klange changed the topic of #osdev to: Operating System Development || Don't ask to ask---just ask! || For 3+ LoC, use a pastebin (for example https://gist.github.com/) || Stats + Old logs: http://osdev-logs.qzx.com New Logs: https://libera.irclog.whitequark.org/osdev || Visit https://wiki.osdev.org and https://forum.osdev.org || Books: https://wiki.osdev.org/Books
SniverDaBest has quit [Quit: Client closed]
vdamewood has joined #osdev
d1rg3_ has quit [Ping timeout: 248 seconds]
Lucretia has quit [Remote host closed the connection]
xliter has joined #osdev
xliter has quit [Quit: xliter]
RootThatBoot has joined #osdev
bauen1 has quit [Ping timeout: 244 seconds]
bauen1 has joined #osdev
Matt|home has joined #osdev
RootThatBoot has quit [Ping timeout: 240 seconds]
sortie has joined #osdev
d1rg3_ has joined #osdev
d1rg3_ has quit [Ping timeout: 272 seconds]
goliath has quit [Quit: SIGSEGV]
gog has quit [Quit: byee]
surabax has quit [Quit: Leaving]
heat has joined #osdev
heat has quit [Ping timeout: 272 seconds]
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
heat has joined #osdev
vdamewood has joined #osdev
bauen1 has quit [Ping timeout: 252 seconds]
bauen1 has joined #osdev
netbsduser` has joined #osdev
netbsduser` has quit [Ping timeout: 276 seconds]
<geist> KERNAL
<heat> KERNIE THE KERNAL
<zid> moaning heath
<ring0_starr> kof673: ramfs is supposed to be an entire filesystem though. how does it organize files and directories, it'd have to use the vfs for that, no? the ram part is just the store
<zid> I initialized my ehci controller, but I bet his usb stick is lowspeed and I have to hand it off to the uhci controller and write that too :(
<ring0_starr> kind of seems like ramfs is silly for that reason, ram has nothing to do with a file system
<geist> ring0_starr: well it has no on disk structure and no mechanism to interface with a b lock devices
<geist> it's basically pre-initialized with contents
<geist> but entirely in memory
<zid> I use ramfses as an actual fs, mainly as part of RAID arrays with --write-mostly against a loopback mapped file. basically page cache that can't be evicted
<zid> plus you know, livecds
<heat> fun fact tmpfs can be evicted
<ring0_starr> by the way when we say ramfs, do we mean tmpfs or memfs
<heat> usually tmpfs because memfs is ass
<geist> and of course on other OSes its called something else
<ring0_starr> err
<ring0_starr> no ramfs is just ramfs, i was thinking of memfd
<zid> getting a ramfs on windows used to need a third party driver, I used it to make battlefield 2 load faster
<zid> so I could get the jets
<heat> on linux tmpfs is actually called shmemfs
<heat> (anonymous shared mappings use it)
<ring0_starr> tmpfs could be placed in nonvolatile storage
<heat> and there's a separate, MINIMAL, ramfs
<heat> tmpfs != /tmp
<heat> anyway, as to your actual question
<heat> >how does it organize files and directories, it'd have to use the vfs for that, no?
<heat> yep that's it
<ring0_starr> tmpfs on /tmp type tmpfs (rw,nosuid,nodev,size=8163072k,nr_inodes=1048576,inode64)
<heat> non evictable inode cache, page cache, dcache
<geist> especially with the linux vfs structure
<ring0_starr> right, my point being the only reason why ramfs is so simple on linux is because all the necessary abstractions already exist from vfs
<geist> no disagreement here
<ring0_starr> but otherwise the backing store is de-coupled from the filesystem itself
<ring0_starr> linux has memory devices i think right?
<ring0_starr> like /dev/md0 on bsd
<heat> possibly, dunno how you'd create one though
<heat> the trivial-est way would be a loop device on a tmpfs/ramfs
<ring0_starr> so you can in theory have ext4 running in memory only
<klys> so daylight savings time means 1:59am skips to 3:00am tonight.
<zid> american dst right
<klys> correct
<zid> yea, it's march 30th here
<heat> ring0_starr, sure, terrible idea though
<heat> there's no reason to use mfs when you can just... not
<ring0_starr> dont care
<ring0_starr> want loose coupling because it's architecturally better
<ring0_starr> point is you can do that because your abstractions are good
<zid> I have no fucking clue when my book releases tomorrow now
<zid> heat: When onyx ehci?
<geist> echi is for sillies
<zid> I wanted to load /bin/init and I decided the easiest way to do that would be to load it off the same usb stick we're booting from
<nikolar> xhci?
<heat> i dont know
<heat> im working on coredumps now
<zid> because ehci is so much easier than cpio
<heat> i haven't written a driver in aaaaaaaaaaaaaaaages
<zid> I think I have the controller kind of alive? but idk how to do the USB bit yet
<zid> actually talk usb
<zid> haven't even found what to talk to yet :D
<heat> my last proper driver was nvme in 2022
<geist> aaaaaages
<heat> 3 years man
<heat> geist, why do zircon coredumps dump a bunch of json in PT_NOTES
<heat> roland keeps surprising me
<geist> heh
<geist> JSSSSSONNN
<heat> i recently learned he made up buildids
<bslsk05> ​fedoraproject.org: RolandMcGrath/BuildID - Fedora Project Wiki
<geist> huh! interesting
<heat> it's a clever way to avoid dumping a bunch of memory you wouldn't need to otherwise
d1rg3_ has joined #osdev
FreeFull has joined #osdev
<zid> good news, intel can't spell periodic
<mpetch> periodically Intel can't spell.
<zid> more or less
<mpetch> lol
<zid> good news, they didn't even fix it between ich7 and ich9 either
<zid> where's my ich4 manual..
<zid> nope, somehow *introduced* between ich4 and ich7
GeDaMo has joined #osdev
heat has quit [Ping timeout: 252 seconds]
<bslsk05> ​www.theregister.com: Kernel saunters – Apple rearranges XNU kernel with exclaves • The Register
<ring0_starr> that's KERNAL sanders to you
<geist> interesting
<ring0_starr> send_fried_chicken(2)
<ring0_starr> asking the kernal to gimme dat kfc
<GeDaMo> https://randomaugustine.medium.com/on-apple-exclaves-d683a2c37194 "Do not confuse the Secure Enclave with the subject of this article, Secure Exclaves!"
<GeDaMo> I had, in fact, been reading exclave as enclave :/
<bslsk05> ​randomaugustine.medium.com: Just a moment...
<bslsk05> ​www.df-f.com: Tracing Back to the Source | SPTM Round 3 — Dataflow Forensics
<kof673> ring0_starr, you are wildly overestimating my status. might as well be an array. only way it is an "FS" is I will hook up stdio to it, read-only. that's it. fopen("ramfs:foo:/somewhere/bar"); that's it lol
<ring0_starr> then you've implemented memfd_create()
<kof673> c89 don't have no fds
<ring0_starr> so in your thing you are only exposing iso C standard interfaces?
<ring0_starr> heh
<kof673> for now, the only reason i mentioned nikolar asked a long time ago what to use critical bit tree for
<kof673> it would let you easily cycle through everything under a path, if desired
<kof673> interface does not matter so much, just that it is transparent, is the purpose. does not need "mounts" yet even
Lucretia has joined #osdev
<kof673> it is a case of writing a script to generate a structure that is compiled in......that's it :D not something interactive they create :D
<kof673> compile-time, built-in
<kof673> part of the binary ;D
vdamewood has quit [Ping timeout: 245 seconds]
vdamewood has joined #osdev
d1rg3_ has quit [Ping timeout: 260 seconds]
leon has quit [Ping timeout: 265 seconds]
demindiro has joined #osdev
<demindiro> Is it possible to have a dynamically linked symbol without that symbol being part of any library (or maybe some fake library instead)?
<demindiro> Alternatively, I'll just pass a pointer to the program entry function but I do wonder about the dynamic linking approach
<zid> where would it be then
<demindiro> My particular usecase is for the kernel to provide the symbol when it loads the ELF file
<zid> I know what a dynamically linked symbol means, and I know what "not being part of any library" means, but I don't understand what that would mean when put together. Other than a "cannot find symbol _blah"
<zid> If you want reverse binding, dlopen can do that
<zid> RTLD_GLOBAL or whatever it's called, makes the thing you run provide its symbols to things it loads. useful for plugin architectures
<zid> so you might have emulator.exe: main.c + plugin_loader.c + library.c then plugin0_main.c which implements plugin_write, plugin_read, and uses 'library' functions from emulator.exe which has loaded it
<demindiro> What I need is more like linux-vdso
<demindiro> From what I understand libc handles linking the VDSO thing, but I wondered if the kernel could do it by itself reasonably
<zid> that's exactly how .so's normally work though
<demindiro> Except linux-vdso doesn't actually exist on my filesystem
<zid> it's just whether it got injected by ld.so or the kernel
<zid> all the linking is 100% normal
gog has joined #osdev
leon has joined #osdev
goliath has joined #osdev
q3lont has joined #osdev
Left_Turn has joined #osdev
demindiro has quit [Quit: Client closed]
Gordinator has joined #osdev
GordinatorG has joined #osdev
Gordinator has quit [Read error: Connection reset by peer]
heat has joined #osdev
surabax has joined #osdev
vinleod has joined #osdev
vdamewood has quit [Ping timeout: 272 seconds]
eddof13 has joined #osdev
eddof13 has quit [Client Quit]
user71 has joined #osdev
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
leon has quit [Read error: Connection reset by peer]
leon has joined #osdev
fedaykin has quit [Quit: leaving]
fedaykin has joined #osdev
d1rg3_ has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 268 seconds]
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 272 seconds]
Arsen has quit [Quit: Quit.]
qookie has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
q3lont has quit [Ping timeout: 244 seconds]
q3lont has joined #osdev
heat_ has quit [Read error: Connection reset by peer]
heat_ has joined #osdev
fedaykin has quit [Ping timeout: 252 seconds]
xenos1984 has quit [Ping timeout: 268 seconds]
xenos1984 has joined #osdev
xenos1984 has quit [Ping timeout: 246 seconds]
xenos1984 has joined #osdev
q3lont has quit [Ping timeout: 245 seconds]
Arthuria has joined #osdev
teroshan has quit [Quit: Ping timeout (120 seconds)]
teroshan has joined #osdev
Arsen has joined #osdev
qookie has joined #osdev
Arthuria has quit [Ping timeout: 268 seconds]
Turn_Left has joined #osdev
craigo has quit [Ping timeout: 252 seconds]
Left_Turn has quit [Ping timeout: 244 seconds]
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 260 seconds]
msv has quit [Remote host closed the connection]
msv has joined #osdev
Arthuria has joined #osdev
netbsduser` has joined #osdev
Marsh has joined #osdev
MiningMarsh has quit [Ping timeout: 248 seconds]
Marsh is now known as MiningMarsh
user71 has quit [Quit: Leaving]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 244 seconds]
fedaykin has joined #osdev
MiningMarsh has quit [Quit: ZNC 1.9.1 - https://znc.in]
MiningMarsh has joined #osdev
MiningMarsh has quit [Client Quit]
MiningMarsh has joined #osdev
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
troseman has joined #osdev
troseman has quit [Quit: troseman]
GordinatorG has quit [Quit: My client has closed - perhaps I did that, perhaps I didn't]
troseman has joined #osdev
beto has quit [Quit: bye bye.]
beto has joined #osdev
goliath has quit [Quit: SIGSEGV]
<MrBonkers> systemd on Managarm: https://imgur.com/a/E2Vca8b
<heat_> haha congrats
vinleod is now known as vdamewood
<Ermine> congrats! waiting for a blogpost with details
<heat_> kids these days just want some blogposts
<MrBonkers> given our blog writing pace, that might be a while :^)
<no92_leo> yeah
<Ermine> i mean, there's a bunch of questions, like what works, what doesn't, what did you have to implement (like, cgroups?)
<Ermine> so i'm not asking for a tiktok
<no92_leo> I mean we can prob give you some answers right here
<no92_leo> but to answer some of that, the cgroup (v2) impl needed is super duper basic
* Ermine also preemptively ticks "systemd" from #osdev bingo card
<no92_leo> it was mostly fixing a _load_ of unix socket issues
<no92_leo> but generally fixing soooo many bugs
<heat_> boogz
<MrBonkers> yep, lots of bugs
<MrBonkers> cgroupv2
<MrBonkers> we already had epoll, timerfd, netlink and friends
<Ermine> what about namespaces?
<no92_leo> not required
<no92_leo> we just return ENOSYS on namespace stuff
<heat_> Ermine, *bernie voice* i am once again asking for your support
<MrBonkers> to answer what works, this is a minimal build, so just udevd and the main binary
<MrBonkers> and journald and tmpfiles
<MrBonkers> so no logind, no homed, no other random systemd stuff
<MrBonkers> I do plan on getting logind up and running, the rest idk if I want that yet
<Ermine> i guess stuff like selinux/seccomp/prctl features/other hardening stuff is also not required?
<MrBonkers> yes
<MrBonkers> selinux, seccomp is disabled
<MrBonkers> same for audit, apparmor and the likes
<MrBonkers> we implemented a few prctl's
<no92_leo> I implemented one prctl call, that's it
<MrBonkers> and we stubbed all the libcap related items
<no92_leo> PR_SET_PDEATHSIG is wanted by udev
<Ermine> heat_: you want me to bring up systemd
<Ermine> or is it SCM_RIGHTS reminder?
<heat_> no, i want you to implement epoll
<heat_> thanks!
<Ermine> MrBonkers, no92_leo thank you for answers!
<heat_> jk i can do epoll, you do timerfd, then we work on netlink together
<MrBonkers> feel free to ping me if there's more
<no92_leo> feel free to reach out for questions on such items
<heat_> epoll is actually scary
<heat_> it seems edgecase prone
<heat_> the rest, meh pretty easy probably
<heat_> i have clone now
<no92_leo> the netlink stuff took a while to get right but it's very doable, strace'ing on linux is your friend there
<heat_> netlink i'm not so concerned about, theres an RFC and freebsd has it too
<no92_leo> managarm's epoll impl is fairly succinct I would say, and it holds up quite well so far
<MrBonkers> fork > clone (systemd approved of it)
<heat_> it's large, but doable
<heat_> no92_leo, do you have a link?
<no92_leo> one sec
<bslsk05> ​github.com: managarm/posix/subsystem/src/epoll.cpp at master · managarm/managarm · GitHub
<heat_> oh wow that's insanely small
<Ermine> when i have nothing to say, i pick on naming
<Ermine> so, you may want s/posix/linux/ :)
<no92_leo> well it's the posix server :^)
<heat_> an epoll implementation that uses boost and std::cout may very well get you arrested in some jurisdictions
lukflug has joined #osdev
<no92_leo> ah we never switched to our own intrusive list impl
<no92_leo> we wanted to get rid of boost there for a while and never got around
<Ermine> heat_: perk of microkernals btw: you can use userspace libs
marv7000 has joined #osdev
<kof673> "god made the world in 6 days and was arrested on the 7th" -- devil's dictionary
<heat_> Ermine, "perk"
<Ermine> you can even write driver in JS!
<heat_> i'm dealing with a non-deterministic segfault in dash that i can only repro with huge fucking autoconf scripts
<heat_> shoot me
<Ermine> minimalist shell crashes?
<Ermine> preposterous!
<heat_> i think it's BLOATED KERNEL caused
<Ermine> your kernel is pretty much MINIMAL i'd say
<Ermine> anyway, i guess you next step is to implement ptrace probably
<heat_> my kernel is definitely not MINIMAL
<heat_> please no
<heat_> ptrace might just end me
<MrBonkers> ptrace? the horror
<heat_> i guess you dont have it in managarm?
<MrBonkers> nope, but we have our own ways of debugging managarm applications
<MrBonkers> the most recent addition is dumping all requests to a file, turning it into a pcap and feeding that into wireshark
<heat_> i just now added coredumps to onyx
<heat_> which is neat but i need to get gdb up and running as well
<heat_> plus enabling debuginfo packages on a few of them
<no92_leo> yeah the wireshark dissecting of IPC with its filtering is amazing
<MrBonkers> we can gdb using gdbserver, if an application dies and if configured to launch gdb on it, we can connect gdb on the host to managarm and pull backtraces from there
<Ermine> so you need to get your core dumps on the host?
<no92_leo> we should implement gdb over USB-serial adapters soon too :^)
<heat_> so you have gdb?
<MrBonkers> it's not a coredump really, if we coredump on the host qemu decided to die :^)
<no92_leo> we run a gdbserver over serial if something dies
<Ermine> my question was addressed to heat_
<MrBonkers> we have a way to pull backtraces from userspace apps with gdb, but not a full gdb that we can run programs in and step through it
<heat_> Ermine, yep atm i can dump under onyx but no gdb
<heat_> eu-readelf is kinda handy atm though
<heat_> in the process of trying to compile gdb i'm running into crashes i think are old
<no92_leo> how much of that work is already upstream?
<Ermine> none ig
<heat_> yeah none
<heat_> Soon(tm)
<no92_leo> ooooh you dabbled with skylake iGPUs?
<heat_> yep
<heat_> a looooong time ago
<no92_leo> that's sick, I should get back to fixing up my work on that, we wanted to have lil be a library where you implement a few sysdep functions that offers a DRM-esque interface to modeset intel GPUs
<no92_leo> it's stuck where we can modeset some stuff but we get artifacting on page flips
<heat_> i'm planning on just porting drm
<heat_> with a little compat shim around it
<no92_leo> I'd be very interested in seeing how much work that would be for a hobby OS
<heat_> my kernel is already pretty complete
<heat_> i just need to put in the work and implement the things i haven't implemented yet (workqueues come to mind)
<heat_> very few kernels have RCU :)
trillion_exabyte has quit [Ping timeout: 272 seconds]
trillion_exabyte has joined #osdev
netbsduser` has quit [Ping timeout: 248 seconds]
<Ermine> gotta run it on vbox one day
gog has quit [Quit: byee]