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
thinkpol has quit [Remote host closed the connection]
thinkpol has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
gog has quit [Quit: byee]
goliath has quit [Quit: SIGSEGV]
terminalpusher has quit [Remote host closed the connection]
wlemuel has quit [Quit: Ping timeout (120 seconds)]
wlemuel has joined #osdev
[itchyjunk] has quit [Ping timeout: 252 seconds]
[itchyjunk] has joined #osdev
eroux has quit [Ping timeout: 250 seconds]
Arthuria has joined #osdev
eroux has joined #osdev
heat has quit [Ping timeout: 265 seconds]
pieguy128 has quit [Quit: ZNC 1.8.2 - https://znc.in]
pieguy128 has joined #osdev
smeso has quit [Quit: smeso]
smeso has joined #osdev
Arthuria has quit [Ping timeout: 250 seconds]
Arthuria has joined #osdev
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
[itchyjunk] has quit [Remote host closed the connection]
Arthuria has quit [Ping timeout: 260 seconds]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
Arthuria has joined #osdev
keegans has joined #osdev
keegans has left #osdev [#osdev]
Arthuria has quit [Ping timeout: 250 seconds]
Arthuria has joined #osdev
Arthuria has quit [Ping timeout: 255 seconds]
Arthuria has joined #osdev
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
Vercas694 has quit [Quit: Ping timeout (120 seconds)]
Vercas694 has joined #osdev
xenos1984 has joined #osdev
Arthuria has quit [Remote host closed the connection]
bliminse has quit [Quit: leaving]
bliminse has joined #osdev
slidercrank has joined #osdev
<geist> nerd snipe of the day: is it legal for memcpy to elide the copy if the source and destination pointers are the same?
<klange> memcpy? overlapping areas is UB, so my answer is "i like trains"
<geist> i think that's correct
<zid`> sounds good to me
<geist> it does get into C++ questions: if you copy one object into another one via a pointer, if they happen to be the same pointer is that UB?
<kazinsal> assuming cdecl, yes
<geist> ie, void copy(foo *a, foo *b) { *a = *b; }
<kazinsal> comedy option: some insane 8086 calling convention that specifies only near pointers but never specifies that ds == es
<kazinsal> in which memcpy(0x1000, 0x1000, 16) may not actually do what you expect
<geist> the above routine seems to be in many cases compiled to a call through to memcpy, so the compiler must also interpret copying two objects via pointers as being UB if they happen to be the same pointer
<geist> i always thought i remember something like if you write your own operator= you must check for the same object and skip it, but then maybe hta'ts just a good idea?
<geist> yah you're supposed to guard for self assignment in the operator= operator
<geist> hmm, maybe that's because operator= is an assignment operator against an existing thing, and can't be a standalone operator
valshaped has quit [Ping timeout: 250 seconds]
<geist> ah i see, it's not *required* that you do the self test in the assignment operator, it's just expected if there is bad behavior
<bslsk05> ​github.com: CppCoreGuidelines/CppCoreGuidelines.md at master · isocpp/CppCoreGuidelines · GitHub
<geist> so that's still odd, the compiler for simple structures will just call through to memcpy in the default assignment operator *without* a self test
valshaped has joined #osdev
<geist> hmm fiddling with godbolt i think it has something to do with trivial POD types vs something more complicated
<mrvn> geist: it's expected that memcpy to the same pointer has no bad effect.
<sham1> "I like trains" might just be my favourite answer for a question about UB
<mrvn> you don't like pregnant kittens?
<geist> mrvn: expected, but it's specced as UB
<geist> i totally agree that it's expected, and thus a memcpy implementation can simply skip the copy if it wanted to
<geist> so i think it's some sort of odd case where the spec and reality dont exactly line up, but it seems that what you say is reality
bgs has quit [Remote host closed the connection]
<sham1> Well in reality it is the most reasonable thing to have it do
<sham1> But if one wants guarantees they use memmove
<klange> In the naive case that the overlapping-areas thing is intended to address, equivalent source and destination should not suffer any ill outcome anyway
<geist> right. what was faking me out is the fact that the compiler actually sometimes emits calls to memcpy in cases where it expects the compile to either go through or not copy
<sham1> Well the compiler knows it to not be UB and thus emits the call
<geist> well, except that memcpy is *specced* to be UB if it overlaps
<geist> seems like it should be calling through to memmove if nothing else
x8dcc has quit [Remote host closed the connection]
<sham1> The compiler ought to be conservative and only emit memcpy when it can prove that they don't overlap
<geist> but yeah, from quickly searchig around for different memcpy implementations (musl, glibc, etc) none of them seem to test for dst==src
<sham1> Whether that happens is a different matter
<geist> sham1: exactly, that's what i was surprised to see
<geist> various amounts of size changing the compiler(s) will switch to manual copying instead of a memcpy call through, but in the manual case they also dont check for overlap
<geist> anyway, horse beaten dead, just a thought because i'm writing a new memcpy implementation for work and i'm sure the libc gods will strike me down
<geist> so i need to make sure i got all my ducks in a row
<mjg> these fucking string ops feel like leetcode exercises for me now
<mjg> fucking bullshit nobody should have to do
<mjg> testing if dst == src is crap, the condition almost never is true
<mjg> i did see a memcpy doing it tho
<mjg> in bionic
Halofreak1990 has quit [Ping timeout: 246 seconds]
<geist> mjg: need one for riscv in asm
<mjg> are you even optimizng it
<mjg> this one does look like a candidate to generate with automemcpy and call it a day
<mjg> that said you do you, just venting ova here
<geist> yes. i am
<geist> what is automemcpy?
<bslsk05> ​research.google: automemcpy: A framework for automatic generation of fundamental memory operations – Google Research
<geist> ah i see. a) it's arm/x86 only b) its not asm
<mjg> it generates the asm you supposedly want
<mjg> and that's what you can commit
<mjg> it may be it can't do anything for riscv indeed though
<geist> correct
<mjg> all that aside, i have to warn you that the glibc test suite may look tempting to validate the code
<mjg> but is weirdly *not* comprehensive
<mjg> i got bugs which it did not find
<mjg> relayed from Justin Case
<geist> i'm not using the glibc test suite
<mjg> what are you using
<mjg> there is smeone who wants to ipmlement simd et al for freebsd
<mjg> a ready to use suite would be nice
<mjg> erm, simd for memcpy et al
<moon-child> simd et al? What's the et al?
<mjg> 08:47 < mjg> erm, simd for memcpy et al
<moon-child> oh I can't read
<moon-child> :P
<geist> oh i just have something i wrote myself
<geist> wont be sufficient for larger tests, but for the smallish test cases where i need it it's sufficient
frkazoid333 has quit [Read error: Connection reset by peer]
<zid`> wait, is justin case someone's real name
<klange> I'm sure there are a non-zero set of people with that as their actual name.
<zid`> people who don't like their kids?
danilogondolfo has joined #osdev
bauen1 has quit [Ping timeout: 250 seconds]
<immibis> people whose parents don't like them
<kazinsal> I can think of at least one person named Justin whose parents would be ashamed of them, yes
<immibis> yeah, Justin Case. You can't like your kid if you give them a gag name
<kazinsal> nah man I got one guy who I would punch in the taint if I saw him up in this bitch
<kazinsal> thankfully for his ass he's not in the community and he hasn't seen me in 5+ years
GeDaMo has joined #osdev
Burgundy has joined #osdev
gog has joined #osdev
bauen1 has joined #osdev
Jari-- has joined #osdev
alpha2023 has joined #osdev
nyah has joined #osdev
Ali_A has joined #osdev
goliath has joined #osdev
bnchs has joined #osdev
Ali_A has quit [Quit: Client closed]
Jari-- has quit [Ping timeout: 256 seconds]
kfv has joined #osdev
awita has joined #osdev
terminalpusher has joined #osdev
kfv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<gog> hi
<nikolar> Hello gog
Halofreak1990 has joined #osdev
alturmann1729 has quit [Remote host closed the connection]
xvmt has quit [Remote host closed the connection]
Halofreak1990 has quit [Ping timeout: 252 seconds]
alturmann1729 has joined #osdev
xvmt has joined #osdev
kfv has joined #osdev
bauen1 has quit [Ping timeout: 240 seconds]
sleider has joined #osdev
terminalpusher has quit [Ping timeout: 260 seconds]
terminalpusher has joined #osdev
terminalpusher has quit [Ping timeout: 260 seconds]
sleider has quit [Read error: Connection reset by peer]
mrvn has quit [Ping timeout: 248 seconds]
kfv has quit [Remote host closed the connection]
kfv has joined #osdev
kfv has quit [Remote host closed the connection]
bnchs has quit [Read error: Connection reset by peer]
slidercrank has quit [Quit: Why not ask me about Sevastopol's safety protocols?]
Left_Turn has joined #osdev
awita has quit [Ping timeout: 265 seconds]
bauen1 has joined #osdev
heat has joined #osdev
frkazoid333 has joined #osdev
brynet has quit [Ping timeout: 265 seconds]
bliminse has quit [Quit: leaving]
brynet has joined #osdev
slidercrank has joined #osdev
bauen1 has quit [Ping timeout: 260 seconds]
bauen1 has joined #osdev
gildasio1 has quit [Ping timeout: 255 seconds]
uddipiggu has quit [Quit: Leaving]
ThinkT510 has quit [Ping timeout: 240 seconds]
ThinkT510 has joined #osdev
gildasio1 has joined #osdev
xenos1984 has quit [Ping timeout: 260 seconds]
pharonix71 has quit [Remote host closed the connection]
pharonix71 has joined #osdev
xenos1984 has joined #osdev
awita has joined #osdev
rnicholl1 has joined #osdev
blockhead has joined #osdev
qubasa has quit [Remote host closed the connection]
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
xenos1984 has quit [Ping timeout: 260 seconds]
Turn_Left has joined #osdev
awita has quit [Remote host closed the connection]
Left_Turn has quit [Ping timeout: 264 seconds]
rnicholl1 has joined #osdev
xenos1984 has joined #osdev
qubasa has joined #osdev
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
dude12312414 has joined #osdev
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #osdev
rnicholl1 has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
rnicholl1 has joined #osdev
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
heat_ has joined #osdev
heat has quit [Ping timeout: 265 seconds]
rnicholl1 has joined #osdev
xvmt has quit [Remote host closed the connection]
rnicholl1 has quit [Client Quit]
xvmt has joined #osdev
wlemuel has quit [Quit: Ping timeout (120 seconds)]
wlemuel has joined #osdev
rnicholl1 has joined #osdev
rnicholl1 has quit [Client Quit]
Halofreak1990 has joined #osdev
frkazoid333 has quit [Ping timeout: 260 seconds]
TkTech has quit [Ping timeout: 240 seconds]
heat_ has quit [Remote host closed the connection]
heat_ has joined #osdev
<gog> meow
<lav> nya
<Ermine> hi gog
<Ermine> may I pet you
<gog> yes
<gog> hi lav
<gog> may i pet you
<lav> hii
<lav> yes
* gog patpatpatpatpat
<heat_> gogzilla
* Ermine pets gog
* gog prr
* lav purr
<lav> i should make an euler diagram of this
Left_Turn has joined #osdev
<lav> prr
Turn_Left has quit [Ping timeout: 248 seconds]
<heat_> lav, of what
<gog> :3
<zid`> which one of you is a mathmegician
<zid`> I wanna do project euler but I am dumb
<lav> like ermine -pat-> gog -pat-> lav
<lav> though euler diagram probably isn't the best representation actually
<gog> lav is at the bottom of this particular chain
<gog> a fitting place
<lav> alsfjgfhskdna
<lav> f
<lav> s afsvjldfs jg
<lav> as d
<lav> sldjvöxjf
<lav> 👉👈 🥺
<lav> girls
<lav> imagine if lisp and haskell had a baby
<zid`> yes please
<zid`> oh no thanks
<lav> but like
<zid`> yes to the girls, no to the haskell and/or lisp
<lav> lisp syntax, haskell purity and types
<GeDaMo> I feel like someone has probably done that
<lav> actually someone on fedi sent me something yesterday
<pitust> i dont think its a very good idea i mean haskell is literally evil and probably hitler
rnicholl1 has joined #osdev
bauen1 has quit [Ping timeout: 265 seconds]
<zid`> I'll trade you a haskell for a girl
<bslsk05> ​LuxLang/lux - The Lux Programming Language (52 forks/1526 stargazers/MPL-2.0)
<lav> it even has first-class datatypes
rnicholl1 has quit [Client Quit]
<pitust> it's too late
<pitust> we are done for
<lav> >:3
<lav> oh btw gog!!
<lav> i got the celeste skirt
<gog> :o
<gog> cute
<lav> no u
bauen1 has joined #osdev
<gog> eee
<zid`> I don't have any skirts, have to destroy the evidence after :(
<sakasama> I collect all the skirts zid` discards. I wish they came in colours other than red though.
rnicholl1 has joined #osdev
<lav> miau
<FireFly> celeste skirt :o
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
<kof123> just need a charlie chaplin language to amuse haskell then
rnicholl1 has joined #osdev
<lav> FireFly: i know!!
heat_ has quit [Remote host closed the connection]
heat_ has joined #osdev
<FireFly> sounds cute
<lav> it is
<FireFly> with pockets!
<lav> yeah
<lav> BIG pockets
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
<zid`> It'd take me a bit of staring to figure out that's celeste, which imo is cool
<zid`> fucking hate huge logo stuff
rnicholl1 has joined #osdev
<zid`> it's a nice skirt, or it's a nice skirt that someone can recognise if they look
<FireFly> right
<lav> yeah same most like "in" tshirts and stuff make me feel like a billboard >_>
<FireFly> agreed
<gog> yeah i don't wear any branding
rnicholl1 has quit [Client Quit]
<zid`> Which is wrong, you're supposed to disclose that you're on the payroll of big oil
<zid`> big cod oil
<gog> lysi does not pay me
<zid`> coverup
<gog> i just like their products
<lav> wait does that mean you are
<lav> möllers tran
<FireFly> relatedly apropos apparel and nice designs, https://github.com/yetzt/null-island
<bslsk05> ​yetzt/null-island - A design reflection about the representation of missing values. (0 forks/40 stargazers/CC0-1.0)
eroux 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!]
eroux has joined #osdev
eroux has quit [Read error: Connection reset by peer]
linear_cannon has joined #osdev
eroux has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
dude12312414 has joined #osdev
dude12312414 has quit [Remote host closed the connection]
heat_ has quit [Remote host closed the connection]
heat_ has joined #osdev
* sham1 reflects on trusting trust
<zid`> just trust me
<zid`> I will tell you who to trust from there
<zid`> easy
frkazoid333 has joined #osdev
sebonirc has quit [Remote host closed the connection]
sebonirc has joined #osdev
* kof123 casts wall on sham1, bouncing off back to himself
<heat_> my OS seems to die when booting the 43rd CPU :/
<zid`> rude
<heat_> it is
<mjg> it glances at your shitlocks
<mjg> then the srat table
<zid`> have you considered not having a 96 byte per-cpu struct
<mjg> then at your shitlocks
<mjg> and decides fuck it, i'm out
<heat_> zid`, i have larger pcpu data than that
<mjg> per computer data amiright
<zid`> multiply it by an integer then
<heat_> mjg, your mom's a shitlock
<zid`> 43*96 = 1 page
<heat_> no, it has nothing to do with that. it's trying a TLB shootdown for KASAN data and waiting endlessly for a CPU that never looks at it
heat_ is now known as heat
<zid`> have you considered not having cpus
<sham1> Just don't computer
<gog> i don't
<zid`> where would someone even get 43 cpus, mafia?
<heat> amd
<heat> or in my case, -smp
<zid`> I know you could *pay* for 43 cpus
<zid`> but who has the 40 or so million dollars that would cost
<zid`> and the warehouse to put them in
<zid`> I dread to think the electricity cost too
slidercrank has quit [Quit: Why not ask me about Sevastopol's safety protocols?]
<heat> hehehe
<heat> found the bug. i was setting the CPU online from the waking processor, which could hang if inside vmalloc I tried to shootdown an AP *while it was initializing*, because the AP init process also requires memory allocation (and runs with irqs off)
epony has joined #osdev
<mjg> kernel startup is fraught with peril
<mjg> personally i like vm init requiring memory to be allocated
<heat> my page allocator has a page allocator :)
<heat> i have a bootmem page allocator, THE page allocator, virtual memory allocator (vmalloc), slab allocator, and a small memory pool allocator
<heat> its gr8
<mjg> it's allocators all the way down innit
<heat> oh and *the* actual virtual memory allocator for all matters userspace too
<heat> absolutely
Turn_Left has joined #osdev
Turn_Left has quit [Max SendQ exceeded]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 264 seconds]
Turn_Left has quit [Max SendQ exceeded]
Turn_Left has joined #osdev
danilogondolfo has quit [Remote host closed the connection]
<Halofreak1990> for me, any memory my AP init process requires is allocated by the BSP beforehand, and the APs really only have to load their various descriptors before dropping into the idle loop, waiting for stuff to be scheduled on them
<heat> yes, that's usually the case for me, except where it isn't
nyah has quit [Quit: leaving]
theboringkid has joined #osdev
theboringkid has quit [Client Quit]
[itchyjunk] has joined #osdev
CalculusCats is now known as Calculuscat
Calculuscat is now known as CalculusCat
sleider has joined #osdev
epony is now known as Guest3663
Guest3663 is now known as epony
Turn_Left has quit [Read error: Connection reset by peer]
pieguy128 has quit [Quit: ZNC 1.8.2 - https://znc.in]
Burgundy has left #osdev [#osdev]
pieguy128 has joined #osdev
[itchyjunk] has quit [Read error: Connection reset by peer]
<heat> geist, [arm64] are the 0x80 bytes you get for each exception type actually useful or it a good idea to just b actual_exception_handler?
<heat> maybe I can fit context saving there?
<geist> if you can it's good, but honestly anything serious ends up needing to j out
<geist> so may as well just treat it as a bit j table
<geist> that seems to be what most big systems do
<geist> but yeah if you have relatively simple context ssaving, can put it inline
<heat> i guess since you're jumping anyway, there's no gain in having it inline?
terminalpusher has joined #osdev
<geist> just saving space
<geist> maybe it's a bit faster from a prefetching point of view for it to have a bit of code before hitting the second j
<geist> vs a branch to a branch, i guess
<moon-child> also presumably cache pollution
<moon-child> super marginal either way
CalculusCat is now known as CalculusCats
ppmathis has quit [Quit: Ping timeout (120 seconds)]
ppmathis has joined #osdev
wlemuel has quit [Ping timeout: 252 seconds]
wlemuel has joined #osdev
<heat> why is arm64 so confusing
<heat> i can't tell how exceptions work
<heat> like, erm, _el1 registers that only work when you come from EL1??
<heat> how else do I get those registers? *literally* the current ones? so I branch or something?