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
Mondenkind is now known as moon-child
nyah has quit [Quit: leaving]
<heat> geist, isn't it big that fuchsia is vulnerable to meltdown still?
<heat> hm, I guess you can argue it's not that serious since you don't have too much vulnerable data in zircon itself right?
<heat> except, hmm, all of physical memory... yeah i dunno
<zid> oh no, they might be able to install printer drivers
<gog> meow
Burgundy has quit [Ping timeout: 265 seconds]
* jjuran throws gog a fishy
* gog chomp fishy
<remexre> hm, looks like ld is sorting sections I'm specifying in a linker script from largest-to-smallest
<remexre> but my starting address isn't page-aligned, because ELF headers are at the front
<remexre> any way to get it to do some smarter fill?
epony has quit [Ping timeout: 268 seconds]
epony has joined #osdev
<zid> rustcc very good, rust very bad
dormito has quit [Ping timeout: 252 seconds]
<Mutabah> heh.
<Mutabah> It'd call that a diganostics bug
<Mutabah> It shouldn't suggest the first option when you're just discarding theresult
<zid> "I know the syntax of what you wanted to do, I knew the semantics of what you want to do, but, no"
<zid> thanks
<zid> It's a bit like banning the number 47, and you have to write it as 46+1 everywhere or something
dormito has joined #osdev
<Mutabah> zid: The compiler's diagnostics engine and the actual language are two different things
<zid> correct
<zid> >rustc very good, rust very bad
<Mutabah> The diagnostics engine can make poentially-wrong guesses about what the programmer intended
<Mutabah> The language cannot - it must be completely predictable
<zid> yes, I am complaining about the language
<Mutabah> (Also post-inc `++` is a bit of a footgun)
<gog> i love footguns
<zid> It could trivially define i++ to be a macro for i += 1
<zid> the compiler even knows what it is
<Mutabah> It'd be a different meaning
<zid> I just said it defined it not to be
<Mutabah> `i++` in C is "save i, increment, return saved value"
<Mutabah> `i += 1` in rust is just the increment step
<zid> They are semantically identical if you say they are semantically identical
<zid> if you don't want += appearing in expressions, don't allow it, don't remove ++ while you're at it
<remexre> i++j
<zid> especially if you don't have like, automatic for loop iterators, idk if rust does or doesn't
<remexre> zid: like for x in 0..10 {} ?
<zid> something like that yea
<jjuran> zid: "you have to write it as 46+1 everywhere or something" <— Kind of like `int min_int = -2147483647 - 1;`
<zid> not in the least?
<jjuran> Because 2147483648 is UB?
<zid> It's also out of range, and nobody is forcing you to write it *instead* of something that would otherwise be legal
<zid> except for a silly ban
<jjuran> -2147483648 isn't out of range
<zid> so why are you writing it as something else? :P
<jjuran> Because C defines it as an operation on 2147483648, which is out of range
<zid> you just said it isn't out of range
<jjuran> The value isn't, no
<jjuran> But the bare numeral is
<zid> so you agree then
<jjuran> No
<zid> you can't have it both ways
<zid> either it's out of range for an integer literal or it isn't
<jjuran> No, two different things.
<jjuran> The integer literal 2147483648 is out of range. The 32-bit signed value -2147483648 is in range.
<remexre> -2147483648 isn't a literal in C, it's an operator applied to a literal
<heat> rust
<zid> (which is why the literal is out of range)
<zid> I personally think the literal system in C is shitty
<jjuran> Now on that we agree.
<zid> but it isn't "we understood what you meant, but explictly banned it to be awkward"
<zid> It's just an artefact of twoscomp being asymmetrical
<jjuran> `int x = -2147483648;` is unambiguous. There's zero benefit to disallowing it.
<zid> It isn't explicitly disallowed.
<zid> Rust *explicitly* diallows ++, and even suggests the alternative
<heat> C89 is the only language we should be using
<zid> this is like if the standards comittee ran the gcc project, clang/borland/icc/etc didn't exist, and the spec said "if you see -21474483648, don't accept it, instead print a diagnostic saying it's wrong and you should write -2147483647-1"
<heat> C99 at best
<zid> which is not the case, hence them not being the same
<zid> C89 > C11 > C99 > C23
<heat> noooooo
<heat> C89 > C99 > every other language ever
<zid> C11 has anonymous unions
<heat> you know what also has anonymous unions? GNU 89
<heat> I lied, GNU 89 > GNU 99 > C89 > C99
<zid> yea gnu89 > c89
<zid> Czid, it has C89, with anonymous unions, compound literals, designated initializers, and you can dereference pointers to structs containing incomplete members up until that member
<jjuran> heat: I won't let you deprive me of C++98
<heat> C++98? oh jeez really?
<zid> enum size tagging, an array length operator, a maximum enum operator
<heat> that's like almost the worst choice
<zid> Literals are all u128s
<heat> C++03 is the worst one
<zid> s128s even
<zid> Initializing floats via hex sets the bitpattern, ieee754 is mandatory, twos comp is mandatory
<Mutabah> zid: Comparing an operator (pair, taking pre/post) that is a source of confusion in C with integer literals seems like a false equivalence
<zid> Mutabah: Agreed, which is why I didn't
<Mutabah> Not including the `++` operator seems sensible
<zid> someone else did and I disagreed
<Mutabah> Ah, sorry - misread
<zid> why do you hate ++
<Mutabah> `++` is 99% of the time used to do one thing - add one (and nothing else)
<zid> correct, like - is used for one thing, negating a value
<Mutabah> But - it has a side-effect, it returns the old value
<zid> we don't write 0-x
<heat> ++ is 20x more readable than var += 1
<Mutabah> which leads to really interesting ordering quirks
<zid> we like being able to x
<zid> -x*
<zid> It's actually MUCH harder on the parser to allow this behavior, but we allow it because it looks better
<remexre> how would trait-based operator overloads and memory management work with ++?
<zid> You just make it a macro for += 1
<zid> literally s/++/+= 1/g
<zid> so it does whatever += 1 does
<Mutabah> Can't just be a macro (or sugar, which is like macros)
<remexre> oh, like go-style ++ instead of c-style?
<Mutabah> because `i += 1` results in `()`
<zid> macro as in "replacement of thing with another thing automatically"
<zid> not as in C macro
<Mutabah> *nod*
<remexre> er, I mean the Go semantics of x++
<remexre> which are different from the C semantics
<heat> just get a ++, idc if it doesn't return a value
<Mutabah> The term used by the rust team is "syntax sugar"
<Mutabah> `i ++;` vs `i += 1;`
<zid> so they not only support it in the compiler now, they *also* support it in the language, and *still* disallow it, lol
<zid> that's even worse
<jjuran> If you don't need the old value, there's also `++x`
<Mutabah> not sure adding an operator that would confuse C programmers (due to different semantics) is worth saving two characters
<zid> 99% of the time in C you don't want the old value either, and we still use i++, cus it looks nicer
<heat> it 100% is
<zid> Mutabah: I think you should remove unary - then
<heat> two characters is a lot of characters when incrementing is usually a big part of any language
<heat> (and any program)
<remexre> idiomatic rust uses iterators instead for loops
<zid> yea thankfully
<zid> I didn't know it had them, that confirms
<remexre> I was actually kind of surprised to see that error message, because I don't know that I've ever wished for x++ to exist
<remexre> er yeah that's what I sent above
<zid> You asked me if "like tso?"
<remexre> I suppose it could've used exposition :P
<zid> and I confirmed, but you didn't say it actually had them
<Mutabah> zid: A unary negate improves quite a bit for non-primitive types
<zid> I need to make one of those "Don't use x" memes
<zid> They've taken us for absolute FOOLS! What is the negative of a string!?
<Mutabah> Although, the same argument could be said for an increment operator
<Mutabah> You're welcome to make an RFC to add the operator
<heat> meltdown question: is reading kernel .text for the entry trampoline a problem?
<heat> can you *theoretically* do it?
<Mutabah> Kernel .text usually isn't secret?
<heat> it is if you KASLR the kernel image
<Mutabah> And you've edited the kernel image to achive that?
<Mutabah> I guess then it'd matter
<heat> yeah, relocations
<heat> when I say "reading .text" I mean reading actual in-memory .text
<heat> not /boot/vmonyx
<Mutabah> Oh, sure, knew that
<Mutabah> Just wasn't considering the evaluated relocations
<heat> I think KPTI requires the entry code to be in a fixed position right
<heat> I think i'll defer writing this to another date until I fully understand how this thing works
heat is now known as _Heat
<mrvn> Didn't they fix some of the undefinedness with multiple ++ in an expression recently?
<mrvn> a++ = a++;
<mrvn> _Heat: your entry code is in the interrupt vector or syscall MSR and has to match the page(s) you map from the kernel.
<mrvn> s/entry code/entry code address/
<mrvn> You could potentially change those on every task switch.
<_Heat> my entry code needs to be in a fixed position or I THINK I can leak ASLR
<mrvn> how would an "int 80" leak ASLR because you changed the address "int 80" calls?
<mrvn> or SYSCALL or svc or whatever the arch uses
<_Heat> I don't know
<_Heat> as I said, I don't fully understand how meltdown works
<mrvn> They make the kernel do something (speculative) that will prime the cache depending on the value/result and then they time the cache access to see what the value was.
<mrvn> really broadly speaking.
<mrvn> sometimes they make user space do something speculative it shouldn't be allowed to.
<mrvn> And since it's speculative the CPU later sees the path isn't take so it's not an error. But by that time the cache is poisoned.
<_Heat> I know, I want the less-broadly speaking
<mrvn> Switching page tables clears tlb/caches and gets rid of the poison.
<mrvn> That limits the attack surface to the few pages and functions you map into user processes. You just have to consider if any of them have secret infos.
<mrvn> e.g. you might be able to find out where in physical/virtual memory the actual kernel page tables are and then hammer the DRAM to flip a bit.
<mrvn> I find it funny that the biggest obstacle to making microkernels fast (page table switching) is not standard for syscalls because the hardware is borked.
<mrvn> s/not/now/
gog has quit [Ping timeout: 260 seconds]
_Heat is now known as heat
Vercas6 has quit [Quit: Ping timeout (120 seconds)]
Vercas6 has joined #osdev
bradd has joined #osdev
[itchyjunk] has quit [Remote host closed the connection]
wxwisiasdf has quit [Quit: Lost terminal]
elastic_dog is now known as Guest2431
elastic_dog has joined #osdev
Guest2431 has quit [Ping timeout: 260 seconds]
heat has quit [Ping timeout: 260 seconds]
gxt has quit [Remote host closed the connection]
gildasio has quit [Remote host closed the connection]
PapaFrog has quit [Read error: Connection reset by peer]
gildasio has joined #osdev
PapaFrog has joined #osdev
gxt has joined #osdev
xvmt has quit [Remote host closed the connection]
xvmt has joined #osdev
gildasio has quit [Ping timeout: 255 seconds]
gxt has quit [Ping timeout: 255 seconds]
gxt has joined #osdev
gildasio has joined #osdev
rorx has quit [Ping timeout: 256 seconds]
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
rorx has joined #osdev
Burgundy has joined #osdev
GeDaMo has joined #osdev
Vercas6 has quit [Quit: Ping timeout (120 seconds)]
Vercas6 has joined #osdev
GeDaMo has quit [Ping timeout: 265 seconds]
GeDaMo has joined #osdev
elastic_dog has quit [Killed (lead.libera.chat (Nickname regained by services))]
elastic_dog has joined #osdev
simpl_e has quit [Ping timeout: 255 seconds]
nyah has joined #osdev
mahk has quit [Ping timeout: 248 seconds]
bauen1 has quit [Ping timeout: 268 seconds]
Burgundy has quit [Ping timeout: 264 seconds]
Vercas6 has quit [Quit: Ping timeout (120 seconds)]
<mrvn> Is it wrong to watch Wednesday on a Friday?
bradd has quit [Ping timeout: 264 seconds]
Vercas6 has joined #osdev
<kaichiuchi> no
spikeheron has quit [Quit: WeeChat 3.7.1]
spikeheron has joined #osdev
<mrvn> kaichiuchi: It's amateurs like you who give kidnapping a bad name.
dude12312414 has joined #osdev
Burgundy has joined #osdev
heat has joined #osdev
[itchyjunk] has joined #osdev
bauen1 has joined #osdev
xenos1984 has quit [Ping timeout: 256 seconds]
xenos1984 has joined #osdev
mahk has joined #osdev
dude12312414 has quit [Ping timeout: 255 seconds]
dude12312414 has joined #osdev
FreeFull has joined #osdev
dude12312414 has quit [Remote host closed the connection]
gog has joined #osdev
y0m0n has joined #osdev
Burgundy has quit [Ping timeout: 265 seconds]
antranigv has quit [Ping timeout: 248 seconds]
<jjuran> mrvn: Heinlein wrote a novel called Friday. Have you considered reading that?
<gog> hi
<Ermine> hi gog!
<gog> how's y'all's friday
<zid> it's friday?
<dminuoso> Oh I read Henglein, and wondered about him writing novels..
<jjuran> I'm sorry about your hangnail.
<heat> linux torvalds
<Ermine> I need to make a presentation for tomorrow talk.
<GeDaMo> On any particular subject?
<Ermine> Yes. It's my assignment to read an article and prepare a talk about it.
<GeDaMo> Have you selected the article? :P
<Ermine> Yes. It's on topological data analysis in macroeconomics.
<zid> I'd have picked an 800 page fanfic about evangelion
<Ermine> I'd too, but there wasn't such an option.
<kaichiuchi> remember when I said that docker was pretty cool?
<kaichiuchi> it's rapidly turning out to be annoying
<Ermine> Dock it.
antranigv has joined #osdev
chartreuse has joined #osdev
<kaichiuchi> I've spent more hours fucking with Docker than I have writing code
<kaichiuchi> for something that is essentially just running commands with virtualization
<kaichiuchi> to the worst, it doesn't seem like I can actually make this work to produce macos binaries
<kaichiuchi> without using osxcross or whatever the fuck
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
Vercas6 has quit [Quit: Ping timeout (120 seconds)]
Vercas6 has joined #osdev
<kaichiuchi> okay, after further pondering and experimentation, and a lot of time wasted, I've come to this conclusion: it is very heavily biased towards Linux for almost everything
<kaichiuchi> and... that's a problem when you're dealing with cross-platform software
<kaichiuchi> I can't even build native macOS apps through Docker
<jbowen> i mean, yeah, docker is very much focused on Linux
<kaichiuchi> my brother in christ
<jbowen> i'm not aware of a cross-platform "container" concept; Solaris has Zones; FreeBSD has Jails; Linux has namespaces + cgroups == containers
<gog> chroot was the original container
<kaichiuchi> what I was trying to do was to do something like: "hey if you're on windows, mac, or linux, that's fine, just use this Dockerfile and it'll just work"
<jbowen> That would be neat
<kaichiuchi> but that's not what Docker does
<jbowen> No, it's not
<jbowen> Docker for Windows and Docker for macOS just run in a Linux VM
<kaichiuchi> at least with Docker I got kinda close to what I wanted
<jbowen> afaik, at least
<mrvn> we use signularity at work
<jbowen> Isn't it called "Apptainer" now?
<kaichiuchi> I configured it to download the exact compiler, CMake version, ninja version, etc etc that I wanted
<gog> our services run in docker containers in staging and production
<gog> but in development we're stuck with fucken vs and windows
<heat_> the original container is a computer
<heat_> VISUAL STUDIO BEST
<kaichiuchi> honestly
<gog> i really need to sort out dev on linux because i really hate rebooting every morning
<\Test_User> blind studio better
<heat_> PRAISE BE DWORD
<kaichiuchi> I hate everything
<heat_> same
<jbowen> VMS on VAX was the greatest platform
<gog> oh yeah i wanted geist to help me by shouting at the people who work at google analytics because their tech support was nonexistent and they told me to do things i already did
<kaichiuchi> I think what I'm going to do is just write shell scripts to configure the environment
<gog> i figured it out myself anyway
<kaichiuchi> and by that I mean
<heat_> isn't that all tech support
<kaichiuchi> downloading everything that I fucking care about
<kaichiuchi> .
<jimbzy> I used to hate to live, but now I live to hate.
<jbowen> what are you trying to do, kaichiuchi?
* gog hands jimbzy a sosig
<jimbzy> Sosig!
xenos1984 has quit [Ping timeout: 256 seconds]
<jimbzy> I need to dust that project off one of these days.
<kaichiuchi> jbowen: essentially, I want to say "okay, this is the compiler that we use, the dependencies", etc, their exact versions
<kaichiuchi> the Dockerfile I had used ubuntu 22.04 (LTS), and specifically used LLVM's shell scripts to download the LLVM version I cared about, and I specifically downloaded a CMake version I cared about
<kaichiuchi> and I say "I care about" because I want people to be developing in an environment I know, trust, and can control
<jbowen> You can certainly do that for different Linux distros with docker (or podman or whatever container stuff you want to use)
<kaichiuchi> for *Linux*, yes
<kaichiuchi> but what if the person is developing on Windows for the Windows port?
<jbowen> If you had a Windows image to use, you could potentially boot a Windows VM with KVM or something
<jbowen> I don't really know how that would work with proprietary OSes like Windows and macOS, though
<jbowen> Maybe it's possible to cross-compile stuff on Linux for Windows or macOS? I really don't know much about developing for those OSes
<kaichiuchi> it is
<kaichiuchi> but for clang it's spotty
<kaichiuchi> I think I'm just going to make my life a little simpler
<mrvn> just provide a VM image of your OS that is self hosting. :)
<kaichiuchi> i have no idea why dependency management is so fucking bad
<jbowen> it gets to be a very complex graph problem (or set of graph problems)
<jimbzy> How you been, gog?
<gog> busy
<gog> how you?
<jimbzy> Same
<heat_> c r i n g e
heat_ is now known as heat
<gog> trying to stay on top of things tho. doing an OK job i guess
<kaichiuchi> an old spongebob squarepants game for the playstation did a better job at dependency management 20 years ago
<jimbzy> If the bosses are quiet then all must be well.
<gog> my boss tells me i'm doing a great job
<gog> this week was rotten though. i barely got anything done lol
<jimbzy> Use WADs, kaichiuchi.
<gog> i do not want to look at or think about google analytics ever again if my fix actually works like it did today
<jimbzy> It was crazy busy at the store, but I enjoyed it.
<gog> nice
<gog> i have bad memories working in retail grocery lol
<jimbzy> It's pretty fun on the overnight shift.
<geist> gog: awww sorry
* geist provides fishes for gog
xenos1984 has joined #osdev
<kaichiuchi> i worked retail for 10 years
<kaichiuchi> now I work on cash machines
* gog chomp fishy
<kaichiuchi> funny, isn't it
<gog> i work for a startup where we have beer and a dog in the office
<gog> hell the CEO handed me a beer on his way out tonight :D
<mrvn> does the dog get drunk often?
<gog> yeah she's a lush
<zid> so is gog, accepts beers from dogs
<kaichiuchi> zid: you were right
<kaichiuchi> fuck Docker
<jimbzy> My store manager doesn't care what we do as long as the inventory flows, and it has gotten much better since I started.
<gog> nice
<gog> my boss does care what i do but he doesn't micromanage at least
<kaichiuchi> same
<kaichiuchi> my boss is almost... drugged levels of calm
<kaichiuchi> it's nice
<jimbzy> They've turned me into the micromanager I guess.
<kaichiuchi> certainly better than my prior job
<heat> does anyone know of (e)BPF interpreter tests?
<gog> my boss is generally very calm but he gets annoyed and he's kinda funny when he's angry lol
bauen1 has quit [Ping timeout: 256 seconds]
<gog> cursing in spanish and slamming his keyboard
<heat> hoder, no me gusta la gog
gxt has quit [Quit: WeeChat 3.6]
<gog> yeh
gxt has joined #osdev
gxt has quit [Ping timeout: 255 seconds]
<bslsk05> ​github.com: ubpf/tests at main · iovisor/ubpf · GitHub
<heat> i found testies
FreeFull has quit []
gxt has joined #osdev
<gog> ligma
<heat> what's ligma
<gog> a linguistic trick, closely related to sugma
<heat> and what is this sugma you talk about
<gog> ¯\_(ツ)_/¯
<heat> no one will ever know
<zid> heat: Are you Sungondese?
<heat> absolutely
<heat> i come from a long lineage of sugondese
<zid> So you're pretty crazy about it too eh
<zid> One might even say you're Sugondese nuts.
<zid> BOOM GOTEM
* geist shakes head
* kaichiuchi silently weeps
<gog> :<
<heat> not cool zid
<zid> I didn't start it, I am just way better at it.
<heat> are you roasting me because my gender is football
<heat> that's pretty exclusionary
* geist watches the ligma doctor video again. its so dumb
<heat> are you literally xenophobic?
<heat> feeling cute, might write an interpreter later
<gog> haha the ligma doctor
bauen1 has joined #osdev
<gog> i'm in pain
<heat> why
<gog> idk
<geist> because super dumb now?
<geist> we are definitely super dumb
<gog> only on my days off
<heat> callate gog y hace tu trabajo, sí?
<gog> no, es la fin de semana
<gog> llamame el lunes
<heat> el*
<gog> no me importa genero gramatico
<mrvn> Dropping an egg in a toy missile from (near) space and have it land on a matress, i.e. a precision guided missile. Surely the FAA will not have a problem with that or anyone else. :) https://www.youtube.com/watch?v=BYVZh5kqaFg
<bslsk05> ​'Egg Drop From Space' by Mark Rober (00:26:56)
<zid> I didn't get the actual rober vid recommended but I did gt https://www.youtube.com/watch?v=5tQ6OTJdhns instead
<bslsk05> ​'Aero Simulation for Mark Rober's 100,000ft Egg Drop' by BPS.space (00:16:30)
<mrvn> zid: years of work and testing and all they needed is a beachball.
<mrvn> KISS
fkrauthan has quit [Quit: ZNC - https://znc.in]
fkrauthan has joined #osdev
bgs has quit [Remote host closed the connection]
Ellenor is now known as AmyMalik