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
ZetItUp has quit []
leoh has quit [Ping timeout: 240 seconds]
leoh has joined #osdev
netbsduser has quit [Ping timeout: 260 seconds]
hydrocarboxide has quit [Remote host closed the connection]
Matt|home has quit [Quit: Matt|home]
edr has quit [Quit: Leaving]
zid has joined #osdev
jcea has joined #osdev
no92_leo1 has joined #osdev
no92_leo has quit [Ping timeout: 268 seconds]
no92_leo1 is now known as no92_leo
leoh has quit [Ping timeout: 276 seconds]
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karenw has joined #osdev
vdamewood has joined #osdev
karenw has quit [Quit: Deep into that darkness peering...]
leoh has joined #osdev
jcea has quit [Remote host closed the connection]
jcea has joined #osdev
Yoofie6464463823 has joined #osdev
jcea has quit [Client Quit]
Yoofie6464463823 has quit [Read error: Connection reset by peer]
Yoofie6464463823 has joined #osdev
c0co has quit [Ping timeout: 252 seconds]
jcea has joined #osdev
Artea has quit [Remote host closed the connection]
dza has quit [Quit: Ping timeout (120 seconds)]
msv has quit [Quit: Leaving]
jcea has quit [Ping timeout: 252 seconds]
itrsea has quit [Remote host closed the connection]
itrsea has joined #osdev
Artea has joined #osdev
msv has joined #osdev
dza has joined #osdev
leoh has quit [Ping timeout: 276 seconds]
eluks has quit [Remote host closed the connection]
eluks has joined #osdev
leoh has joined #osdev
<Ermine> nova is the way
<klys> > The New Rust-Written NVIDIA "NOVA" Driver ??
<klys> > NOVA Microhypervisor ?
<Ermine> first one
dude12312414 has quit [Remote host closed the connection]
goliath has joined #osdev
leoh has quit [Ping timeout: 276 seconds]
<zid> Is it more than 10 lines yet
GeDaMo has joined #osdev
<Ermine> heat: modprobe -r amdgpu
<nikolar> zid: who needs any display output anyway, right
<zid> but it's written in rust. So all those black pixels? Concurrently black, safely
<nikolar> and blazingly fast
<Ermine> then it goes supernova and your screen turns white
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Lucretia has joined #osdev
<nikolar> no
<nikolar> it goes super nova and the whole solar system gets nuked
netbsduser has joined #osdev
<heat> [418799.051713] [ T2777] WARNING: CPU: 11 PID: 2777 at drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:205 fill_dc_mst_payload_table_from_drm+0x92/0x130 [amdgpu]
<heat> another day another amdgpu warn
<heat> this time, from the laptop
<zid> amd drivers PROFOUNDLY STABLE
averymt has joined #osdev
<Ermine> heat: send logs plox
<Ermine> though 6.16 is going to be released this sunday
<heat> i've heard of even worse amdgpu bugs in -rc1 or -rc2
<heat> so lol
itrsea has quit [Remote host closed the connection]
itrsea has joined #osdev
<Ermine> btw i don't remember what the value after slash means in symbol_name+0xa/0xb
<heat> symbol size
<bslsk05> ​paste.opensuse.org: openSUSE Paste
<heat> i got a fucked up display when resuming too, it was great
<Ermine> do you have displayport monitor?
<heat> yeah
<heat> on a thunderbolt dock
<heat> (which is why I assume it's using MST)
<zid> yea all the bug reports are on usb-c docks on displayport
<zid> (I googled the function name)
<zid> your kernel is just ancient
<heat> i'm on 6.15.6
<zid> why are you not on 6.16-rc7 + amdgpu -next?
<heat> because i'm not a WARN fan
<mjg> WARN?
<mjg> big W
<zid> I have direct emperical evidence that you are
<heat> i do get a lot of WARNs but i really am not enjoying them at all
<Ermine> hm, ASSERT failure leads to WARN?
<heat> i dont even know where they got this macro
<bslsk05> ​elixir.bootlin.com: Making sure you're not a bot!
<Ermine> but amdgpu's does WARN_ONCE and sets their breakpoint
<heat> good, that's so you don't actually see the warnings per second
<heat> (this is how AMD competes with nvidia)
<Ellenor> xD?
<mjg> hm
<mjg> i wonder if it would make sense to in fact count these warns
<Ermine> TODO: refactor to set link->mst_stream_alloc_table directly if possible
<mjg> something like "fyi happened twice already, not logging anymore mofer"
<mjg> ultimately you don't know if the lol condition is something you keep running into or not
<mjg> even if things appear to work
<heat> you're welcome for the idea
<heat> don't forget to add my Suggested-by
<mjg> i would much rather point out a typo
<mjg> and Co-developed-by:
<heat> forgot to test?
<heat> Tested-by: is not optional
<mjg> test is another department
* FireFly . o O ( Commit-trailers-added-by: )
<sortie> Coming This Summer: The Commit You Never Would Have Expected
<Ellenor> KIO ECH?
<Ellenor> sorry
<Ellenor> what even?
<mjg> lemme tell you waht the shitiest fs is on the planet
<mjg> ext in onyx
<sortie> how dare you
<sortie> onyx is web scale
<mjg> the bar is that high mon
<mjg> the worst fs out there is so good google could be using it
<mjg> they just happen to not do it
<heat> what's wrong with my ext2 :(
<heat> i mean, multiple things, it's not great
<heat> but it does the job and i've spent quite a while making it not crap itself out
<mjg> in that case you outdid linux 2.4
<heat> i really want journalling but it'll take some effort
<heat> i would like to ditch my struct bufs but i need some other way of tracking dirty "data" blocks in the page cache
<heat> it's weird
<heat> maybe could have them optionally attached
<mjg> idk have you tried doing some more work on linux
<heat> i'm doing that right now
<heat> hbu
<mjg> you brown nosed your way into being a revieewer and now are doing nothing!
<heat> you're lame and a poopyhead
<pog> can i run docker scalable microservice deployments on onyx
<heat> not yet
<heat> i need containers
<heat> and WEBSCALE languages like java
<heat> and golang
<pog> c#
<Ermine> java is webscale?
<heat> java is webscale
<Ermine> surprise
<mjg> rust is zeroscale
<Ermine> anyway, containers would require cgroups...
<mjg> gotta say reddit is not worthless
<nikolar> heat: how can you talk about webscale and not mention js
<nikolar> smh
<heat> nodejs is webscale as well
<nikolar> there we go
<heat> i apologize if you were mislead for a while
<heat> Ermine: cgroups yeah, plus namespaces
<heat> gotta say we're a little off the Glorious Container Future
<nikolar> good
<heat> mjg: are bind mounts exactly the same as regular mounts internally, but with a different mnt root?
<mjg> on linukkz? i don't know all the details, i'm a bsd man
<nikolar> how does bsd do it then
<mjg> i'm not going to rant about it
<heat> dont ask that nikolar
<heat> you'll be disappointed
<heat> yeah exactly
<nikolar> lo
<mjg> it's a "layered filesystem"
<heat> probably two different filesystems
<heat> exa-fucking-actly
<heat> see, i know BSD like the palm of my hand
<heat> you can't specfs me away
<mjg> the idea probably made sense early on
<mjg> conceptually i mean
<mjg> but it came with so many fucking problems they should have aborted it
<mjg> bottom line for you nikolar is that this shit was so buggy for so long that it still has issues on netbsd
<mjg> openbsd literally gave up trying to fix it
<nikolar> so no bind mounts on open?
<mjg> nope
<nikolar> nice
<mjg> literally no functionality of hte sort
<nikolar> well better to yeet it than to have it broken i guess
<mjg> for liek 15+ years now i think
<mjg> certainly, but these are not the only 2 options
<mjg> :d
<nikolar> lol true
<mjg> this got realtiavely stabilize on freebsd
<mjg> and by that i mean it basically works, but is slow af and still has user-visible lollers
<heat> mnt->mnt.mnt_root = dget(root);
<heat> yep exactly what i said
<heat> it's just an exact clone of the other mount, but with a weird root
<mjg> hey it's been 20 years!
<bslsk05> ​undeadly.org: RIP stackable filesystems
<mjg> "d
<mjg> > Marius adds: "we will replace the missing functionality (that is also needed..) with other solutions that are more sane."
<mjg> where the feature at Marius
<heat> he works at facebook now
<bslsk05> ​www.linkedin.com <no title>
<mjg> does this mean facebook is in fact on openbsd? :thinkingface:
<heat> surely
<heat> wasn't whatapp on freebsd?
<heat> or was it snapchat
<heat> "WhatsApp is no longer running FreeBSD. Prior to acquisition, everything was bare metal managed hosting at SoftLayer and we had all FreeBSD except one Linux host for reasons I can't remember (maybe an expirement for calling?). After acquisition, there was a migration to Facebook hosting that included moving to Facebook's flavor of containerized Linux."
<mjg> well that was a given after the acquisition
<nikolar> heat: i think netflix is on free
<heat> maybe facebook should have started using freebsd
<mjg> nikolar: content boxen are on free
<mjg> the CLOUD is linux
<nikolar> ah
<nikolar> ZFS BABY i guess
<mjg> no
<mjg> they are on ufs
<kof673> i think webscale is kind of relative...in the sense that smaller places it just means 'use high level language, buy more hardware if too slow"
<mjg> because there is poor af caching
<heat> hahahahaha
<nikolar> kek
<kof673> java was enterprise too, anyways
<nikolar> no, no
<nikolar> not enterprise
<nikolar> webscale
<nikolar> pay attention
<kof673> that's because you are young
<heat> the content boxen aren't the ones storing
<kof673> ti was enterprise buy a fancy solaris machine :D
<heat> they're the ones pushing shit tons of content
<kof673> this linux thing is not going anywhere
<nikolar> heat: oh right
<nikolar> i don't know the netflix infra lol
<heat> they basically have their own CDN
<bslsk05> ​redirect -> medium.com: Just a moment...
<heat> where they push the packets, and that's freebsd AFAIK
<nikolar> interesting
<mjg> they are pushing from ufs with hardware offload for most of it
<mjg> including TLS
pebble has joined #osdev
<bslsk05> ​freebsdfoundation.org: Maintaining the World’s Fastest Content Delivery Network at Netflix on FreeBSD​ | FreeBSD Foundation
<mjg> lemme tell you someting GeDaMo
<mjg> you ever heard of NETSCALER
<mjg> that's on freebsd for a decade+
<GeDaMo> It's not ringing any bells
<mjg> one of their main folk attended a freebsd c onference last year talkinig about it
<mjg> one of the final remarks is that they are moving to linux
<mjg> :D
<heat> mjg: hw offload is a given
<heat> for any system, even linux
<sortie> movies on bsd? this must be the future
<heat> you can't push lots of packets with super fancy NICs and intense amounts of offloading
<heat> s/with/without/
<bslsk05> ​<heat*> you can't push lots of packets without super fancy NICs and intense amounts of offloading
<mjg> i am saying freebsd is just a thing layer around the actual shit doing the real work
<mjg> s/thing/thin/
<bslsk05> ​<mjg*> i am saying freebsd is just a thin layer around the actual shit doing the real work
<mjg> ofc some perf characteristics 'n quality have to be there, but it's not really the system itself making perf happen
<sortie> My takeaway is that I need to put 'Challenge / Solution / Impact' sections on the Sortix website
<GeDaMo> More bullet points! :P
<sortie> sortix end-user-stories
<mjg> maybe you could write a success story of self-hosting sortix
<sortie> geist I need me some proxmox quotes stat for publication
<heat> Apache/2.4.63 (FreeBSD) OpenSSL/1.1.1w-freebsd
<heat> damn i was so hoping this was linux
<sortie> mjg, not a bad idea for a blog post. Uh, what kind of self-hosting? self-build or the actual website? I do a lot of, uh, things that count as self-hosting
<mjg> heat: :D
<sortie> :D
<mjg> sortie: well if you are serious, i would start with an overview how the infra is on sortix
<mjg> heat: fun fact is that there was a time period where openbsd.org was hosted on solaris or linux
<GeDaMo> You could write a blog post about the different things that could be called self-hosting :P
<sortie> Hey that's a good angle on it
<mjg> heat: but that was for financial reasons
<kof673> hotmail ran freebsd IIRC
<kof673> those were the days of netcraft confirms :D
<sortie> GeDaMo: I've somehow reached the osdev level where I can literally run all of the osdev.org infrastructure, uh, including #osdev
<heat> it uses openbsd httpd now
<mjg> heat: as in they could not self-host, but got donated hosting so they took it
EmanueleDavalli has joined #osdev
<mjg> btw
<mjg> since you visited freebsdfoundation.org, you used freebsd for a little bit
<mjg> how does it feel
<heat> awful
<heat> i can feel the kern_sysctl.c
<mjg> OH
<mjg> but it's such a good file bro
<mjg> i mean surely it was not always such a bad idea
<mjg> :X
<mjg> if you are so smart how do yo udo sysctl in onyx motherfucker
<heat> i don't
<heat> if i ever need to i'll just pull out the good ol procfs
<pog> put that away
<heat> 🚨🚨pseudo fs hater spotted 🚨🚨
<mjg> you just don't get it 💅
<kof673> ^ yeah, i interpreted it more "not in front of the children"
<heat> the children can't see fake filesystems? the children can't find out everything is a file?
<heat> puritan world view
<GeDaMo> The children don't know about files and directories any more :|
<mjg> i heard about that
<pog> father i can't click book
<mjg> i believe it
<bslsk05> ​futurism.com: Gen Z Kids Apparently Don't Understand How File Systems Work
<mjg> i met people who did not understand that "desktop" on windows is ultimately a folder somewhere
<pog> also everything being a file is plan9 brained
<mjg> in my custom OS everything is a piece of shit
<mjg> it is superior in that i don't need to adhere to file semantics
<sortie> kernel TLS sounds scary
<mjg> to be clear, it's not thread local storage :d
<sortie> I actually do scary thread local storage in the Sortix kernel
<heat> the tricky bits (negotiation) aren't done in kernel space
<heat> at least for linux
<bslsk05> ​tls13.xargs.org: The Illustrated TLS 1.3 Connection: Every Byte Explained
<nikolar> heat and i are gen z and we know how file systems work
<nikolar> right heat
<heat> i don't think i do, sorry
<nikolar> dang
<GeDaMo> Damned kids, get off my LAN, etc. :P
<heat> i'm not on your LAN
<nikolar> neither am i, smh
<mjg> bro
<mjg> i hosted lan parties on BNC
<mjg> for the genz out there, it meant it was SHIT AF
<mjg> but there is an extra factor
<mjg> we did not have properly sorted out cables
<pog> as in 10base2?
<nikolar> lol
<nikolar> coax for the win or something
<mjg> instead i was gluing them with TAPE to bnc connectors
<GeDaMo> A connector for each machine and a terminator at each end, what's to sort out? :P
<mjg> we had liek 10 boxen
<mjg> and it would stop working from time to time if ANY connection fell off
<mjg> :d
<nikolar> kek
<mjg> so
<mjg> my sister was around 7 at the time
<mjg> she would keep trying to walk into the room, the network would stop working
<mjg> and it would pick back up after she left
<nikolar> lol
<mjg> it became kind of a meme to the point where neighborhood kids would tease her about it
<GeDaMo> A company I worked for sold Omninet systems, the connectors were cheap and had no kind of latching, eventually the engineers took to cutting off the connector and soldering the cable direct to the card :|
<mjg> i knew people who did networking in college dorms in my uni
<mjg> they told me people kept fucking with connectors on purpose
<mjg> the interesting bit was that at some point they got sponshorship to modernize all this shit, ye
<mjg> not only they got real ethernet there
<mjg> but were donated cisco switches, sunfire servers
<mjg> you literally got minature enterprise datacenters in each dormitory
<mjg> a lot of it was also piece of shit PLANET equipment tho
<mjg> :d
<mjg> here is a story heat is gonna like
<mjg> so i was buds with one of the dorm admins, ya
<mjg> guy would charge new people for getting connected to the network
<mjg> the price was an equivalent of one meal at the time
<mjg> so nobody was getting poor from it, but the guy got himself drinking budget for a month
<mjg> guy was a POS
<mjg> but within reason :p
<kof673> there's probably a law of the universe anything not explicitly unchargeable will be charged for
<mjg> i don't believe in karma
<mjg> i mean look at trump :d
<mjg> unless he is secretly the greatest guy ever
<kof673> i didn't mean that, but i appreciate the double meaning :D but that is further evidence, back-charging you for a supposed prior existence
<kof673> hegelian synthesis requires two sides :D devil's dictionary, opposition needs nailed down to their seats
<heat> i didn't like the story
<heat> boooooooooooooo
<heat> boooooooooooooooooooooooooooooooo
jcea has joined #osdev
edr has joined #osdev
<PublicWiFi> do you guys know if there's any turnkey tools to format a disk to 7th edition unix filesystem? :D
<PublicWiFi> very niche I know lol
<heat> knowing the sort of filesystem it would probably be easier if you write your own mkfs
<PublicWiFi> probably
<PublicWiFi> I'm wanting to move toward an inode table filesystem setup and fat16 aint that :P
<PublicWiFi> wanted to experiment with unix stuff to see how it works
<nikolar> might as well go straight to ext2
<nikolar> there's plenty of tooling and it shouldn't be hard
<PublicWiFi> that's kinda what I was thinking but I'm wondering if the overhead on this 8-bit system would be too great
<heat> yeah, agreed
<heat> oh
<heat> yeah
<PublicWiFi> :S
<nikolar> kek, that's an important detail
<PublicWiFi> lol sorry fellas :D
<PublicWiFi> fat16 is already pretty rough on this z80
<nikolar> the filesystem operations themselves?
<PublicWiFi> maybe i should just roll my own horrible bad awful fs :D
<nikolar> i don't think fat16, however horrible it is, should be a problem for z80
<heat> isn't FAT8 a thing?
<nikolar> barely i think?
<PublicWiFi> if I keep the drives 32MB or lower than it cuts down the overhead by a lot
<PublicWiFi> since the sector count can fit in a 16-bit register
<averymt> hmm, I think SLFS might have some tools for that? although it might be easiest to just run 7th in SIMH and convert the disk back to raw
<PublicWiFi> most osdev stuff is inode centered
<PublicWiFi> so im not sure how to handle that sort of thing with FAT
<nikolar> averymt: if he intends to use v7 ffs or whatever it was called, he'll want proper tooling
<nikolar> ie, not running v7 unix in simh
<PublicWiFi> it was mostly just for experimenting
<PublicWiFi> i didn't really wanna run the filesystem perm
<heat> basically, for v7
<heat> imagine ext2
<heat> but crap
<PublicWiFi> LOL
<nikolar> i think bsds might even have some support for older unix FSs
<heat> i'm being super honest here
<averymt> https://github.com/glfs-book/slfs here's the link if you want to check
<bslsk05> ​glfs-book/slfs - This book is dedicated to supplementing an LFS, MLFS, BLFS, and/or GLFS x86-64 system by providing package not found in the other LFS books. (5 forks/6 stargazers)
<PublicWiFi> no i appreciate it
<PublicWiFi> lol
<heat> it *wasn't* good
<nikolar> it worked
<nikolar> and that's what counted then lol
<heat> number of inodes, etc were tied to the architecture you were compiling with
<heat> as in hardcoded
<averymt> I haven't heard of any such packages in there, but I know there *is* quite a bit of older unix source-available software patched and ported
<heat> and, like. 20 char directory entries or something? something awful like that
<PublicWiFi> the zeal 8-bit project has their own fs that looks interesting, but it doesn't use an inode system IIRC
<bslsk05> ​Zeal8bit/ZealFS - A simple file system for small storage, that can be implemented on 8-bit computers (6 forks/49 stargazers/Apache-2.0)
<PublicWiFi> its geared towards z80 ofc, so file sizes and disk sizes are small
<nikolar> PublicWiFi: if you want a dead simple inode system, you can just make up one in an afternoon
<PublicWiFi> he also splits the sectors into pages
<PublicWiFi> well its more of how to handle it with FAT, I can't really store inode table info directly on disk ya?
<PublicWiFi> and memory is very limited so I can't keep a running table or something
<PublicWiFi> so my issue is an abstract one
<nikolar> what's "inode table info"
<nikolar> and why couldn't you stoer it
<PublicWiFi> how to handle the differences in the filesystem dichotomies
<PublicWiFi> doesn't ext2 and ect have specific places for you to store inodes on disk?
<PublicWiFi> FAT has something similar but not really the same
<nikolar> sure
<nikolar> and metadata about that region is stored in the superblock
<PublicWiFi> fat16 equiv would be the MBR
<PublicWiFi> I think
<nikolar> not really, no
<PublicWiFi> rip
<nikolar> unless it's doing something weird
<nikolar> (i don't know much about fat16 in particular, but i can't imagine it storing crucial info in the mbr)
<PublicWiFi> hmm
<PublicWiFi> ima keep reading, ill figure it out!
<PublicWiFi> I looked up how linux handles fat16 and I found this post
<bslsk05> ​unix.stackexchange.com: Just a moment...
<PublicWiFi> it helped a little but I'm still fuzzy on the details I think
<nikolar> to summarize: linux just makes inode numbers up out of thin air
<nikolar> while potentially checking for collisions
<nikolar> ie, it's literally doing the dumbest possible thing
<PublicWiFi> yes
<nikolar> so you're probably overthinking it
<PublicWiFi> but I wonder if its just "emulating" inode behavior
<PublicWiFi> probably lol, that's my go-to that's for sure
<heat> what do you mean
<PublicWiFi> I dont know what I mean
<PublicWiFi> LOL
<PublicWiFi> I'm so sorry fellas
<PublicWiFi> these abstract ideas wreck my brain for some reason
<heat> ok
<PublicWiFi> maybe I should just load the fat16 metadata into my inode struct as good as I can and call it a day
<nikolar> how else would you do it
<PublicWiFi> throw away this z80 and get an x86 machine and use ext2
<PublicWiFi> :D
<nikolar> the cpu is entirely irrelevant for this
<PublicWiFi> strictly speaking, yes
<nikolar> if you want to be clever, you can derive the inode number from the fat16's metadata struct
<PublicWiFi> I think my issue is that I don't think I truly understand inodes and need to read more
<nikolar> probably
ZetItUp has joined #osdev
<PublicWiFi> thanks for your guidance fellas
<PublicWiFi> itll click in my brain one day haha
<averymt> well, if you feel like that, *and* you've read some code doing what you think you want to, and you still don't understand, then you're probably correct
pebble has quit [Read error: Connection reset by peer]
<ZetItUp> just curious, are my comments too much for this? https://github.com/ZetItUp/diff_os/blob/main/boot/boot.asm
<bslsk05> ​github.com: diff_os/boot/boot.asm at main · ZetItUp/diff_os · GitHub
<ZetItUp> or should i tone it down?
<nikolar> Who cares?
<PublicWiFi> I think its fine, looks clean
<nikolar> It's your code
<ZetItUp> nikolar: i've gotten told by several people that i write too long comments so just looking for feedback :D
<ZetItUp> gotten? been
<PublicWiFi> idk, it seems fine to me
<PublicWiFi> it really helps with asm imo, cause its easy to get lost in the sauce
<ZetItUp> yeah that too
<PublicWiFi> now if you were in C doing something like `printf("something\r\n"); // printing something
<PublicWiFi> xD
<PublicWiFi> ` <-- missing closer sorry :D
<PublicWiFi> in assembler I also have a little "header" comment block on all my routines that tell me what registers were changed/clobbered, what flags are set/reset, what routines that routine calls, ect
<PublicWiFi> so idk maybe I'm an overcommenter too
<ZetItUp> yeah i kinda want better comments because sometimes i've seen people reading code and they Think they have an idea what something does, but it doesn't
goliath has quit [Quit: SIGSEGV]
tronexte has quit [Ping timeout: 244 seconds]
tronexte has joined #osdev
Left_Turn has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 268 seconds]
c0co has joined #osdev
dude12312414 has joined #osdev
itrsea has quit [Remote host closed the connection]
itrsea has joined #osdev
leoh has joined #osdev
goliath has joined #osdev
leoh has quit [Ping timeout: 240 seconds]
alice has joined #osdev
EmanueleDavalli has quit [Quit: Client closed]
jcea has quit [Ping timeout: 276 seconds]
leoh has joined #osdev
<mjg> sup
<mjg> so is there a sensible tool to find out if there is an exported symbol NEVER referenced outside of the object file which provides it?
<mjg> imagine a big codebase like linukkkz and trying to find stale shit
<mjg> sortie: perhaps you know something? ^^^
<sortie> ldd and readelf perhaps?
<sortie> Not quite my strong suit. heat?
<heat> you need to look at all the .o's
<heat> i'm afraid you can't point it at an executable... maybe there's a DWARF trick to allow something of the sort
<Ermine> linker could be patched to print all leftover symbols
<heat> maybe there's a linker option i don't know about
<mjg> that's what i'm asking about mofers
<mjg> fuck you, i'm gong to ask chatgpt
<mjg> lol chatgpt recommends ld --unused... which does not exist
<mjg> in neither gnu or llvm linker
<GeDaMo> gcc seems to have some 'unused' warning options
<mjg> that's for static shitters
<mjg> for context, your boy heat made a contribution to linux where he removed some func which is no longer used
<geist> all hail heat
<mjg> but that should not be necessary find out by fucken analysis
<mjg> i mean this kind of a leftover should be automatically pointed out by tooling
dutch has quit [Quit: WeeChat 4.6.3]
vai has joined #osdev
vai is now known as Jari--
jeaye has quit [Quit: WeeChat 4.4.3]
jeaye has joined #osdev
tjf has joined #osdev
leoh has quit [Ping timeout: 276 seconds]
itrsea has quit [Remote host closed the connection]
itrsea has joined #osdev
itrsea has quit [Client Quit]
<bslsk05> ​www.gnu.org: Exported Symbols of Shared Libraries (GNU Gnulib)
<mjg> ZetItUp: i want symbols which are exported and NOT use
<mjg> d
ekko has joined #osdev
<bslsk05> ​<Flameeyes> Today: how to identify unused exported functions and variablesAnd here it comes a new post for my technical readers, after a little digression about the Gentoo’s today news, a new post about helping software maintenance by analysis of the resulting binaries. ␤ This time the objective is trying to get rid of functions and variables that are not being used in your codepath. The obvious way to check for this is to use the -Wunuse[…]
<ZetItUp> woah
<mjg> now that's something, thanks
<ZetItUp> he claims it's more work to be done or something at the end, but hopefully it leads you in the right direction :D
netbsduser has quit [Ping timeout: 276 seconds]
netbsduser has joined #osdev
leoh has joined #osdev
agent314 has joined #osdev
averymt has quit [Quit: Quit]
ekko has quit [Read error: Connection reset by peer]
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
goliath has quit [Quit: SIGSEGV]
leoh has quit [Ping timeout: 260 seconds]
scaleww has joined #osdev
leoh has joined #osdev
<Ameisen> geist: you'd said that in your interpreter, you basically emitted a microcode to execute? How did you handle floating point ops - just more microcode instructions? How did you handle self-modifying code?
karenw has joined #osdev
leoh has quit [Ping timeout: 276 seconds]
gildasio has joined #osdev
<kof673> for "my code" i will have markup so i can find function X calls function Y, uses variable Z, etc. and function Y is either "internal" to that "library" or "external" etc. but this is all just "markup" and shell scripts and...what if preprocessor defines determine whether something is called or not? I believe I can handle that but...
<kof673> similar, i want "reflective" ability to know the member types of a struct at run-time. have to handle "optional" or "variant"-type members...preprocessor defines might determine whether a member exists or its type. or it can be both, optional and if it exists, the type varies. this is on top of or aside from using a define as the type.
<kof673> not impossible, i am just doing manual markup on the honor system for now
<kof673> or it is just more to maintain :/
<kof673> same with function arguments. everything in C can potentially vary by defines
<geist> Ameisen: didn't handle self modifying i donmt think, and floating point this was for armv4, so had no FPU at the time
<kof673> i even have a little "dependency" file format + program to query such things, build system might like to know, just generation of such files is manual for now :D
<geist> Ameisen: i dont have the code handy, but basically i would translate ARM code one 4K page at a time into a 1:1 unpacked mapping, kinda VLIW looking
<geist> this would allow things like fixed branches to point directly to the next page, or things that immediate load to just put an immediate in the register, etc
<geist> and didn't have to drill through the 3 or 4 layers of switch statements it took to deal with ARM32. ARM32 also has all instructions are conditional which makes it harder to interpret quickly
<geist> that sort of thing
<geist> i think it would have been easy enough to detect self modifying and just invalidate the code blocks that have already been translated, at some substantial cost
<geist> oh here's the code, i forgot i put it on github. this is the uop format: https://github.com/travisg/armemu/blob/master/include/arm/uops.h
<bslsk05> ​github.com: armemu/include/arm/uops.h at master · travisg/armemu · GitHub
<geist> line 126
<heat> idk bout arm32, but arm64 (and riscv64) should be nice for handling self modifying code
<bslsk05> ​github.com: armemu/arm/uop_dispatch.c at master · travisg/armemu · GitHub
<heat> e.g with rv just flush everything on an fence.i
<geist> yah that's true, since yuo can't rely on self modifying working anyway without an invalidate
<geist> and yeah i actually already did handle it https://github.com/travisg/armemu/blob/master/arm/cp15.c#L139
<bslsk05> ​github.com: armemu/arm/cp15.c at master · travisg/armemu · GitHub
<geist> it basically runs as if the icache was on, so if you want self modifying you have to flush the icache
<geist> which dumps all the code pages
c0co has quit [Ping timeout: 276 seconds]
<geist> at least with arm there are all these fast paths you can take based on a very generic 'data processing' instruction that is the main reason this emulator was reasonably quick: https://github.com/travisg/armemu/blob/master/arm/arm_ops.c#L414
<bslsk05> ​github.com: armemu/arm/arm_ops.c at master · travisg/armemu · GitHub
<geist> stuff like that, where it catches that an otherwise expensive alu op is just a mov
karenw has quit [Ping timeout: 245 seconds]
jcea has joined #osdev
<kof673> (this was all re: finding dead functions not called) i don't use that yet, but for every .c and .h file i would eventually want a "dependency file" describing it: https://0x0.st/s/eM6HMbhpJqb7MfzjQANd7Q/XP4R.txt doesn't ctags or something kind of do this so editors know where things are defined or used :D anyways...
leoh has joined #osdev
Lucretia has quit [Remote host closed the connection]
<agent314> would pico 2 have enough juice to run something like xv6-riscv?
<geist> depends. the riscv cores in the pico 2 doesn't have an MMU so probably not
<geist> but then i dunno precisely what xv6-riscv needs
* agent314 dives into RP2350 datasheet
<heat> you can do a nommu unix
<heat> if you're a special kind of insane
<agent314> https://github.com/mit-pdos/xv6-riscv/blob/riscv/kernel/riscv.h eeehhh i see references to page table, TLB, i see "csrw pmpcfg0" calls
<bslsk05> ​github.com: xv6-riscv/kernel/riscv.h at riscv · mit-pdos/xv6-riscv · GitHub
<agent314> doesn't look good
<agent314> i think i'll probably have better luck with the 1000line os
<heat> you might be able to squeeze linux into it
Ellenor is now known as AmyMalik
<agent314> i think somebody online did but they basically run an emulator
<bslsk05> ​Mr-Bossman/pi-pico2-linux - RISC-V linux on the raspberry pi pico 2 (21 forks/241 stargazers)
<heat> there lol
<heat> this is native
<bslsk05> ​dmitry.gr: 8-pin Linux - Dmitry.GR
<agent314> heat: native?! wow
<heat> yep
<heat> linux runs on almost anything
<agent314> i'm not sure my brain is capable of wrapping itself around the idea of linux running on hardware that xv6 doesn't run on
<heat> quite simple: linux supports systems without mmus
<agent314> but i suppose linux has been looked over by many many more eyes than xv6 and much more money has been pumped into it
<agent314> and CEO/CTOs of whatever are probably very interested in linux being able to run on that microwave over there for various reasons
<agent314> thanks btw! finally somebody gave me a simple and concrete answer thats not like "it's too primitive" or "it doesn't support"
netbsduser has quit [Ping timeout: 240 seconds]
scaleww has quit [Quit: Leaving]
Turn_Left has quit [Ping timeout: 252 seconds]
leoh has quit [Ping timeout: 248 seconds]
gildasio has quit [Ping timeout: 244 seconds]