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
dutch has quit [Quit: WeeChat 3.7.1]
gog has quit [Quit: byee]
gog has joined #osdev
heat has quit [Read error: Connection reset by peer]
heat_ has joined #osdev
gorgonical has quit [Remote host closed the connection]
linearcannon has joined #osdev
ketan has joined #osdev
kaichiuchi has quit [Ping timeout: 260 seconds]
kaichiuchi has joined #osdev
riverdc has joined #osdev
heat__ has joined #osdev
ptrc_ has joined #osdev
xvmt_ has joined #osdev
zid` has joined #osdev
pieguy128_ has joined #osdev
froggey-1 has joined #osdev
XgFgX has joined #osdev
sprocket has joined #osdev
maksy has joined #osdev
kori has quit [Killed (NickServ (GHOST command used by kori1!kori@dfg.rocks))]
heat__ has quit [Ping timeout: 252 seconds]
dzwdz1 has joined #osdev
acidx_ has joined #osdev
auronandace has joined #osdev
kori has joined #osdev
invalidopcode7 has joined #osdev
joe9_ has joined #osdev
mimmy_ has joined #osdev
terrorjack7 has joined #osdev
manawyrm- has joined #osdev
riverdc_ has quit [Ping timeout: 256 seconds]
mimmy has quit [Ping timeout: 256 seconds]
thinkpol has quit [Ping timeout: 256 seconds]
mimmy_ is now known as mimmy
kristinam has quit [Ping timeout: 256 seconds]
sprock has quit [Ping timeout: 256 seconds]
wgrant has quit [Ping timeout: 256 seconds]
maksy_ has quit [Ping timeout: 256 seconds]
heat_ has quit [Ping timeout: 256 seconds]
invalidopcode has quit [Ping timeout: 256 seconds]
rorx has quit [Ping timeout: 256 seconds]
aejsmith has quit [Ping timeout: 256 seconds]
joe9 has quit [Ping timeout: 256 seconds]
zid has quit [Ping timeout: 256 seconds]
terrorjack has quit [Ping timeout: 256 seconds]
dzwdz has quit [Ping timeout: 256 seconds]
air has quit [Ping timeout: 256 seconds]
xvmt has quit [Ping timeout: 256 seconds]
pieguy128 has quit [Ping timeout: 256 seconds]
ThinkT510 has quit [Ping timeout: 256 seconds]
nur has quit [Ping timeout: 256 seconds]
potash has quit [Ping timeout: 256 seconds]
acidx has quit [Ping timeout: 256 seconds]
ptrc has quit [Ping timeout: 256 seconds]
froggey has quit [Ping timeout: 256 seconds]
manawyrm has quit [Ping timeout: 256 seconds]
XgF has quit [Ping timeout: 256 seconds]
invalidopcode7 is now known as invalidopcode
xvmt_ is now known as xvmt
ptrc_ is now known as ptrc
terrorjack7 is now known as terrorjack
thinkpol has joined #osdev
rorx_ has joined #osdev
wgrant has joined #osdev
air has joined #osdev
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #osdev
ketan has quit [Ping timeout: 260 seconds]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<zid`> Why is it -1C
<zid`> and who can I blame for it
<Mutabah> zid`: What's the context?
<zid`> it is -1C
<zid`> and I need someone to blame
<Mutabah> Wait, negative 1 centigrade?
<zid`> yes
<Mutabah> I read that as "link against library `C`"
<Mutabah> And hence "why did someone name this library capital C?"
<zid`> might wanna.. upgrade your typeface
<Mutabah> putty default 4lyfe?
vdamewood has quit [Read error: Connection reset by peer]
<zid`> putty's default styling is super harsh
vdamewood has joined #osdev
<Mutabah> Hmm... "Courrier" seems a little better
<zid`> btw centigrade is out of fashion for 50 years
<Mutabah> yeah, dunno why I chose that term
<Mutabah> brain no werky i guess
<zid`> poor mr. celcius
<geist> while i agree, i kinda thing centigrade sounds more formal
<geist> also yay -1. i like it cold, but not too cold
<geist> right around 0 is a nice temp
<zid`> centigrade is just wrong, technically
<zid`> it's the name of the scale, not the unit
<zid`> Any scale subdivided into 100 you could say centigrade for
<geist> well sure. but still
<Mutabah> 22C
<Mutabah> My favorite temp
<zid`> Give me 16C
<zid`> 12-24 is my range
nur has joined #osdev
<zid`> welp, advent in 10, should probably set up my text editor
<geist> think it's time to sit down and try to get hello world rust working
<zid`> oh no
<geist> OH YEAH
<geist> it's been done,b ut i'm trying to stumble through it the hard way, thus learning more in te process
<geist> screwed around with cargo last night to try to get it to build a multi-arch static lib and explore how extern "C" and whatnot work. as is usual once you figure it out it's no big deal, but lots of trial and error
<epony> it's getting leomessy which lang had the cargo cult crate packaging gems nodes now.. ;-)
<Mutabah> geist: If you need help, feel free to ask me (or join #rust)
<zid`> yea but if you join #rust you'll be surrounded by rust users
<klys> think twice~
<epony> just beware the rusty needle spiked people, they look like they have had too much eggnogging
<klys> "Why hold people who you don't pay to a higher standard than the people who you do pay?" - theo
<epony> looks like fixing the global TOCTOU in UNIX will not be Golang's priority either
<zid`> wow day9 is.. a thing
<moon-child> centigrade? How old-fashioned
<moon-child> oh zid said taht already
<zid`> arse, I pass the test input, but not my real input
bgs has joined #osdev
<zid`> I finally found the bug, after an hour :D
bgs has quit [Remote host closed the connection]
m5zs7k has quit [Ping timeout: 260 seconds]
m5zs7k has joined #osdev
<mrvn> Mutabah: 22 coulomb isn't much energy. :)
<Mutabah> Well, no, because it's not energy :)
<geist> oh dont worry, i'm already surrounded by rust users
<geist> oooh speaking of eggnog i bought some the other day
<geist> i should put something in it
<zid`> I've never tried it, it sounds either really nice, or incrediby nasty, and I can't decide which it will be
<zid`> You'd think I'd have at least heard of or seen it outside of american media, given what wikipedia says
<zid`> The origins, etymology, and the ingredients used to make original eggnog drinks are debated. According to the Oxford English Dictionary, nog was "a kind of strong beer brewed in East Anglia"
<zid`> (East Anglia is where I live)
<geist> yeah in this case it's basically sweet milk. i'm sure it's not the same thing at all
<geist> but it takes nicely to getting spiked
<geist> and giving you a hangover
<zid`> It seems that it was popular around colonial times, which is why it's a thing in the US
<zid`> but it died out over here
<zid`> so now it seems very american to us
<geist> oh yeah i'm sure whatever is at the supermarket here is some americanized nonsense
<moon-child> eggnog is good
m5zs7k has quit [Ping timeout: 246 seconds]
<moon-child> Although. The other week I made the mistake of getting low-quality eggnog. And I can't bring myself to drink any more of it, but don't want to throw it out
m5zs7k has joined #osdev
NiD27 has joined #osdev
rorx_ is now known as rorx
auronandace is now known as ThinkT510
<epony> ^ snakenogg
invalidopcode has quit [Remote host closed the connection]
GeDaMo has joined #osdev
<zid`> ah shit.
<zid`> I decided to do some advent2015 figuring it'd be easy, but they hadn't quite settled on their current formula yet. Day 4 needs MD5. My self-imposed rule is no external code.
<zid`> Guess I am implementing MD5.
m5zs7k has quit [Ping timeout: 265 seconds]
pounce has quit [Ping timeout: 246 seconds]
<epony> what for?
<epony> it might be quite the overhead if you only need md4
<epony> just "this" without "for what" is no information
m5zs7k has joined #osdev
<epony> you know rc4 is still used
gog has quit [Ping timeout: 252 seconds]
dormito has quit [Ping timeout: 264 seconds]
dormito has joined #osdev
<klys> you better be drinking southern comfort or darigold or something good
<epony> jagermeister and mouthwash alternator
<epony> same as: rc4 and md5
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
<zid`> smoking cigarettes and moaning at strict aliasing meaning I have to do this the long way, mainly
<epony> drop the cigs, not going to end well
gog has joined #osdev
<zid`> maybe I'll give up and just assume LE
<epony> until you have to program your NIC (software defined network) core
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
heat__ has joined #osdev
heat__ is now known as heat
<zid`> Morning hate
<heat> 'ate the heat
<heat> morning
<heat> no i didn't do advent of code yet
<zid`> I got stuck, for an hour
<zid`> I like the part where I just implemented MD5, but get the wrong answer. I wonder why.
heat has quit [Remote host closed the connection]
heat has joined #osdev
<zid`> Oh it works for an empty string at least, so I guess my plaintext padding etc is wrong
epony has quit [Quit: QUIT]
<zid`> ah got it, length is suppsoed to be in bits
NiD27 has quit [Quit: Leaving]
gildasio has quit [Ping timeout: 255 seconds]
gxt has quit [Ping timeout: 255 seconds]
gildasio has joined #osdev
gxt has joined #osdev
<ddevault> my EFI stub problems continue to haunt me
<ddevault> I've basically copied linux's EFI header and linker script and still no dice
<ddevault> attempting to build an EFI stub linux build to compare, not going well
<ddevault> building edk2 also ran into numerous problems
heat has quit [Ping timeout: 256 seconds]
<ddevault> right, now I have an EFI stub linux which does boot in qemu to compare with
<zid`> It'd be gut wrenching if even that didn't boot :P
<ddevault> my god it would be eh
<zid`> what does the efi stub linux stuff consist of?
<ddevault> linux on the left, my kernel on the right, if anyone is curious: https://l.sr.ht/t_KA.png
<ddevault> I'm taking a break
<bslsk05> ​elixir.bootlin.com: efi-header.S - arch/arm64/kernel/efi-header.S - Linux source code (v6.0.12) - Bootlin
<zid`> a filesystem with a kernel, and a -bios blah.efi?
<ddevault> I have a FAT disk I've been sticking my EFI binary into
<zid`> or is it a filesystem with your efi thing on it with the classid stuff, and seabios has an efi shell
<ddevault> just added linux EFI stub to that
<j`ey> zid`: by stub, he just means the EFI header thing
<ddevault> then qemu boots with pflash set to edk2 and the FAT device via virtio
<ddevault> then I can run EFI binaries through the EFI shell
<zid`> ah so it's about getting edk2 specifically, to launch your efi program?
<ddevault> yes
<zid`> and are you able to build edk2 yourself?
<ddevault> I ran into some problems
<zid`> rip, that sucks
<zid`> My go-to method is just to instrument the loader with printfs galore
<j`ey> yeah, that's what I did to help with some of it
<zid`> I've edited qemu a .. few times
<ddevault> aye, if I can get an edk2 build going that will help
<ddevault> I'm not without leads
<ddevault> but I need a break
<ddevault> here's my latest binary: https://mirror.drewdevault.com/bootaarch64.efi
<ddevault> tiny linux build for comparison: https://mirror.drewdevault.com/bootlinux.efi
<j`ey> still seems to fail at that same line for me btw
<zid`> .data is fucky in that
<zid`> The one tool I have that can load PE files complains that .data is 0x200 vs 0x1B8 or something
puck has quit [Excess Flood]
puck has joined #osdev
<j`ey> zid`: that fixed it
<j`ey> (kinda I guess)
<ddevault> hm?
<j`ey> I hacked EDK2 to say SizeOfRawData = 0x1B8.. if SizeOfRawData == 0x200
<j`ey> so your size for .data is wrong
<zid`> either .data itself is too short, or your calculation for the header field is wrong and rounded up
<zid`> PE loaders are *super* picky about these fields
<ddevault> hm
<ddevault> okay
<ddevault> I was being lazy and chucking .bss into .data
<ddevault> maybe addressing that will fix it
<zid`> those are different fields
<zid`> 8
<zid`> 4
<zid`> SizeOfInitializedData
<zid`> 12
<zid`> The size of the initialized data section, or the sum of all such sections if there are multiple data sections.
<zid`> 4
<zid`> SizeOfUninitializedData
<zid`> The size of the uninitialized data section (BSS), or the sum of all such sections if there are multiple BSS sections.
<ddevault> I also align .data on the PE file alignment
<zid`> You have 0x200 code, 0x200 data, 0x0 bss
<ddevault> works if I don't do the alignment step
<ddevault> phew
<ddevault> finally
<ddevault> lemme fix bss too
<zid`> yw
<zid`> That'll be £50
<kaichiuchi> hi
<bslsk05> ​git.sr.ht: ~sircmpwn/helios: boot+aarch64: fix EFI stub issues - sourcehut git
<ddevault> erp
<bslsk05> ​git.sr.ht: ~sircmpwn/helios: boot+aarch64: fix EFI stub issues - sourcehut git
<ddevault> now to debug a problem I've had many times
<ddevault> edk2 doesn't boot it automatically if it's called EFI/boot/bootaarch64.efi
<j`ey> bootaa64.efi
<j`ey> ddevault: ^
<ddevault> works
<ddevault> many thanks
<zid`> grr how do I get backreferences working in grep
<GeDaMo> -P ?
<Ermine> I've registered an account on forum.osdev.org but I cannot log in to wiki. Should I wait for things to sync?
<zid`> oh I got it, it counts from bloody 1
froggey-1 is now known as froggey
<geist> whooo stayed up late finally finishing God of war ragnarok
<geist> had to get it done
<Ermine> geist: congrats!
<geist> what a fantastic tale
isaacwoods has joined #osdev
epony has joined #osdev
<zid`> boo, invalid back reference
<zid`> I wanted to grep for a pair that appears twice, pair is (.)\1 pair twice should be ((.)\1)\2 but no worky :'(
<zid`> can't capture it
<zid`> oh! ((.)\2)\1
<kaichiuchi> geist: it is truly an amazing game
<zid`> also dawned on me that .\1\1\1 is a thing
<GeDaMo> I was going to suggest that but I assumed you'd already thought of it :|
<kaichiuchi> our code compiled on clang first try but with a shit ton of warnings
<kaichiuchi> this’ll be good
<zid`> GeDaMo: It was a process, okay?
<zid`> I did 2*2 not 2+2 to get four
<GeDaMo> Also, if it's a single character, can't you just use a repeat range?
<zid`> a what
<GeDaMo> Actually, that should work with any match
<zid`> {4}?
<zid`> That matches any 4 characters
<GeDaMo> Ah, right
<GeDaMo> What about applying it to the \1 ?
<bslsk05> ​adventofcode.com: Day 5 - Advent of Code 2015
<zid`> If you wanted to give it a go yourself :P
nikitalocalhost has quit [Remote host closed the connection]
epony has quit [Ping timeout: 268 seconds]
bauen1 has quit [Quit: leaving]
<kaichiuchi> I’m bored
<zid`> do advent 2015 then
<GeDaMo> Why are you doing 2015?
<zid`> doing them in order makes the most sense to me
epony has joined #osdev
<GeDaMo> OK :|
<zid`> GeDaMo reads books from the middle
bauen1 has joined #osdev
<kaichiuchi> i don’t think that’s a fair comparison.
<kaichiuchi> it’s not a story, they’re just problems
bauen1 has quit [Ping timeout: 256 seconds]
[itchyjunk] has joined #osdev
MiningMarsh has quit [Read error: Connection reset by peer]
grange_c has quit [Quit: The Lounge - https://thelounge.chat]
grange_c0 has joined #osdev
MiningMarsh has joined #osdev
elastic_dog has quit [Ping timeout: 260 seconds]
elastic_dog has joined #osdev
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
gildasio has quit [Ping timeout: 255 seconds]
gxt has quit [Ping timeout: 255 seconds]
gildasio has joined #osdev
gxt has joined #osdev
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
<bslsk05> ​'Designing 3D Printed Parts for Retro Chess Set #3DPrinting' by Buildy Bryce (00:00:48)
gxt has quit [Remote host closed the connection]
gxt has joined #osdev
<kaichiuchi> hey kids
<kaichiuchi> can i go home
<mrvn> home is where you hang your hat
Burgundy has joined #osdev
<kaichiuchi> i don’t wear hats my friend
<kaichiuchi> i don’t even think i own a beanie
<mrvn> your RPi likes hats
<kaichiuchi> i don’t have an rpi
<kaichiuchi> but i wish i did
gog` has joined #osdev
gog has quit [Read error: Connection reset by peer]
gog` is now known as gog
<gog> hi
<zid`> glog
<zid`> heat is hiding
<zid`> I need you to flush him out, so that I can shoot him with this shotgun
<gog> ok
* gog flushes
<kaichiuchi> glog is my new project name.
<kaichiuchi> it is decided
<kaichiuchi> also, I can’t show the assembly but can someone tell me why IAR decided to spill an entire function’s parameters to the stack?
<kaichiuchi> not a single parameter was transferred in registers
<gog> sorry
<gog> i don't know anything abotu IAR
<kaichiuchi> no one does and it’s for the best
Terlisimo has quit [Quit: Connection reset by beer]
acidx_ is now known as acidx
Starfoxxes has quit [Ping timeout: 252 seconds]
Starfoxxes has joined #osdev
Terlisimo has joined #osdev
bauen1 has joined #osdev
wootehfoot has joined #osdev
<mrvn> kaichiuchi: "We do it because 'Why Not?'"
heat has joined #osdev
<heat> bazunga
<gog> heat
<heat> gog
<gog> bazooper
<kaichiuchi> heat
<heat> kaichiuchi,
<kaichiuchi> hi
<heat> helo
<heat> gog: bazel
<heat> real talk do yall say bayzel or bahzel
<heat> i used to think it was bayzel but I've heard plenty of people say bahzel and now I don't know what to say
<gog> behzel
<heat> yeah that, sorry, not bahzel but behzel
<heat> wikipedia says it's bayzel
<zid`> I say neither
<heat> actually, goog says it's bayzel
<zid`> none of the three
<bslsk05> ​bazel.build: FAQ  |  Bazel
<gog> bagel
<heat> zid says
<heat> bazoong
<gog> nobody listens to zid
<zid`> True
<heat> no one listens to zid, but everyone listens to zid`
<zid`> beyzul would be closest
<zid`> in terms of unambiguous fowels
<zid`> or vowels
<zid`> and.. the thing I say.. basil, but I can't describe that a unambiguously :p
<zid`> strut vowel? idk
<heat> the goog says /ˈbeɪzˌəl/
<zid`> that's NA
<zid`> /ˈbazl/
<zid`> is what my goog says
<heat> no i mean for the actual build system
<zid`> what build system
<heat> /ˈbeɪzˌəl/
<heat> this one
<zid`> named after the town in switzerland?
<bslsk05> ​en.wikipedia.org: Bazel (software) - Wikipedia
<zid`> yea if you spell it with an e you can have ei
<zid`> magic e from FRENCH
<heat> real talk 2 why the fuck does this shit have upside down e
<heat> linguists NEED TO BE STOPPED
<zid`> cus IPA was developed to be typeable on typewriters
<zid`> cutting custom letters is harder than turning letters upside down
<zid`> face -> feice, fak -> fak
<zid`> if you see ^[aeiou].e$ where . = constant in english
<zid`> you use different vowels
<zid`> mac vs mace
<zid`> stag vs stage
<heat> so are you supposed to turn the paper upside down when typing?
<zid`> or the typewriter
<heat> linguists are bonkers
<zid`> I prefer to do it like a ransom note
<zid`> cut the letters out of a book and tape them all to a new sheet of paper
<heat> turning the paper also means turning the typewriter
<heat> it's all a matter of perspective
<zid`> Only if it's jammed
FreeFull has joined #osdev
<kaichiuchi> it’s only 1430
<kaichiuchi> god
<heat> 1430?? praise be
<heat> constantinople is still in byzantium's hands!
<gog> it's 1930
<gog> smh
<mrvn> istanbule?
<heat> quick, let us go forth and defend the holy land from the turks
<gog> great depression
<heat> 1930? hei
<Ermine> heat: Byzantium is a Constantinople, and empire was Byzantine.
<gog> istanbul
<gog> i stan
<heat> tsargrad
<heat> istanbul is actually a pretty recent name
<heat> even under the ottomans it was still constantinople
<Ermine> Byzantium is better. Roma invicta.
<heat> byzantium cringe western roman empire good
<Ermine> s/western//
<heat> the russians always had the ambition of recapturing that shit
<Ermine> ?
jafarlihi has joined #osdev
<heat> after byzantium went bye bye the russian empire thought of itself as the last roman empire
<heat> the "third rome"
<heat> many tsars had the personal ambition of recapturing tsargrad
<mjg> i'm a descendant of the true roman citizens
<mjg> true story
<mjg> !!!
<heat> polska strong 💪💪💪
<heat> better than stupid roman 😡😡
<Ermine> one tsar shitted himeself with such ambitions in 1856.
<heat> Ermine, yup. tbf it took all the great powers to stop russia
<heat> if you want to talk about historical russian L's you can't skip the polish-soviet war
<heat> because polska stronk 💪💪💪💪💪💪💪💪💪💪💪💪
<heat> consonants > weird letters and that was established in 1921
<Ermine> I didn't really study the Polish-Soviet war. I know more about the Winter war. Russia was victorious, but it was Pyhrric victory.
<heat> which winter war?
<heat> you had plenty :v
<Ermine> the one against Finland.
<heat> russia was "victorious" with many quotes
<Ermine> As I said, it's Pyhrric.
<jafarlihi> Can I compile my 32 bit OS with x86_64 GCC cross compiler? Do I need to change anything or is it drop in replacement?
<Ermine> Theoretically it can emit i386 code, but I'd get an i386 (or i686) cross-compiler.
<Ermine> What happening with wiki.osdev.org?
<heat> seems like it's having issues
<heat> maybe the mythical chase will notice
<heat> we have some sort of cargo cult for the osdev wiki
<Ermine> It gives me exceptions about connecting to phpbb database.
<heat> what do you want to hear
<heat> i can try and osdev wiki myself
<geist> jafarlihi: yep. it should work fine
<geist> just compile with -m32
<geist> *however* you might have trouble finding a libgcc.a for i386 if it hasn't been pre-compiled
<heat> geist, i would not recommend -m32, it will break if you link in libgcc
<heat> yeh
<heat> x86_64-elf does not have a 32-bit multilib
<jafarlihi> How am I supposed to set up my infra if my OS supports both 32 and 64? Have two compilers?
<geist> the general solution is yes
<heat> yes
<geist> i keep around prebuilts for like 10 different arches, each has their own prefix
<geist> it's messy, but works nicely
<jafarlihi> Is it good idea to start with 32 bit then add 64 bit support later on, or would it be good to switch right away after having IDT, GDT, and such shit set up?
<geist> go straight to 64
<geist> there's not a strong reason to fiddle with 32bit anything if there's a 64bit equivalent
<jafarlihi> Then I can get rid of my 32 bit cross compiler right?
<jafarlihi> Or do I still need infra for both?
<geist> probably, but it depends o what you're doing
<heat> geist, i think skipping 32-bit isn't a good idea when starting out. paging is hard :(
<heat> getting to 64-bit is a fucking task and a half, if you're starting out, in assembly
<heat> compared to riscv and arm64 that is
<Ermine> Do you mean having OS images for both x86 and x64 or do you mean making your system run both x86 and x64 binaries?
<jafarlihi> I just want to get to 64 and I already have 32 bit shit set up like ISRs IDT and GDT, not sure what to do with current build system
<heat> at one point we should all collectively say that x86 is not the ideal architecture for someone starting out
<heat> riscv is simple and works, even if at the end of the day it's a bit of a trashy architecture
<Ermine> heat: x86 is what many people have at their houses to experiment with. Anything else would require an emulator.
<heat> which is exactly what you should use when starting out
sortie has quit [Ping timeout: 260 seconds]
sortie has joined #osdev
jafarlihi has quit [Quit: WeeChat 3.7.1]
<kaichiuchi> but i want to use x86-64 :(
<kaichiuchi> complexity is a given with this field no matter the architecture
<kaichiuchi> i get that a simpler architecture might make things a little easier, but that won’t last
<geist> hmm, thats true, also getting paging working is a pain, you're right
<geist> i *guess* when you start out you're basically startig with hello world anyway, and it doesn't matter much what arch that's in
<kaichiuchi> yeah, you are *going* to hit deep complexity at some point
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<sortie> My kernel suffers from lost wakeups in my kthread_cond_{wait,signal,broadcast} API :(
<sortie> The good news is that I can easily reproduce it (somehow running qemu natively while ssh'ing into the VM recursively has a double digit percentage chance of triggering it) and then I can easily attach gdb and inspect all the threads the deadlocked kernel, but... it's hard to figure out WHY the wakeups got lost and the code looks correct
<sortie> My gdb skill level is now advanced enough that I can attach to a VM running my OS, run a gdb script I wrote, and it dumps stacktraces of all the threads (and I can easily switch to any thread to debug it)
<sortie> All of my production VMs run with a VNC display via local ssh into, then I can switch to the qemu monitor, run gdbserver, and then attach a gdb to it (after building a matching kernel locally with debug symbols) and see why they malfunctioned
<sortie> https://paste.ahti.space/f43ee1.html ← Hey I got a dual deadlock! The kernel 'worker' thread has work to do (but lost a wakeup and is still waiting) and the kernel 'interrupt' thread is stuck waiting for a mutex (which is currently unlocked, so it lost a wakeup)
<bslsk05> ​paste.ahti.space <no title>
<heat> kaichiuchi, geist, it's just that you have a much steeper hill to climb if you need to immediately set up paging, a gdt, etc before you've even seen a line of C
<heat> i can tell you that newb-me would've felt discouraged if I needed to do that as my first steps
<sortie> Yeah I recommend the 32-bit unpaged multiboot Bare Bones for that reason
<sortie> Seeing the Hello World like that is massively motivating
<sortie> Especially if you can try it on real hardware, that's just mind blowing
<heat> while in 32-bit x86, riscv-anything, arm-anything, you can call or jalr or bl your way into C and try things out that way
<heat> much more of a piecemeal experience
<heat> just to set up x86_64 you have "what's a segment, what's a gdt, what are virtual and physical addresses, what's this paging thing and god oh god why is it so painful"
<heat> compounded by the fact that you're writing everything in assembly
<heat> the closest you have to easy-mode-x86_64 is something like booting straight from EFI and reusing their shit, crossing your fingers and hoping nothing breaks
<geist> heat: sure, point taken
<sortie> I may have reached the ”oh god how did it ever work“ stage of debugging
<sortie> I added some assertions let's see if it burns
ThinkT510 has quit [Quit: WeeChat 3.7.1]
<heat> sortie, fairly sure you have a race in your kutex_wait
<heat> you should check the value under the lock, and start sleeping under it
<Ermine> Make kutex_wait kute.
<sbalmos> I keep thinking through my VFS designs, wondering if it's really worth it to have separate volumes for apps (user-read-only, executable perms) vs user data (user-writable, not executable perms)
<kof123> i just decided make nearly all fields optional and deal with it later lol slow perhaps, but very flexible
<kof123> so for specific use cases, user/whoever will need to make an fs with fields that play some role
<kof123> and they can either cram things all on one fs, or divide across multiple
<kof123> "mechanism, not policy" -- supposedly was used by X
<kof123> so i will perhaps end up with "templates" like "if you need these features, need to point this thing at fs(es) with these minimum required fields enabled" etc.
<heat> sbalmos, why is that part of your vfs?
<sbalmos> heat: that just happened to be where I was sticking stream-of-conscious bullet point notes. not vfs, kinda fs / system policy related
ThinkT510 has joined #osdev
gildasio has quit [Ping timeout: 255 seconds]
<heat> geist, hast thou played around with passing more info directly from the kernel to userspace, through a vdso like thing?
<heat> i've been thinking that passing things like "is a thread currently scheduled or not?" directly from the kernel to the user through a simple write would be interesting
<heat> like the kernel just writing that out in a context switch
gxt_ has joined #osdev
<heat> could help on things like user mutex spinning
gxt has quit [Ping timeout: 255 seconds]
gildasio has joined #osdev
<geist> yah main problem there of course is making sure the kernel can do it without any failure
<geist> so probably would involve having to share a page or memory region with the kernel up front, and pin it so that it cannot go away
<geist> *reading* from user space via something like that is much trickier
<heat> the idea would be to register it through a syscall or something
<heat> locking pages would be a pain ofc and if this were to be done naively in the libc you'd end up severely limiting the number of threads you can have (by the virtue of locked memory limits)
<heat> in UNIX-likes that is
darkstardevx has quit [Remote host closed the connection]
darkstardevx has joined #osdev
<geist> yah. but i do think having a shared page per thread or so makes sense
<geist> you can even use it as a bounce buffer for short messages and whatnot
<geist> if yuo bake that into your syscall mechanism
DutchIngraham has quit [Quit: WeeChat 3.7]
spikeheron has joined #osdev
<sortie> Today in "how did this even work in the first place" level of debugging: Turns out my futex(2) syscall implementation used the same wait queue linked list as the backend of kthread_mutex_lock(), however futex(2) also used kthread_mutex_lock to protect that list, so if that lock was contended, then a thread might end up in the linked list twice, and upon return unlink a bunch of unrelated kernel waiters, and they lose wakeups
<sortie> Turns out the answer was that I basically had never run a workload that contended futex(2)
<sortie> 's backing mutex in a process until qemu which was multi-threaded enough to do it reliably
<heat> cowabunga
wootehfoot has quit [Read error: Connection reset by peer]
FreeFull has quit []
xenos1984 has quit [Read error: Connection reset by peer]
gog has quit [Ping timeout: 256 seconds]
gog has joined #osdev