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
netbsduser` has quit [Ping timeout: 256 seconds]
<mjg> oh man, that branch history injection mitigation is eating about 7% cpu when ubenching stat
<Ermine> another cpu vuln?
Burgundy has quit [Ping timeout: 268 seconds]
arminweigl_ has joined #osdev
arminweigl has quit [Ping timeout: 252 seconds]
arminweigl_ is now known as arminweigl
wand has joined #osdev
wand has quit [Remote host closed the connection]
wand has joined #osdev
alexander has quit [Ping timeout: 256 seconds]
<Ermine> heat: what will happen if I both add x86_64-onyx gcc to PATH and x86_64-onyx clang to CLANG_PATH?
<heat> nothing
<heat> CLANG_PATH basically tells the build system to use a given LLVM toolchain (with onyx support)
<heat> meaning it won't (or shouldn't!) pick up on the gnu tooling
<Ermine> Okay. I'll guess I'll have to switch to llvm to use clangd
<heat> im not sure how much of the llvm install you can cut down just for clangd
<heat> you'll probably need to keep onyx runtime libraries and headers
<heat> clangd itself should be statically linked
<heat> if you do want to keep using gcc that is
chiselfuse has quit [Ping timeout: 260 seconds]
chiselfuse has joined #osdev
<Ermine> Oh, i like it how clangd infers types for auto vars and vs code shows that
alexander has joined #osdev
<heat> yep
<heat> admittedly i've abused auto sometimes and i've tried hard to cut back on that
mavhq has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
mavhq has joined #osdev
MiningMarsh has quit [Ping timeout: 260 seconds]
xenos1984 has quit [Read error: Connection reset by peer]
MiningMarsh has joined #osdev
srjek has quit [Ping timeout: 256 seconds]
xenos1984 has joined #osdev
Arthuria has joined #osdev
edr has quit [Quit: Leaving]
heat has quit [Quit: Client closed]
JerryXiao has quit [Ping timeout: 245 seconds]
JerryXiao has joined #osdev
rorx has quit [Ping timeout: 268 seconds]
rorx has joined #osdev
Matt|home has joined #osdev
smeso has quit [Quit: smeso]
gog has quit [Ping timeout: 272 seconds]
smeso has joined #osdev
Arthuria has quit [Ping timeout: 245 seconds]
rorx has quit [Ping timeout: 240 seconds]
rorx has joined #osdev
rorx has quit [Ping timeout: 255 seconds]
goliath has joined #osdev
rorx has joined #osdev
pebble has joined #osdev
gbowne1 has quit [Remote host closed the connection]
rorx has quit [Ping timeout: 260 seconds]
bauen1 has quit [Ping timeout: 260 seconds]
voidah has quit [Ping timeout: 252 seconds]
npc has joined #osdev
Bitweasil has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
Bitweasil has joined #osdev
voidah has joined #osdev
rorx has joined #osdev
netbsduser` has joined #osdev
<azonenberg> Do GNU linker scripts support preprocessor directives?
<azonenberg> or in general is there any good way to create/maintain a set of linker scripts that have a lot of common components but a few bits different?
<clever> azonenberg: LK has been using sed i believe
<goliath> can't you just run the linker script through the preprocessor first in your build script?
<goliath> s/build script/build system/
<bslsk05> ​github.com: lk/arch/arm/rules.mk at master · littlekernel/lk · GitHub
<kazinsal> ld has an `INCLUDE filename_goes_here`
<kazinsal> but no proper macro support iirc
<kof673> narrator: neither does the C preprocessor (arguably)
<kazinsal> you'd need to manually invoke `cpp` if you wanted to use the C preprocessor on linker scripts
<azonenberg> so it has include
<clever> goliath: i can see how using gcc -E could give you more flexibility then just dumb sed
<clever> i have had to do that before for dts files
<azonenberg> include is enough for this use case
<azonenberg> basically i want to have one standard base file and then redefine the MEMORY regions separately in each script
<azonenberg> so i can have a base linker script for the MCU
<azonenberg> then one for a bootloader that restricts it to the first few kB of flash
<azonenberg> and one for the app that blocks off those same flash sectors
<azonenberg> and have all of the other stuff be common
<clever> azonenberg: ah, thats the exact same thing LK is using sed for: https://github.com/littlekernel/lk/blob/master/arch/arm/system-onesegment.ld#L7
<bslsk05> ​github.com: lk/arch/arm/system-onesegment.ld at master · littlekernel/lk · GitHub
<clever> the binary starts at KERNEL_BASE, with an offset of LOAD_OFFSET, and __end_of_ram is at KERNEL_BASE + MEMSIZE
TkTech has quit [Quit: The Lounge - https://thelounge.chat]
<clever> twosegment, is for when .text is in ro xip flash, and the rest is in ram
<azonenberg> INCLUDE works but now i just have to figure out how to configure the search path
<azonenberg> because its not able to find things
rorx has quit [Ping timeout: 268 seconds]
<azonenberg> ah ok it's -L
netbsduser` has quit [Ping timeout: 268 seconds]
<azonenberg> anyway, yay what a shock
<azonenberg> <10 mins to find a working solution to a subtle obscure gnu linker task lol
<clever> ah, and then you can have a per-mcu version of that file, and set the search path
<clever> that sounds perfect
<azonenberg> I do that already per MCU because that's how i define peripheral address regions
<bslsk05> ​gist.github.com: stm32l431-base.ld · GitHub
<azonenberg> so i put this in stm32l431-base.ld then stm32l431.ld includes this after defining the base memory regions
<azonenberg> then if i'm doing bootloader/app or A/B images or whatever i can just make a new MEMORY section and include this after
voidah has quit [Ping timeout: 260 seconds]
rorx has joined #osdev
GeDaMo has joined #osdev
<mjg> huh, parking_lot rwlocks inject spins between read lock attempts
<mjg> PESSIMAL
bauen1 has joined #osdev
zetef has joined #osdev
sortie has joined #osdev
Yoofie has quit [Ping timeout: 260 seconds]
rorx has quit [Ping timeout: 240 seconds]
Yoofie has joined #osdev
gog has joined #osdev
<Ermine> mjg: where
kfv has joined #osdev
carbonfiber has joined #osdev
zetef has quit [Ping timeout: 260 seconds]
xFCFFDFFFFEFFFAF has joined #osdev
Burgundy has joined #osdev
bauen1 has quit [Ping timeout: 245 seconds]
kfv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rorx has joined #osdev
suqdiq has quit [Quit: Ping timeout (120 seconds)]
rorx has quit [Ping timeout: 268 seconds]
d5k has joined #osdev
pebble has quit []
rorx has joined #osdev
voidah has joined #osdev
xenos1984 has quit [Read error: Connection reset by peer]
joe9 has joined #osdev
d5k has quit [Ping timeout: 255 seconds]
rorx has quit [Ping timeout: 268 seconds]
xFCFFDFFFFEFFFAF has quit [Read error: Connection reset by peer]
bauen1 has joined #osdev
netbsduser` has joined #osdev
kfv has joined #osdev
xenos1984 has joined #osdev
goliath has quit [Quit: SIGSEGV]
srjek has joined #osdev
rorx has joined #osdev
pebble has joined #osdev
npc has quit [Remote host closed the connection]
navi has joined #osdev
goliath has joined #osdev
m257 has joined #osdev
<bslsk05> ​users.rust-lang.org: Idiomatic way for waiting for multiple children to exit on Linux? - help - The Rust Programming Language Forum
<mjg> anyone?
<mjg> i'm waiting for a webdev to respond that rust has fearless concurrency so i can use threads no problem
Matt|home has quit [Remote host closed the connection]
<mjg> really though, things are not looking good so far
zetef has joined #osdev
carbonfiber has quit [Quit: Connection closed for inactivity]
<Mutabah> mjg: Hey, don't undersell the effectivenss of a loop+sleep approach
<mjg> :)
zetef has quit [Ping timeout: 256 seconds]
kfv has quit [Quit: Textual IRC Client: www.textualapp.com]
<mjg> and solved, kind of -- experimental support for pid fds
<mjg> interestingly something like this would already not be a problem on bsds(!) 2 decades ago
<mjg> kqueue allows you to wait for process events
edr has joined #osdev
leg7 has joined #osdev
Arthuria has joined #osdev
xFCFFDFFFFEFFFAF has joined #osdev
<nikolapdp> mjg: when has rust every looked promising :)
<zid`> egg
<mjg> if you don't like rust write your own programming language
navi has quit [Ping timeout: 255 seconds]
<nikolapdp> uh, i write in c
<nikolapdp> why would i write another language if i don't like rust
<zid`> zidc
<nikolapdp> rapid fire, zid`, what does you language do
<zid`> it's almost identical to C, but there's no w*, and you can dereference pointers to structs with trailing incomplete members
<zid`> also there's an sizeof for arrays that gives you the member count not the byte count
<nikolapdp> shouldn't that be lenof or someting
pebble has quit []
<zid`> and it has builtin macros for doing unaligned reads etc
<zid`> an endian #define
<leg7> what is `w*`?
<zid`> and some other stuff I forget
<nikolapdp> no generics or borrow checker or lambdas
<nikolapdp> smh
<Ermine> go go go
<GeDaMo> Tally me banana / array elements :P
<netbsduser`> nikolapdp: traditionally elementsof
<nikolapdp> yeah sure, i meant that it shouldn't replace sizeof, but that it should be it's own thing
<zid`> good job I said that then
<netbsduser`> nice link btw mjg
<nikolapdp> good job zid`
<nikolapdp> egg
<GeDaMo> There's a language that uses 'tally' for the number of elements, I can't remember which one :/
<netbsduser`> the author is making a timely reminder that unix is a c platform and c is the language of unix
<netbsduser`> and rust is foreign to it so they are using thread nonsense to individually wait instead of the traditional selfpipe trick
<zid`> GeDaMo: APL lolcode
<GeDaMo> I was thinking APL or possibly some other array language
<zid`> specifically the lolcode variant that uses only emoji
<bslsk05> ​www.jsoftware.com: # Tally - Copy
<GeDaMo> It's called tally but spelt # :P
<zid`> GeDaMo: tally() operator should return a const char * that contains "1111" if the array has 4 elements
<nikolapdp> genius
<nikolapdp> add it to your langauge
<zid`> and "1111 1111" for 9 ofc
<zid`> ack
<zid`> made a mess of my control chars
<nikolapdp> you sure did, but the pdp doesn't care
<zid`> "1111 1111" ?
<zid`> There we go
<zid`> just to stop you using strlen() on it mainly
<nikolapdp> oh the escape sequences are a part of the string
<nikolapdp> neato
<zid`> You could probably still do it with strlen(s)/6 + strlen(s)%5 though
Arthuria has quit [Ping timeout: 268 seconds]
<GeDaMo> 𝍸𝍬
<zid`> nice boxes
<zid`> even my browser doesn't have those
<zid`> ah tally unicode, neat
<GeDaMo> Neither does mine but my IRC client has, for some reason :P
<zid`> my irc font is a pixel font, windows will sub in from a different font for things it doesn't have, but I don't know what that font actually is though
<bslsk05> ​i.imgur.com <no title>
<zid`> Thanks wiktionary :P
<bslsk05> ​github.com: ollama-webui · GitHub
<nikolapdp> it's not wiktionary's fault, it's your font's
<zid`> They should WEBFONT me
<zid`> I don't have whatsit, noscript installed anymore
<zid`> so it won't get blocked
<zid`> nikolapdp are you busy not doing any work again
<nikolapdp> i am busy yes
rorx has quit [Ping timeout: 256 seconds]
<sham1> Web fonts are nice to use, but devs should choose appropriate backup fonts
<GeDaMo> Aren't web fonts potentially dangerous?
<gog> fonts contain bytecode
<zid`> hence noscript
<zid`> you don't have to process the bytecode unless you want good kerning I don't think
<gog> anything that has bytecode is sus
<gog> keming
<zid`> keming
<zid`> If you don't process the bytecode you get keming
<gog> yes
<gog> linotype simulator
<gog> ETAOIN SHRDLU
<zid`> nice
<zid`> ETAOIN SHRDLU is my waifu
<zid`> even with all the murders
<bslsk05> ​www.theregister.com: Font security 'still a Helvetica of a problem' says Canva • The Register
<zid`> >written in Python
<zid`> so not a serious tool then at least
<zid`> lol they just put "/etc/passwd" in the xml configs it used
<zid`> can't really blame bytecode fonts for that
<gog> we need to stop writing code
<zid`> we need to stop running things other people wrote in python
<zid`> python is a prototyping language
<zid`> it should be illegal to transfer python code over a network
<gog> i can't even read python anymore
<nikolapdp> lol
xFCFFDFFFFEFFFAF has quit [Read error: Connection reset by peer]
xFCFFDFFFFEFFFAF has joined #osdev
SophiaNya has quit [Remote host closed the connection]
ptrc has quit [Remote host closed the connection]
Burgundy has left #osdev [#osdev]
SophiaNya has joined #osdev
ptrc has joined #osdev
* Ermine moves from python to go
<kof673> apparently there is unicode stuff, not sure if for that: > The Mayan numeral system was the system [...] a vigesimal (base-20) positional numeral system. [...] three symbols: zero (a shell),^[citation needed] one (a dot) and five (a bar).
<kof673> > for example, thirteen is written as three dots in a horizontal row above two horizontal bars; sometimes it is also written as three vertical dots to the left of two vertical bars.
heat has joined #osdev
<heat> mjg, smp_mb
<mjg> lock twitteradd
<heat> twitterchg
<heat> implicit lock'd
<mjg> i with there was a rust write up for 1. c programmers 2. doing systems stuff
m257 has quit [Quit: Client closed]
<mjg> even stuff which claims to be for c programmers is not
<bslsk05> ​google.github.io: Welcome to Comprehensive Rust 🦀 - Comprehensive Rust 🦀
<heat> this?
<mjg> are you for real mofo
<heat> yes?
vai has joined #osdev
<bslsk05> ​google.github.io: Let's Write a UART Driver - Comprehensive Rust 🦀
<bslsk05> ​users.rust-lang.org: How to add an object to a hash map - help - The Rust Programming Language Forum
m257 has joined #osdev
<heat> isn't the answer Box<> like someone here told you before
<mjg> nope
<zid`> grep "unsafe" pl011.rs
<mjg> it just shifts the fundamental issue
<zid`> 3
<zid`> not bad for 15 lines of code
<heat> mjg, why?
<mjg> real implementation of boxing stuff up still creates a stack-based instance first
<mjg> which is then copied
<heat> thats weird
<mjg> rust
<heat> does it create something on the stack and then move it to the heap?
<mjg> anyhow it may be this is in fact not a problme, but i don't see it justtified anywhere
<mjg> and things like this are a big part of what i would consider to be material for c programmers
<mjg> someone only using higher level langs does not even need to consider this aspect
<mjg> and i see why regular docs would not bother talking about it
<mjg> sincce they are aiming at people from other stuff
<heat> there's a very select group of people that care if you do an extra copy or not
<mjg> if you are pretending to be a "c replacement"....
<heat> and it is you and a few other people in the LKML
<mjg> and talk shit about perf
<mjg> anyhow, from conceptual standpoint, there is a massive mismatch between what one would consider a pointer
<mjg> and what rust operates on
<mjg> but i don't have a full grasp on it
<heat> yes, because pointers are unsafe
<mjg> materials straighetning it out would be nice
<heat> we figured that out 30 years ago
<nikolapdp> FEARLESS
<mjg> aaand are fucking scarce
<zid`> DOING WORK IS UNSAFE --Rust, 2024
<Ermine> heat: I don't get the big picture of how block devices work. Is their interface a subclass of io_queue?
<heat> Ermine, block devices aren't necessarily related to io_queue
skydhash has joined #osdev
<zid`> nikolapdp: need something to do for 6 days 6 hours 35 mins
<nikolapdp> LEARN RUST
<nikolapdp> RUST RUST
<gog> I'M RUSTING
<nikolapdp> RUUUUUUUST
<heat> Ermine, basically blockdev provides an opaque submit_request (with some incestuous blk_mq_ops there)
<zid`> I can't learn rust in 6 days, I gave up after 1 hour last time
<mjg> do learn rust
<mjg> but don't lie about it
<mjg> 8)
<heat> Ermine, if you use blk mq paths, blk_mq_submit_request will then pick an io_queue (using blk_mq_ops::pick_queue) and submit the request *there*
<mjg> do you submit requests using mpsc queues from rust
<heat> no, i have a single linked list with a spinlock on it
<heat> the classic pessimal
<mjg> may i interest you in ideas from distributed systems
<heat> no!
<heat> i did ponder making this scale but it made no sense
<heat> because io_queues are generally per-cpu anyway
<heat> and if they're not, submission is going to need a lock anyway
<mjg> 's was a meme
<heat> i know
<mjg> academia twats who never did real multicore in their life refer to stock-standard trickery as "from distributed systems"
<heat> Ermine, anyway then io_queue::device_io_submit can take the struct request (with its associated data, i.e the blockdev struct itself) and do the thing
<heat> do note that device_io_submit runs in atomic contexts and as such all allocations (if any) need to be GFP_ATOMIC, all locks need to be irqsafe, and ideally all memory should be preallocated alongside the struct request
<heat> nvme is a good example
<mjg> [']
<mjg> (i'm fucking off now)
<nikolapdp> drop(mjg)
<mjg> note this identified going out of scope does not affect the real me
<mjg> did you know letting std::process::Command objs going out of scope does not affect the child
<mjg> meaning you don't have a legitimate way to reap it after
<nikolapdp> wtf
<mjg> a language for soyboys would do something about accidents like that, but rust creators thought "well there is no leak *within* the program so who gives a shit"
<heat> hey that sounds like std::thread vs std::jthread
<gog> pee threads
<gog> leaking everywhere
<Ermine> so, fsen call blockdev.submit_request when they want to do IO ?
<mjg> std? you mean standard transmitted disease?
<heat> Ermine, yesen at some point
<Mutabah> mjg, gog - mind toning down (or up?) the language a bit? Put some thought into your insults at least
<gog> ok
<gog> i should really be webdeving anyway
<nikolapdp> hey gog, good news, i've got a language for you
<nikolapdp> it's called rust
<nikolapdp> maybe you've heard of it
<heat> Ermine, see ext2_readpage() -> sb_read_bio() -> bio_submit_req_wait() -> bio_submit_request() -> dev->sumbmit_request
<mjg> Mutabah: do you know a good resource for c programmers trying to learn rust
<mjg> i can try to come up with an elaborate insult as gratitude if required
<Mutabah> maybe "Rust by example"?
<mjg> i found that stuff to be of weirdly bad quality
<Mutabah> The challenge I have is that I learnt before 1.0, and learnt by just taking an existing project of mine and hackily converting it to rust
<mjg> liek anything you read there is super simplified, which would be fine if they just wanted to illustrate something at first
<mjg> and if they later followed by something which very much is common and is not obvious whatsoever how to do it, but they don't
<mjg> case in point, see process creation i linked above
<mjg> literally the only examples are creating a lolproc and immediately waiting for it, maybe grabbing some of its output
<mjg> this is useful and all, but far from the only case for creating a process, innit
<heat> have you conisdered just calling waitpid?
<mjg> mofo, the recommended crate creates an object tied to the process
<mjg> if i just waitpid i reap the child from under the object
<heat> and?
<mjg> kind of a layering violation would not you think?
m257 has quit [Ping timeout: 250 seconds]
<heat> ZFS!
<mjg> aight want something funny?
<heat> you can probably still use signal handlers as much as you can probably also use waitpid
<mjg> i found a dude who tried to use the famed fearlezz concurrency
<mjg> and found perf is terrible
<mjg> their locks immediately go to sleep when contended, so...
<heat> yes, what now
<mjg> the solution is to not use locking but message passing
<heat> all locks immediately go to sleep when contended
<heat> in userspace
<mjg> message passing is implemented with hand-rolled spinlocks which never go to sleep
<heat> FAST
<mjg> and suddenly perf is acceptable
<mjg> so much for fearless concurrency
<heat> what
<mjg> what what
<heat> i'm not sure how your conclusion here can be
<heat> "how about that fearless concurrency eh?"
m257 has joined #osdev
<mjg> rust docs claim it's all dandy, just use locks
<nikolapdp> RFEARLESS CONCURRENCY
<heat> it's still fearless concurrency but with a spinlock
<mjg> people who try to do it find thigns don't work
<mjg> you have to use a not recommended method to dodge the problem
leg7 has quit [Ping timeout: 268 seconds]
<heat> brother in christ try glibc
<mjg> and the method is implemented in a shite manner which futexes were created to solve
<heat> the scenes when you find out pthread_mutex_lock also blocks
<mjg> i know
<mjg> you must have missed the part where locking does not scale for the most part and quadruple so if you go to sleep
<heat> correct
<mjg> but if that's true even by rust standards, they should not be recommending it
<mjg> yet they do
<mjg> marketing literally states you can just slap mutexen all over and it's gonna be great
<mjg> speed ups, safely
<heat> rcu is very hard to model correctly
<nikolapdp> that's what FEARLESS CONCURRENCY is supposed to mean after all
<heat> and used by a teeny tiny % of people
<mjg> of course, real world multicore performance requires expertise
<mjg> so for starters they could concede that
<mjg> instead of lying
<Ermine> I've got a feeling this rust discussion lasts for days
<heat> i've seen a web server use mutexes and relatively big locks and run with hundreds or thousands of threads
<Mutabah> throw rayon at it?
<mjg> a well meaning beginner can easily buy into this and write themselvs into shit
<heat> anyone can write themselves into shit
<heat> for any language
<mjg> the lang does not have to encourage it
<mjg> which rust does
<Mutabah> "fearless concurrency" doesn't mean that your code will be super-duper fast with no effort
<heat> do you want the language to encourage RCU?????
<Mutabah> but it _does_ mean that you won't accidentally expose data you didn't intend to due to a race
<mjg> Mutabah: that's not what rust advocates claim
<mjg> heat: no, i want the language to stop bullshitting about multicore
<Mutabah> and it will be faster than other safe languages (e.g. blows python out of the water)
<mjg> Mutabah: so i got that example guy (no link handy though, sorry) who had a project in go
<mjg> Mutabah: rewrote that in rust and got the perf drop due to mutexes sleeping
<mjg> recovered after converting to message passing
<heat> mjg, not sure what they can do. remove mutexes from the standard library?
<nikolapdp> Mutabah, for a so called systems language, python is a werid comparison
<heat> "rust mutexen are pessimal so just use unsafe and roll your own solution"
<mjg> no, they should stop encouraing multicore
<mjg> which often times is not warranted
<nikolapdp> not wrong
<mjg> for example nginx or apache (in pre-fork mpm) are single-threaded, yet utilize multiple cpus just fine
<mjg> without multicore fuckery
<heat> you're bringing world class web servers into the picture while talking about some shitty tutorials
<Ermine> s/multicore/multithread
<mjg> no, even numerous examples with tokio where people claim they use shit in production explicitly show 0 use for multicore handling in their code
<mjg> ultimately people mostly have something which grabs a request and produces some shite output
<mjg> whateer synchronisation which was needed was already done by code below
<mjg> for example in the database
<mjg> i/o multiplexing done by whatever magic framework (tokio in case of rust)
<Mutabah> nikolapdp: Ok, how about "same performance as C++, but without the uncontrolled memory safety holes"
<mjg> somehow outside of rust majority of code gets away with very simple code oblivious to multicore aspects
<mjg> s/of code/projects/
<mjg> but in rust you better add some locks
<Mutabah> mjg: At the lowest level of anything - there's ether locks or atomics - otherwise you have race conditions
skydhash has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<mjg> i commented on this above
<Mutabah> Sorry, I probably missed that then - been flicking back and forth
<mjg> well it's not a /serious/ discussion, so... :)
<mjg> i just remembered a great example.
<mjg> there is a new-ish grep rewrite with some magic algos which make it way faster than gnu grep
<mjg> all in c afair
<mjg> and single-threaded
<mjg> meanwhile should you check for a grep in rust you are going to immediately find threading
<mjg> and it still loses(!)
<mjg> the baseline program is not as fast and threading itself comes with overhead
<mjg> arguably for a big enough file tree it is going to start winning
xenos1984 has quit [Read error: Connection reset by peer]
<Ermine> Ah, so block device can plug blk_mq_submit request and be multiqueued, but it can roll its own submit_request if it wants to?
<Mutabah> mjg: I think that's the idea of ripgrep - be able to do recursive searches fast
<heat> Ermine, yep
<Mutabah> Counter point to the upside of rust's threading and infrastructure - I made a 3D raytracer/renderer, and enabling threading was some simple changes to switch to using rayon
<Mutabah> and voila, 16 threads crunching the geometry calculations.
<mjg> you mean you had embarassingly parallel problem to deal with or something else of that caliber
<mjg> that does happen and even c(!) has lib to handle this (see openmp)
<heat> Ermine, all in all i don't recommend it, blk_mq_submit_request implements trickier stuff like block plugging and the sort
<mjg> you may also notice you could get all these benefits without the misleaing marketing about locks
<heat> it should be the Canonical(r) entry point into most IO stacks
<heat> personally i think arguing about rust multithreading capabilities ad infinitum is a great use of everyone's time
<zid`> kibitzing
<heat> this is a distinctly good discussion because no one is listening to the other participants
<mjg> Mutabah: wtf, someone added threading to ugrep....
<zid`> gongoozling is the best sport ngl
<heat> gongoozling sounds like a new step in ZFS before your data goes to the disk
<Ermine> Ok, so for virtio I basically need to implement io_queue which somehow translates to virtqueues, and corresponding mq_ops ?
<mjg> Mutabah: i'm buggering off the subject 8)
xFCFFDFFFFEFFFAF has quit [Read error: Connection reset by peer]
bauen1 has quit [Ping timeout: 260 seconds]
<heat> Ermine, correct
<Ermine> Gotcha
xenos1984 has joined #osdev
xFCFFDFFFFEFFFAF has joined #osdev
melonai has quit [Quit: Ping timeout (120 seconds)]
melonai has joined #osdev
spareproject has joined #osdev
xFCFFDFFFFEFFFAF has quit [Remote host closed the connection]
m257 has quit [Quit: Client closed]
m257 has joined #osdev
m257 has quit [Ping timeout: 250 seconds]
Left_Turn has joined #osdev
thaumavorio has quit [Ping timeout: 256 seconds]
thaumavorio has joined #osdev
xal has quit [Quit: No Ping reply in 180 seconds.]
xal has joined #osdev
goliath has quit [Quit: SIGSEGV]
bauen1 has joined #osdev
spareproject has quit [Remote host closed the connection]
Burgundy has joined #osdev
gog has quit [Quit: Konversation terminated!]
asarandi has quit [Quit: WeeChat 4.2.2]
asarandi has joined #osdev
xFCFFDFFFFEFFFAF has joined #osdev
<ddevault> that was significantly more work than I anticipated
<mjg> :)
<mjg> congrats
<nikolar> Very nice ddevault
<mjg> are you C-ing or rusting it
<ddevault> hare
<mjg> oh right
<heat> nice!
<nikolar> very nice indeed
m257 has joined #osdev
navi has joined #osdev
skydhash has joined #osdev
navi has quit [Ping timeout: 256 seconds]
<heat> linux has a locked named blocked_lock_lock
<heat> lock
<Ermine> gj ddevault !
<ddevault> ty!
<kof673> to clarify your position mjg (this is not a criticism) is there any language/etc. that does really offer fearless concurrency, or is it all a mixture of hype/fluff/etc. ?
<kof673> "offer" as in a default path/idiom/methodology, not something that needs lots of work (again, not a criticism: maybe it always needs careful planning)
<GeDaMo> Erlang?
<GeDaMo> Occam?
<Ermine> Occam's razor?
<mjg> kof673: there is tech out there which largely hides anything multicore you for simple things
<mjg> however, for real problems where real expertise is required so far nobody came up with a magic pill
m257 has quit [Ping timeout: 250 seconds]
leg7 has joined #osdev
<Ermine> Lol, so it's named after Occam's razor
<GeDaMo> There are a number of languages with 'concurrent' in the name like Concurrent Pascal / Euclid / Clean
<Ermine> 'Prior Art'
foudfou_ has joined #osdev
<mjg> concurrent pascal?
foudfou has quit [Ping timeout: 260 seconds]
<mjg> knowing pascal it runs with a fixed number of threads
srjek has quit [Ping timeout: 246 seconds]
<mjg> i'm not opening that
<mjg> here is some wisdom from linkedin instead
<mjg> > A wise man once told me we as managers or leaders we are managing people hence understanding the underlying reasons for conflicts can be crucial for managing them effectively. having open conversations with team members to identify any sources of pressure, personal issues, or misunderstandings that contribute to the conflicts. Additionally, creating a supportive and collaborative team environment can help
<mjg> reduce the likelihood of conflicts arising in the first place.
<mjg> sounds like an intern but the photo suggests dude is at least 50
leg7 has quit [Remote host closed the connection]
xFCFFDFFFFEFFFAF has quit [Read error: Connection reset by peer]
xFCFFDFFFFEFFFAF has joined #osdev
<kof673> wise was double, illiteracy is eternal :D
<kof673> or, not all conflict is magically bad
<kof673> nor needs "managed"
navi has joined #osdev
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #osdev
<kof673> > Se-Osiris, Ancient Egyptian Wizard that was the "wise man" lol
goliath has joined #osdev
<Ermine> if a conflict affects the project, it should be managed i guess
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #osdev
xal has quit []
xal has joined #osdev
gbowne1 has joined #osdev
<kof673> i'm not arguing that, just nitpicking "wise" used to be "wizard" lol
<kof673> so that is the "wizard' definition lol
skydhash has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<heat> lord oh lord why does my systemd have gnutls AND openssl linked in
<nikolapdp> lel
<nikolapdp> you know whose init doesn't have two full blown ssl implentations in it
<heat> 2.11BSD
<nikolapdp> indeed
<mjg> :(
<mjg> i'm gonna add openssl to it just to invalidate your statement
<nikolar> I double dare you
<nikolar> Do it
<mjg> waiting for my vax delivery
<heat> this is insane
<nikolar> (btw you'd need to SSL implementations to invalidate my statement but I'll accept just one)
<GeDaMo> Vacuum cleaner? :P
<heat> apparently if i link my GPL'd code against OpenSSL I'm infringing on the GPL??
<mjg> ?
<mjg> i''m pretty sure tons of gpl uses openssl
<nikolar> Wat
<mjg> so something is funky
<heat> it appears to have been the entire legal argument for gnutls
theyneversleep has joined #osdev
<heat> that if not for gnutls, every copyright holder in a gpl project needs to grant an exception for openssl
<heat> but now apparently no one gives a shit
<bslsk05> ​www.gnu.org: Frequently Asked Questions about the GNU Licenses - GNU Project - Free Software Foundation
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<heat> this does sound legally bogus but IANAL
<nikolar> Apparently there was a licensing update for openssl in 2017 that made it compatible with GPL
<heat> where?
<nikolar> Trying to dig it up, it was a dead link
<bslsk05> ​www.openssl.org: Licensing Update - OpenSSL Blog
<heat> oh the switch to apache?
<zid`> nikolapdp: That isn't barney, wtf
<nikolar> Barney?
<zid`> That's what you told me you'd be watching in your free time
<heat> ohhhhh the OG openssl license had weird advertisement clauses
<heat> that's why they weren't GPL compatible
<nikolar> Oh makes sense
<zid`> Guys, can you believe
<zid`> People born in 24 are 2000 now
<nikolar> I'm pretty sure you're fine heat
<nikolar> Yes zid, I can believe that
<heat> ine from what?
<nikolar> Though I'm not 24
foudfou_ has quit [Remote host closed the connection]
<nikolar> Licensing-wise
<heat> yeah
foudfou has joined #osdev
<heat> i'm not facing this problem though
gog has joined #osdev
<heat> was just curious as to why gnutls existed at all
<heat> or why anyone would ever use such a horrible horrible thing
<nikolar> Lol why is it so horrible
<heat> i would be very surprised if it isn't openssl but worst and commie'd
<heat> worse*
<zid`> openssl but *worse*? how?
<heat> that's very trivial
<heat> see: libressl
<zid`> openssl compiles -fno-strict-aliasing because *they have too much UB and refuse to fix it* :D
<heat> so does linox
<heat> does that mean freebsd > linox?
<zid`> The linux case is weird, linux does very specific UB on purpose because it's "Things that they think gcc should make IDB, for all I"
<nikolar> Lol and do they do exactly
<zid`> wat
<zid`> heat, balkans to english pls
<netbsduser`> the no strict alising goes without saying
<netbsduser`> there isn't a kernel in the world that doesn't employ that flag (except for the ones not built with radical compilers)
<heat> zid`, the FOSS world is full of people saying stuff should not be UB, or that UB is fine
<heat> linux gets a pass because it's linux and everyone loves it
<zid`> sadly
<zid`> Linux gets a *partial* pass from me
<heat> hell, linux made its own memory model
<heat> which, fair enough, they kinda had to
<zid`> They have a lot of contributors and aliasing bugs are hard to chase, I'd consider it a hardening option, for them
<zid`> just claim linux enables it by default to make the code MORE ROBUST and then whatever I guess, rather than a quality control issue
<mjg> frogbsd vs linax
<childlikempress> linux memory model uses data dependencies which aren't really in c++11
<heat> yes they are
<heat> consume!!
<childlikempress> hence 'aren't _really_' :p
<heat> it's not the spec's fault if the compiler never bothered to implement it
<childlikempress> oh don't they have control deps too
<childlikempress> that at least isn't in c++11
<heat> but it just so happens that data dependencies are kinda automatic if you're not alpha
<heat> a relaxed load Just Works usually
<heat> except if you're alpha, in which case you cry
<mjg> good thing you are a beta
* mjg <-- sigma
<heat> mjg what's the openbsd memory model
<heat> is it "giant lock and pray"
<childlikempress> oh same as python!
<mjg> interestingly that's somewhat true
<childlikempress> match made in heaven
<heat> x86 should have an interpreter lock
<childlikempress> it does!
<childlikempress> look up split locks
<mjg> they have numerous races which they hope wont happen
<childlikempress> mjg: wait what?
<mjg> note giant is autodropped when you are going off cpu
<mjg> childlikempress: for example they had some code for process export (for ps) which failed to ref squat
<mjg> so they would deref some pointers while protected by giant, copyout, possibly dropping giant, then continue using them
<mjg> but by that time they very well may not be what they seem, just like owls in twin peaks
<childlikempress> that ... seems ... exploitable?
<mjg> plausibly
<heat> WHAT
<mjg> chances are decent their races are "safe" n that they never free that memory
<heat> noway bro
<mjg> aka "type stable"
<childlikempress> oh
<childlikempress> sad
<heat> did you know openbsd eliminated all rop gadgets
<heat> and pads .text with int3
<mjg> ye i expect for the most part you are getting botched export
<mjg> missing processes 'n shit
<childlikempress> wait but then does that mean if you just create a bunch of proceses and then destroy them all, you'll leak some memory used for process descriptors?
<childlikempress> because it can't be reused for anything else?
<mjg> they can be reused for other processes
<childlikempress> but nothing else?
<heat> its extra secure
<mjg> it's an age old tradition to have core kernel structures
<mjg> yes
<mjg> ... handled like this
<mjg> literally same deal with vnodes
<childlikempress> o.o
<mjg> literally can't be freed
<mjg> age old tradition in the bsd land i mean
<heat> in unix
<heat> struct buf bufs[NBUFS];
<nikolapdp> #defineNPROC (10 + 7 * MAXUSERS)
<nikolapdp> struct proc PROC[NPROC];
<nikolapdp> straight out of 2.11
<mjg> astrological tunning
<kof673> ^ > this does sound legally bogus /me points at double lions outside ocurthouse
<kof673> *courthouse. that is kind of what "legal" means, "bogus"
<heat> nikolapdp, it's a classic practice
<heat> the BSD people are only sad they had to stop doing it
<heat> but still limit vnodes and shit
<mjg> why are you dunking so much on bsd
<mjg> where is someone to call you out
<nikolapdp> PDP11 RULEZ
<nikolapdp> BSD2.11 FOR LYFE
<kof673> "law" did the "Spirit" thing formerly, "legal" is appearances/formalized...may or may not be actual. 3 frogs in a suit
<kof673> that was not a misuse by you nor the link, just.....illiteracy is eternal :D
<heat> mjg, it's about time you dunk on my scheduler code again
<mjg> i'm busy dunking on something else atm
xFCFFDFFFFEFFFAF has quit [Ping timeout: 272 seconds]
<heat> oh they're rewriting tor in rust
<kof673> or, "legal" is only 1/2 of the double lion lol
<zid`> that makes sense
<mjg> you know what would be funny
<mjg> if it turned out that rust has a backdoor a'la xz
valshaped7424880 has quit [Read error: Connection reset by peer]
<nikolapdp> kek
<mjg> liek think about it
<mjg> there is a push to get this lang everywhere
<heat> has jia committed to rust
<heat> quick someone check
<mjg> not that i know of, but maybe his brother in law?
<nikolapdp> no
<nikolapdp> you
<mjg> i committed to rust
<mjg> true story
<Ermine> You can make this backdoor in literally any language
<nikolapdp> what magnificent contribution did you make mjg
<mjg> PERFORMANCE... kind of
<nikolapdp> Ermine not every language is being pushed everywhere as hard as rust
<mjg> mostly being annoyed at strace output
<Ermine> and?
<nikolapdp> lol fair
<nikolapdp> just saying
<Ermine> C is not pushed, yet the backdoor was in C
<bslsk05> ​github.com: Stop probing for statx unless necessary by mjguzik · Pull Request #106661 · rust-lang/rust · GitHub
<Ermine> And autotools are not pushed
<mjg> fucken' gg
valshaped7424880 has joined #osdev
<nikolapdp> oh i think you misunderstood mjg
<kof673> i read that as jira
<nikolapdp> what if the backdoor was inside of the language itself
<heat> it'd still be safer than C
<nikolapdp> sure heat
<nikolapdp> you'd know, you write in c after all
<heat> mjg, you know what the musl guy told me when i said you could cache syscall results?
<heat> nikolapdp, i do
<nikolapdp> yeah we've seen all of your lambdas in c
<heat> he told me "what if they migrate the process to a newer kernel and now the syscall caching doesn't reflect the thing :("
<heat> i feel like you sniff glue
<heat> do you?
<mjg> what syscall results are you down to cache heat
<mjg> are you the the kind of ricer to cache getpid?
<heat> not that kind
<mjg> i'm watching you and i don't like what i see
<heat> caching if syscalls exist or if flags are implemented
<mjg> then i don't get hiso bjection
<mjg> my solution: stick to kernel 2.2
<heat> lets say you're running on 6.0, SYS_ligma doesn't exist, you cahce that. now you migrate to 6.1, suddenly SYS_ligma exists, but your cache is wrong
<mjg> where tf did you cache
<heat> memory?
<mjg> right, so how is this a problem
<Ermine> how tf do you migrate the process
<mjg> you hotpatched from 6.0 to 6.1?
<heat> you can freeze processes
<heat> it is technically a thing you can do
<heat> in practice it's a super tiny edgecase
<nikolapdp> how common is hot patching anyway
<mjg> does thatcode even work though
<mjg> a genuine question
<mjg> it was beyond dodgy
<heat> what code?
<mjg> prctl feezer
<mjg> and more accurately, the restore part
<heat> idk
<heat> but criu apparently supports live migration
<mjg> and openbsd supports 256 cpus
<nikolapdp> is that defined by NCPU
<mjg> MAXCPU
<nikolapdp> heh neat
<nikolapdp> keeping the tradition going
<mjg> well you do need a limit to size shit
<mjg> some of it anyway
<mjg> even linux has one
<heat> LINUX WOULD NEVER
* geist slaps linux with a wet trout
<heat> is zircon still limited to 32 cpus?
<vin> what do you mean by migrate a process to a new kernel heat? Won't we have to always restart when the kernel is updated? I have not heard of live migration, sounds pretty cool
<mjg> arch/sparc64/include/cpu.h:#define MAXCPUS 256
<nikolapdp> 256 sparc cpus?
<heat> mjg, you're looking at the wrong thing btw, it's a config
<mjg> stuff that matters
<nikolapdp> who took all of the sparcs
<heat> CONFIG_NR_CPUS i think
<mjg> ye, so there is a limit, like i said
<heat> i know i was shitposting
<mjg> nikolapdp: so the meme here is that i386 supported up to 256 cpus on paper
<mjg> based on that all the bsds slapped maxpu of 256
<mjg> smart
<nikolapdp> that's funny
<mjg> extra smart there was a bunch of statically sized arrays derived from it
<mjg> basically memory waste
navi has quit [Ping timeout: 255 seconds]
<nikolapdp> you've got loads of memory though don't you
<nikolapdp> just buy more ram
<mjg> and increase swap
<heat> mjg, https://github.com/heatd/musl/blob/master/src/fcntl/open.c#L16-L18 this is whats running on tons of alpine linux docker containers
<mjg> 2GB drives are already available
<bslsk05> ​github.com: musl/src/fcntl/open.c at master · heatd/musl · GitHub
<nikolapdp> increasing swap genuinely helped my laptop
<nikolapdp> there are occasional slowdowns but never a hard oom like i used to have
<mjg> heat: .... wow
<heat> you know why?
<mjg> what the actual fuck
<heat> there were like 2 buggy versions around the 2.6 early days where O_CLOEXEC was broken
<mjg> it is very gnu way to work around the problem like this
<Ermine> gnu engineering ethos
<mjg> and they are refusing to retire this because...?
<heat> because musl supporting old broken crap is a feature to them
<heat> and caching results doesn't work because then live migration won't pick up the new stuff!
<mjg> is the guy worried about someone migrating to an *older* kernel?
FreeFull has joined #osdev
<heat> nope
<mjg> then this bit should be cacheable no problem by his own standards?
<mjg> why not at leat ifdef it?
<heat> but then you won't pick up the new syscalls!
<mjg> 2.6.32 is liek eoled even by red hat
<heat> yes but it's not EOL'd by the minimal crowd
<mjg> #ifndef FUCK_OLD_CRUFT
<mjg> there
<mjg> everyone gets to keep running the code the ywant
<heat> who yearn for the ANSI C tcc 2.6.7 combination
<mjg> bsd make author does not make shit like TMPFILE
<mjg> because old unix systems don't have it
<mjg> and bsd make work there
<heat> he should join musl
<mjg> and you better not try to ifdef it
<mjg> they may be buds
<heat> i do want to note however
<Ermine> there was a guy at #suckless which tried to build his entire system with tcc
<nikolapdp> how did that go
<heat> this is great for hobby OSes starting out, because musl will try to take care of your broken ass system
<mjg> maybe use some old fuckin' version instead
<mjg> i mean there is pretending to be a production lib
<mjg> and there is pretending to facilitate irrelevant projects
netbsduser` has quit [Ping timeout: 268 seconds]
<mjg> ultimately this is not my problem tho, so f-u
<dostoyevsky2> heat: what does __sys_open_cp do?
<heat> syscall with cancellation point handling
<heat> this variant is needed cuz newer linux archs dropped SYS_open and only have SYS_openat
<mjg> sys_open?
<mjg> how did that happen
<heat> how did what happen
<mjg> "we don't break userspace'?
<nikolapdp> dopping sys_open clearly
<heat> *newer linux archs*
<heat> aka aarch64 and newer IIRC
<mjg> :O
<heat> they dropped a lot of the !at variants
<mjg> ok that is a little funky, but compatible
* kof673 stares at tcc: tinyc, tendra, turboc all used this lol
<kof673> i'm guessing the former :)
<dostoyevsky2> isn't the great thing about tcc that you can easily have a jit in your os... with libtcc
<nikolapdp> indeed
<dostoyevsky2> and the real os you can also still compile with a normal compiler, but for scripting inside the kernel you could have libtcc
<heat> yikes
<dostoyevsky2> I guess luajit goes in a similar direction and maybe does it better
<heat> there are many solutions i'd prefer that don't involve pulling in a whole compiler backend
<dostoyevsky2> I think libtcc is like 300kb as a .lib and a great option e.g. when you need the speed for your firewall or the like
<heat> mjg, mofer feel this code
<heat> unsigned i, j;
<heat> for (i=0; (buf[i] = "/proc/self/fd/"[i]); i++);
<Ermine> netbsd netebsd netbsd
<nikolapdp> beauty
<mjg> :/
<dostoyevsky2> also, imho, an OS should include sqlite/duckdb these days ;-)
<heat> okay i need to push some changes i have lying around
<kof673> tcc in the above example is what is known as "legal" :D
<Ermine> does ebpf involve pulling a whole compiler backend?
<heat> no
<heat> you can jit cbpf or ebpf pretty reasonably yourself
<dostoyevsky2> Ermine: The code checker is probably a lot more work in ebpf than the actual jitting
<heat> on ebpf you even have compilers generating it, so you can't really do a much better job
srjek has joined #osdev
xenos1984 has quit [Read error: Connection reset by peer]
<childlikempress> heat: loooool
<childlikempress> wait i just saw the ; at the end, i assumed there was a loop body or sth but no it's literally strcpy
<childlikempress> lol
heat has quit [Remote host closed the connection]
heat has joined #osdev
xenos1984 has joined #osdev
<kof673> well, considering it is a known size ahead of time...could just be memcpy (and copy the \0) even
<mjg> i'm starting to wonder if that musl cloexec thing is even legal
<mjg> it breaks atomicity of file replacement vs dup2
<heat> they would argue it's a best-effort emulation
<mjg> also note PESSIMAL branch order
<mjg> O_CLOEXEC is less likely than fd >= 0 so should be tested first
<mjg> heat: sure, but what about kernels which don't need emulation? do you need the BREAKAGE
<heat> how could you replace a file open hasn't even returned yet?
<puck> mjg: hrmm, so
<mjg> you don't know that's what you are doing, you are just dup2'n somewhere
<puck> mjg: ...if you race your open() and dup2, i'd be worried
<mjg> well funny story fellas
<puck> even without this hack
<puck> because that probably means you're going to end up with the FD closed too early
<mjg> there used to be a bug in freebsd where capabilities for a file descriptor were not properly synchronized in lockless fd lookup
<mjg> which nobody serious would run into because you would have to be doing something stupid like dup2 in a multithreaded program
<mjg> modifying a fd as it is being used by another prog
<mjg> and that's precisely what broke an actual program
<mjg> :]
<mjg> ultimately the above changes observable behavior
<heat> yes but in your case you'd need some shit like
<heat> s/your/this/
<mjg> so you could make an argument it breaks compat
<heat> dup2(fd, rand())
<heat> which in openbsd would break because it doesn't have rand()!
<mjg> which for kernels without the original bug is avoidable
<mjg> which imo sounds about as valid as a claim you need that compat to begin with
<heat> hmm i can see an argument for your case
<heat> say i do close(1); open() and on another thread i'm dup2(oldfd, 1)
<heat> but... why am i playing these sorts of risky games with threads
<mjg> yes it is observable behavior, but you have to do something stupid to run into it
<heat> all dubious stuff, but the hack itself is mega-dubious in general
<mjg> which probably means some dumbfuck program is doing it
<heat> and i do want to note they pull this kind of shit in many places
<mjg> don't use musl maybe?
<mjg> did i mention its' the gnu way
<bslsk05> ​github.com: musl/src/fcntl/fcntl.c at master · heatd/musl · GitHub
<mjg> now that's plain... not optimal
<heat> gnu would have this all wrapped up in macros with some macros getting defined by random autoconf tests
<heat> they'd also do some uname() testing that would invariably break
<heat> oh yeah this reminds me: apparently some linux forks define their own syscalls, and glibc just happened to use a new syscall that colided with the shitty vendor one
<heat> the guy was asking if they could instead not do that :v
<mjg> ?
<childlikempress> syscall numbers should be uuids, change my mind
<childlikempress> like uefi thingies
<mjg> syscall numbers should not bea thing
<mjg> instead you would have utf16 strings
<heat> mjg you're reinventing early CSRG proposals stop
<mjg> as a joke you could even add e to syscalls where it does not belong
<bslsk05> ​sourceware.org: clock_gettime after 2.31 and reused syscall numbers
<mjg> lmao
<mjg> i have one better
<mjg> story
<mjg> so freebsd can run linux binaries. back in the day in order to do it you had to run "brandelf" on them to mark them as linukkz
<mjg> some fucking guy claimed his machine would reboot every time he tried to run a binary
<heat> either he forgot to run brandelf or he ran brandelf on a freebsd binary
<heat> somehow it ended up calling SYS_reboot or whatever
<mjg> individuals looking at the report geezered this out
<mjg> it was asserted that due to mismatched syscall numbers the binary just ends up invoking reboot(2)
<mjg> and the issue ineed no longer occurs after brandelf
<mjg> except such a binary would not get to execute any syscalls as the loader would not have been found
<heat> you know, lunix has a safe guard for that!
<mjg> in other words at the time there was some elf parsing bug which was triggered by some linux binary and it crashed the kernel
<heat> your kernel is weird
<mjg> not "your"
<mjg> 's not my circus
<heat> anymore
<heat> 0x28121969
<heat> the L man's aniversary IIRC
<mjg> i thought it was supposed to be birthdays of his children or somethin'
<heat> his children were not born in 69
<mjg> anyway i agree with some safeguarding against accidental root usage
<heat> i don't really agree cuz how tf do you call the wrong syscall anyway?
<heat> unless it's this case, in which case yeah it'd save your bacon
<mjg> This system call fails (with the error EINVAL) unless magic equals LINUX_REBOOT_MAGIC1 (that is, 0xfee1dead)
<mjg> and magic2 equals LINUX_REBOOT_MAGIC2 (that is, 0x28121969). However, since Linux 2.1.17 also LINUX_RE‐ BOOT_MAGIC2A (that is, 0x05121996) and since Linux 2.1.97 also LINUX_REBOOT_MAGIC2B (that is, 0x16041998) and since Linux 2.5.71 also LINUX_REBOOT_MAGIC2C (that is, 0x20112000) are permitted as values for magic2. (The hexadecimal values of these constants are meaningful.)
<mjg> 1996
<mjg> 1998
<heat> yeah those should be his children
<mjg> in their interpreatation the kernel failed to use the linux system call table
<mjg> due to lack of brandelf
<heat> how do they do linuxulator now anyway?
<heat> some prctl-ish or personality(2)-ish syscall?
<heat> will it die tragically if you exec a freebsd binary?
<mjg> some bullshit in elf parsing recognizes it's not native freebsd
<heat> oh do they use the abi field?
<mjg> bottom line you can unpack ubuntu image, chroot into it and it just works
<mjg> without any fuckery
Left_Turn has quit [Read error: Connection reset by peer]
theyneversleep has quit [Remote host closed the connection]
heat has quit [Remote host closed the connection]
Nixkernal has quit [Ping timeout: 252 seconds]
heat has joined #osdev
<heat> i would purposefully break that use case
<heat> not most distros, just debian-based ones in general
<mjg> unemployment.unwrap().collect().expect("riches");
<kof673> well...not assigning "blame" but was it the linux toolchain did not mark things "linux" before and now it does?
<kof673> or was it really freebsd not parsing whatever
<mjg> i don't know what's going on there, now or historically
<mjg> it was on fbsd to keep things working
<kof673> i know i used it about a week or two ago on 5.x, just not sure the reason it is needed :D
<mjg> ok i have a solution
<mjg> instead of "syscall numbers" you get syscall names spelled out in ascii in the register
<mjg> 8 chars is a long enough name i think
<mjg> if someone wants 16 another reg can be added to abi
<mjg> for example one could add "onyxcrap" and it would unlink the repo from your fs
<childlikempress> ascii is 7 bits, you can fit 9 chars
<mjg> "onyxshite" then
<childlikempress> but use avx512 regs for it imo
<Griwes> base256 encode it
<FireFly> childlikempress: good idea, 512 bits gives you 73 ASCII chars, that should be enough for short synopsys of the syscall
<mjg> maybe you could pass arguments this way?
<childlikempress> actually, what if
<Griwes> passing arguments through registers? truly a revolutionary idea
<childlikempress> instead of syscall numbers
<mjg> Griwes: spelled out in base512
<childlikempress> you just put a little ebpf program or sth and it does whatever you want
<childlikempress> then we never have to add new syscalls ;o
<mjg> how about a pluggable ebpf scheduler
skydhash has joined #osdev
<bslsk05> ​old.reddit.com: Blocked
<mjg> got the guy to do the work
<mjg> if Elon had a kernel it would not even have syscalls
<mjg> things would be done before the program sks for it
<bslsk05> ​'Frank Sinatra - Smells Like Teen Spirit (AI Cover)' by AI MUSIC WORLD (00:02:41)
goliath has quit [Quit: SIGSEGV]
xFCFFDFFFFEFFFAF has joined #osdev
heat has quit [Quit: Client closed]