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
thinkpol has quit [Remote host closed the connection]
thinkpol has joined #osdev
netbsduser has quit [Ping timeout: 248 seconds]
itrsea has quit [Remote host closed the connection]
itrsea has joined #osdev
itrsea has quit [Quit: leaving]
edr has quit [Quit: Leaving]
msv has quit [Remote host closed the connection]
msv has joined #osdev
colona has quit [Server closed connection]
colona has joined #osdev
msv has quit [Remote host closed the connection]
msv has joined #osdev
\Test_User has joined #osdev
itrsea has joined #osdev
jcea has quit [Ping timeout: 248 seconds]
MrBonkers has quit [Read error: Connection reset by peer]
_whitelogger has joined #osdev
frkazoid333 has quit [Ping timeout: 260 seconds]
fedaykin has joined #osdev
eluks has quit [Remote host closed the connection]
eluks has joined #osdev
goliath has joined #osdev
<Ermine> i found a null dereference in amdgpu
<geist> you win
<Ermine> yay!
<clever> Ermine: ive found one before
<clever> i was trying to run the vc4 userland half of mesa, to pre-compile shaders for the rpi
<clever> first thing the userland half did, was an ioctl to query the vc4 version in the kernel, via /dev/dri
<clever> that ioctl, did something totally different on amdgpu!
<clever> because the struct was too small, the kernel defaulted to nulls in the fields that userland didnt populate
<clever> and then OOPS, kernel null pointer!
<Ermine> kaboom
<clever> yep
<AmyMalik> i wonder if that's the problem i've been having trying to upgrade to khardenedbsd14.3
<AmyMalik> unlikely
<Ermine> And i've broke it by accessing a file in debugfs
karenw has quit [Ping timeout: 252 seconds]
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #osdev
<Ermine> and it tried to access structure which corresponds to hardware not present on my gpu
<Ermine> clever: is your use case even supported
Lucretia has joined #osdev
<clever> Ermine: there is a benchmarking tool in mesa, that is meant to take a given shader, and then compile it for every gpu the userland supports
<clever> and the plan was to repurpose that, to compile shaders and then run them in baremetal
<clever> so only the userland half of mesa needs to be active
<clever> but the userland half, went and tried to probe the kernel, to see if the kernel half was usable!
<clever> and the ioctl's clash
pabs3 has quit [Read error: Connection reset by peer]
pabs3 has joined #osdev
netbsduser has joined #osdev
GeDaMo has joined #osdev
zid` has quit [Ping timeout: 252 seconds]
netbsduser` has joined #osdev
netbsduser` has quit [Client Quit]
<pog> 'ate if-else, 'ate statements. luv expressions. love me ternary operator
<GeDaMo> Lookup tables! :P
<pog> yes
<pog> fuck explicit branching
<pog> do that as little as possible
<mjg> i recently realised i hate performance
<nikolar> that's PESSIMAL
<heat> i have just realised i love performance
<nikolar> i have just realised
<mjg> i also i'm kind of webdev
<heat> you are yes
<heat> 1) you suck
<heat> 2) you work on a network product
<nikolar> heat: you work on a network product (the kernel)
<nikolar> you're a webdev too
<nikolar> we're all webdevs
<heat> proud webdev
<mjg> this was a toxicity test
<mjg> and heat, you turned out to be an asshole
<mjg> 8(
<nikolar> mjg: and that's news how exactly
<heat> WHAT
<mjg> nikolar: it is not, but i needed hard evidence
<nikolar> of course
<heat> oh i'm hard alr-i shouldn't say this i'm a professional at work
<nikolar> lol
<nikolar> professional
<nikolar> you haven't even sold a single sles license
<mjg> alr-i? what does that mean?
<heat> apparently it wasn't a BGP hijack
<heat> they stopped announcing the 1.1.1.1 routes
<heat> due to good old misconfiguration
<nikolar> nice
<heat> mjg: you know, i had to try to bpftrace some static functions lately
<heat> such a crapshoot :(
zid has joined #osdev
<mjg> dude what
<mjg> maybe it would have worked if you were not so toxic
<mjg> just sayin
<heat> can you PLEASE add a kprobe for this function
<heat> THANK YOU
<zid> you do it
<nikolar> literally
<mjg> i have some recollection systemtap was able to trace this shit tho
<mjg> provided the thing was not optimized away
<mjg> ofc
<heat> i mean with kprobes you can technically do it if you find the inlined spot(s) in the binary
<mjg> ye
<kof673> deliberate misconfiguration redirection /s
<kof673> good old misdirection /s
mjacob has quit [Remote host closed the connection]
<zid> heat when will my PC next reboot
<zid> taking bets
<nikolar> yes
<Ermine> yesno
<zid> none of these are times
<nikolar> maybe?
<GeDaMo> zid: what's causing your computer to reboot?
<zid> GeDaMo: Suggestions welcome
<zid> I pulled spare pci card, updated nvidia driver, wiggled ram, underclocked cpu
<GeDaMo> I had a problem a while ago where the power connection to the motherboard didn't have a latch and it was lsightly loose
<nikolar> does it crash/bluescreen
<zid> never
<nikolar> or is it a hard reboot
tronexte has joined #osdev
<zid> triplefault only
<zid> never a crash so far
<nikolar> rippers
<zid> so cpu and ram psu and gpu are actually all unlikely suspects
<zid> hypervisor bug? :P
<GeDaMo> BIOS virus :|
<nikolar> better rip out that flash chip
EuclidDivision has joined #osdev
<nikolar> heat, when are we getting an ia64 machine
EuclidDivision44 has joined #osdev
<mjg> :OO
<Ermine> you should ask hp employee about that
<nikolar> there's one for 220 euro in germany
<nikolar> how the heck is shipping only 23 euro
<mjg> they ship it broken
<nikolar> kek
EuclidDivision44 has quit [Client Quit]
<EuclidDivision> I hope it is appropriate to post here. In my Rust implementation of xv6-riscv, having multiple function calls in _start causes the first to loop infinitely, preventing the others from running. Using next in GDB either loops back to execute the same function or leaves only a blinking cursor.
edr has joined #osdev
<zid> I dove into my wsl setup and fixed it it was always weird and buggy
EuclidDivision11 has joined #osdev
<zid> lots of weird powershell commands to run
<zid> maybe that fixed it
EuclidDivision11 has left #osdev [#osdev]
<EuclidDivision> I use Ubuntu 24.04
<zid> grats
<nikolar> jej
<GeDaMo> EuclidDivision: have you checked the asm being generated? Is it possible something is fiddling with the return stack?
<nikolar> *kek
<zid> wsl --status is no longer throwing Error: 0x893439...
<zid> which seems positive
<nikolar> what did you do
<zid> [13:30] <zid> I dove into my wsl setup and fixed it it was always weird and buggy
<zid> [13:30] * EuclidDivision11 (~EuclidDiv@user/EuclidDivision) has joined #osdev
<zid> [13:30] <zid> lots of weird powershell commands to run
<nikolar> so just splattered random powershell commands kek
<zid> nikolar: does http/ssh work for me?
<zid> (either)
<nikolar> yup, works fine
<zid> good good
<zid> my terminal emulator no longer does though? :p
<nikolar> kek rip
<nikolar> just ssh into your own machine, duh
innegatives has joined #osdev
<zid> I might need to reboot and shit though
edr has quit [Ping timeout: 268 seconds]
<nikolar> probably
<zid> I think I broke it again
<nikolar> kek
<zid> okay so
<zid> cmd.exe works
<zid> pwoershell does not work
<zid> mintty does not work
EuclidDivision has quit [Quit: EuclidDivision]
jcea has joined #osdev
zid has quit [Remote host closed the connection]
EuclidDivision has joined #osdev
EuclidDivision has quit [Client Quit]
karenw has joined #osdev
EuclidDivision has joined #osdev
zid has joined #osdev
<zid> Okay yea a reboot fixed a bunch of things
<zid> let's hope the machine is actually stable now
<EuclidDivision> Can anyone please help me?
<GeDaMo> EuclidDivision: have you checked the asm being generated? Is it possible something is fiddling with the return stack?
<kof673> what ge damo said........see what the assembly is actually doing ^^^^^^^^^^^^
<zid> To be fair your question so far was "code not work"
<zid> not much we can help with
<zid> just make random guesses
<pog> cosmic radiation
<pog> move to a shielded enclosure
goliath has quit [Quit: SIGSEGV]
frkazoid333 has joined #osdev
<EuclidDivision> The assembly file contains about 3700 lines. Should I read and try to understand every line?
tronexte has quit [Ping timeout: 252 seconds]
<heat> what assembly file?
<nikolar> what do you mean what assembly file
<nikolar> assembly file, duh
<EuclidDivision> The assembly file that objdump gives
tronexte has joined #osdev
<heat> objdump doesn't give you an assembly file
<heat> it gives you... instructions
<heat> if you're disassembling a whole binary worth of C/C++/rust/whatever, yeah, you don't need to read it or understand it (certainly it will often change)
<EuclidDivision> But aren't those instructions assembly instructions. Here's a line: `auipc    a0,0x10`
<heat> i mean, they are
<heat> but what are you trying to get from reading whatever GCC crapped out?
<EuclidDivision> GeDaMo advised me to check the assembly file to find out what causes the unexpected behaviour.
<GeDaMo> That's right, blame me :|
<nikolar> it's all your fault GeDaMo
<nikolar> smh
vdamewood has joined #osdev
tronexte has quit [Ping timeout: 268 seconds]
c0co has joined #osdev
tronexte has joined #osdev
<EuclidDivision> I think the linker script can suggest something: https://gist.github.com/EuclidDivisionLemma/3e188fefec9134d61263ef92d9e2c0a6
<EuclidDivision> In my code i'm making the stack pointer point to `kernel_stack_for_kernel_use`
<heat> that's wrong
<heat> you're pushing over .text
<heat> stacks (generally) grow _down_
Left_Turn has joined #osdev
Left_Turn has quit [Read error: Connection reset by peer]
<heat> so you set the sp to the high address, pushing subtracts (downwards), popping adds (upwards)
<heat> in this case a stack push will just write over your .text, which might explain the crashes
Left_Turn has joined #osdev
<EuclidDivision> Ok, but RISCV barebones on osdev  does just that:  https://wiki.osdev.org/RISC-V_Bare_Bones
<EuclidDivision> ```
<EuclidDivision> .bss : ALIGN(4K) {
<EuclidDivision>         PROVIDE(bss_start = .);
<EuclidDivision>         *(.bss);
<EuclidDivision>         . += 4096;
<EuclidDivision>         PROVIDE(stack_top = .);
<EuclidDivision>         . += 4096;
<EuclidDivision>         PROVIDE(global_pointer = .);
<EuclidDivision>         PROVIDE(bss_end = .);
<EuclidDivision> ```
<EuclidDivision> I might be wrong.
<heat> that linker script looks written by a person that doesn't know what they're doing
<nikolar> it allocates 4k for the stack
<nikolar> but also don't do that, yea
<heat> but yeah it also uses 4K for the stack with that += 4096 before the stack_top = .;
<zid> It's not awful
<heat> that second . += 4096; looks cargo culted
<zid> NEGATIVE OFFSET GUARD PAGE :P
<heat> and the global pointer is also not supposed to be there, fwiw
<EuclidDivision> Well, I have a 20KiB stack (my linker script). I believe that, the larger the  stack the better.
<heat> it's also not picking up shit like .sbss, .bss.something, .text.something
<heat> which are minor problems but all add up to clueless person writing a linker script
<zid> https://repo.or.cz/sanders.git/blob/HEAD:/linker.ld My linker scripts are boring.
<nikolar> EuclidDivision: no, you have 20kib after the stack
<heat> zid: adorable
<zid> it is very cute and functional
<heat> i need to properly add a preprocessor for mine
<nikolar> why
<nikolar> you're doing way to much stuff lol
<zid> heat's linker scripts are complicated and dumb
<heat> nikolar: i need most of those things
<zid> You just haven't figured out how to not
<nikolar> what are these levels btw
<zid> page tables?
<heat> no
<heat> init levels
<zid> what the fuck heat
<zid> that makes even less sense
<heat> basically each level corresponds to a stage in boot
<zid> figure out how to rework your shit to get rid of that :P
<heat> and when the kernel reaches that stage, it executes all funcptrs in the section and moves on
<heat> it is the defacto standard way to do this sort of stuff
<heat> i learned it from geist, lk does it, fuchsia does it, linux does it
<zid> cargo cult
<nikolar> so geist does it and you copied linux
<zid> NOTHING CAN BE IMPROVED
<zid> ONLY LINUX COPIED
<zid> heat, every year
goliath has joined #osdev
<heat> i didn't take this from linux you idiot
jcea has quit [Ping timeout: 252 seconds]
<Ermine> it's not canon if openbsd doesn't do that
<heat> i don't know what openbsd does
<heat> i would definitely not be surprised if they ended up doing something similar
<Ermine> i don't know either
<Ermine> unrelated, iirc clangd doen't like those funcptrs
<heat> oh yeah they definitely do something similar
<heat> with the SYSINIT stuff
<heat> but their ordering is even more contrived
<Ermine> kek
<nikolar> heat: what's the benefit compared to just doing `kmain() { f1(); f2(); f3(); }`
<heat> this is useful and needed because having a single main doesn't scale
<heat> you end up having _a lot_ of subsystems that want to be initialized (in various amounts) at certain points in boot
<heat> where they depend on some event or some other subsystem to have initialized
<Ermine> and probably those subsystems depend on build configuration
<heat> it also ties in nicely with drivers just registering a INIT_LEVEL_DRIVERS(rtl8139_init); and things Just Working
<EuclidDivision> I changed my linker script to
<EuclidDivision> ```
<EuclidDivision>     . += 20480;
<EuclidDivision>     PROVIDE(kernel_stack_for_kernel_use = .);
<EuclidDivision> ```
<EuclidDivision> Here's the output: https://pasteboard.co/bFP7afdIk58f.png
<EuclidDivision> As can be seen, even now the program does not seem to ever reach breakpoint 3 and the cursor just blinks.
<Ermine> anybody with relatively new amd gpu, could you please send me contents of /sys/kernel/debug/dri/1/amdgpu_dm_capabilities ?
<heat> igpu works?
<Ermine> should be
<nikolar> Ermine:
<nikolar> mall supported: no, enabled: no
<nikolar> sub-viewport supported: no, enabled: no
<zid> supported no enabled yes would be more fun
<Ermine> nikolar: thank you
<nikolar> > AMD Radeon 840M Graphics [Integrated]
<nikolar> rdna3 something something iirc
<heat> same for my AMD Radeon 780M
<heat> i'll check in a bit on my desktop
<nikolar> mall supported: yes, enabled: no
<nikolar> sub-viewport supported: yes, enabled: no
<nikolar> i think that's AMD Ryzen 7 7700X
<nikolar> erm
<nikolar> i mean AMD Radeon RX 7800 XT
<Ermine> seems like dGPUs have this kind of thing
EuclidDivision has quit [Quit: Client closed]
<GeDaMo> I have mall supported: no, enabled: no; sub-viewport supported: no, enabled: no on 5700g iGPU
<zid> good news btw I finally beat the uma finale race
<zid> I am a horse girl master
<heat> nikolar: nvidia suspend is borked btw
<heat> but that's the only problem i have with nvidia
Left_Turn has quit [Ping timeout: 260 seconds]
Turn_Left has joined #osdev
<nikolar> kek only
<nikolar> i can't use my laptop if suspend is broken for example
<heat> my laptop (with a much older nvidia GPU) doesn't have problems
<heat> it might be that it's just too new
<nikolar> yeah probably
<nikolar> i had issues with with my laptop on lts
<nikolar> on mainline, works fine
karenw has quit [Ping timeout: 252 seconds]
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 260 seconds]
<Ermine> suspend is a pain point on linux
<Ermine> my pc had problems with it recently
<Ermine> laptop panicked on unsuspend
<zid> suspend is for evil monsters true fact
<Ermine> issues arise, then go away, then new bugs come, etc
<zid> when are we replacing acpi with a string table pointing to some ebpf
<heat> Ermine: the 9900X's igpu has no for everything as well
<geist> kek
<heat> why are you kek'ing? just because you have a threadripper? smh
<mjg> smh my head
<Ermine> threadripper's igpu doesn't have mall either
<Ermine> heat, GeDaMo: thank you
<AmyMalik> zid, that obsoletes all other OSes
<pog> UEFI OS
<heat> pog
<heat> EFI EFI EFI EFI EFI
<zid> Ameisen: Tragic
* Ermine gives pog a piece of cheese and efi firmware
<zid> wow rude
itrsea has quit [Remote host closed the connection]
itrsea has joined #osdev
edr has joined #osdev
* geist mysteriously keks, their true intentions unknown
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 248 seconds]
goliath has quit [Quit: SIGSEGV]
tjf has quit [Quit: l8r]
tjf has joined #osdev
goliath has joined #osdev
gmodena has quit [Quit: ZNC 1.8.2 - https://znc.in]
gmodena has joined #osdev
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
goliath has quit [Quit: SIGSEGV]
gmodena has quit [Quit: ZNC 1.8.2 - https://znc.in]
itrsea has quit [Remote host closed the connection]
itrsea has joined #osdev
Shaddox404 has joined #osdev
<heat> i'm adding flushing support on the block stack
<heat> it turns out i'm not doing this, and this is bad, mkay
<heat> i have to ask at work but i'm curious wrt the performance difference of FUA'ing all writes vs normal writes + flushing at the end
<nikolar> lp
<nikolar> lol
<heat> what
<nikolar> > it turns out i'm not doing this, and this is bad, mkay
<AmyMalik> owo?
<heat> yeah it is bad, mkay
<heat> for DATA CONSISTENCY
<nikolar> thus, lol
<heat> it's not that much of a biggie, usually
<nikolar> keyword usually
<heat> totes
<nikolar> for real
<heat> that's why i want to fix it
<nikolar> well fix it
<nikolar> you're welcome
<heat> thanks boss
<heat> you're cut out to be a manager
<nikolar> i know right
<nikolar> but i can't unleash that talent on the world, so i'll stay as a programme
vdamewood has quit [Quit: Life beckons]
netbsduser has quit [Ping timeout: 260 seconds]
gmodena has joined #osdev
karenw has joined #osdev
frkazoid333 has quit [Ping timeout: 276 seconds]
Shaddox404 has quit [Quit: (╯°□°)╯︵ ┻━┻]
xenos1984 has quit [Ping timeout: 248 seconds]
xenos1984 has joined #osdev
jcea has joined #osdev
Turn_Left has quit [Read error: Connection reset by peer]
Lucretia has quit [Remote host closed the connection]
V has joined #osdev
V has quit [Quit: We're here. We're queer. Connection reset by peer]
freakazoid332 has joined #osdev