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
gbowne1 has joined #osdev
gbowne1 has quit [Remote host closed the connection]
gbowne1 has joined #osdev
netbsduser`` has quit [Ping timeout: 255 seconds]
valshaped7424880 has quit [Quit: Gone]
valshaped7424880 has joined #osdev
gildasio has quit [Ping timeout: 252 seconds]
gildasio has joined #osdev
sbalmos has quit [Ping timeout: 248 seconds]
sbalmos has joined #osdev
[itchyjunk] has quit [Remote host closed the connection]
MiningMarsh has quit [Read error: Connection reset by peer]
MiningMarsh has joined #osdev
heat has quit [Ping timeout: 245 seconds]
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
agent314 has joined #osdev
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
agent314 has quit [Ping timeout: 260 seconds]
<geist> Bikinis
<geist> That's android autocorrecting hijinks
pretty_dumm_guy has quit [Quit: WeeChat 3.5]
andydude has joined #osdev
<andydude> I don't know why I ever go to any other room. #osdev is where it's at
Osmten has joined #osdev
<moon-child> andydude: sorry, it is no longer in #osdev
<moon-child> we are all clueless as to why and where it is now
<andydude> don't sell yourselves short, it's still here
johnjaye has quit [Ping timeout: 260 seconds]
johnjaye has joined #osdev
Osmten has quit [Ping timeout: 245 seconds]
Gooberpatrol66 has quit [Ping timeout: 240 seconds]
Gooberpatrol66 has joined #osdev
Osmten has joined #osdev
air has quit [Ping timeout: 248 seconds]
air has joined #osdev
TkTech5 has joined #osdev
TkTech has quit [Ping timeout: 240 seconds]
TkTech5 is now known as TkTech
gabi-250 has quit [Ping timeout: 252 seconds]
gabi-250 has joined #osdev
duderonomy has joined #osdev
andydude has quit [Quit: Leaving.]
netbsduser`` has joined #osdev
<geist> it's here!
netbsduser`` has quit [Ping timeout: 240 seconds]
danilogondolfo has joined #osdev
Brnocrist has quit [Ping timeout: 264 seconds]
Brnocrist has joined #osdev
goliath has joined #osdev
netbsduser`` has joined #osdev
remexre has quit [Ping timeout: 252 seconds]
kfv has joined #osdev
irl25519 has joined #osdev
remexre has joined #osdev
Osmten has quit [Quit: Client closed]
gbowne1 has quit [Quit: Leaving]
GeDaMo has joined #osdev
PublicWiFi has quit [Ping timeout: 260 seconds]
Osmten has joined #osdev
kfv has quit [Quit: Textual IRC Client: www.textualapp.com]
PublicWiFi has joined #osdev
gog has joined #osdev
bauen1 has quit [Ping timeout: 258 seconds]
Burgundy has joined #osdev
irl25519 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Osmten has quit [Quit: Client closed]
Osmten has joined #osdev
pretty_dumm_guy has joined #osdev
pretty_dumm_guy has quit [Client Quit]
heat has joined #osdev
zxrom has quit [Quit: Leaving]
bauen1 has joined #osdev
craigo has quit [Quit: Leaving]
Osmten has quit [Quit: Client closed]
<mcrod`> hi
warlock has joined #osdev
goliath has quit [Quit: SIGSEGV]
y0m0n has joined #osdev
Burgundy has quit [Ping timeout: 255 seconds]
pog has joined #osdev
gog has quit [Ping timeout: 255 seconds]
sbalmos has quit [Ping timeout: 258 seconds]
sbalmos has joined #osdev
zxrom has joined #osdev
irl25519 has joined #osdev
<bslsk05> ​i.imgur.com <no title>
pog is now known as gog
irl25519 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
[itchyjunk] has joined #osdev
dude12312414 has joined #osdev
dude12312414 has quit [Client Quit]
suqdiq has joined #osdev
stolen has joined #osdev
<heat> apparently linux does not bother copying shared memory on fork
<heat> funny
<heat> i think this means you always get an implicit page fault on .text after fork()?
bauen1 has quit [Ping timeout: 258 seconds]
<pitust> heat: shared memory as in MAP_SHARED?
<pitust> yes that is standard behavio
<geist> indeed
<heat> no pitust
<heat> MAP_SHARED or AFAIK unfaulted MAP_PRIVATE
<heat> non-CoWed i mean
<heat> and when I say copy in this context I really mean copy of PTEs
<heat> /*
<heat> * becomes much lighter when there are big shared or private readonly
<heat> * Don't copy ptes where a page fault will fill them correctly. Fork
<heat> * than faulting.
<heat> * mappings. The tradeoff is that copy_page_range is more efficient
<heat> */
<geist> ah
<geist> was thinking i wonder if you could link inner page tables with the R bit set higher level (on x86 where the permissions are heirarchail)
<geist> and then fault on write the entire page table
xenos1984 has quit [Ping timeout: 258 seconds]
xenos1984 has joined #osdev
<heat> CoW page tables? sounds tricky
<geist> well, and it would only work with heirarchial permissions, which i think only x86 gets you
<pitust> is that not a thing on other platforms?
<pitust> this also works on systems with soft tlb refill
<heat> riscv at least doesn't have hierarchical perms
<heat> arm doesnt as well IIRC?
<pitust> interesting
<mcrod`> hi
<mcrod`> heat: HI!!!!!!!
<heat> no
<zid> no
<gog> hi
<mcrod`> gog i want a snack
danilogondolfo has quit [Quit: Leaving]
heat has quit [Ping timeout: 258 seconds]
heat has joined #osdev
<mcrod`> heat: what would you prefer i say
<heat> ok confirmed you fault a bunch of the executable back in on fork()
<heat> try this baddie with a program named 'testprog' that just forks(): sudo bpftrace -e 'kprobe:handle_mm_fault /comm == "testprog"/ { printf("fault on %p, pid %d, file %p\n", arg1 & -4096, pid, ((struct vm_area_struct *) arg0)->vm_file); } kretprobe:kernel_clone /comm == "testprog"/ { printf("fork %d\n", retval); }'
<mcrod`> i’ll keep that in mind
gog has quit [Quit: Konversation terminated!]
<heat> 'kprobe:handle_mm_fault /comm == "testprog"/ { $vma = (struct vm_area_struct *) arg0; if($vma->vm_flags & 4) {printf("fault on text %p, pid %d, file %p\n", arg1 & -4096, pid, $vma->vm_file);} } kretprobe:kernel_clone /comm == "testprog"/ { printf("fork %d\n", retval); }'
<heat> this probe is better, filters out non-.text
Left_Turn has joined #osdev
<heat> gosh i'm having fun using bpftrace
<heat> dtrace who
<totally-not-mjg> lol heat do it the old way
<totally-not-mjg> just speculate what's happening
<totally-not-mjg> geezers would be proud
<heat> totally-not-mjg, u aware of this shit happening in paidbsd?
<heat> i'm truly wondering if this optimization makes any sense
<heat> at least for .text regions (MAP_PRIVATE + VM_EXEC)
irl25519 has joined #osdev
<totally-not-mjg> i have not checked, i know there are stupid page faults taking place
<totally-not-mjg> liek on initial stack access
<totally-not-mjg> that said not faulting on this shit would defo be noice
<totally-not-mjg> (i don't know if i stressed how bad the vm is)
bauen1 has joined #osdev
<heat> RIGHT
<heat> let me ask theo
<heat> he'll come up with some bullshit on how i'm adding a new if() on fork and ifs are ecspansive!!!!!
<heat> uvm is peak technology
<zid> isn't anyone who cares about perf using vfork or whatever, and regular fork is only for 'don't care' people
<heat> in theory
<heat> for one, vfork is very limited, so vfork() pretty much must be followed exec() or _exit
<heat> you can't go dup()ing around or whatever
<heat> (gosh i missed a great opportunity to BSDbanter(7))
<zid> so then fork() is probably used in a perf context for people doing lots of them on very simple images, and an extra if() is therefore exepsnive, qed
<zid> heat smells
<heat> that's true, i am not odorless
<mcrod`> theo the rat
xenos1984 has quit [Ping timeout: 245 seconds]
dude12312414 has joined #osdev
dude12312414 has quit [Client Quit]
<Ermine> heat: you can into ebpf? cool!
<heat> who can?
<Ermine> you
<heat> i mean, i can, but if you mean onyx then no, onyx cannot into ebpf yet
<heat> this is *linux*
<heat> bpftrace is like, erm, vastly annoying to port as it requires LLVM as a dependency
xenos1984 has joined #osdev
Turn_Left has joined #osdev
gog has joined #osdev
Left_Turn has quit [Ping timeout: 240 seconds]
stolen has quit [Quit: Connection closed for inactivity]
gabi-250 has quit [*.net *.split]
gildasio has quit [*.net *.split]
Vercas has quit [*.net *.split]
gxt has quit [*.net *.split]
goliath has joined #osdev
gog` has joined #osdev
gog has quit [Killed (NickServ (GHOST command used by gog`))]
gog` is now known as gog
<totally-not-mjg> did you know openbsd lol branchen
<totally-not-mjg> in code paths used way more often than mmap
<heat> deraadt@openbsd.org
andydude has joined #osdev
<totally-not-mjg> theo himself added a fucking PESSIMAL "solution" to fd lookup
andydude has quit [Ping timeout: 255 seconds]
<Ermine> heat: deraadt == deranged raadt?
<irl25519> is this some deraadt hate channel?
<heat> yes
bauen1 has quit [Ping timeout: 245 seconds]
<mcrod`> i like him
<Ermine> I don't
<mcrod`> why not
<Ermine> 1) He is the creator of openbsd; 2) He's an asshole
<mcrod`> so is linus torvalds
<mcrod`> ulrich drepper, richard stallman
<heat> i hate 2 out of those 3
<mcrod`> here’s the thing
<zid> ulrich dr pepper!?
<Ermine> 1) I didn't state my position on Linus/Drepper/Stallman/whatever; 2) Linus is not the creator of openbad
<heat> i like linus particularly because he's technically capable AND he's not such a huge asshole as he once was
<mcrod`> i’ve learned, with difficulty
<mcrod`> that this field is *rife* with socially inept people
<heat> also he doesn't scan for mentions of linux in openbsd mailing lists and email the person that mentioned them
<Ermine> Theo scans lkml???
<mcrod`> and by socially inept i don’t mean awkward
<heat> Ermine, yeah he emailed me yesterday
<Ermine> L MAO
<heat> i told him he could send emails away to the LKML and he actually did
<mcrod`> you’re kidding
<heat> we have a recorded linus torvalds - theo deraadt exchange
<heat> i am not
<mcrod`> theo actually emailed you?
<heat> yep
<mcrod`> that’s incredible
<mcrod`> i didn’t realize he was that full of hate about linux
<mcrod`> i don’t like linux much either
<mcrod`> but that’s kind of another level
<heat> he's full of hate about linux and freebsd
<heat> and probably netbsd
<heat> and probably dragonflybsd
<mcrod`> either way this changes nothing of what i said
<Ermine> and probably anything !openbad
<mcrod`> the backbone of this planet, software speaking, begins with some major assholes
<heat> last email I had read from him was him bashing a freebsd committer (who had NOTHING TO DO WITH WIFI) that asked on openbsd tech-kern about their wifi drivers
<heat> didn't even answer the question
<heat> just "huh weren't you guys using linux drivers? how's that working out for ya?"
<mcrod`> and if you go almost anywhere where the super smart people are
<mcrod`> you’ll get answers
<mcrod`> but you’ll come away burned
<mcrod`> *almost* every time
<heat> no
<mcrod`> are you kidding me
<Ermine> I don't get burned whem asking heat
<mcrod`> i did say almost
<mcrod`> it’s not a constant
<heat> unless those "super smart people" are 1) assholes or 2) as socially inept as sheldon
<heat> bazinga
<heat> Ermine, stop, you're proving his point
<Ermine> XD
<mcrod`> remember when freenode was around? remember those days of #c?
<mcrod`> you got answers but not before you were called retarded
<mcrod`> it was a necessary trade off
<mcrod`> “do i go here and ask and get shit on”
<heat> "no"
<mcrod`> or, “read book K&R and turn to page 394 and fuck off”
<mcrod`> just like most support channels where they tell you to “RTFM”
<Cindy> mcrod`: example of a terminally online person
<Ermine> Generally speaking, openbsd people like to consider themselves the only righteous people in the world
<mcrod`> granted I’m just ranting
<mcrod`> it’s not quite as bad these days
<mcrod`> rest assured, at least on IRC when heat was like 6
<mcrod`> it was
<heat> how old are you again?
<mcrod`> 28
<heat> you were 13 then
<mcrod`> i started using IRC in 2006
<mcrod`> yes i was
<Ermine> ok millenial
<heat> too busy having a wank to think about C
<mcrod`> and I regret it
<mcrod`> as in the wank :)
<Ermine> I was playing lego back then
<heat> amen
<heat> lego poggers
<mcrod`> i make it seem like i’m 60
<mcrod`> but jesus christ
<mcrod`> it was the wild west
<Ermine> amen heat
irl25519 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mcrod`> what I should’ve done was study K&R really hard and KN King’s book
<Cindy> mcrod`: you don't have to have a character-by-character copy of the K&R book in your head to be a C programmer
<mcrod`> Cindy: of course not
<Ermine> You'd better study pascal if you started learning programming back then
<mcrod`> point being: i should’ve been harder on myself
<mcrod`> heat is 20 writing an OS and at 20 I was stuck playing league of legends
<mcrod`> oh well
<heat> oh my god
<Cindy> oh my fucking god
<mcrod`> oh my god
<heat> what's next? discord admins?
<mcrod`> wut
<heat> also you're being kinda stupid
<mcrod`> yeah shut up i know
<heat> i do regret wasting so much time writing an OS
<mcrod`> it’s perfectly acceptable to insult someone in private
<Cindy> wheneve someone complains about someone not reading a specific page in the K&R book in response to a question, it makes me think about the please please please get a life foundation
<heat> even though it's fun and fulfilling, it's not the only thing in the world
<mcrod`> sometimes they might even thank you for it afterwards
<mcrod`> but when you do it in public, they tend to think you’re serious
<Ermine> And I'm graduating, yet still struggling with that pipe code
<mcrod`> heat: sure
irl25519 has joined #osdev
<heat> Ermine, do you need help?
<mcrod`> but most people in their 20s don’t use the time they have
<mcrod`> i focus on age a lot for one reason
<mcrod`> it. goes. quicker. than you realize.
<Ermine> heat: no, I need some time to contemplate, and I *really* lack time
irl25519 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gxt has joined #osdev
gildasio has joined #osdev
irl25519 has joined #osdev
lockna has joined #osdev
gbowne1 has joined #osdev
gabi-250 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!]
bauen1 has joined #osdev
gabi-250 has quit [Ping timeout: 256 seconds]
gbowne1_ has joined #osdev
gbowne1_ has quit [Remote host closed the connection]
gabi-250 has joined #osdev
lockna has quit [Quit: Leaving]
lockna has joined #osdev
irl25519 has quit [Quit: Textual IRC Client: www.textualapp.com]
theruran has quit [Quit: Connection closed for inactivity]
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
goliath has quit [Quit: SIGSEGV]
theruran has joined #osdev
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 260 seconds]
KitsuWhooa has quit [Quit: Unable to handle kernel NULL pointer dereference at null]
Left_Turn has quit [Read error: Connection reset by peer]
y0m0n has quit [Ping timeout: 264 seconds]
lockna has quit [Ping timeout: 264 seconds]
masoudd has joined #osdev
<totally-not-mjg> > Fixes: 5efc244346f9 ("audit: fix exe_file access in audit_exe_compare")
<totally-not-mjg> gotta love fixes to fixes
<heat> do you like reverts of reverts?
gog has quit [Quit: byee]
dude12312414 has joined #osdev
agent314 has joined #osdev
<totally-not-mjg> heat: don't tell g.eist, but remember that 20 mil files
<totally-not-mjg> heat: i booted ILLUMOS MOTHERF^W and it can execute 20 parallel find(1)s over it in 37 seconds
<totally-not-mjg> heat: literally over twice the time needed for freebsd
<totally-not-mjg> big part of it is time spent off cpu -- only 1480% utilisation as opposed to 2000%
<totally-not-mjg> interestingly freebsd only gets just shy of 1900%
<heat> cool story boomer
heat has quit [Remote host closed the connection]
heat has joined #osdev
<heat> totally-not-mjg, here's a funny: i spent the last month or so implementing UVM-ish amaps in my spare time. tested with page_fault1, regressed performance a bit
<mcrod`> i need a genius
<heat> or at least i regressed *consistency*
<heat> i don't know why
<heat> the code is simpler
<mcrod`> what is a good way to sort a map file by greatest to least size per entry
<heat> what's a map file?
<mcrod`> it tells me how big a symbol is and where it is placed
<heat> like a linker map file?
<mcrod`> yes
<heat> oh right
<mcrod`> i'm spoiled
<heat> how did you generate it? nm > binary.map?
<mcrod`> IAR's looks way better
<mcrod`> no, -Wl,--Map=SAMEthing.map
<heat> what's the format there?
<mcrod`> one sec
<totally-not-mjg> heat: profile mofo
<totally-not-mjg> heat: cool story zooomer
<mcrod`> i should turn on LTO and see how this changes
<heat> mcrod`, sort -k3 -n?
<heat> totally-not-mjg, i have a flamegraph that includes a bogus spin_lock bottleneck that if commented out... just maintains performance
<mcrod`> it did it backwards
<mcrod`> and some of it is wrong
<heat> oh, -r
<heat> yeah am i wondering if sort -n handles hex
<mcrod`> mmm, not quite
<mcrod`> -n was somehow closer
<mcrod`> bonkers to me that you can't tell the linker to generate shit from greatest to least
<mcrod`> even on IAR you can't do that
<heat> jeeeeeeeeeeesus yeah this doesn't work
<heat> people on the interwebs use bespoke awk invocations
<mcrod`> indeed
<mcrod`> which is what I was hoping for
<mcrod`> because awk is awkward
<heat> nm --size-sort btw
<mcrod`> why isn't there an awk implementation called awkward
<mcrod`> no the map file is way better to look at
<heat> no
<mcrod`> yes