thinkpol has quit [Remote host closed the connection]
thinkpol has joined #osdev
MaxLeiter has joined #osdev
FreeFull has quit []
Imk0tter has quit [Ping timeout: 252 seconds]
elastic_dog has quit [Killed (silver.libera.chat (Nickname regained by services))]
elastic_dog has joined #osdev
arminweigl has quit [Ping timeout: 264 seconds]
bnchs has quit [Read error: Connection reset by peer]
gog has quit [Ping timeout: 260 seconds]
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
[itchyjunk] has joined #osdev
[itchyjunk] has quit [Remote host closed the connection]
bnchs has joined #osdev
dude12312414 has joined #osdev
dude12312414 has quit [Remote host closed the connection]
freakazoid332 has quit [Ping timeout: 250 seconds]
vdamewood has quit [Remote host closed the connection]
vdamewood has joined #osdev
bradd has joined #osdev
vdamewood has quit [Ping timeout: 250 seconds]
vinleod has joined #osdev
frkzoid has joined #osdev
heat has quit [Ping timeout: 248 seconds]
vinleod has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
jtbx has quit [Quit: jtbx]
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
vdamewood has quit [Remote host closed the connection]
elastic_dog is now known as Guest9046
elastic_dog has joined #osdev
vdamewood has joined #osdev
vdamewood has quit [Remote host closed the connection]
vdamewood has joined #osdev
slidercrank has joined #osdev
pmaz has joined #osdev
dzwdz has quit [Ping timeout: 260 seconds]
GeDaMo has joined #osdev
vdamewood has quit [Remote host closed the connection]
vdamewood has joined #osdev
dzwdz has joined #osdev
heat has joined #osdev
kof123 has quit [Quit: Leaving.]
remexre has quit [Read error: Connection reset by peer]
remexre has joined #osdev
gog has joined #osdev
arminweigl has joined #osdev
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
kof1231 has joined #osdev
xenos1984 has quit [Read error: Connection reset by peer]
xenos1984 has joined #osdev
bradd has quit [Ping timeout: 250 seconds]
pmaz has quit [Quit: Konversation terminated!]
Left_Turn has joined #osdev
money has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 252 seconds]
vdamewood has quit [Remote host closed the connection]
vdamewood has joined #osdev
exCAT has joined #osdev
danilogondolfo has joined #osdev
heat has joined #osdev
<heat>
what's your favourite part of the C standard
heat_ has quit [Read error: Connection reset by peer]
<heat>
mine is annex K
<mjg>
is that UB list in whatever version you are referring to
<nortti>
I don't think are UB lists? it's just kinda scattered throuhgout the standard
<mjg>
dawg what
<mjg>
i have OG c99 right here, annex J
<mjg>
j.1 lists unspecified behavior
<mjg>
j.2 lists undefined
<mjg>
heat: is the joke that there is no annex k?
<mjg>
quite frankly the c99 standard is my go to when i have to check osme bullshit
<mjg>
i should probably update :s
<nortti>
yeah annex k is part of c11
<nortti>
bounds-checked string functions
<mjg>
sfine, i'll download the crapper
<mjg>
now i'm midly curious when the first standard showed up
<heat>
annex K is memset_s, memcpy_s, etc
<heat>
all the Great Bits of the C11 standard
<mjg>
memset_optimal
<mjg>
funny story
<mjg>
i joined a company you all heard of and a guru famed at local scale told me some bullshit about c
<mjg>
i told him that the c standard states otherwise, he was adamant the standard says nothing about it
<mjg>
i'm pretty sure he never seen one
<Ermine>
memset_pessimal
<heat>
is this the headwear company
<heat>
memset_s and the s stands for sexy
<Ermine>
sexualised c standard?
<heat>
anything that happens in my bedroom is UNDEFINED BEHAVIOR
<mjg>
consent was unscpecified
exCAT has quit [Remote host closed the connection]
sortiecat has joined #osdev
vdamewood has quit [Read error: Connection reset by peer]
danilogondolfo has quit [Ping timeout: 250 seconds]
danilogondolfo has joined #osdev
vdamewood has joined #osdev
<heat>
does anyone know why msvc cannot implement aligned_alloc at all? something something incompatible with the heap
<bnchs>
>msvc
<bnchs>
>cannot implement
<bnchs>
it's not a bug it's a feature
<sortiecat>
heat, does those have to go through free()?
<Ermine>
heat: does clang on windows implement it?
<heat>
Ermine, clang on windows uses the msvc crt still I would guess
<heat>
sortiecat, yes
<sortiecat>
The usual way of providing an aligned alloc on a hostile system is to wrap it but that needs its own free
<sortiecat>
So if the heap is unable to provide that alignment even with some internal in-heap effort, then yeah, could be it's not quite possible to implement
<heat>
i read a bunch of handwavy statements on how aligned_alloc "requires them to update the operating system!" which is fucking, erm, normal?
<sortiecat>
But they're probably just laz
<heat>
particularly because of the free() req
<mjg>
lol
<heat>
nothing in the Win32 heap API screams "incompatible with aligned_alloc"
<mjg>
dude
<sortiecat>
Well Windows has all sorts of heap WinAPIs
<mjg>
i know you are young, so lemme explain something to you about corporate realities
<clever>
the simple/dumb way to implement alligned allocations, just add the allocation size to the requested size, malloc() as normal, then round up to the next alignment
<clever>
the added space gives you room to align up, and wastes some space on either side
<clever>
oh hmmm, but free, the ptr you return cant be fed to free()
<mjg>
the bigger the corp, the more likely it is that codebase is utter dogshit and people are unwilling to stick their neck to fix anything
<heat>
sortiecat, everything should end up in HeapAlloc
<clever>
so it would need to modify free, to detect when this has been done
money has quit [Quit: late]
<heat>
"M The Universal CRT doesn't implement C11 aligned_alloc, but does provide _aligned_malloc and _aligned_free. Because the Windows operating system doesn't support aligned allocations, this function is unlikely to be implemented."
<heat>
THE WINDOWS OPERATING SYSTEM DOES NOT SUPPORT ALIGNMENT
<clever>
_aligned_free solves that perfectly
<sortiecat>
heat, you know? I just gave up on Windows many years ago
<heat>
OOHH GREAT WINDOWS OPERATING SYSTEM, WHEN THOU SHALT SUPPORT ALIGNMENT
<sortiecat>
Work did force me to use Windows recently because idk some people still use this??
<mjg>
lmao
<mjg>
sortiecat: still at G?
<sortiecat>
mjg, G gee yeah
<mjg>
loller
<heat>
why can't you say G's name mjg
<Ermine>
Btw what is the purpose of aligned_alloc?
<mjg>
i only had to deal with windows liek once atthe first job
<heat>
is this a voldemort thing
<sortiecat>
heat dude just allocate a page
<sortiecat>
heat, jeez now you said it
<mjg>
OH
<mjg>
the company which shall not be named
<heat>
Ermine, aligned allocations
<heat>
.... i'm not sure if there's a better way to put it
<mjg>
the q is what do you need aligned allocs for mofer
<heat>
if aligned_alloc(alignment = N), ptr % N == 0
<mjg>
the answer is: to benchmark memset
<mjg>
lmao
<heat>
lol
<heat>
but aligned_alloc kind of sucks though
<mjg>
Ermine: one sample reason is to avoid false sharing in a multicore setting
<mjg>
Ermine: you align to cache line size and bam, you are safe (kind of but i'm not going to go into it)
<heat>
posix_memalign is better from a semantics POV but the API is eyebleach
<mjg>
i'm pretty sure eyebleach is supposed to be good
<mjg>
as in cleans up the shit you had seen
<heat>
sorry, you need eyebleach
<heat>
EXCUSE MY MISTAKE OH GREAT MJG OPERATING SYSTEM, WITH THOU BOUNTIFUL ALIGNED ALLOCATIONS
<heat>
do the msvc people not realize they can email the guy who does the heap stuff
<nortti>
*THY
<mjg>
did i mention something about corporate realiteis?
<heat>
is this stuck in jira somewhere
<mjg>
mate, unless there is a BUSINESS CASE for something, peolpe try to not do any work
<heat>
or are they a bugzilla company
<mjg>
even if you do everything right, something is probably going to blow up
<mjg>
because latent crap
<mjg>
and now it's on you
<heat>
at some point you have to question if windows has tests that check if C:\Program Files has been deleted after 30 minutes...
<mjg>
and you don't even have BUSINESS CASE to justify the initial work...
<mjg>
really, big corps are super toxic in that regard
<heat>
i'm not entirely sure if that's always true
<heat>
case in point: the G
<heat>
believe it or not, writing a whole operating system is not justifiable with a BUSINESS CASE
<mjg>
mate
<mjg>
who the fuck knows why they ven started
<heat>
your nest hub would work just as well (probably better even) with linux
<heat>
dude, there's no "who the fuck knows why they even started"
<heat>
the effort is gigantic
<mjg>
so what is the answer
<mjg>
how did it get the go ahead
<heat>
google, like a bunch of other corps, have a bunch of fuck-you money that they can throw for "stupid projects" that don't directly make them money
frkzoid has quit [Ping timeout: 260 seconds]
slidercrank has quit [Ping timeout: 250 seconds]
[itchyjunk] has joined #osdev
vdamewood has quit [Remote host closed the connection]
vdamewood has joined #osdev
sortiecat has quit [Ping timeout: 268 seconds]
vin has joined #osdev
<mjg>
heat: that's not an answer
<mjg>
i do concede the famed BUSINESS CASE is not necessarily antyhing rational from tech standpoint (in fact it often is not)
<mjg>
the key with BC is buy-in from management
<mjg>
"improvign quality" is not a selling point to them tho
<GeDaMo>
Avoidance of legal issues?
<mjg>
[i do like that they are doing fuchsia, don 't get me wrong]
vin has quit [Ping timeout: 265 seconds]
sortiecat has joined #osdev
sortiecat has quit [Read error: Connection reset by peer]
vdamewood has quit [Remote host closed the connection]
vdamewood has joined #osdev
vin has joined #osdev
sortiecat has joined #osdev
xenos1984 has quit [Read error: Connection reset by peer]
sortiecat has quit [Ping timeout: 255 seconds]
xenos1984 has joined #osdev
money_ has joined #osdev
vin has quit [Quit: WeeChat 3.8]
scaleww has joined #osdev
money_ has quit [Read error: Connection reset by peer]
crankslider has joined #osdev
xenos1984 has quit [Ping timeout: 265 seconds]
vdamewood has quit [Read error: Connection reset by peer]
dude12312414 has joined #osdev
xenos1984 has joined #osdev
vdamewood has joined #osdev
money has joined #osdev
frkazoid333 has joined #osdev
gog has quit [Quit: Konversation terminated!]
xenos1984 has quit [Ping timeout: 248 seconds]
vdamewood has quit [Remote host closed the connection]
xenos1984 has joined #osdev
vdamewood has joined #osdev
* geist
yawns
money has quit [Quit: late]
xenos1984 has quit [Ping timeout: 265 seconds]
xenos1984 has joined #osdev
xenos1984 has quit [Ping timeout: 265 seconds]
danilogondolfo has quit [Ping timeout: 250 seconds]
<heat>
this is part of a whole patch set to expose these details to glibc, with the glibc side having a new unaligned-access'd memcpy.S and ifuncs related to this interface
<geist>
ah interesting yeah. i was just tlaking to palmer in the #riscv channel about it the other week
<heat>
about what?
<geist>
about unaligned accesses and how annoying it is that firmware emulates it
<heat>
ah yea
<heat>
what did he say?
<geist>
looksl ike there's pushback for this node by saying 'the kernel should just know based on microarch, etc'
<geist>
oh i think in general palmer is down on firmware emulating shit in general
<geist>
ie, he shares the same disgust as i do with silent emulation
<heat>
"just match on uarch lol" is the shittiest idea ever
<heat>
"lol dude why cpuid, just match on uarch"
<geist>
yah we're at this point with fuchsia where we need to hard decide what to do about it, and crystal ball says 'dont do unaligned on this arch, period' which means we probably have a bunch of code in user space that will
<geist>
(because x86-64 and arm64 are totes fine with it)
<geist>
made somewhat harder to test because qemu happily does unaligned
<geist>
what a goddamn mess
<heat>
riscv is kind of a mess
<geist>
trouble is things tend to stop at 'linux deals with it this way'
<zid`>
"good enough for the girls I go out with"
<geist>
and linux is in a position to reasonably expect to just have a massive, community maintained, table of uarch -> quirk table, and then things tend to get decided that way
<geist>
which sucks for all the other oses
<heat>
i don't think it is tbh
<geist>
but it's worse than even cpuid, since cpuid can add bits for things like this (see ERMS bit) whereas with riscv all you get is two free form registers
<heat>
what are you tableing?
<geist>
stuff like 'does this arch do unaligned accesses'
<geist>
or 'is rdtime emulated', etc
<heat>
any option (unaligned_good or unaligned_bad) is not really a good quirk table
<heat>
because it will always be huge won't it
<geist>
yes but i'm saying if they went the way that Rob is pushing back on that mailing list
<geist>
ie, 'lets not add this to the device tree, the kernel can figure it out based on the uarch'
<geist>
in the case of uarch it's basically a table of 'tuple {impl, uarch} -> quirks'
<bslsk05>
sourceware.org: [PATCH v2 0/3] RISC-V: ifunced memcpy using new kernel hwprobe interface
goliath has joined #osdev
gog has joined #osdev
<gog>
mewe
<Ermine>
gog: may I pet you?
<gog>
yes
* gog
prrr preemptively
* Ermine
pets gog a posteriori
<heat>
fax
<gog>
i'm an ok software developer
<mjg>
chatgpt > gog
<mjg>
just sayin!
<zid`>
gog: can you write me some ok software?
<mjg>
chatgpt is an exquisite software developer
<zid`>
also an amazing chess player
<gog>
chatgpt already outclasses me
<gog>
i got a raise today but it'll be shortlived because the AI apocalypse is upon us
<gog>
and i'll be out of a job in less than a year
<gog>
it's fine tho
<heat>
if I were your boss I would not give you raise
<heat>
bcuz i want more money for me
<heat>
sorry
<Ermine>
heat the bossy boss
<mjg>
heat would make a great job at suicide encouregement hotline
<heat>
the c in heat stands for compassion
<gog>
my boss doesn't in charge of the monies
<gog>
also i've been loudly complaining that i've bseen saddled with code that is very bad and i should get paid more to fix it
* bnchs
pays gog in pats
<heat>
do you want a workers union gog
<heat>
are you a diiiiirtyyyyyyy socialist
<zid`>
comrade gog
<gog>
i'm a member of a trade union yes
Arthuria has joined #osdev
* Ermine
is going to study The Communist Manifesto next monday
freysteinn has joined #osdev
<Ameisen>
odd question: is GCC not having support for the MSVC extensions like Clang does because nobody has implemented it, or because the GCC maintainers don't want it?
<Ameisen>
because I've run into the latter case before