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
LittleFox has quit [Quit: ZNC 1.8.2+deb3.1 - https://znc.in]
LittleFox has joined #osdev
nyah has quit [Quit: leaving]
SophiaNya has quit [Remote host closed the connection]
ptrc has quit [Remote host closed the connection]
wand has quit [Quit: leaving]
SophiaNya has joined #osdev
ptrc has joined #osdev
goliath has quit [Quit: SIGSEGV]
netbsduser`` has quit [Ping timeout: 245 seconds]
Turn_Left has quit [Read error: Connection reset by peer]
heat_ has quit [Remote host closed the connection]
heat_ has joined #osdev
[itchyjunk] has quit [Remote host closed the connection]
pretty_dumm_guy has quit [Quit: WeeChat 3.5]
netbsduser`` has joined #osdev
vdamewood has joined #osdev
netbsduser`` has quit [Ping timeout: 260 seconds]
Burgundy has joined #osdev
Burgundy has quit [Ping timeout: 258 seconds]
rustyy has quit [Quit: leaving]
Arthuria has quit [Remote host closed the connection]
rustyy has joined #osdev
netbsduser`` has joined #osdev
heat_ has quit [Ping timeout: 258 seconds]
gxt has quit [Ping timeout: 256 seconds]
gxt has joined #osdev
bliminse has quit [Quit: leaving]
netbsduser`` has quit [Ping timeout: 255 seconds]
duderonomy has quit [Read error: Connection reset by peer]
duderonomy has joined #osdev
duderonomy has quit [Remote host closed the connection]
duderonomy has joined #osdev
Jari-- has joined #osdev
<Jari--> morning all
<kazinsal> ooh. new interview between Dave Plummer (ex-Microsoft, 90s) and Dave Cutler drops on Saturday
<vdamewood> I thought I was the only one who watched Dave Plummer
netbsduser`` has joined #osdev
netbsduser`` has quit [Ping timeout: 255 seconds]
bliminse has joined #osdev
duderonomy has quit [Read error: Connection reset by peer]
<geist> yeah daves garage
<geist> there's parts of the interview up on youtube, but not the whole thing
<kazinsal> yeah, I watched the clip about Longhorn and x64 and then decided I wanted to wait until the full thing is out
<Mutabah> Longhorn.. now that's a blast from the past
<Mutabah> Anything interesting about it?
<kazinsal> some interesting notes about how they had to switch codebases a bunch because the Longhorn guys kept having major setbacks while the "just do NT on x64" group were running circles around them
gabi-250 has quit [Remote host closed the connection]
gabi-250 has joined #osdev
<geist> wikipedia has a ridiculously detailed account of vist development it seems https://en.wikipedia.org/wiki/Development_of_Windows_Vista
masoudd has joined #osdev
<kazinsal> dang, and it's not even peppered with [citation needed]s
pretty_dumm_guy has joined #osdev
GeDaMo has joined #osdev
xvmt has quit [Remote host closed the connection]
xvmt has joined #osdev
xvmt has quit [Remote host closed the connection]
Left_Turn has joined #osdev
craigo has joined #osdev
xvmt has joined #osdev
Nixkernal_ has quit [Read error: Connection reset by peer]
xvmt has quit [Read error: Connection reset by peer]
Nixkernal has joined #osdev
xvmt has joined #osdev
xvmt has quit [Read error: Connection reset by peer]
Nixkernal has quit [Ping timeout: 260 seconds]
xvmt has joined #osdev
vdamewood has quit [Ping timeout: 248 seconds]
Nixkernal has joined #osdev
vdamewood has joined #osdev
danilogondolfo has joined #osdev
gog has joined #osdev
xvmt has quit [Ping timeout: 246 seconds]
nyah has joined #osdev
rustyy has quit [Ping timeout: 258 seconds]
Left_Turn has quit [Ping timeout: 264 seconds]
duderonomy has joined #osdev
Left_Turn has joined #osdev
gbowne1 has quit [Quit: Leaving]
tixlegeek has joined #osdev
rustyy has joined #osdev
goliath has joined #osdev
Left_Turn has quit [Remote host closed the connection]
Left_Turn has joined #osdev
netbsduser`` has joined #osdev
heat_ has joined #osdev
<heat_> scammer interviewing dave cutler? poggers
Jari-- has quit [Ping timeout: 272 seconds]
<heat_> >BootROM -> U-Boot SPL -> OpenSBI -> EDK2 -> Linux -> OS
<heat_> 1) yo dawg i heard you like chainloading
<heat_> 2) Linux -> OS
<clever> heat_: ive seen a zfs boot manager that does that, all of your kernels/config are on zfs, and linux/kexec is the bootloader
<heat_> is it linux -> linux or linux -> illumos/solaris
<heat_> because the latter would be HILARIOUS
<clever> linux->linux
<moon-child> linux _or_ linux!
<heat_> sadness.
<clever> ive helped that zfs bootmanger team a bit on the rpi, because kexec breaks SMP
<clever> on pi2-pi4, the secondary cores are brought up via spin-tables, and there is no standard way to park them and then wake again after kexec
<clever> but, if you fudge the 1st linux's device-tree, and just delete the secondary cores, they never unpark
<clever> and then unfudge it when you kexec, and the 2nd linux wakes them up!
<clever> but pi5 now has proper PSCI, so that problem shouldnt exist there
<heat_> isn't it valid to just send the APs down the entry point?
<clever> which entrypoint?
<heat_> the kernel's
<clever> linux isnt designed to be ran on all 4 cores at once
<clever> u-boot also corrupts its own state heavily when you do that
<heat_> hm i guess it needs to wait until linux is ready for the cpus
<clever> linux expects to be ran on just 1 core, it will initialize most of its own state, allocate some stacks, and then wake the secondary cores
<clever> yep
<heat_> because at least on riscv the protocol is exactly this: you wake them up, and they go down the kernel's entry point
<heat_> wait, no, my bad, it's not
<heat_> i forgor 💀
<clever> with the rpi spin-tables, you write the desired entry-point to a magic addr (device-tree says what it is for each core), and then you sev
<clever> with PSCI, you make a function call, with the desired entry point
<heat_> yeah riscv OpenSBI just has an automagic call that takes a physical address of the entry point
<clever> yep, thats pretty much identical to PSCI
<clever> i'm not sure, but i think PSCI also allows one core to remotely halt another core?
<clever> so you can forcibly stop and resume the secondary cores
<clever> depending on the hardware implementation, that could be an actual halt (and reset from the firmware entrypoint)
<heat_> SBI can do anything
<clever> or it could just be forcing a transision back to EL3, where the firmware will wfe again
<heat_> SBI literally can flush TLBs remotely
<heat_> it's *horrible*
<clever> that sounds like an irq that gets handled by a higher privledge level
<clever> like an EL3 IPC
<clever> or inter-core irq
<heat_> because there's no other way to IPI than to use SBI, and SBI switches privileges to machine mode
<clever> ah yes, IPI, thats the word i was looking for
<clever> that sounds bad for performance?
<heat_> and because this sucks, they just added a bunch of garbo into the interface for all kinds of things you may want to do quickly without going S -> M -> S -> M -> S
<clever> with PSCI, you have 2 different layers with different interface mechanics
<heat_> if you shortcut everything in SBI itself you'll just do S -> M -> S
<clever> first is 32bit vs 64bit, which have different id#'s for the functions, and wider/narrower args
<clever> and then you have the access mode (hvc, smc, one other?), which trap to different levels
<clever> so you can have PSCI under kvm, and not waste overhead emulating a non-kvm environment
<clever> smc traps to EL3 i believe(secure monitor), while hvc traps to EL2 (hypervisor)
<clever> but, i would expect smc from a non-privledge guest, to also trap into the hypervisor, but then you have to mess with more?
CaCode has joined #osdev
Burgundy has joined #osdev
netbsduser`` has quit [Ping timeout: 260 seconds]
[itchyjunk] has joined #osdev
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GeDaMo has quit [Ping timeout: 272 seconds]
GeDaMo has joined #osdev
netbsduser`` has joined #osdev
tixlegeek has quit [Quit: tixlegeek]
vai has joined #osdev
vai has quit [Client Quit]
<mcrod`> hi
<Ermine> SBI?
vai has joined #osdev
<clever> Ermine: i believe thats the supervisor firmware on risc-v, seems to play a similar role to PSCI on arm, but seems to even handle IPI's and TLB flushing!
Left_Turn has quit [Ping timeout: 272 seconds]
Left_Turn has joined #osdev
zxrom has quit [Ping timeout: 240 seconds]
<pitust> clever: why couldn't you just park the cores yourself into a new spin-table?
<clever> pitust: linux lacks the code for that, because it assumes every arm board has PSCI
<pitust> mhm
<pitust> got it, m1 doesnt exist
<pitust> the rpis dont exist
<clever> pi5 has psci :P
<pitust> ok sure the pi5 does exist
CaCode has quit [Remote host closed the connection]
<mcrod`> i’m falling down the linux binary compatibility rabbit hole
<mcrod`> what a fucking mess
suqdiq has quit [Quit: suqdiq]
elastic_dog has quit [Ping timeout: 240 seconds]
DoubleJ has quit [Quit: Not all those who wander are lost]
DoubleJ has joined #osdev
elastic_dog has joined #osdev
DoubleJ has quit [Quit: Not all those who wander are lost]
xenos1984 has quit [Read error: Connection reset by peer]
DoubleJ has joined #osdev
Turn_Left has joined #osdev
suqdiq has joined #osdev
suqdiq has quit [Client Quit]
suqdiq has joined #osdev
suqdiq has quit [Client Quit]
Left_Turn has quit [Ping timeout: 264 seconds]
suqdiq has joined #osdev
zarock has joined #osdev
<heat_> clever, in theory I don't think SBI *needs* to be firmware
<heat_> i think it's valid for e.g your emulator to handle M mode calls in ""hardware""
<clever> yeah, it could trap out to host mode code
<heat_> or for your CPU to handle it in microcode
<heat_> but conventionally yeah it's firmware and I think that ATM there's only one implementation, OpenSBI
<heat_> clever, btw it even handles... TIMER ACCESSES
<heat_> you need to fucking trap to firmware to read your time counter
xenos1984 has joined #osdev
<clever> lol
<clever> and is the latency on that constant or variable?
<heat_> probably as variable as normal code execution
<clever> but now you have more code then normal, and so more jitter?
<heat_> probably
<clever> heat_: and what about hypervisors and secure vs nonsecure?
<clever> does risc-v just throw all of that into SBI's lap, and SBI has to kinda emulate it with constant context switching?
<clever> does the hw at least support nested paging tables, to accelerate hypervisors a bit?
heat_ has quit [Read error: Connection reset by peer]
heat has joined #osdev
zxrom has joined #osdev
tixlegeek has joined #osdev
masoudd has quit [Quit: Leaving]
<pitust> oh riscv timers are a mess
<pitust> just like the rest of riscv to be honest
<pitust> SBI handles timers because you can't do timer stuff in S mode (that capability is reserved for M mode and x86)
<clever> pitust: oh, is there just one timer, or several?
<pitust> oh yeah i mean of course why have on timer
<clever> arm has both a physical and virtual timer, so the hypervisor can "pause" the timer (set an offset from physical)
<clever> but i can picture how risc-v would say, "thats too cisc!" and just have the offset as a variable in the SBI firmware?
<pitust> yeah so riscv solves this by not having s mode timers
<pitust> well so the timer is part of the interrupt controller i think?
<pitust> of which riscv has 4
<pitust> yeah i dont know its a mess
<clever> let me guess, interrupts always enter SBI, and SBI then has to context switch into the kernel?
<pitust> im not sure
<pitust> i do know that only sbi knows which hartid you are
<pitust> there is no shartid register
<pitust> only mhartid
<pitust> which is m mode because of course
<pitust> cant make it too easy to figure out which hart you are on
<clever> lol
<pitust> oh yeah so many interrupt controllers
<pitust> advanced interrupt architecture (does msis and APLIC), PLIC, CLINT, CLIC
<pitust> but i think that you could get interrupts in s mode if m mode is okay with that (?)
Left_Turn has joined #osdev
<pitust> oh but they support delivering interrupts to user mode
<pitust> well shit then its a great isa with no flaws i guess
<heat> i think interrupts get delivered directly to S mode
<pitust> well except when they don't of course
<heat> when?
<pitust> well how else would vms work
Turn_Left has quit [Ping timeout: 255 seconds]
<pitust> every priviledge level has its own interrupt enable bits
<heat> you have two hart contexts on the plic
<heat> M mode and S mode
<heat> you can handle stuff directly in S mode, or in M mode. normal interrupts should AFAIK be routed directly to S mode
<pitust> ah
<pitust> what if you dont have the plic and instead you have one of the other 3 interrupt controllers?
<heat> i guess if M mode needs something it'll already have it enabled
<heat> CLINT is M mode stuff
<heat> I don't know how the APLIC etc work, but i assume it's the same shtick
<pitust> yeah i guess it is?
<pitust> anyway run away as far as you can from this mess
<mcrod`> well
<mcrod`> i’ve tried my toolchain on ubuntu and as expected it totally breaks
<heat> you can't compile on a new glibc and expect it to work on older glibcs
<heat> if that's your problem
yoyofreeman has joined #osdev
<heat> you can do the reverse. compile on old, run on new, will probably work fine
<mcrod`> yes i know that part at least
<mcrod`> only after re-reading yesterday’s comments and going through 40 pages of shit do I realize now what a mess I got myself into
<heat> what's breaking?
<mcrod`> glibc was too new
<heat> time to find the shittiest oldest debian version you can find that still works
<mcrod`> right
<mcrod`> and that’s going to be excruciating
<mcrod`> especially because i’d still like a newer compiler
<heat> why is this a problem anyway?
<heat> just don't distribute binaries, ez
<mcrod`> disgusting
<heat> or if you do, note that it will only work on <build distro> and/or recent
<mcrod`> debian 10 buster is the current LTS release
<mcrod`> i dunno heat, this is rapidly becoming discouraging
<mcrod`> i truly understand now why people don’t do this shit
<heat> i think google usually builds on some debian release and apart from that you're on your own
<mcrod`> that’s so fucked
<heat> it usually works because glibc people aren't complete maniacs
<heat> now, the problem you would have on musl is that no one except alpine weirdos would be able to use your toolchain
<mcrod`> there are a few approaches i could take
<mcrod`> all of which are shit
<heat> static linking glibc?
<mcrod`> that’s not happening :p
<heat> your toolchain doesn't need DNS I hope
<mcrod`> no
<heat> also fwiw musl in some cases still supports linux 2.4 and 2.6
<zid> heat what's an easy way to see the symbol version of my glibc
<mcrod`> i’m just horrified that this is such a big problem
<zid> glibc is a mess, but the solution is pretty easy
<zid> build with an older glibc
<heat> list the symbols of /usr/lib/libc.so.6 and the most common @GLIBC_ tag is the symbol version
<mcrod`> well, what do you expect from 70,000 distros and 500,000 configurations
<heat> actually, no, scratch that
<heat> that's a stupid idea, there's no symbol version set in stone
<zid> nm "no symbols"
<mcrod`> even statically linking SDL2 might be a problem
<heat> zid, --dynamic
<mcrod`> unless I continuously maintain this
<zid> 2.2.5
<mcrod`> and it should be theoretically as simple as incrementing sdl_ver in my script
<zid> seems to be the super common one
<zid> some 2.27 and 2.34 mixed in though
<heat> 2.2.5 is 2001, i assume it's because of "* Andreas Jaeger contributed a port to x86-64/Linux."
<zid> what happened in 2.34
<mcrod`> 18.04 ubuntu is 2.23
<zid> n order to support smoother in-place-upgrades and to simplify
<zid> implemented in the libraries libpthread, libdl, libutil, libanl has
<zid> been integrated into libc
<zid> the implementation of the runtime all functionality formerly
<zid> probably that
<mcrod`> i think compiling on the latest ubuntu LTS should theoretically be okay?
<zid> if you don't wanna support people running anything older, yes
<zid> if you happen to randomly use a symbol that was just added
<zid> memfrob@@GLIBC_2.2.5
<zid> nice, still there
<mcrod`> oh 20.04 is still supported
<mcrod`> and that’s 2.31
<mcrod`> that’s 2020
<heat> the gang statically links glibc
<mcrod`> that’s a cardinal sin
<zid> I only do orthogonal sins
<mcrod`> no wonder people don’t ship binaries
<mcrod`> unless they have 40 different systems
<zid> shipping binaries is easy
<mcrod`> yes if you make the appropriate tradeoffs
<zid> the only pain point is glibc, and it's easily solved, build against a non-tip version of it.
<zid> what tradeoffs
<zid> same shit applies to windows
<zid> if you wanna target winxp too, build against msvc140.dll not msvc200.dll or whatever
<heat> MSVC 2010 redistributables!!
<heat> zid, ok yeah can confirm, they version symbols per-arch
<zid> neat
<heat> AArch64 was added in 2.17 so most aarch64 syms are @GLIBC_2.17
<bslsk05> ​github.com: glibc/sysdeps/unix/sysv/linux/aarch64/libc.abilist at 1c1083a3e48240866cfac595a2d60dfb1e8a1bf1 · bminor/glibc · GitHub
<heat> they have whole lists for every symbol exported for every shared object, it's horrendous
<pitust> to target all linux just staticlink against musl
<zid> won't work on my machine
<zid> I renumbered all the syscalls.
<zid> (I didn't, but I could have)
<heat> yeah static link against musl but don't forget replacing all the shit slow functions with fast ones
<zid> and writing some dns code?
<heat> yeah it works kinda-ish now
Arthuria has joined #osdev
<heat> they got DNS over TCP, finally, after years of people asking for it
<heat> high tech!
<mcrod`> here’s what I suspect
<mcrod`> even if I pull out the oldest supported LTS release of ubuntu
<mcrod`> that *still* may not be enough
<zid> and?
<zid> Wait for the bug report, see if their use-case is genuine
<zid> you think people are cutting windows 98 releases of their random program?
<mcrod`> ..ok, fair
<zid> The only chance of it happening is if for some reason an important person begs for it
<heat> yesterday you were saying no one was going to use your project, now you're worried someone stuck on 2001 mandriva won't be able to use your project
<zid> actually hitting a non 2.2.5 symbol is kinda hard tbh
<mcrod`> i change my mind a lot
<mcrod`> :(
<zid> then moan
<zid> you express your thoughts via moaning, it's a pattern
<heat> please don't moan
<mcrod`> i’m not moaning
<heat> thanks
<mcrod`> asking “wtf do i do here” is not moaning
<zid> "I wonder if I am offering enough backwards support for older distros" -> "This is an excruciating mess"
<zid> gotta translate to mcrod
<mcrod`> thanks. that means a lot.
<heat> mcrod`, oh i wasn't talking about that kind of moaning
<mcrod`> oh.
<zid> we're talking the type when heat sees a footballer
<heat> i don't moan when i football
<heat> i scream and yell and argh fuck this shite
<zid> I didn't say when watching football
<zid> I said when watching a footballer.
<heat> i've been face to face with 2 "big" (here) professional footballers before
<mcrod`> i hate both of you by the way
<heat> curiously both in the last 2 years
<zid> by 'big' do you mean 'for portugal'
<heat> yeah
<heat> not messi
<mcrod`> in america we give each other brain damage and call it football
<zid> I bet if I flew to portugal, every third person on the street is a professional football player
Arthuria has quit [Remote host closed the connection]
<heat> obviously, you are peter crouch after all
<netbsduser``> do muslers believe in shared libraries?
<netbsduser``> i always associated them with the Suckless organisation, which if i remember rightly, does not
<heat> musl is very pro-static linking but they are not associated with suckless (not nazis)
<netbsduser``> the Suckless organisation has something against shared libraries, which i suspect owes to GNU/Linux people not knowing how to do them
<heat> there's a nice overlap between m i n i m a l i s m and u n i x p h i l o s o p h y people and musl people though
<netbsduser``> but it could also be just another of their bizarre stances which has no apparent basis in reason
<heat> wdym linux people don't know how to use shared libs?
<mcrod`> i statically link everything in SAMEthing at least
<mcrod`> however I’m reconsidering statically linking SDL
<mcrod`> but… not sure what I plan to do yet
<heat> im faaaaaaaairly sure anything to do with GL should be shared linking, because 1) GL/mesa needs shared linking 2) dlopen on statically linked execs is risky and not supported everywhere
<mcrod`> nono
<mcrod`> it’s just audio
<mcrod`> graphics aren’t even compiled in
heat has quit [Remote host closed the connection]
heat has joined #osdev
xenos1984 has quit [Ping timeout: 260 seconds]
xenos1984 has joined #osdev
goliath has quit [Quit: SIGSEGV]
masoudd has joined #osdev
<zid> yea I've only ever had issues with shared libs on windows
GeDaMo has quit [Ping timeout: 255 seconds]
<sham1> Minimalism!
<sham1> UNIX philosophy!
<sham1> Musl!
<heat> cpp main.c | cc - | as - > main.o
<Ermine> static linking has its perks
danilogondolfo has quit [Quit: Leaving]
GeDaMo has joined #osdev
goliath has joined #osdev
Bitweasil has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
Bitweasil has joined #osdev
Left_Turn has quit [Ping timeout: 264 seconds]
xenos1984 has quit [Ping timeout: 246 seconds]
Bitweasil has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
xenos1984 has joined #osdev
Bitweasil has joined #osdev
netbsduser`` has quit [Ping timeout: 258 seconds]
Bitweasil has quit [Remote host closed the connection]
Bitweasil has joined #osdev
Left_Turn has joined #osdev
netbsduser`` has joined #osdev
* geist yawns
<geist> hello fronds
<heat> sup
<heat> yasssterday i coerced pahole into generating BTF from DWARF, which was kinda nice
<geist> TGIF i guess
<geist> been a busy week
<gog> hi
<geist> teh gog!
* gog prr
<heat> hey gog: kernel
<gog> lol
<geist> it's friday, you know what day it is?
<geist> ULTRIX day
<geist> everyone, install ultrix
<gog> it's ULTRIX friday, you fuckin losers
<gog> it's ULTRFIX friday
* gog guitar solo
<heat> nooooooo, it's solaris day, every day is solaris day
* heat lays the bait for mjg
<geist> gog plays the catuitar
<bslsk05> ​'ITS FLAT FUCK FRIDAY YOU FUCKING LOSERS' by pigdeons (00:00:38)
<geist> felix os
<heat> >🐱 Experimental operating system written in Rust
<heat> sorry, not interested
<gog> rust rust rust
<geist> i think i know enough rust now that i was actually able to look at some rust code at work and fix a bug
<geist> which i know, it's an oxymoron, there are no bugs in rust
<geist> but lo. there it was
<heat> is that a plus or a minus?
<heat> i can't tell if you're happy
<geist> i had to hold on to the desk, the room started spinning. i hit the edge of the perceived universe
<Ermine> 🦞🦞🦞
<geist> thus proving we're in a simulation, and i had hit a glitch
<Ermine> 🦀🦀🦀 actually
<geist> 🦀 oooh
<zid> It's cooold
<zid> At least I am not underwater though I guess
<Ermine> good language and not so good site
<geist> <cue picture of people cracking lobster claws with butter flying everywhere>
<heat> you know, it's pretty funny but everyone thinks that just because im a kernel hacker and young i like rust
<heat> the disappointment in their faces is measurable when i say i like C
<geist> yes you can see the calculation in their brain deciding if they want to break off conversation
<geist> or quick glances towards the exit
<Ermine> you do?
<heat> "sir this is a mcdonalds what's your order?"
<geist> it's sort of the same look youd get if you mentio you have ADHD or early onset dementia or something
<geist> like 'oh, i'm sorry but i really dont want to talk about it'
<zid> heat you write everything in C++ you're just posing as an anti-hipster
<heat> C++ people hate my C++
<heat> C people hate my C++ too
<geist> but i think my particular affliction that i have to get over is i'm an avid `top` watcher
<heat> my code is very hateable
<zid> not enough factory template polymorphism classes?
<geist> like, i have a top window up all the time, and i watch it constantly when building
<Ermine> Aslo your code is very heatable
<geist> but... it means i'm aware of Terrible Knowledge that almost no one else i've seen at work cares about
<heat> i can't use top, i use htop
<geist> like 'that rustc compile of <utility> literally takes 37 *minutes* of cpu time'
<heat> haha
<Ermine> Your code is definitely better than one I'm dealing with at $dayjob
<geist> and i mention it and everyone acts shocked
<zid> Time to buy a 7970x then geist
<geist> it's a terrible knowledge that you'd almost want to not know, and just blissfully watch youtube while compiles happen
<zid> get it down to 34 minutes
<definitely-mjg> mon
<geist> zid: well that's the point, we have these 96 core supercomputers at the office, so no one notices that the build takes like ages
<definitely-mjg> run strace on it
<definitely-mjg> the shit i had seen...
<geist> no i't sjust rustc. it parallelizes the build, and takes years to compile stuff
<zid> 37 minutes of cpu on a 96 machine is like.. 12 minutes on a real machine to be fair
<definitely-mjg> geist: strace it
<geist> right, that's my point
<definitely-mjg> it is total webdev
<zid> I had a big rant about this a while back
<geist> with our supercomputers it ends up only takingl ike a minute (actually max parallelism rustc seems to go up to is 32)
<zid> because of how THE CLOUD operates, spectre etc became a problem, and intel started only selling 96 core webserver cpus
<zid> there's no workstation anymore
<geist> but for anyone out in the wild with a Real Computer it'd take like 10-12 minutes for just one of like 50 apps as part of the build
<geist> and no one notices that builds take forever because SUPERCOMUTERS
<geist> oh also that rustc compile takes about 8-9GB at peak
<zid> 30GB of disk space to install rust
<zid> from source
<zid> I hit that issue on my VM a lot
<geist> anyway, didn't really mean to rant, honestly i kinda like rust, but being a low level programmer it's hard to get over some things
<geist> but that's my affliction
<heat> definitely-mjg, haven't you heard, today is solaris day
<geist> no it's Ultrix day!
<zid> rust seems fine, I'm just not sure what it's fine for ;)
* definitely-mjg does not know what to install
<Ermine> HP-UX day when
<geist> it's UNIX/32V day!
<definitely-mjg> if rust stop claiming to be systems lang i would have easier tme looking at it
<geist> what was that all the companies got together to make a single unix, predates ultrix i think, or maybe afterwards
<geist> OSF/1
<heat> midnightbsd day
<definitely-mjg> it's bunch of webdevs developring the core
<definitely-mjg> companies got together to make a signle unix?
<definitely-mjg> did you mean LINUX
<Ermine> is Single Unix Specification actually Linux Specification?
<heat> no, it's sus
<definitely-mjg> no, sus is a dead standard
<geist> Tru64!
<definitely-mjg> xenikkzZ
<heat> onyx
<heat> today is *not* onyx day because onyx day is every day
<definitely-mjg> > Sent from my sortix
<definitely-mjg> innit
<heat> > Sent from my macOS
<heat> see, it's like wakanda, forever
<heat> definitely-mjg, yesterday i got pahole to take C++ DWARF and generate some form of BTF, which was dope
<heat> CTF and BTF cannot actually properly represent C++ or rust or anything else, which is kinda funny
<heat> all in all i regret writing this in C++ as most kernel tooling cannot work with c++
<heat> even randstruct is borked
<Ermine> mangled backtraces...
<heat> that's also ass, but i'm not shipping a demangler in the kernel
<heat> the C++ itanium ABI gives you a demangler for "free" but ofc i can't use that
<Ermine> Makes me think that itanium is a good arch
DoubleJ has quit [Quit: Not all those who wander are lost]
DoubleJ 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!]
<netbsduser``> what is CTF and BTF?
<netbsduser``> some sort of proprietary debug symbols format?
<netbsduser``> osf/1 incidentally is a wonderful unix, one of the most advanced BSD sons to ever live
sbalmos has joined #osdev
<sham1> Ermine: it is]
<sham1> It was also tragically taken behind the shed by Intel to be shot
SophiaNya has quit [Remote host closed the connection]
ptrc has quit [Remote host closed the connection]
SophiaNya has joined #osdev
ptrc has joined #osdev
<heat> netbsduser``, compact type information formats to be used by tracers
<heat> CTF is dtrace's thing, BTF is bpftrace's thing
<heat> basically you compile the whole kernel (or whatever you want to trace) with debug info on, then convert DWARF to CTF/BTF
<heat> ctfmerge and ctfconvert are used as part of the freebsd/solaris kernel build
<heat> linux uses pahole for BTF type info, but there's an oracle fork with CTF support, and they use gcc's ability to generate CTF as debug info
Left_Turn has quit [Remote host closed the connection]
Left_Turn has joined #osdev
pretty_dumm_guy has quit [Ping timeout: 255 seconds]
elastic_dog has quit [Ping timeout: 245 seconds]
pretty_dumm_guy has joined #osdev
<geist> netbsduser``: oh? I have actually no experience with it, now i'm a bit more curious
<geist> i naturally assumed it was hot garbage since when big companies get together to do something it tends to be killed by committee
elastic_dog has joined #osdev
<netbsduser``> geist: it started off looking much like the other machs, they quickly added in all the system v stuff, then they made huge strides in various areas
<geist> yah i think the idea was to compete with system v right?
<netbsduser``> yeah, an open systems alternative
goliath has quit [Quit: SIGSEGV]
<geist> also reading about it i finally grokked what 'osfmk' means. i always read that as 'os framework', but it's really 'osf microkernel'
<netbsduser``> that emphasis was lost later but digital unix/tru64 still made some major progress, like the advfs
<netbsduser``> judging by references i saw early it's almost that, it's "OSF Mach Kernel"
<netbsduser``> they released the microkernel subset freely but the osf/1 kernel which was a traditional bsd-mach they stopped releasing fairly quickly
Left_Turn has quit [Ping timeout: 240 seconds]
Left_Turn has joined #osdev
<geist> oh eeah
Reapiu has joined #osdev
Reapiu is now known as bumbl3b33
<bumbl3b33> Hello, I'm writing a virtual memory module for my kernel. For a UNIX-like system, do I need each process to have the kernel mapped? Also, should I keep the kernel loaded at a constant address to prevent memory conflicts?
Turn_Left has joined #osdev
alice has quit [Remote host closed the connection]
Left_Turn has quit [Ping timeout: 272 seconds]
gbowne1 has joined #osdev
Turn_Left has quit [Remote host closed the connection]
Turn_Left has joined #osdev
alice has joined #osdev
<gog> hi
<gog> bumbl3b33: that's generally how most operating systems work
gxt has quit [Ping timeout: 256 seconds]
<zid> It's hard to take irqs without the kernel mapped
<zid> or do syscalls
<heat> doesn't sparc do a context switch to a different address space?
<heat> i distinctly remember something like that for sparc
gxt has joined #osdev
<heat> maybe just sparc on solaris
<gog> solaris is so good
<zid> yea x86 just happens not to put a new cr4 into the tss orw hatever
<zid> it could do
<zid> possibly because they learned hw tasking is bad
<zid> but... swapgs also bad, so meh
<heat> everything bad
<zid> FRED pls
craigo has quit [Ping timeout: 260 seconds]
sbalmos has quit [Ping timeout: 252 seconds]
<heat> remember kids, if a stranger offers you a computer, just say "No."
sbalmos has joined #osdev
<gog> i never use computers
<zid> yea you couldn't pay me to use a computer
<gog> i'm manually wiring every ethernet frame
<gog> and pressing button
<heat> zid, btw if you're interested intel's simics simulator has FRED support
<zid> good, whatever that is
<zid> cus otherwise I'd think it was dead
<zid> I guess they are dogfooding it for a good while first
<heat> linux has gotten FRED PATCHEN
<gog> i love dogfood
<bumbl3b33> gog: So I map the kernel at a constant, and have each page directory (for each process) have the kernel mapped at that constant? (including the kernel process)
<heat> yes
<bumbl3b33> kk thanks
<zid> and linux support usually comes several years in advance of real silicon
<zid> then 15 more before I get it
<heat> btw "kernel process" is not a thing
<bumbl3b33> oh
<gog> x86 has an extension
<gog> where you can mark pages as global
<bumbl3b33> i cant treat my kernel as a process?
<heat> no
<zid> I look at it like.. a process runs on a core, and each process can temporarily execute kernel code
<zid> that it has mapped
<bumbl3b33> ooohhhh
<heat> the kernel is more like an overpowered library than a process
<gog> yes
<bumbl3b33> thanks
<zid> hopefully that kernel code is 'secure' and you can't do things like escape from the twisty passages it set up
<zid> but you're just.. temporarily becoming ring0 and running a bunch of code
<zid> as the process
<zid> scary!
<heat> very scary, microkernal when
<heat> ppl that don't write microkernals are compensating
<gog> i'm writing a microkernal
<gog> it's gonna take 128 context switches to write a single character to a framebuffer
<zid> sick
<gog> ikr
<bumbl3b33> oh so each page directory needs 2 have kernel mapped in it so it can handle interrupts
<zid> You should microkernal but interpret it in a managed language for security
<gog> handle interrupts, system calls
<bumbl3b33> oh
<heat> to -> 2 just saves you a character
<zid> then remove all the address spaces because you don't need them to be sep. for security cus managed language
<zid> then put all those micro kernels into one big blob of code to make it easier to load
<zid> then port it to C for performance
<zid> best microkernel.
<gog> linux was better as a server under a microkernel
<gog> mklinux
<heat> then roll back the years to 1970 and get drafted to the vietnam war
* gog puts on fortunate son by creedence clearwater revival
goliath has joined #osdev
<mcrod`> hi
<bumbl3b33> hi
<mcrod`> heat: hi
<heat> mcrod`, hi what do you think of the vietnam war
<heat> senator mccarthy isn't listening, don't worry
<mcrod`> the vietnam war was moronic
<heat> that sounds very anti-american
<mcrod`> yes it does doesn’t it
<zid> boooorn, in the USA
<mcrod`> buildjet is just… awesome.
<moon-child> you know what else is moronic?
<moon-child> me
<moon-child> I'm not very smart :(
<gog> me either
dude12312414 has joined #osdev
<mcrod`> i’m not smart either
<mcrod`> maybe i’m just this bizarre little person who walks back and forth
<moon-child> hmmm
<moon-child> what happens if you just stop walking backwards?
xenos1984 has quit [Read error: Connection reset by peer]
dude12312414 has quit [Remote host closed the connection]
<mcrod`> only god knows
<bslsk05> ​twitter: <SenSanders> While Portugal spends about $10,000 less per person on health care than the US, people in Portugal live 5.6 years longer, on average, than Americans. Why? Instead of making health care CEOs & stockholders filthy rich, Portugal invests heavily in primary care and covers everyone.
<heat> poortuguese poggers
<heat> were famous, america knows we exist
<mcrod`> portugeese
<heat> poortugeese
xenos1984 has joined #osdev
<geist> yah you speak the same language as brazil
<zid> It's weird how portugal speaks brazilian tbh
heat has quit [Remote host closed the connection]
heat has joined #osdev
<bumbl3b33> I relocate the kernel to 0xC0000000 (I'm on i386), in the paging configuration right before actually enabling paging. Do I change the linker script to have the kernel start in 0xC0000000, or do I just keep the linker as normal? (My linker script is very similar to the one on OSDev.org's barebones tutorial).
<zid> make the kernel think it's loaded to 0xC000. yea, cus, it will be running form there
<zid> and just make your bootstrap that enables paging independent of where it actually happens to load
<bumbl3b33> ...
<bumbl3b33> nvm
<zid> (x86_64 is much easier btw)
<bumbl3b33> I want to learn i386 before moving to x86_64
<zid> yea it's actually easier the other way around
<zid> as x86_64 is basically i386 with some stuff disabled and some stuff hardcoded to 0
[_] has joined #osdev
[itchyjunk] has quit [Ping timeout: 248 seconds]
Burgundy has quit [Ping timeout: 260 seconds]
<gog> x86_64 is actually easier imo
<zid> I mean, yea, like I said
<gog> and you get lots of fun things
<zid> it's x86_64 = (i386 - n)
<gog> zid
<zid> goog
<gog> bazel
<zid> the bazel problem!?
<gog> yh
<zid> oh that's an s
<zid> the village in belgium.
<mcrod`> bazilga
<bslsk05> ​lwn.net: Subscription required [LWN.net]
<mcrod`> poor fucking bastard
<mcrod`> yeah that sucks
<mcrod`> but basically it's about the mseal() system call in linux
<kazinsal> so much for free as in freedom
<mcrod`> and how Jeff Xu's proposal is an example on how not to do kernel development
<bslsk05> ​lwn.net: mseal() and what comes after [LWN.net]
<mcrod`> i dunno how i would recover from that, working at google and having been shit on that hard by various sources
<mcrod`> puck thanks
<heat> puck, thanx
<puck> mcrod`: if you have an lwn subscription you can just do this :p
<mcrod`> i don't :p
<heat> >The conversation even brought about a rare appearance on linux-kernel by OpenBSD maintainer Theo de Raadt
<kazinsal> handy, thanks
<kazinsal> good ol' theo
<mcrod`> yes heat i wanted to slightly give you some very slight credit
<mcrod`> slight.
<heat> i'm sad i wasn't mentioned
<heat> bastards
<bslsk05> ​ir.amd.com: AMD Introduces New AMD Ryzen Threadripper 7000 Series Processors and Ryzen Threadripper PRO 7000 WX-Series Processors for the Ultimate Workstation :: Advanced Micro Devices, Inc. (AMD)
<mcrod`> i didn't know about this
<mcrod`> i'll never be able to buy it of course, but still cool
<heat> i've said this before but i find it really weird that they picked someone clearly *very green* to deliver a new fucking syscall to linux
<heat> how did they not see this coming?
<mcrod`> i dunno. i feel bad for the guy.
<mcrod`> i really do
<mcrod`> although it could've turned out a lot worse for him
<mcrod`> precisely why I don't even bother trying to contribute
<mcrod`> "michael rodriguez's patch to add syscall light_the_planet_on_fire() is absolute shit" -> employer googles my name, the rest is history
<kazinsal> thankfully I touch computers in a non-coding way for a career so I can submit dogshit patchsets risk-free!
<mcrod`> it's honestly pretty nightmarish how one can tarnish their careers in the blink of an eye if you submit a bad patch
<mcrod`> depends on the project
<mcrod`> i dunno, i think i'm overreacting on that front a little bit but the premise of googling my name and instantly seeing linus torvalds/matthew wilcox essentially saying I don't listen is a *very, very bad thing*
<heat> mcrod`, oh fuck off
<heat> do you know what happened?
<puck> mcrod`: life pro tip: listen
<heat> *someone* threw him to the wolves, he's clearly very green and he *resisted* changes
<kazinsal> I appreciate the Theo-Linus exchange there where Linus goes "yeah those are all good points, can we just crib your notes" and Theo gently ribs back "hey maybe if you do that chrome will finally upstream one of our patches for once" lol
<mcrod`> heat: *I understand*
<heat> in typical ~WEBDEV~ userspacedev fashion he wanted the exact thing the chrome people theorized
<zid> <zid> Time to buy a 7970x
<mcrod`> it's not like I didn't read the threat
<mcrod`> thread
<heat> kazinsal, fwiw i hate mimmutable
<heat> it's a very shortsighted interface
<heat> same shit for msyscall, openbsd just shits out bad syscalls at an unbelievable rate
<puck> hrm, msyscall makes sense in openbsd's case
<heat> linux cannot keep up even if they add AT_EMPTY_PATH that takes "" to every syscall
<heat> msyscall does not need to be a syscall, neither does mimmutable
<mcrod`> puck I think what I'm trying to say is if someone of notoriety to _that_ level says you don't listen, even if the circumstances aren't quite clear (i.e., "you don't listen" is what people see in the first place), that sucks for them
<puck> heat: i think openbsd is kinda purposely going for "limited api surface", and i assume something better will appear once need be; and i mean, openbsd doesn't have a stable syscall abi so who cares(tm) etc
<heat> puck, theo said to me multiple times that no one except ldso is going to use this, etc etc. i simply don't think that's true
<heat> just because *YOU* (openbsd) don't have resources to pull this off, it doesn't mean real projects do not
<puck> heat: msyscall can't actually be called multiple timmes
<kazinsal> I feel like you could probably just offload mimmutable's functionality to being a PROT_IMMUTABLE flag to mmap/mprotect/mremap
<heat> yes
<heat> matthew suggested it, i agreed strongly
<puck> heat: and mimmutable is a more simple case: it's easy enough to just shim it onto something more expressive
<heat> i think jeff is leaning towards that now
<heat> puck, what's stops the kernel from stopping further PROT_SYSCALL on mprotect?
<heat> theo came up with some bullshit with *branches* that is simply not true
<mcrod`> zid: don't worry, if I ever end up with millions you'll get a 7970
<heat> one branch makes no difference in mprotect or mmap logic, seriously
<heat> particularly with the typical branchiest vma rb tree
<puck> heat: "stopping further"?
<puck> (i'm kinda failing to parse that)
<heat> puck: i.e if (current->flags & PROC_SET_MSYSCALL) return -EINVAL;
<puck> heat: as opposed to a separate syscall?
<zid> I like 'add a flag to mprotect' :p
<heat> puck, yep
<puck> heat: yeah idk. my best assumption is "the design is very specific because you're not supposed to actually call mimmutable"
<puck> idk maybe it could've been a special section in the ELF file or something that the kernel parses,
<puck> i should go sleep i'm coming up with cursed ideas
<heat> puck, FWIW the openbsd kernel does that
<heat> they make up their own tinpot openbsd program headers all the time
<zid> <heat> just because *YOU* (openbsd) don't have resources to pull this off, it doesn't mean real projects do not
<zid> kek
<puck> heat: yeah but why isn't mimmutable this!
<puck> uh, msyscall*
<heat> idk
<heat> but anyway the "you're not supposed to call mimmutable" idea is trash, because clearly people want to call mimmutable
<puck> i meant msyscall
<puck> mimmutable's fine(tm)
<puck> i presum.
<heat> hrm sure
<puck> and mimmutable is easy enough to shim, but .. ugh, openbsd doesn't actually guarantee the behavior of mimmutable on unmapped pages in the region
<heat> i mean yes, but theo also repeatedly said (to me and in the ML) that no one called mimmutable except ldso so it doesn't make sense because no one would ever ever want this
<heat> which is *incredibly* short sighted
<puck> heat: this is a unified-system pov
<puck> heat: the openbsd linker handles mimmutable for you in Most Cases, and people probably either don't know mimmutable exists, or don't have a use for it
<heat> i theorize that i.e you could want to do like mmap(..., PROT_READ | PROT_WRITE | PROT_DOWNGRADEABLE) to stop PROT_EXEC mapping shittery on heap mmaps
<heat> for malloc
<heat> and in this case, mmap() + mimmutable() does not cut it, you pay for an extra syscall
<puck> yeah
<puck> also, that's racey
<zid> in the JIT context it being racy isn't an issue
<zid> you just don't run the thread until you lock the memory
<puck> i mean, in JIT it's likely W^X is fine enough, no?
Turn_Left has quit [Read error: Connection reset by peer]
<puck> heat: hmm, you can't mimmutable() any shared libraries that have been dlopen()'d; unless you take the controversial decision of nooping dlclose
<heat> yes
<heat> fwiw musl has a nop dlclose
zarock has quit [Ping timeout: 240 seconds]
zarock has joined #osdev
zarock has quit [Remote host closed the connection]
DoubleJ has quit [Quit: Not all those who wander are lost]
DoubleJ has joined #osdev