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
heat has quit [Ping timeout: 246 seconds]
netbsduser` has quit [Ping timeout: 252 seconds]
Lucretia has quit [Remote host closed the connection]
sbalmos has quit [Quit: WeeChat 4.5.1]
heat has joined #osdev
Halofreak1990 has joined #osdev
<zid> how goes it heatofreak2010
<heat> terribly actually
<zid> did you remember threads exist
<zid> and now you're sad
<heat> i have a weird crash where threads > cpus spamming a futex (not sure if it's directly related) crash the system uncontrollably
<heat> with garbage stack corruption
<zid> slick
<zid> How good are you at instrumenting qemu and catching it trying to create new TCG blocks
<heat> im on kvm
<zid> does it crash in tcg too though
<heat> idk
<zid> might be a useful skill toi learn just in general
sbalmos has joined #osdev
frytaped has joined #osdev
sbalmos has quit [Quit: WeeChat 4.5.1]
sbalmos has joined #osdev
Arthuria has quit [Ping timeout: 260 seconds]
<heat> uhhhhhhhhhhhhh i think this is a kasan problem...
<zid> as in kasan caused it?
<zid> something in kasan isn't thread safe, or just your implementation?
<heat> something with my kasan implementation might be fucking things up
<heat> i disabled KASAN and things seem to just work... i'll be stressing this while watching tha tennis
<heat> i have 40 threads (for 4 cores) spamming both futex system calls and the mmap rwlock and no crash in sight
Halofreak1990 has quit [Ping timeout: 265 seconds]
<ring0_starr> erm, isn't a futex supposed to be a user-mode mutex...?
<Mutabah> There's kernel-side support needed
<Mutabah> A syscall that sleeps until a piece of memory changes (iirc)
<ring0_starr> i always thought that a futex was spinlock based
<ring0_starr> now that i'm reading some stuff this doesn't seem to be the case. is there a name for what i'm thinking of?
<clever> ring0_starr: just pop open `man futex` and look at the operations it allows
<clever> FUTEX_WAIT will test if a given address still contains a given value, and then sleep until FUTEX_WAKE is issued by something else on the same addr
Arthuria has joined #osdev
<clever> the idea being, if you lost the race to a mutex, and you need to wait until its unlocked, you FUTEX_WAIT
<clever> and whatever has the mutex, will FUTEX_WAKE when it unlocks
<clever> FUTEX_FD looks fun, it creates a special fd, that will be readable after a FUTEX_WAKE
<clever> so you can shove the "block until unlocked" part into a select() loop
<clever> so a single thread could be blocked on stdin, a dozen networks sockets, and a dozen mutexes
<clever> i think the other big thing with futex, is that the kernel auto-magically deals with virtual memory, so you can act on a mutex in shared memory, that is at a different virt addr in each process
<ring0_starr> yeah the manpage mentions this
<ring0_starr> > No guarantee is provided about which waiters are awoken (e.g., a waiter with a higher scheduling priority is not guaranteed to be awoken in preference to a waiter with a lower priority).
<ring0_starr> why is this okay?
<clever> it might just be an un-ordered linked list in the kernel, and it just wakes whatever is first
<ring0_starr> that doesn't make it okay... this is a case of priority inversion
<clever> scheduling priorities are complicated on modern linux
<clever> and nice doesnt do what you think it does
kilic has quit [Remote host closed the connection]
<clever> sorting by priority on every (un)lock would have a lot of overhead
<ring0_starr> not if you use a purpose built data structure
kilic has joined #osdev
<heat> futex has PI support
<ring0_starr> i wonder if anything changes if the threads have SCHED_RR
<ring0_starr> that are using this
<heat> FUTEX_WAIT_PI etc
<heat> sorting by priority would fucking suck
<heat> you'd starve lower priority waiters
<ring0_starr> yeah im reading about it now
<ring0_starr> but if you use a non-PI futex, there's no guarantee about which waiters are awoken, therefore the starvation of some readers might still happen
<heat> what readers?
<ring0_starr> i don't know. i was about to call this "a mess"
<ring0_starr> s/readers/waiters/
<bslsk05> ​<ring0_starr*> but if you use a non-PI futex, there's no guarantee about which waiters are awoken, therefore the starvation of some waiters might still happen
<heat> normal futexes are perfectly fair, roughly FIFO waiting
<ring0_starr> I guess uaddr readers
<heat> it's not perfectly scheduling-fair, but it depends on the hat you're wearing
<ring0_starr> there's no guarantee of that being the case. in practice it works out alright but what makes it a mess is that you cannot reason about it
<heat> you do not need to reason about it
<heat> there is no need to expose internal details to userspace
<ring0_starr> hrmm i vaguely recall there being some kind of 'red hawk linux'
<ring0_starr> i wonder what they do
<ring0_starr> as the environment, you do need to expose those kinds of details to userspace, because nothing else in between the language and the kernel is making any kind of guarantee
<ring0_starr> if nobody makes any kind of guarantee in the chain then there is no determinism
<heat> you do not need to expose these kinds of details to userspace
<heat> seriously, try it
<heat> you'll paint yourself into the most hellishly well documented corner
<heat> internal details should not be ABI
<ring0_starr> it's not the ABI though, it's the operating environment at large. you only really would need to know these details at a level greater than any single process
<ring0_starr> you're right if you think of every process as its own island, but this isn't ever the case...
<heat> say i explicitly document the futex waking order, in a man page
<heat> this works great while it's a very simple linked-list-like hashtable. good.
<heat> now say i make up a new data structure that does not play ball with the waking order
<heat> oopsie, fucky wucky
<ring0_starr> your users would just stick with the older more reliable version of your kernel
<heat> >more reliable
<heat> citation needed
<ring0_starr> more deterministic
<heat> also haha sure thing boss
<heat> clever, futex_fd has been ded for like 15 years btw
<clever> ah
<clever> i just found it in the man page, and it looked neat
<heat> 17 actually
<heat> Because it was inherently racy, FUTEX_FD has been removed from Linux 2.6.26 onward.
heat has quit [Ping timeout: 272 seconds]
<clever> damn
<clever> clever@c2d ~ $ uname -a
<clever> Linux c2d 3.8.13-gentoo #3 SMP Thu Dec 15 10:33:05 AST 2016 x86_64 Intel(R) Core(TM)2 CPU 6300 @ 1.86GHz GenuineIntel GNU/Linux
<clever> klingon@klingon:~$ uname -a
<clever> Linux klingon 3.2.0-75-generic #110-Ubuntu SMP Tue Dec 16 19:11:55 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
<clever> dont think i can find a 2.6 machine still running, lol
<ring0_starr> i have 2.6 on an access point from the early 00s!
<ring0_starr> with 8mb of ram
<ring0_starr> it freezes up when you make too many web requests
<clever> ring0_starr: my old ISP router had a stats page, that was basically just printing the byte-counters from iftop
<clever> but the idiots used an int32_t
<clever> after 2gig of traffic goes thru the router, it overflows, and reports 0 bytes
<clever> after another 2gig of traffic goes thru it, it fully wraps around, and starts working again
<kof673> > Jun 30, 2004 · The Live CD boot of Knoppix v3.4, with the experimental kernel 2.6.6, is beyond a shadow of a doubt, the hottest thing that I have ever run that should work ;D > [knoppix 5.3.1] includes Linux Kernel 2.6.24.4
<clever> also, if you scrape that http page every second, the router will lock up solid after 29.5 days
<clever> like clockwork, very repeatable
<clever> every minute*
<kof673> knoppix 3.4, hot and racey, oh my
<GreaseMonkey> knoppix 3.4 is the knoppix i've had for years
<GreaseMonkey> i also have morphix 0.4, which is a precursor to ubuntu and started the whole "hybrid livecd/installer" thing
the_oz has quit [Ping timeout: 244 seconds]
goliath has joined #osdev
craigo has joined #osdev
Arthuria has quit [Remote host closed the connection]
McDonaldsWiFi has joined #osdev
PublicWiFi has quit [Ping timeout: 276 seconds]
Halofreak1990 has joined #osdev
dinkelhacker_ has joined #osdev
cloudowind has quit [Quit: leaving]
cloudowind has joined #osdev
FreeFull has quit [Ping timeout: 244 seconds]
FreeFull has joined #osdev
<Ermine> geist: hi, are you available?
netbsduser` has joined #osdev
cppLover0 has joined #osdev
Halofreak1990 has quit [Ping timeout: 244 seconds]
cppLover0 has quit [Ping timeout: 252 seconds]
Left_Turn has joined #osdev
Left_Turn has quit [Read error: Connection reset by peer]
Left_Turn has joined #osdev
cppLover0 has joined #osdev
<cppLover0> hi
Lucretia has joined #osdev
Turn_Left has joined #osdev
Halofreak1990 has joined #osdev
Left_Turn has quit [Ping timeout: 265 seconds]
tomaw| has joined #osdev
Halofreak1990 has quit [Ping timeout: 244 seconds]
tomaw has quit [Killed (mercury.libera.chat (Nickname regained by services))]
tomaw| is now known as tomaw
GeDaMo has joined #osdev
voidah has quit [Ping timeout: 252 seconds]
Halofreak1990 has joined #osdev
cppLover0 has quit [Read error: Connection reset by peer]
Halofreak1990 has quit [Ping timeout: 265 seconds]
voidah has joined #osdev
edr has joined #osdev
frytaped has quit [Ping timeout: 252 seconds]
ebrasca has joined #osdev
<ebrasca> Hi, is there a TCP packet (MSS) size limit in qemu?
bwani54 has joined #osdev
<dinkelhacker_> has anyone looked at zig for os dev?
Marsh has joined #osdev
MiningMarsh has quit [Ping timeout: 252 seconds]
Marsh is now known as MiningMarsh
<zid> seemed like it'd work fine, language wise, just comes down to the tools I guess
<zid> can it spit out a standalone elf? if so, you're gtg
<bslsk05> ​wiki.osdev.org: Zig Bare Bones - OSDev Wiki
heat has joined #osdev
<kof673> zig person used to come in here a long time ago i believe...
<kof673> i made a ddr "drop the bomb" joke once and i think that was the end of that :D for great justice
<heat> ebrasca, i dont think so, obviously the MSS depends on the link MTU and all that
<dinkelhacker_> kof673 lol
<dinkelhacker_> zid tooling should be fine. I was just wondering if someone has already some experience with the language.
<zid> I imagine the zig channel does? :P
<heat> no i think the ceo of zig, zid, would know better
<zid> shit, rumbled
<nikolar> zid tooling
<dinkelhacker_> Yeah but in the zig channel I'll probably getting actual answers to my question... which is not what I am looking for. I'm looking for the cynical responses and rants you only get in #osdev :P
<zid> kek
<zid> zig is shit, then
<dinkelhacker_> Finally! That's all I needed to know.
<zid> It's like C but last lexographically, making it inf- I MEAN SUPERIOR
<zid> LAST LEXOGRAPHICALLY IS THE BEST
<heat> zig is actually crap
<heat> you have to be a special type of hipster to enjoy it
<nikolar> ZIG ZIG ZIG
<heat> C people like C, rust people like rust
<nikolar> said a guy using c++
<zid> I saw some guy using zig once, it didn't look awful
<heat> zig is neither C nor rust
<zid> but that's because it looked like C
<nikolar> actually, i don't remember heat saying he enjoyed c++
<nikolar> i retract my previous statemetn
<zid> but it looked like C made slightly more annoying
<dinkelhacker_> but it has meta programming which is nice
<zid> So does C
<heat> >but it has meta programming which is nice
<heat> found the C++ enjoyer
<zid> Write a C program that printfs a C program, have your makefile keep compiling everything over and over
<dinkelhacker_> yeah.. but no thanks... :D
<zid> That's called being picky
<dinkelhacker_> heat: because c++ is the only language that has meta programming?
<heat> because C++ is the language for metaprogramming enjoyers
<dinkelhacker_> I don't think anyone really enjoys c++
<dinkelhacker_> maybe bjarne
<heat> LIE
<heat> just visit r/cpp
<nikolar> i don't think bjarne enjoys it either
<nikolar> heat, do you enjoy c++
<zid> heat: stockholm syndrome != enjoying
<heat> not really
<nikolar> there we go
<zid> They think it's a wonderful tool that solves all problems, if they could just figure out how to use it correctly
<heat> i think bjarne enjoys it a lot less than some r/cpp people
<nikolar> definitely
<Ermine> oh, shit, here we go again
<dinkelhacker_> :D
<Ermine> please stop using "stockholm syndrome". It's not a thing
<nikolar> tell that to r/cpp
<zid> The problem isn't C++ ofc, it's that their tiny mind is too feeble to contain all of C++'s glory at the same time so they're having to spend years and years learning it and practicing, so that one day they can write GOOD code
<zid> One must imagine the C++ programmer happy.
<dinkelhacker_> Ah the good old "it all makes sense once you get better" argument. That's the one thing Rust took over from c++. That and the made up memory model.
<nikolar> every memory models is made up :P
<zid> yea rust is certainly on the scale
<zid> sorry, spectrum
<zid> Rust users are on the spectrum*
<zid> double typo what am I like
<nikolar> double whammy
<Ermine> a lot of stuff in OS space is made up
<heat> futexes were made up and they're pretty good
<Ermine> futexen
alifib has joined #osdev
Halofreak1990 has joined #osdev
<ebrasca> heat: Thx!
<Ermine> before that spammer arrives, should #osdev have +s mode
<Ermine> ?
<heat> #osdev has +s alrady
<heat> already
<zid> Permission Denied - You're not an IRC operator
<zid> Rude
<Ermine> I don't see it though, I see +nrt
<heat> ah wait, not +s
<zid> heat is lying
<heat> but we do have +r
<heat> or that fucking flag
<heat> that stops you from joining without being registered
<zid> non-temporal, registered, turtles, +nrt
<heat> irc flags fucking suck
<nikolar> no, you suck
<Ermine> no u
<alifib> no, joe biden
<heat> FUCK YOU BUDDY
<nikolar> no u
<zid> ircd won't let me kline joe biden, it's a disgrace
<heat> all praise joe biden yes sir i'll buy the biden coin
<alifib> the biden coin is coming soon
<alifib> zid, give it a few more hours
<Mutabah> I assume +s is "registered only"?
<zid> and then joe biden will make me an ircop!?
<zid> no, that's +r
<zid> +s is secret
<Mutabah> ah, cool
<alifib> zid, yes!
<Ermine> +s hides channel from /list and /whois
<Ermine> thx!
<Mutabah> Ping me in in a few hours, and I'll clear it when I wake up
<Mutabah> wait, we're already +r - so that may avoid this issue anyway
<alifib> unless the spammer is really registered as joe biden
<alifib> in which case, we're fucked
<alifib> technically speaking
<heat> i am fully convinced this is president biden
<Mutabah> Eh, it's just a single post spam from what I've seen, so wouldn't be the worst
<alifib> i can confirm, i'm jill biden
<heat> woah well good morning mrs biden, new jillcoin soon?
<alifib> sure, why not, i need to talk to michelle first
<zid> heat when osdev Ulm meetup
<zid> (Summit on conquering the world, ofc)
* kof673 points at bslsk05 you had to get that first and work your way to the phoenix to "overcome the world"
<kof673> it overcame autumn darkness basically lol
sbalmos has quit [Quit: WeeChat 4.5.1]
<Ermine> s/osdev/onyx/z
<bslsk05> ​<zid*> heat when onyx Ulm meetup
<Ermine> til bluez uses ell. I thought it was only iwd
goliath has quit [Quit: SIGSEGV]
<GeDaMo> zid: https://xordle.org/
<bslsk05> ​xordle.org: Xordle
<pog> i enjoy c++
<pog> (hans_moleman.jpg)
<zid> GeDaMo: this is hard lol
<zid> all the letters are really common ones
<GeDaMo> I surprised myself by managing it :P
<zid> I got it, final two guesses were my inputs
<GeDaMo> There are some others mentioned in the info panel
<zid> which one are we doing then
<bslsk05> ​shuntle.com: Shuntle
voidah has quit [Ping timeout: 252 seconds]
<zid> the hell is this word though
* Ermine gives pog a piece of c#
* pog is repulsed, eats it anyway
<pog> tastes like can't implement IDisposable for native AOT on bare metal
<pog> although i should check bflat again see if they made that possible
<zid> aha I got it
<zid> Final guess though
<zid> pog: native attacks on titans?
<pog> yes
<zid> anternet of things
<zid> an internet for ants
dinkelhacker_ has quit [Quit: Client closed]
d5k has quit [Ping timeout: 265 seconds]
goliath has joined #osdev
alifib has quit [Quit: .]
<heat> Ermine, what's ell?
<Ermine> embedded linux library
Arthuria has joined #osdev
<Ermine> intel makes it
bauen1 has quit [Ping timeout: 252 seconds]
bauen1 has joined #osdev
Halofreak1990 has quit [Ping timeout: 260 seconds]
<nortti> https://github.com/sergev/LiteBSD now this is a funky one
<bslsk05> ​sergev/LiteBSD - Variant of 4.4BSD Unix for microcontrollers (36 forks/314 stargazers/NOASSERTION)
<kof673> there was a prior lite, but not sure what the meaning was: > 4.4BSD Lite was the second-to-last release from the CSRG. After they had to withdraw the Net/2 source, the files found to be derived from [...] # IIRC at&t or whoever was found to have stolen some of their code :D
xenos1984 has quit [Ping timeout: 272 seconds]
xenos1984 has joined #osdev
<zid> half a meg of ram? bougie as fuck
sbalmos has joined #osdev
Lucretia has quit [Remote host closed the connection]
Lucretia has joined #osdev
guideX has quit [Quit: Leaving]
guideX has joined #osdev
craigo has quit [Quit: Leaving]
troseman has joined #osdev
troseman has quit [Client Quit]
netbsduser` has quit [Remote host closed the connection]
netbsduser` has joined #osdev
cloudowind has quit [Ping timeout: 245 seconds]
cloudowind has joined #osdev
hwpplayer1 has joined #osdev
Dead_Bush_Sanpa1 has joined #osdev
Dead_Bush_Sanpai has quit [Ping timeout: 265 seconds]
Dead_Bush_Sanpa1 is now known as Dead_Bush_Sanpai