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
<zid> I am growing fish and selling them, does openbsd have this feature yet
<zid> I buy more random fish with my profits, hoping to pull legendaries, who provide passive income and can be put into my other tank
<qookie> where can i short fish
<zid> fish futures market
<kazinsal> insider fish trading
<zid> Possibly, but I can't say in which direction
<zid> https://gaby.com.pl/img/freshwaterfish/img13.jpg There's a place in poland that makes these, I see them in shops occasionally here
<zid> They're pretty good I kinda want one
<zid> The cat might like it if nothing else
<zid> Not that it has ever seen a real fish, probably wouldn't be able to make heads or tails of it
Bonstra has quit [Quit: Pouf c'est tout !]
<qookie> can't say i've seen it in stores in poland :^)
<zid> go into many fishing tackle shops? :P
Bonstra has joined #osdev
<qookie> that's the thing, i don't :^)
<zid> I am *shocked* you've not seen one then
<qookie> same, produced here => sold in every store here, after all
<zid> Yea, it should be right next to the milk
<zid> milk, full range of gaby fish pillows, weird hotdogs
<qookie> buy a 12 pack of milk, get a fish plush for free
<zid> I think price wise it might end up the other way around
<zid> They're like £25 for the non-tiny ones
<zid> What's that in zenny
<qookie> holy, about 100 zł
<qookie> 130 even damn
Turn_Left has quit [Read error: Connection reset by peer]
tixlegeek has quit [Quit: tixlegeek]
gog has quit [Ping timeout: 264 seconds]
bliminse has quit [Ping timeout: 240 seconds]
bliminse has joined #osdev
<geist> oh hey look at that, there's a dev board for a stm32h5 series, with a cortex-m33
<geist> not that expensive either, less than $30
netbsduser` has quit [Ping timeout: 260 seconds]
[itchyjunk] has quit [Read error: Connection reset by peer]
mavhq has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
mavhq has joined #osdev
edr has quit [Quit: Leaving]
eddof13 has joined #osdev
eddof13 has quit [Client Quit]
smeso has quit [Quit: smeso]
smeso has joined #osdev
netbsduser` has joined #osdev
Arthuria has joined #osdev
Hammdist has quit [Quit: Client closed]
Hammdist has joined #osdev
Arthuria has quit [Ping timeout: 240 seconds]
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
netbsduser` has quit [Ping timeout: 252 seconds]
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
frkazoid333 has quit [Ping timeout: 248 seconds]
duderonomy has joined #osdev
Osmten has joined #osdev
Hammdist has quit [Quit: Client closed]
netbsduser` has joined #osdev
cloudowind has quit [Ping timeout: 260 seconds]
Hammdist has joined #osdev
netbsduser` has quit [Ping timeout: 260 seconds]
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
Jari-- has joined #osdev
<Jari--> morning
<klys> gm.
<Jari--> Nicotine + coffee. Can eat later at any time, eating is not important now:)
<Jari--> 65. day without a single smoke : ]]
<klys> :) yesterday morning I just ate a prot bar and a ham & gouda sandwich for breakfast. tomorrow morning is still seven hours into the future
<zid> wat
<klys> oh it's almost midnight
gog has joined #osdev
<klys> gog: ^,,^
<gog> hiii
agent314 has quit [Ping timeout: 252 seconds]
* kazinsal pets gog
netbsduser` has joined #osdev
rustyy has quit [Quit: leaving]
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
rustyy has joined #osdev
alpha2023 has quit [Read error: Connection reset by peer]
alpha2023 has joined #osdev
netbsduser` has quit [Ping timeout: 264 seconds]
Jari-- has quit [Ping timeout: 255 seconds]
goliath has joined #osdev
netbsduser` has joined #osdev
PublicWiFi has quit [Ping timeout: 246 seconds]
blockhead has quit [Read error: Connection reset by peer]
marshmallow has joined #osdev
netbsduser` has quit [Ping timeout: 246 seconds]
moberg has quit [Ping timeout: 248 seconds]
moberg has joined #osdev
grumbler has joined #osdev
vdamewood has joined #osdev
* gog prr
<gog> i had a rough night ugh
<gog> i hate my apartment
gbowne1 has quit [Quit: Leaving]
cloudowind has joined #osdev
grumbler_ has joined #osdev
grumbler has quit [Ping timeout: 252 seconds]
<kazinsal> I had apartment inspections yesterday and it was nervewracking
<kazinsal> particularly because this building was built like shit and the floor is slowly separating from the baseboard
<kazinsal> and the floors are the worst cheap laminate found in the country, so I gouged the hell out of it within 20 minutes of moving in
<gog> oof
grumbler_ has quit [Quit: It's time]
<sham1> foo
levitating has joined #osdev
heat has joined #osdev
Burgundy has joined #osdev
<Ermine> gog: may I pet you
<levitating> Does anyone understand why this https://termbin.com/y54e disassembles into https://termbin.com/0v8p?
cloudowind has quit [Read error: Connection reset by peer]
<zid> yes
<zid> because you disassembled it wrong
<zid> or assembled, potentially
<zid> It's disassembled as 64bit for sure
<levitating> I just assembled with nasm -efelf64, and this disassembly is from objdump, gdb shows the same. Th
gog has quit [Read error: Connection reset by peer]
<levitating> This is the only weird thing I've noticed in the disassembly
<zid> a3 00 10 10 00 mov ds:0x101000,eax
<zid> a3 00 10 10 00 b8 00 movabs ds:0x103000b800101000,eax
<zid> a3 00 10 10 00 b8 00 movabs ds:0x103000b800101000,eax
<zid> 30 10
<zid> 32bit, then 64bit disassembly
<zid> did you .bits 32 at some point?
<levitating> Yes! I did, now I need to remember why...
<zid> Because it's 32bit code
<zid> but it explains why when stuffed into a 64bit elf, it disassembles as 64bit code rather cleanly :P
<zid> err uncleanly
bauen1 has quit [Ping timeout: 246 seconds]
<zid> Because it isn't, because you told your assembler to lie
<zid> (which may infact be what you want, you just need to force your disassembler to 32bit mode for that disassembly)
GeDaMo has joined #osdev
<levitating> Looks fine with objdump configured for i386, thanks!
<levitating> Now back to figuring out why this code doesn't work..
<zid> That's the fun bit though
<levitating> It was, but I've been working on this project on and off for months because I can't get the PAE enabled without it crashing.
<zid> well, that's very debuggable at least
<zid> If you're enabling pae, why are you using 64bit elf?
<zid> like, pae needs to be on to enter 64bit long mode, but you never actually.. use it
<levitating> Hmm, I am following an outdated guide where they identity page a gigabyte or so before entering long mode and starting the kernel.
<heat> that sounds reasonable
<zid> are you starting from real mode or something?
<levitating> Yes I think so
<zid> you.. think so
<heat> what
gog has joined #osdev
Left_Turn has joined #osdev
<zid> heat, my hubris at having enjoyed the nice thunderstorm the other day has led to it being extremely cold and wimdy today :(
<levitating> Like I said it's been a long time since I started this projec and I am no expert to say the least. I boot using grub, I think it's already in protected mode at that point?
<heat> yes
<heat> can you show us the code?
<zid> you can literally just make some 64bit page tables you intend to use somewhere, and switch into long mode with them directly
<zid> from gru
<zid> as long as you leave the page that runs the cpu mode switch mapped in your new page tables so that you don't rip the memory out from under the instruction pointer, it's gtg
orccoin has joined #osdev
<levitating> https://github.com/LevitatingBusinessMan/runix/blob/master/src/boot/boot.asm Here is the code, remember I am just trying to learn.
<bslsk05> ​github.com: runix/src/boot/boot.asm at master · LevitatingBusinessMan/runix · GitHub
<kof13> runix was an old ancient psx (playstation 1) linux port :D just saying :D i don't think anyone will get mad
<zid> PDPT* btw
<kof13> IIRC it was russian
<zid> PDP is a series of small microcomputers from IBM
<levitating> kof13: I actually did search for the name I bit. I called it runix because I intended to write in Rust and my name starts with an R.
<kof13> yeah, you may have to dig to actually find it, it is 2.x something :D
<kof13> i believe it was never "mainlined"
<zid> Your .enable_paging is almost identical to mine
<heat> you say you crash when enabling PAE?
<zid> (except I enable NX too), but it's lacking an lgdt
<zid> lgdt is cool
<levitating> zid: Right, I am not sure where I got PDPT from.
<heat> that seems odd
<zid> PDP*
<zid> PDPT is correct
<zid> page directory page table
<heat> i mean PDPT is a table of PDPs
nyah has joined #osdev
<zid> of PDPTEs
<levitating> heat: After setting cr0 qemu just goes back into the bios.
<zid> you triplefaulted
<zid> -no-shutdown -no-reboot -d int
<zid> run with that
<zid> ah PDP = programmed data processor
<zid> from DEC not IBM if I said IBM
<nortti> oh I presumed you were intentionally lying there, what with "small microcomputers" too
<heat> levitating, oh ok cr0?
<zid> small microcomputers is correct!
<zid> mini?
<heat> so you triple fault when enabling paging? makes sense
<heat> you forgot to actually enable long mode
<nortti> zid: they range from mini (e.g. pdp-8, pdpd-12) to mainframe (pdp-11)
<nortti> er
<zid> oh yea where's the wmwrsrs
<heat> you need a proper GDT with at least a compat 32-bit code segment and a 64-bit code segment
<nortti> pdp-11* pdp-10*
<zid> nah he enables long mode heat
<heat> no, the wrmsr is there
<zid> on 153-156
grumbler has joined #osdev
<zid> EFER.LM
<heat> but you need good segments to go along with it
<levitating> zid: Now it hangs and qemu is giving a long output starting with SMM: enter
<zid> yea ignore the SMM ones, at the bottom should be the fault that was tripelfaulting you
<levitating> I am not sure what triple faulting is I'd have to read into it
<levitating> -no-shutdown -no-reboot -d int
<levitating> nvm
<zid> the cpu resetting because it got three exceptions in a row
<levitating> wrong clipboard
<levitating> check_exception old: 0x8 new 0xd
<zid> fault -> fault didn't work -> double fault -> double fault didn't work -> reset
<zid> You want the first of the three
<zid> that aren't smm, old should be 0xffff
<zid> (It might only print two I guess, a triplefault is an instant reset, not something you handle)
<heat> zid, 32-bit compat segments are different from 32-bit non-compat right?
<heat> i think so?
<zid> I've never used 32bit compat
<heat> sure you have
<zid> nope
<heat> when switching to 64-bit
<zid> nope
<heat> you need to
<zid> they don't flush until you jump
<zid> you go straight from pmode to long if you do it in this order
<zid> compat is when you go back into 32bit from long
<zid> There's a diagram in the intel manual that I can never find
<heat> hmmm i think you're right yeah
<zid> There are three routes in, and 2 routes out of each mode all in a nice diagram
<zid> and like 16 routes to #GP
<heat> long-mode MMU translations should apply right from the getgo as soon as you enable paging
<zid> but grub is in linear mem not virtual
<zid> so you don't have to play silly games
<zid> you enable paging + long mode, then the iret puts you into *both*
cloudowind has joined #osdev
<zid> or however you switch
<zid> jmp 8:
<bslsk05> ​github.com: bootstrap/boot/long.asm at master · zid/bootstrap · GitHub
<zid> Literally identical except I enable NX too, and remembered to lgdt so that it won't explode
<zid> but he said the cr0 mov on 33 is what crashes him, which is literally the line before I lgdt anyway, so whatever
<heat> yeah i... i don't see it
<zid> moving into cr0 shouldn't actually change anything until the ret at the dn
<zid> end
<zid> but we haven't heard back from his old 0xffffff yet
<zid> it might infact be the ret
<heat> i tried to build it but the obvious cargo build doesn't work so i ran out of options
<heat> oh well
<levitating> Actually I just tested it, on the mov cr0 GDB gives an error. But the crash occurs when I try to si after that.
<zid> I can't build rust either
<zid> ignore gdb, look at qemu's monitor
<levitating> Which executes the ret
<zid> yea, the ret is guarenteed to fail
<zid> you need to lgdt some 64bit segments, and load your segment selectors, see my github link for reference
<levitating> No need to build rust, I don't use any rust code yet, I was just testing with building without stdlib. You can build by going into src/boot and running make
<levitating> It will just create an iso with the bootcode and grub
<heat> ah ok
<zid> so will zid/bootstrap.git
<heat> zid, you don't *need* the ret
<zid> It uses GRAFTED MOUNT POINTS
<heat> you'll just run in 32-bit compat
<zid> heat: the ret will update all those cr0 cr4 etc bits to be live
<zid> and it'll go nuts and crash
<zid> I think ret will, anyway
<levitating> This is guide I was trying to follow: https://os.phil-opp.com/entering-longmode/#enable-paging. I am checking out your code rn
<bslsk05> ​os.phil-opp.com: Entering Long Mode | Writing an OS in Rust (First Edition)
<levitating> (not follow directly btw, just trying to figure it out myself with wikipedia and OSDev Wiki)
<zid> looks like ret doesn't cause a reload, if he has one
<heat> well your page tables are borked levitating
heat has quit [Remote host closed the connection]
<zid> so he does ret; lgdt
<zid> I just do the lgdt
heat has joined #osdev
<levitating> heat: Can you spot the issue?
<zid> knowing the fault would be nice..
<zid> it looks *approximately* correct to the first order at least, pml4 contains one entry, [0] which points to a PDPT with a [0] entry, etc
<zid> check_exception old: 0xffffffff new 0xe
<zid> 0: v=0e e=0000 i=0 cpl=0 IP=0010:0000000000100122 pc=0000000000100122 SP=0018:000000000010403c CR2=0000000000100122
Turn_Left has joined #osdev
<zid> what's at 0x100122
<heat> ok i fixed it
<levitating> I haven't really looked at that yet, because I was running without --no-shutdown as of 20 minutes ago
<zid> 0e is a page fault btw
<zid> you could info tlb
<bslsk05> ​gist.github.com: boot.asm · GitHub
<zid> ooh that was fast
<heat> just a silly logic error
<zid> oh yea, add eax, 8
<levitating> Oh my bad I already had a tiny modification in that area that wasn't commited
<zid> anyway, put info tlb into the monitor
<levitating> info tlb?
<zid> yes?
<heat> page directory entries were all 0 zid
<heat> now they're not
<zid> probably helpful, yea
Left_Turn has quit [Ping timeout: 240 seconds]
<zid> as well as not actually.. writing anything
<zid> and using eax for two different things
<zid> it was solid code otherwise
<heat> yeah
<levitating> zid: I actually fixed that but forgot to commit, but I guess I didn't fix it properly. Let me work in heats patch
<zid> info tlb after you try
<zid> This is why I do it in C :P
sudden has quit [Remote host closed the connection]
<levitating> It's not fixed
<zid> info tlb!
<levitating> I am not sure what info tlb is?
<heat> how's it not fixed?
<heat> it's fixed here??
<levitating> hmm weird, gimme a sec
<heat> on KVM (intel) and qemu tcg
<levitating> Okay, I checked out into a previous commit and applied your patch and it worked! Thanks heat
<zid> https://gist.github.com/zid/ae5e5ef4aa706c608fafafefee85afe2 What I end up with, I have no idea what half this stuff is though :p
<bslsk05> ​gist.github.com: gist:ae5e5ef4aa706c608fafafefee85afe2 · GitHub
<heat> cheers
<levitating> Oh you type info tlb into qemu?
<zid> I think.. 5 pages of kernel, 1 page of stack, then my ramfs
<zid> why didn't you ask, if you didn't know what I meant >_<
<heat> they asked
<zid> they said info tlb? and I said yes
Osmten has quit [Quit: Client closed]
<heat> <levitating> I am not sure what info tlb is?
<zid> oh that's the third time I said it
<zid> but I was busy making my paste rather than responding
<heat> i wanna show off my info tlb too
<zid> My info tlb fuckin *explodes*
<zid> I had to lower the ram limit on qemu, my scrollback can't go far enough on my terminal
<zid> even after upping my scrollback
<zid> turns out mapping a gig a page at a time a couple of times generates a bunch of lines, who knew
<bslsk05> ​gist.github.com: info_tlb.txt · GitHub
<zid> that looks like an autogenerated stack address :P
<heat> 70k lines
<zid> I need to remove my bootstrap pages for realisies at some point
<zid> first thing mem_init() should do in kernel is unmap that shit but I just never got around to it
<heat> 0xffff800... is vmalloc space, so that's why it's so fragmented and maps random shit
<heat> 0xffffd... is the physmap, it ends up pretty tidy with 1GB pages
<zid> fffffe8000000000: 0000000000527000 ---DA---W
<zid> ffffff0000001000: 0000000000515000 ----A--UW
<zid> ffffff0000400000: 00000000005f2000 ---DA--UW
<zid> ffffff0000000000: 0000000000514000 ---DA--UW
<zid> I have no idea what this is in mine
<zid> page tables?
<zid> been forever since I messed with this
<heat> maybe? looks plausible looking at the phys addresses
<heat> i don't use recursive page tables
<heat> that's the devil's lettuce
tixlegeek has joined #osdev
<zid> yea I don't think I actually need that mapping anymore
<zid> I was holding out on "just map everything" for a while and used it
<zid> ffffffff80000000: 0000000000105000 ----A----
<zid> ffffffff80001000: 0000000000106000 ---------
<heat> just map everything ftw
<zid> Who needs the second page of my kernel, not me apparently
<heat> BLOAT
<zid> one day I will write out my actual memory map and prune this crap and make sure it makes sense
<zid> I have random acpi tables and framebuffer bits and stuff strewn all over
<zid> For acpi I literally just picked a pml4e I wasn't using and offset mapped it in I think
<levitating> Hey thanks a lot for all of your help (again)
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
<zid> 0xffff800...000 + n -> n or whatever, so that I could read my acpi tables
<zid> then never unmapped any of it once I was done
<zid> which again predates the "just map everything", so I think it's in the 'everything' map too and should be using that
<zid> ffun fun
<heat> funsafe-math
xenos1984 has quit [Read error: Connection reset by peer]
<zid> fun-math
<zid> -ffun-math, randomly adds 0.01 to some results
<zid> sometimes sqrts them
<zid> I featured req'd it to wakely
xenos1984 has joined #osdev
<levitating> The actual reason that it was broken for my local version, was because I was still using EAX as a pointer to PDP even though I had already or'd the present and writable bit on it.
<zid> yep, as mentioned
<mcrod> hi
grumbler has quit [Quit: It's time]
netbsduser` has joined #osdev
kof13 has quit [Ping timeout: 252 seconds]
cloudowind has quit [Quit: Lost terminal]
tixlegeek has quit [Quit: tixlegeek]
stolen has joined #osdev
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bradd has quit [Ping timeout: 252 seconds]
bliminse has quit [Quit: leaving]
zxrom has quit [Ping timeout: 244 seconds]
tixlegeek has joined #osdev
bauen1 has joined #osdev
orccoin has quit [Read error: Connection reset by peer]
PublicWiFi has joined #osdev
CaCode has joined #osdev
<bslsk05> ​github.com: Release LLVM 17.0.1 · llvm/llvm-project · GitHub
<gog> oopsie doodle
<gog> maybe somebody there is like me and they're not a good programmer
bauen1 has quit [Ping timeout: 260 seconds]
<Mutabah> Any idea what the issue was? I'm curious
<bslsk05> ​discourse.llvm.org: LLVM 17.0.1 released! - Announcements - LLVM Discussion Forums
<heat> >Note that 17.0.0 was pushed out, but contained errors in the version information, so we decided to quickly follow up with 17.0.1
<heat> the fcheck-new flag isn't mentioned in the release notes but yeah i implemented it and its there
heat has quit [Remote host closed the connection]
heat has joined #osdev
bauen1 has joined #osdev
netbsduser` has quit [Ping timeout: 252 seconds]
zxrom has joined #osdev
tixlegeek has quit [Quit: tixlegeek]
netbsduser` has joined #osdev
rustyy has quit [Ping timeout: 260 seconds]
goliath has quit [Quit: SIGSEGV]
frkazoid333 has joined #osdev
linkdd has joined #osdev
rustyy has joined #osdev
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
tixlegeek has joined #osdev
eddof13 has joined #osdev
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sortie has quit [Ping timeout: 245 seconds]
stolen has quit [Quit: Connection closed for inactivity]
sortie has joined #osdev
sortie has quit [Remote host closed the connection]
sortie has joined #osdev
eddof13 has joined #osdev
theboringkid has joined #osdev
eddof13 has quit [Ping timeout: 244 seconds]
dude12312414 has joined #osdev
goliath has joined #osdev
Hammdist has quit [Quit: Client closed]
theboringkid has quit [Ping timeout: 240 seconds]
<mcrod> hi
<heat> i have a proposal to ban "hi" and "openbsd" in this channel
<gog> hi
pounce has quit [Ping timeout: 240 seconds]
pounce has joined #osdev
xenos1984 has quit [Ping timeout: 260 seconds]
xenos1984 has joined #osdev
<mcrod> C++20 is still not the default?
<mcrod> gog: may I pet you
<gog> yes
<gog> heat: hi
<gog> i'm sad
* mcrod pets gog
* gog prr
bauen1 has quit [Ping timeout: 240 seconds]
flom84 has joined #osdev
<gog> i'm gonna make fake tikka masala for dinner
bauen1 has joined #osdev
<gog> i don't have time to make naan bread :(
tixlegeek has quit [Quit: tixlegeek]
<jimbzy> NaN bread
bliminse has joined #osdev
<gog> yes
<gog> itis nota number
<gog> it is bread
<gog> bread is not numbers
<heat> bread()
<gog> bread is not a function
<gog> TypeError
<heat> bread is definitely a function
<heat> just like lookuppn
bauen1 has quit [Ping timeout: 260 seconds]
Burgundy has quit [Ping timeout: 240 seconds]
<mcrod> .
<mcrod> heat: guess who joined our company
<heat> linus torvalds??
<mcrod> no
theruran has quit [Server closed connection]
<mcrod> you have two more guesses
<mcrod> it is someone you know
<heat> is it gog
<mcrod> no
theruran has joined #osdev
<heat> is it me
<mcrod> yes
<mcrod> i shit you not
<heat> poggers
<mcrod> his name is pedro falcato
<mcrod> couldn’t believe it
<heat> what
<heat> fuck off mate
<mcrod> wut
<heat> i need proof
<heat> there's no way
<heat> i've never met someone with my name
<heat> like, ever
<gog> lmao
<gog> pedro falcato
<gog> pedro falcato
<heat> shut up gog
<heat> dont steal my name
<heat> it's mine only
<mcrod> vote for pedro
<heat> do NOT vote for me
<heat> bad idea
<gog> my name is ada
<gog> or is it michael
<gog> or maybe pedro
<gog> ¯\_(ツ)_/¯
gog has quit [Quit: Konversation terminated!]
xenos1984 has quit [Ping timeout: 258 seconds]
deriamis_ has joined #osdev
deriamis has quit [Ping timeout: 264 seconds]
flom84 has quit [Ping timeout: 260 seconds]
<mcrod> it’s pog
xenos1984 has joined #osdev
netbsduser` has quit [Remote host closed the connection]
netbsduser` has joined #osdev
orccoin has joined #osdev
gog has joined #osdev
Burgundy has joined #osdev
bauen1 has joined #osdev
<bslsk05> ​herbsutter.com: Trip report: Summer ISO C++ standards meeting (Varna, Bulgaria) – Sutter’s Mill
<heat> c++26 got RCU and hazard pointers
gorgonical has joined #osdev
<Ermine> heat: why didn't you propose banning freebsd or netbsd?
Left_Turn has joined #osdev
<Ermine> On other news, I'm freaking lucky today
tixlegeek has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
Turn_Left has quit [Ping timeout: 240 seconds]
gog has quit [Ping timeout: 245 seconds]
<gorgonical> Holy shit I am so out of sorts I thought it was Wednesday already
<gorgonical> I was thinking "jeez i thought i just went to the gym yesterday, I gotta go again??"
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
melonai3 has joined #osdev
friedy has joined #osdev
<mcrod> what’s a hazard pointer
melonai has quit [Ping timeout: 255 seconds]
melonai3 is now known as melonai
<mcrod> and why does google not tell me what RCU stands for
<Ermine> google bad
<bslsk05> ​www.kernel.org: What is RCU? -- "Read, Copy, Update" — The Linux Kernel documentation
<gorgonical> indeed, google bad, kagi good
<mcrod> also
<mcrod> maybe I just don’t have a lot of multithreaded experience
<mcrod> and, I don’t
<mcrod> but I feel like there’s a *lot* of bullshit around it
nvmd has joined #osdev
<mcrod> in fact I’m actually not sure how you get really deep into the multithreaded world except “write these enormously complicated things that you won’t understand 5 years from now”
<gorgonical> one of my biggest pet peeves for c style is when the braces are omitted for single-statement if-elses
melonai3 has joined #osdev
nvmd has quit [Ping timeout: 260 seconds]
theboringkid has joined #osdev
melonai has quit [Ping timeout: 260 seconds]
melonai3 is now known as melonai
<mcrod> yes
<mcrod> i agree
nvmd has joined #osdev
theboringkid has quit [Ping timeout: 260 seconds]
goliath has quit [Quit: SIGSEGV]
divine has quit [Ping timeout: 246 seconds]
friedy has quit [Quit: Client closed]
nvmd has quit [Ping timeout: 260 seconds]
divine has joined #osdev
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
gog has joined #osdev
nvmd has joined #osdev
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
heat_ has joined #osdev
heat has quit [Ping timeout: 260 seconds]
<heat_> Ermine, because openbsd sucks harder
heat_ is now known as heat
heat_ has joined #osdev
heat has quit [Ping timeout: 246 seconds]
skipwich has quit [Ping timeout: 260 seconds]
skipwich has joined #osdev
nvmd has quit [Ping timeout: 258 seconds]
heat_ has quit [Read error: Connection reset by peer]
heat has joined #osdev
xenos1984 has quit [Ping timeout: 260 seconds]
xenos1984 has joined #osdev
<geist> gorgonical: oh that rcu link is quite good
<gorgonical> first result on kagi with "linux rcu" even
skipwich has quit [Ping timeout: 258 seconds]
skipwich has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
rorx has quit [Ping timeout: 264 seconds]
<netbsduser`> rcu is easy: first you read, then you copy, then you update, then you win
<sbalmos> huh... did reddit just remove the osdev sub?
<nortti> still there for me
<sbalmos> eh, looks like reddit's servers are in a split-brain
<netbsduser`> sbalmos: is that the one where they are "os deving" by lightly modifying the source code of the windows xp source code leak? if so i am not surprised
<sbalmos> no
<sbalmos> it's the one where every other day someone asks "how do I get started writing my own os? I know JS and Python lolz"
nvmd has joined #osdev
<netbsduser`> interesting you mention that
<netbsduser`> the famous fenolossa osdev tutorial now has a warning banner on it
xenos1984 has quit [Ping timeout: 260 seconds]
friedy has joined #osdev
<heat> what's that?
<heat> never heard of it
<heat> geist, paul mckenney's book is also really good
<heat> but in reality what was standardized was the API, not the implementation
<heat> what will almost surely end up happening is epoch-based reclamation will start popping up
orccoin has quit [Ping timeout: 240 seconds]
<heat> just like facebook's folly RCU implementation (literally implements the C++26 paper, but in folly:: instead of std::)
<heat> will it be any good? who knows, but better than no RCU i bet
<Cindy> fasaboo
<Cindy> bro, who needs C++
<Cindy> when you can actually control the object size in C, unlike C++, where after you link the program to STL, it bloats up to 5 MB
<Cindy> even if you use like one STL function
<heat> ok
<heat> is this going to become a C vs C++ discussion?
<Cindy> sorr
<Cindy> sorry
<heat> np
<heat> i just don't really have the patience for this kind of sillyness really
<heat> really am just discussing RCU
<Ermine> what rcu means in context of the language
<heat> wdym
<Cindy> real context unit
Gooberpatrol66 has quit [Ping timeout: 245 seconds]
xenos1984 has joined #osdev
skipwich has quit [Ping timeout: 252 seconds]
skipwich has joined #osdev
Matt|home has quit [Ping timeout: 240 seconds]
<mcrod> hi
<mcrod> sorry heat
<heat> together we can stop the his
<mcrod> no we can’t
nvmd has quit [Ping timeout: 260 seconds]
<mcrod> i’m a nice person who says hi a lot
nvmd has joined #osdev
Matt|home has joined #osdev
grumbler has joined #osdev
<netbsduser`> heat: a hugely popular osdev tutorial that gets reddit, hackernews, and similar crowds roaring with wonder
<netbsduser`> it had been causing some upset in the osdev discord because of a number of problems with it which would lead the unwary to ask about the exact problems in the discord
<jimbzy> Problems are good, though. That's how we learn.
<sbalmos> the guy's repo with all of the data even has a warning at the top saying it has many bugs and design issues
<netbsduser`> jimbzy: the trouble is when the problems get fundamental
<sbalmos> like a few other "starter libraries" that abuse undefined behavior in C/EFI, are horribly buggy, etc. same questions over and over.
<netbsduser`> for example most osdev tutorials are really "write a bootsector and do some basic x86 initialisation" tutorials
<sbalmos> not to mention people who don't know ${language} /at all/, and keep making boneheaded bit-manipulation errors
<gog> hi
nvmd has quit [Quit: WeeChat 3.8]
<heat> back in my day we had jamesm's tutorial
<heat> not these fancy pants tutorials
<jimbzy> sbalmos, Bad way to learn a language.
<gog> ah i remember jamesm tutoral
<jimbzy> ya
<sbalmos> jimbzy: no kidding
<gog> mcrod: hi
<sbalmos> jimbzy: they don't know, say, C. they don't understand bit manipulation, assembly, etc etc etc
<mcrod> gog: hi
<netbsduser`> jamesm realised the error of his ways and later plotted to create a teaching kernel which would be an actual kernel
<gog> can i hug you
<jimbzy> Yeah, that's not a good way to get started.
<mcrod> gog: yes of course
<zid> sbalmos: You get this same issue with people trying to 'learn reverse engineering'
* gog hug mcq
<gog> mcrod:
<zid> Like it isn't all applied knowledge
<sbalmos> mm hmm
* mcrod hug gog
<jimbzy> That's pretty much how I learned assembly, zid.
<gog> you learn by doing
* sbalmos puts a plate of gognip over in the corner for gog
<zid> you learn RE by learning C, binutils, windbg, assembly, reading the manuals, etc, not from 'learning RE'. OSdev is very very similar imo, except a couple of algos that are rare outside of it like some memory stuff.
* gog rolls around and sniffs the gognip
<gog> i taught myself everything i know
<jimbzy> I learned how to read it pretty well, and then I started writing little patches.
<netbsduser`> doing is helpful but one of the most important things for most people is to have intimate knowledge of an existing OS
<gog> jk i had problems and asked for advice and found solutions other people did
<heat> openbsd
* heat has been banned from #osdev
<gog> hi
<jimbzy> For that, you need Andy Mininxbaum's books.
<netbsduser`> you can imitate openbsd, but by god, implement a unified buffer cache
<heat> gog has been banned from #osdev
<gog> linux torvald
<heat> netbsduser`, did you know their vfork() is still fake?
<netbsduser`> heat: i didn't, but i am not surprised
<heat> the man page is even written in a dismissive tone
<mcrod> all man pages are
<mcrod> it’s unix
<jimbzy> "This shit may, or may not work. I don't know. Try it."
<heat> >Since fork(2) is now efficient,
<heat> lads, we've solved fork(2)
<heat> inefficiency is no more
<netbsduser`> that's right
<heat> and apparently mmaped files and write()/read() don't actually sync up automatically
<netbsduser`> as long as you only go on a texas tlb shootdown massacre and grind potentially gigabytes of address space to set up copy-on-write, you are efficient
<heat> which is ridonculous
<netbsduser`> that's the fault of their lack of a unified buffer cache
<heat> how is that the buffer cache's problem?
<heat> just sounds like a bad page cache to me...
<netbsduser`> it's because the code path for filling the filepage cache accesses the buffer cache
<heat> how does that matter?
<heat> i would expect the page cache to be divided in pages and for mmap to directly map pages
<heat> as such touching them on mmap and/or write() would be the same thing
<netbsduser`> and so if you then modify the file with write(), even after the pages have been mapped shared, if the block you modified belongs to a page that has been faulted in, then the change is not reflected in the file page cache
Burgundy has quit [Ping timeout: 252 seconds]
<netbsduser`> openbsd still uses the traditional buffer cache, which is block-based, for file page contents
<netbsduser`> so the data exists in both the block buffer cache and the file page cache
<netbsduser`> this duplication is why there is incoherence
<heat> i think i kind of understand what you mean
friedy has quit [Quit: Client closed]
friedy has joined #osdev
Gooberpatrol66 has joined #osdev
<heat> oh so the page cache is not even accessed on read/write?
<heat> i see
<heat> it's bizarre
<heat> i don't think you can unsee the unified page cache after seeing it lol
friedy has quit [Client Quit]
rorx has joined #osdev
TkTech has joined #osdev
<zid> Does POSIX say anything about how shit should interact btw, specifically stuff like, having two copies of a file open, having one mmaped and one opened, etc, or is it just "idk, the OS does something, glhf"
gog has quit [Ping timeout: 260 seconds]
<heat> it says you may need to msync()
<netbsduser`> zid: almost certainly the minimal of requirements
<zid> m'sync *tips fedora*
[itchyjunk] has joined #osdev
<netbsduser`> though it's interesting i've never seen anyone serious suggest that you should assume only the minimal requirements set by posix
<heat> POSIX is useless
<zid> posix seems pretty underspecified in general
<heat> linux is the new UNIX, POSIX is a relic
<zid> and has crappy APIs that can't actually implement useful things for files, like atomicity
<netbsduser`> i just think it's interesting by comparison to e.g. the C standard
<heat> the C standard suffers from the same issue though?
<heat> it's the minimalest of requirements
<zid> C standard doesn't really "suffer" from it though
<zid> because it's *very* minimal to begin with
<zid> so you *know* you're on your own
<netbsduser`> there exists a lobby of people who will suggest that you will and deserve to have your hard drive formatted and your children and wife murdered in brutal fashion for ever stepping beyond it
<zid> posix heavily specifies a lot of complex stuff, but leaves all the subtle interactions unsaid, that's the problem
<netbsduser`> but no such lobby for posix that i know of
<heat> some people do see POSIX as the big goal
<heat> and POSIX certification
<heat> which is silly but to each their own
<mcrod> hey i said that
<heat> you're a big copycat mcrod
<netbsduser`> it's understandable to try to conform to it
<netbsduser`> but to elevate it to scripture and to gleefully delight in lawyering it to catch out the unwary would be bizarre
<netbsduser`> and is not done
<netbsduser`> people spit on the developers of windows for "doing the minimal to be posix compliant", after all
<heat> yes because micro$hit winblowz
<heat> but they wouldn't dare say that to a great UNIX descendent such as OpenBSD
<heat> it's even secure!
Turn_Left has joined #osdev
<heat> microgarbage winsucks
Left_Turn has quit [Ping timeout: 264 seconds]
Turn_Left has quit [Ping timeout: 258 seconds]
Left_Turn has joined #osdev
simpl_e has quit [Ping timeout: 264 seconds]
<zid> windows isn't even bare minimum
<zid> its fwrite/fread have the wrong buffering behavior for posix, it only does C
<netbsduser`> i mean the Windows Subsystem for POSIX Applications
<netbsduser`> though it's gone now
<zid> we have wsl now sorta
<zid> if they ever add proper hyper-v support for amd's vt tech..
tixlegeek has quit [Quit: tixlegeek]
<netbsduser`> wsl 2 is a bit boring though
<netbsduser`> >virtual machine
<zid> hey, it's INTEGRATED
<zid> I can copy paste and stuff, and it automounts all my filesystems in both directions
duderonomy has quit [Ping timeout: 244 seconds]
<zid> and I get native windows
<zid> like if I were doing X forwarding
<heat> the giga ideas for WSL1 were truly giga ideas but way too hard
nyah has quit [Quit: leaving]
Matt|home has quit [Quit: Leaving]