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
Imk0tter has joined #osdev
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]
danilogondolfo has joined #osdev
Perflosopher has left #osdev [The Lounge - https://thelounge.chat]
xenos1984 has joined #osdev
linear_cannon has joined #osdev
air has quit [Ping timeout: 250 seconds]
<heat> ah, great nap
<heat> top 10 naps of all time
<zid`> nah, you lived
<zid`> can't be top 10
<heat> i also really enjoy your company zid
netbsduser has quit [Remote host closed the connection]
<heat> mjg, yes I also like fuchsia, just saying that it's one of those projects you can only do if you have plenty of extra money
netbsduser` has joined #osdev
<heat> google does this a lot, which is partly why I find them particularly attractive
<heat> just a bunch of stuff that really has no designated BUSINESS CASE. some of it sticks, other stuff doesn't
<heat> like llvm-libc. is there a BUSINESS CASE for a new libc? no. is it a cute idea that may be worth something in the future? sure
<heat> in no way, shape or form is writing a libc from scratch justifiable vs just using glibc or forking musl or forking BSD libc
scaleww has quit [Quit: Leaving]
<heat> in other words GNU hurd is getting x86_64 support? new patches for glibc just dropped
<heat> for a "x86_64-gnu port"
air has joined #osdev
<nortti> oh huh, I thought it'd had that for a little bit now
scaleww has joined #osdev
<heat> geist, apparently the D1 (riscv) supports unaligned accesses natively
<nortti> the allwinner chip?
<geist> nice. oh another thing i discovered this morning
<geist> kinda kenw it, but hadn't verified
<geist> RDTIME instruction is a lie
<nortti> https://muxup.com/2023q1/commercially-available-risc-v-silicon "1 x RV64GC T-Head C906 application core." for the D1, wonder if any other chips use a C906 core
<bslsk05> ​muxup.com: Commercially available RISC-V silicon - Muxup
<heat> nortti, yep
<Ermine> x86_64 in minix when
<heat> geist, what's rdtime?
<heat> geist, fyi riscv,misaligned-access-performance in the device tree
<geist> nortti: keep in mind the C906 is a *very* low end core
<heat> can be "emulated", "slow" or "fast"
<geist> oh nice.
<Ermine> heat: what do you think about performance of this? https://www.sifive.com/boards/hifive-pro-p550
<bslsk05> ​www.sifive.com: HiFive Pro P550 - SiFive
<nortti> geist: yeah, am aware. been looking at a lichee rv for an osdev project, as a kind of riscv raspi1 equivalent
<geist> i mean i dont see it in any of the device trees i have here, but nice that it's specced
<heat> Ermine, i dunno probably sucks
<heat> geist probably has a better opinion
<geist> Ermine: it doesn't exist yet, so hard to tell
<geist> on paper it's a higher end core. i'd put it approx cortex-a72 class
<heat> ah yes, the duality of riscv boards
<heat> either doesn't exist, or sucks
<geist> heat: so rdtime is a pseudo instruction that reads from CSR 0xc01 (time)
<geist> nice. so you can get the current tick rate in any mode. lovely
<geist> but! sifive cores all say 'this will trigger an illegal instruction exception'
<geist> but it appears to work! what gives? (you can guess)
<heat> ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
<heat> ;_;
<geist> AAAAAAAAHHHHHH
<bslsk05> ​en.uncyclopedia.co: AAAAAAAAA! - Uncyclopedia, the content-free encyclopedia
<GeDaMo> Nasal demons! :P
<geist> heat: so i ran some benchmarks on my visionfive 2, in linux user space. it's pretty bad, though better than it could be.
<heat> also fwiw the device tree knob is not really "specced" in any spec, but was pushed by the riscv people to linux a month or so ago
<geist> approx 378 cycles per rdtime (about 250ns, sice the core is running at 1.5Ghz)
<heat> so it's the best kind of documented, documented in linux source code!
<geist> yeah, that's generally the source of truth, i wonder if htere's a piece for the emulated time?
<geist> hmm, where do you see it?
<heat> ah wait, might still be waiting for the push
<bslsk05> ​github.com: linux/cpus.yaml at master · torvalds/linux · GitHub
<geist> do yo have the push offhand? i'm curious if they added anything else
<bslsk05> ​lore.kernel.org: [PATCH v3 4/7] dt-bindings: Add RISC-V misaligned access performance - Evan Green
<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
<bslsk05> ​lore.kernel.org: RE: [PATCH v2 4/6] dt-bindings: Add RISC-V misaligned access performance - Palmer Dabbelt
<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'
<heat> fwiw
<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
<mjg> whare are msvc extensions?
* mjg never had any dealings with that one
<bslsk05> ​clang.llvm.org: MSVC compatibility — Clang 17.0.0git documentation
<Ameisen> there's a few things Clang doesn't support from MSVC, but overall it has fairly good compatibility
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
goliath has quit [Quit: SIGSEGV]
<gog> clang tries to be everything to everyone
<mjg> it is crap to me
<heat> Ameisen, clang literally has windows targets and cl.exe emulation
<heat> i don't think gcc is targetting msvc compat
<heat> but, erm, this is not #gcc
<zid`> mingw isn't even
<zid`> and that's the windows port of gcc
<zid`> clang's got it easy though and they can just throw in a new frontend someone submits fairly easily
danilogondolfo has quit [Remote host closed the connection]
<zid`> when gcc-pipe
exCAT has joined #osdev
exCAT has quit [Max SendQ exceeded]
thatcher has quit [Remote host closed the connection]
thatcher has joined #osdev
goliath has joined #osdev
Arthuria has quit [Read error: Connection reset by peer]
Arthuria has joined #osdev
Turn_Left has quit [Read error: Connection reset by peer]
justmatt has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
scaleww has quit [Quit: Leaving]
Arthuria has quit [Read error: Connection reset by peer]
tiggster has joined #osdev
<moon-child> Ameisen: -fms-extensions :)
radens has quit [Quit: Connection closed for inactivity]
dutch has quit [Quit: WeeChat 3.8]
<zid`> don't forget the bitfields