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
innegatives has quit [Quit: Connection closed for inactivity]
jcea has quit [Quit: jcea]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 252 seconds]
sprock has quit [Ping timeout: 276 seconds]
c0co has quit [Quit: Ragequite]
Turn_Left has quit [Read error: Connection reset by peer]
jcea has joined #osdev
swiftraccoon has joined #osdev
jcea has quit [Ping timeout: 248 seconds]
sprock has joined #osdev
itrsea has quit [Quit: leaving]
pabs3 has quit [Ping timeout: 244 seconds]
Jari-- has quit [Ping timeout: 244 seconds]
pabs3 has joined #osdev
goliath has joined #osdev
ELENORO is now known as AmyMalik
goliath has quit [Quit: SIGSEGV]
mrpops2ko_ has joined #osdev
mrpops2ko has quit [Ping timeout: 252 seconds]
mrpops2ko_ has quit [Ping timeout: 272 seconds]
goliath has joined #osdev
tronexte has quit [Read error: Connection reset by peer]
tronexte has joined #osdev
netbsduser has joined #osdev
GeDaMo has joined #osdev
<chiselfuse> how does brk know where the last segment of the elf is loaded in order to create a page above it?
<Mutabah> Implementation detail, but it could just scan the memory for the end, or it could peek at (or ask) the loader to get the end location
<heat> what
<heat> brk doesn't know shit
<heat> the kernel knows this at load time
Lucretia has joined #osdev
<heat> like, it loads the executable, and sets the brk starting location
<chiselfuse> heat: so on Linux at least, the kernel would set brk at the end of the last LOAD segment?
<heat> It Depends
<bslsk05> ​elixir.bootlin.com: Making sure you're not a bot!
<chiselfuse> how do i make sure i'm not a bot
<heat> sounds like what a bot would say
<nikolar> indeed, we aren't helping you
<chiselfuse> i wont forgive you when we take over
<heat> you can't even figure out brk
<chiselfuse> is that the actual function that loads elf
<chiselfuse> 3k lines wew
<heat> i think we're safe
<heat> yes it is
<chiselfuse> once i figure out brk i'll have more memory and be smarter duh
<nikolar> heat: phew
<heat> it's also not 3k lines
<heat> not even the file is 3KLOC
<nikolar> chiselfuse: tell that to chatgpt
<nikolar> it ain't gettin any smarter
<nikolar> and it's been trained on all of the internet
<chiselfuse> oh it's like 500 i misread
<nikolar> it's not 500
<heat> good news guys
<heat> he's an AI bot
<heat> he's giving out random answers confidently until he gets it right
<nikolar> (he won't get it right)
<chiselfuse> Okay, you want an accurate but immediate calculation of the lines of code of the function `static int load_elf_binary(struct linux_binprm *bprm)`, got it! 1385 - 824 = 561. Let me know if you want me to prove it using ZFC axioms.
<nikolar> right, because everything you need to do to load an elf file fits in those 500 lines
<nikolar> of course, duh
<zid`> nikolar it is going to be hot today
<zid`> what do
<nikolar> cool down, duh
<zid`> I could go 'shopping'
<zid`> by which I mean hide in the shop with AC and take a nap
<nikolar> that would work, sure
<zid`> maybe I should fake low blood sugar and see if I can get a free red bull too
<chiselfuse> there's this invention called take the red bull can, put in pocket and walk out
<nikolar> sounds like something an llm would say
<nikolar> zid`: if you're lucky, there's a promotion and they are handing them away anyway
<zid`> That seems smart, stealing from a shop that you live next to
<zid`> nikolar: That has never happened in the history of ever
<nikolar> it has, constantly, in front of my uni at least
<zid`> your uni is not a shop
<nikolar> it's not, no
<chiselfuse> i think my strategy is the most viable so far
<zid`> Yes well you're objectively stupid
<zid`> of course you think that
<nikolar> kek
mrpops2ko has joined #osdev
mrpops2ko has quit [Client Quit]
mrpops2ko has joined #osdev
mxs9 has quit [Quit: The Lounge - https://thelounge.chat]
mrpops2ko has quit [Quit: No Ping reply in 180 seconds.]
<AmyMalik> uhh
mrpops2ko has joined #osdev
DragonMaus has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
DragonMaus has joined #osdev
vdamewood has joined #osdev
vinleod has joined #osdev
vdamewood has quit [Killed (calcium.libera.chat (Nickname regained by services))]
vinleod is now known as vdamewood
innegatives has joined #osdev
<Ermine> 500 lines of code ought to be enough for anybody
<averymt> Great! There's at least 1330 in that file
<zid`> In the case where you don't count any aux code, my elf loader is 4 lines
<zid`> notbad
<chiselfuse> zid`: can you show me it please
<zid`> ke = (struct elf_header *)kernel_start;
<zid`> for(i = 0; i < ke->e_phnum; i++)
<zid`> p = (struct program_header *)(u32)(ke->e_phoff + kernel_start);
<zid`> map_section(&p[i], kernel_start, 1);
<chiselfuse> zid`: can i have a url to the rest of the code where this resides in?
<zid`> nope
<chiselfuse> is it not public?
<zid`> what did your last slave die of
<chiselfuse> i never had a last slave because i never had slaves
<chiselfuse> zid`: do you map all segments regardless of whether they are of type LOAD
edr has joined #osdev
goliath has quit [Quit: SIGSEGV]
jcea has joined #osdev
c0co has joined #osdev
Left_Turn has joined #osdev
averymt_ has joined #osdev
averymt has quit [Ping timeout: 260 seconds]
Terlisimo has quit [Quit: Connection reset by beer]
Terlisimo has joined #osdev
innegatives has quit [Quit: Connection closed for inactivity]
<zid`> heat: Did you ever get power back after the portugal/spain powercut, or are you still peddling a bike to charge your laptop?
<heat> i live off the earth now
<zid`> I always knew you were a weird alien
<zid`> nikolar: I want to play video game but it makes my gpu fan spin up and I'm worried I'll cook myself
<nikolar> Get a better GPU then
<zid`> I think what'd work better would be an uglier game
<GeDaMo> What game were you trying to play?
<zid`> everspace 2
<zid`> random website says I only lose to laptop gpus in perf/watt
<zid`> and.. radeons
<GeDaMo> Can you turn down the graphics a bit?
<zid`> how dare you
<GeDaMo> You just said you'd be better with an uglier game! :P
<zid`> making a game uglier is absolutely not the same thing
* Ermine thinks of bying nvidia card anyway
<zid`> potato of exile
<Ermine> Oh wow, no textures?
<heat> Ermine: it works well on my end
<heat> but suspend is fucked for some reason
<heat> i can't tell why
<Ermine> i can confirm that on nouveau on my friend's pc
<Ermine> but i mean trying to engage with nova driver
<heat> i'm using the open nvidia driver
<heat> the actual driver that doesn't suck
<heat> versus the driver that sucks and the driver that doesn't do anything
<Ermine> well yeah, for everyday activity i'd use nvidia driver as well
<Ermine> while trying to help with nova
<Ermine> by e.g. having a separate distro installed for that purpose
<heat> nova literally doesn't do anything
<Ermine> yet
<heat> it's been like 2 years
<Ermine> they've added an nvidia guy to maintainers recently didn't they
<heat> it's literally a toy project that they were able to push into the kernel
<bslsk05> ​IRCCloud pastebin | Raw link: https://irccloud.com/pastebin/raw/PCYLkLYg
<Ermine> means there are low-hanging fruits to salvage
<heat> someone on the arch side botched the config update for 6.15 (where they added this) and did =m
<heat> which broke nvidia gpu module binding for everyone
<Ermine> kaboom
<Ermine> but i mean, it wouldn't be harder than dealing with amdgpu, right?
<heat> i mean, you have a whole huge ass driver to write
<heat> not to mention the rust roadblocks
<Ermine> yes
<heat> amdgpu is bad code but it exists
<heat> and is functional
<zid`> heat: That paste looks like they're almost done to me
<zid`> how much more work could it possibly be
<Ermine> btw which tree you've wc'd ?
<heat> mainline
mrpops2ko_ has joined #osdev
mrpops2ko has quit [Ping timeout: 272 seconds]
<Ermine> hm, i have drm-misc-next here and it has even less code
<nikolar> can confirm, amdgpu is functional
<Ermine> but i don't expect getting functional driver any time soon
<nikolar> heat: isn't that literally ever rust bit of code in the kernel kek
<heat> no
<nikolar> re > it's literally a toy project that they were able to push into the kernel
<zid`> they're still trying to get it to compile
mrpops2ko_ has quit [Ping timeout: 252 seconds]
<zid`> they've got a few hundred more lines but they need to solve the halting problem first so they can put the mut constraints in the right places
innegatives has joined #osdev
<Ermine> hmmm but now i get your point
<Ermine> kinda
<Ermine> like it's not going to be substantially better than nouveau
<heat> it definitely might
<heat> nvidia seems to more or less back it
<heat> the problem is that there is literally nothing yet, so we can't really judge
<nikolar> more like, nvidia let's their employees do whatever
<nikolar> instead of "backing it"
Left_Turn has quit [Read error: Connection reset by peer]
<heat> nvidia is most definitely not a "lol do whatever" company
c0co has quit [Quit: Ragequite]
c0co has joined #osdev
Left_Turn has joined #osdev
<nikolar> i highly doubt they are paying that one nova guy to work on nova specifically
Turn_Left has joined #osdev
trashbox has joined #osdev
Left_Turn has quit [Ping timeout: 248 seconds]
jcea has quit [Ping timeout: 268 seconds]
guideX has quit [Quit: Leaving]
mrpops2ko has joined #osdev
eluks has joined #osdev
mrpops2ko has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
goliath has joined #osdev
mrpops2ko has joined #osdev
vdamewood has quit [Quit: Life beckons]
<zid`> nikolar: Maybe he's in the nova mains deep under nvidia hq, been kept alive by his piety to the rust gods alone
<zid`> nova mines*
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 260 seconds]
<heat> nikolar: they can most definitely pay one or two or three or four guys to "work on nvidia upstream"
<heat> and it hints that the long term approach will not be the nvidia out of tree tsuff
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 245 seconds]
<zid`> he's dead dw
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 252 seconds]
<geist> zeds dead
averymt_ is now known as averymt
jedesa has joined #osdev
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
dotexe1337 has joined #osdev
dotexe1337 has quit [Client Quit]
<Ermine> nouveau/nova devs state that nvidia is helpful actually, but that happens behind the scenes because nvidia procedures
vdamewood has joined #osdev
netbsduser has quit [Ping timeout: 248 seconds]
<heat> i mean, they are actively publicly contributing nowadays
<heat> for certain things
marv70000 has joined #osdev
marv7000 has quit [Ping timeout: 244 seconds]
marv70000 is now known as marv7000
Left_Turn has quit [Read error: Connection reset by peer]
karenw has joined #osdev
<Ameisen> I've been wracking my brain on trying to add host register re-use between dynamically recompiled instructions, while maintaining the constraints: the ability to enter/exit the recompiled code at any point, and each instruction still being discrete when observed.
<Ameisen> If I add seperate landing/launch pads for each address that save/restore state, each chunk can assume re-use along it, maintaining a table per-instruction about what host registers are what guest registers. When launched, this would be serialized into a register I suppose, with 5 bits to signify each register. At the exit pont (exiting the recompiled code or the landing pad of another instruction, after say a jump), that register and the known table
<Ameisen> of registers for that instruction would be harmonizes, with data pushed/popped as needed.
<Ameisen> It should work well _within_ a chunk, but loops or such that happen to go across chunk boundaries might suffer.
<Ameisen> I'm not sure how bad that overhead would be yet as I haven't written the assembly to handle the harmonization, and it likly depends upon how different the assignments are.
<Ameisen> the dynamic recompiler currently reserves 8 host registers (on Win64: b, di, si, bp, 12, 13, 14, 15) so I still have some clearance.
Lucretia has quit [Read error: Connection reset by peer]
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
goliath has quit [Quit: SIGSEGV]