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
eck has quit [Ping timeout: 260 seconds]
eck has joined #osdev
[_] has joined #osdev
gabi-250_ has quit [Remote host closed the connection]
foudfou has quit [Remote host closed the connection]
gabi-250_ has joined #osdev
foudfou has joined #osdev
[itchyjunk] has quit [Ping timeout: 245 seconds]
vinleod has joined #osdev
vdamewood has quit [Read error: Connection reset by peer]
pretty_dumm_guy has quit [Quit: WeeChat 3.5]
gbowne1 has joined #osdev
Gog has quit [Ping timeout: 255 seconds]
awita has joined #osdev
rpnx has joined #osdev
awita has quit [Remote host closed the connection]
rpnx has quit [Quit: My laptop has gone to sleep.]
rpnx has joined #osdev
Hammdist has joined #osdev
Hammdist has left #osdev [#osdev]
vinleod is now known as vdamewood
rpnx has quit [Quit: My laptop has gone to sleep.]
\Test_User has quit [Server closed connection]
\Test_User has joined #osdev
rpnx has joined #osdev
<heat_> should i write a linker?
<heat_> i kind of feel like doing that
rpnx has quit [Client Quit]
eck has quit [Ping timeout: 256 seconds]
eck has joined #osdev
<zid> yea
<zid> make sure it supports LTO though else it's useless
<zid> sorry
<heat_> i'm not sure how hard LTO is to support
<heat_> like effectively you just load a linker plugin and call some well defined API
vdamewood has quit [Remote host closed the connection]
vdamewood has joined #osdev
<geist> probably need some sort of dyload support, but other than that
<geist> heat_: AOUT
skipwich has quit [Quit: DISCONNECT]
<heat_> sadly i don't have any sort of AOUT architecture
<heat_> but THERES SOMEONE IN THIS CHANNEL WHO DOES
<heat_> actually, was there ever 386 aout?
skipwich has joined #osdev
<heat_> ... yeah looks like it, makes sense
<zid> well 386 linux supports aout
<zid> I always had to turn support for it off in menuconfig
<heat_> not anymore, they axed aout
<heat_> ... yeah what kind of question was that, i knew they axed aout on x86 linux a year or so ago
<zid> it's the cartilage damage
<zid> rearing its ugly head
<kof123> the question is will gcc/clang/etc. output a file named "a.out" by default even when support is gone :D
<kof123> or do they output a file named "elf" now
<kof123> there are principle of least astonishment concerns here
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
netbsduser has joined #osdev
vilya_ has quit [Ping timeout: 256 seconds]
vilya has joined #osdev
heat_ has quit [Ping timeout: 276 seconds]
netbsduser has quit [Ping timeout: 256 seconds]
edr has quit [Quit: Leaving]
rpnx has joined #osdev
<geist> yeah you can find a line when a lot of the BSDs and even Linux switched from about to ELF
<geist> with Linux iirc it was something like Slackware 1 vs 2 or whatnot.
<geist> ah no, Slackware 3.0
<kazinsal> yeah I think kernel 1.2 was when the kernel team basically said "stop using a.out, maintaining shared libraries with it is a catastrophe"
netbsduser has joined #osdev
<kazinsal> wow. didn't realize a.out was finally killed off just last year
<geist> huh yeah honestly i haven't looked at it before
<geist> i'm impressed it has at least some capability of complex stuff, since 2BSD is using it and it has the ability for up to 16 overlays, etc
<geist> which at the minimum means it's a bit more complex than a simple in memory image
<kof123> i think <glances at todo list, see you in 20 years> my bytecode thing can just be all PIC because can just refer to things by name...slow, but hopefully will save some work there
* geist goes to take some image of the disks on the ultra workstation
<geist> and then.... going to burn a disk with a particular os install
<geist> hmmm! what os should i install on a sun ultra 2? i wonder!
<kazinsal> openbsd *is yanked away from off-screen*
<mjg> you just made me realize "sun ultra sparc" shortens to SUS
<geist> well, maybe but i'm thinking of another one
<mjg> sus innit
<mjg> no i'm pretty sure you are thinking solaris 10
<geist> (funny though i'm iterally watching a video of someone installing openbsd on a mac g3)
<mjg> offf
<geist> mjg: gasp! solaris 10! that's an ace idea!
<mjg> ?
<mjg> dafaq were you thinking
<mjg> if not solaris 10
<kazinsal> lk, clearly
<mjg> there is lk for sparc as well?
<mjg> wut
* Matt|home bangs head on desk
* Matt|home bangs head on desk
* Matt|home bangs head on desk
rpnx has quit [Quit: My laptop has gone to sleep.]
<geist> i have not gotten around to porting to sparc or ultrasparc yet
<mjg> aight, so the question stands
<geist> what question?
<mjg> what were you planning to install
<geist> solarisl 10
<geist> haven't run solaris on a proper sparc with a screen in some time
rpnx has joined #osdev
netbsduser has quit [Ping timeout: 276 seconds]
netbsduser has joined #osdev
rustyy has joined #osdev
netbsduser has quit [Ping timeout: 252 seconds]
wand has joined #osdev
vdamewood has quit [Remote host closed the connection]
vdamewood has joined #osdev
rpnx has quit [Quit: My laptop has gone to sleep.]
k0valski1889162 has joined #osdev
GeDaMo has joined #osdev
ppmathis3 has joined #osdev
CaptainIRS has joined #osdev
grange_c026 has joined #osdev
Ermine_ has joined #osdev
childlikempress has joined #osdev
rowbee has joined #osdev
moberg1 has joined #osdev
bradd_ has joined #osdev
colona_ has joined #osdev
Test_User has joined #osdev
nuvls_ has joined #osdev
eck_ has joined #osdev
weinholt` has joined #osdev
pretty_dumm_guy has joined #osdev
\Test_User has quit [*.net *.split]
eck has quit [*.net *.split]
moberg has quit [*.net *.split]
lojik has quit [*.net *.split]
grange_c02 has quit [*.net *.split]
hrberg has quit [*.net *.split]
colona has quit [*.net *.split]
mavhq has quit [*.net *.split]
mahk has quit [*.net *.split]
Ermine has quit [*.net *.split]
eschaton has quit [*.net *.split]
moon-child has quit [*.net *.split]
bradd has quit [*.net *.split]
CaptainIRS1 has quit [*.net *.split]
rwb has quit [*.net *.split]
nuvls has quit [*.net *.split]
weinholt has quit [*.net *.split]
ppmathis has quit [*.net *.split]
rowbee is now known as rwb
grange_c026 is now known as grange_c02
Ermine_ is now known as Ermine
ppmathis3 is now known as ppmathis
vilya_ has joined #osdev
vilya has quit [Ping timeout: 256 seconds]
eschaton has joined #osdev
ThinkT510 has quit [Remote host closed the connection]
ThinkT510 has joined #osdev
mavhq has joined #osdev
gbowne1 has quit [Quit: Leaving]
Rubikoid has quit [Ping timeout: 268 seconds]
Rubikoid has joined #osdev
Test_User is now known as \Test_User
zaquest has quit [Remote host closed the connection]
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
vilya_ has quit [Ping timeout: 260 seconds]
vilya has joined #osdev
mctpyt has joined #osdev
clever has quit [Server closed connection]
clever has joined #osdev
mctpyt has quit [Ping timeout: 260 seconds]
flom84 has joined #osdev
tanto has quit [Quit: Adios]
vancz has quit []
pie_ has quit []
pie_ has joined #osdev
pie_ has quit [Ping timeout: 252 seconds]
vilya has quit [Ping timeout: 260 seconds]
Left_Turn has joined #osdev
vilya has joined #osdev
pretty_dumm_guy has quit [Ping timeout: 264 seconds]
tanto has joined #osdev
pie_ has joined #osdev
vancz has joined #osdev
pretty_dumm_guy has joined #osdev
flom84 has quit [Ping timeout: 264 seconds]
netbsduser has joined #osdev
goliath has quit [Quit: SIGSEGV]
zxrom has quit [Quit: Leaving]
weinholt` has quit [Quit: Reconnecting]
weinholt has joined #osdev
Gog has joined #osdev
zetef has joined #osdev
zetef has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
zetef has joined #osdev
[itchyjunk] has joined #osdev
[_] has quit [Ping timeout: 256 seconds]
xvmt has joined #osdev
vdamewood has quit [Remote host closed the connection]
vdamewood has joined #osdev
xvmt has quit [Read error: Connection reset by peer]
xvmt has joined #osdev
xvmt has quit [Read error: Connection reset by peer]
uzix has joined #osdev
xvmt has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 255 seconds]
zxrom has joined #osdev
vdamewood has quit [Remote host closed the connection]
gorenbk has joined #osdev
pretty_dumm_guy has quit [Quit: WeeChat 3.5]
vdamewood has joined #osdev
rorx has quit [Ping timeout: 260 seconds]
project104 has joined #osdev
project10 has quit [Ping timeout: 260 seconds]
project104 is now known as project10
Turn_Left has quit [Ping timeout: 276 seconds]
Left_Turn has joined #osdev
foudfou has quit [Quit: Bye]
foudfou has joined #osdev
Nixkernal has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Nixkernal has joined #osdev
sham1 has quit [Server closed connection]
sham1 has joined #osdev
gorenbk has quit [Ping timeout: 255 seconds]
rorx has joined #osdev
Nixkernal has quit [Ping timeout: 276 seconds]
Nixkernal has joined #osdev
[Kalisto] has quit [Quit: Ping timeout (120 seconds)]
[Kalisto] has joined #osdev
[itchyjunk] has quit [Remote host closed the connection]
[itchyjunk] has joined #osdev
eck_ is now known as eck
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
antranigv has quit [Ping timeout: 268 seconds]
antranigv has joined #osdev
Hammdist has joined #osdev
<Hammdist> where would I find an implementation of the write() function that issues the 'write' system call for aarch64? I need to issue the system call in a program that is being compiled with -nostdlib
zetef has quit [Ping timeout: 252 seconds]
<nortti> for linux? I'd take a look at musl libc
<GeDaMo> Hammdist: https://arm64.syscall.sh/
<bslsk05> ​arm64.syscall.sh: arm64.syscall.sh
<Hammdist> thanks all I have managed to issue a write syscall so I am back on track ...
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
heat_ has joined #osdev
bauen1 has quit [Ping timeout: 256 seconds]
gruetzkopf has quit [Server closed connection]
gruetzkopf has joined #osdev
heat_ is now known as heat
xenos1984 has quit [Ping timeout: 260 seconds]
xenos1984 has joined #osdev
<heat> can you ever get IO performance by submitting larger requests? like instead of doing writeback on 2 individual sectors on each end of a 4K page, you'd writeback the whole thing, even the non-dirty parts
<netbsduser> what a good question
<zid> yes?
<zid> mechanical drives being a fairly good example
<netbsduser> my current writeback clustering code breaks on the first nondirty page, but i think without a doubt if you had e.g. these eight pages DCDCDDCD then obviously writing the entire 8 at once is clearly the best thing to do
<zid> and flash might be on 32k clusters
<zid> and partials are fucking awful on flash
<heat> might depend on the block device though? like if it's not even a real block device but nbd
<Ermine> hey heat, why do you want to write ld?
<heat> well, with nbd then the server running the block device would take the hit, i guess
<netbsduser> what's nbd? nonblock device?
<heat> network block device
<netbsduser> like iSCSI?
<Ermine> device that is somethere in the network but gets presented as block device
<heat> <Ermine> hey heat, why do you want to write ld? <-- just cuz
<heat> it's almost objectively a waste of time, but should be fun
<heat> also an exercise to make sure I *really* understand ELF
<heat> i still have some knowledge holes around shared libs/-fPIC/-fPIE codegen
<heat> i guess one needs to know more about the block device before knowing what to do in that situation
<heat> heck, i don't know what would happen on an SSD as well
<Ermine> If to learn ELF, maybe I should write ld some day too
zid has quit [Server closed connection]
zid has joined #osdev
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
troseman has quit [Quit: troseman]
Left_Turn has quit [Ping timeout: 255 seconds]
troseman has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
xenos1984 has quit [Ping timeout: 256 seconds]
<sham1> hi
<Gog> hi
<heat> gog
<Gog> heat
<heat> botloader
<heat> buttloader hehehehehe
<Gog> hahahahahahahahah
<Gog> load my butt up
<Ermine> that's how I'm going to name my bootloader
<heat> 😼
<Ermine> If I ever finish it
xenos1984 has joined #osdev
<geist> heat: RE:ssh i always thought itd be pretty interesting to write a proper flash wear levelling and block translation layer
<geist> i started on one years ago, but didn't get very far
<heat> ssh?
<geist> ssd
<heat> ah yes
<heat> i wouldn't be surprised if lk is used for exactly that
<heat> plus all other sorts of SSD operations
<heat> i think that's where WD use riscv chips
<geist> possibly, but from what i understand most SSD firmware uses 2 or 3 dedicated cores each running their own logic in lockstep
<geist> ie, one that acts like SATA/NVME and a dedicated core that's running the wear translation
<geist> and within that i dunno if there's much need for multiple threads
<Ermine> mtd site says that getting good flash translation layer is very complex task
<geist> though they clearly have some notion of foreground/background though
<geist> yah, of course SD cards need it too and they're not as high performance
<geist> that's where i'd expect to see something more LK like
<heat> wouldnt multiple IO queues imply multiple software threads on the other end?
rustyy has quit [Ping timeout: 264 seconds]
Left_Turn has joined #osdev
<geist> well, depends on how the hardware works. i suspect the flash controllers ar fairly sophisticated on high end SSDs/NVMe and/or there are a lot of them in parallel
<geist> doesn't mean you *need* threads, you just need a cpu to queue up and manage a bunch of simultaneous transactions
<Gog> hi
<geist> sort of like mini-raid internally, since you're talkin to multiple chips and/or multiple planes within the chips
<geist> gog!
<heat> gog: WHY ARE YOU NOT MANAGING TRANSATIONS RIGHT NOW
<heat> TRANSACTIONS
* Gog actions
<Gog> get it
<Gog> a trans action
<geist> because gog is under a pyroclastic lava flow
<heat> hah
* Gog fingerguns
<heat> gog what's your favourite xorg subpackage
<heat> is it
<heat> xtrans?
* heat gunfingers
<Gog> yes
* geist xeyes both of you
<Gog> lewd
<heat> gog, https://gitlab.freedesktop.org/xorg/lib/libxtrans omg i can't believe i never saw this
<bslsk05> ​gitlab.freedesktop.org: xorg / lib / libxtrans · GitLab
<heat> they adopted the flag
<geist> hah awesome
<Gog> hahaha omg
* Ermine will try hard to not get into this page in public spaces
<Gog> were you aware that it's trans awareness week? i was not aware, but that's what this week is about. working on my awareness
* Gog goes back to not paying attention
<heat> are you self aware?
<Gog> i'd say i'm more self-conscious
<Gog> about everything
<Ermine> gog: extra pets?
<Gog> pls
* Ermine pets gog
* Gog prr
<heat> every time i visit gitlab i remember why i hate gitlab
<Ermine> Initially I've written '\me'. Thank you latex
<Gog> why do you hate gitlab?
<Ermine> heat: visit gitlab
<Ermine> s/gitlab/stagit
<heat> it's github's uncanny valley, and it's also slow as shit
<heat> >Usable with text-browsers such as dillo, links, lynx and w3m.
<heat> this is NOT a feature
<heat> rather, a cons
<heat> con
<Ermine> I knew you'll hate it
<Gog> meow
gabi-250_ has quit [Ping timeout: 240 seconds]
<Ermine> Actually, it's a feature
<Ermine> There are rare situations when you don't have any graphics nearby
<Ermine> You may say that you're better off cloning the repository then
<nortti> wait, gitlab claims to be usable with text browsers?
<heat> no, stagit
<nortti> ah
<geist> hmm there was another one someone was talking about on a discord the other day. you can stand up your own instance, he seemed happy
<geist> gogs.io it seems
<nortti> gitea I think is the more actively developed fork of that
<heat> gog get your lawyer
<Ermine> nortti: and then forgejo
Gog is now known as gogs
<Ermine> Due to gitlab geo bans, we use gitea instead of gitlab
<nortti> oh has it overtaken gitea already? I thought it was going to be one of those forks that fizzle out due to lack of developer effort vs the corporate backed one
<heat> Ermine, wait gitlab geobanned russia?
gbowne1 has joined #osdev
<Ermine> Yes, I can't use their repos
<nortti> I think they geoban all US export restriction countries
<heat> those fuckers
<Ermine> That is, gitlab.com works, but repos don't
<heat> wdym?
<nortti> (at least had an iranian person report they couldn't access sortix source because of that)
<heat> like you can't clone? or can't PR?
<Ermine> I can visit the site
<Ermine> repos = repositories for linux distributions so you can download your copy of gitlab and self-host
<heat> oh
<heat> anyway USE GERRIT AND GITILES
<heat> BECOME GOOGLE
<heat> it's yucky java but i like the interface
<Ermine> I have minix for that
<heat> cgit is also acceptable
<heat> oh and email patches >>
<Ermine> cgit is to view code
<Ermine> gitea's interface is github-like as well
<heat> i know
<Ermine> And they stabilized their CI, which is basically github actions
zetef has joined #osdev
gabi-250_ has joined #osdev
zetef has quit [Ping timeout: 256 seconds]
zetef has joined #osdev
gabi-250_ has quit [Remote host closed the connection]
gabi-250_ has joined #osdev
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
rustyy has joined #osdev
goliath has joined #osdev
[itchyjunk] has quit [Remote host closed the connection]
[itchyjunk] has joined #osdev
<heat> i have just used reallocarray and i feel dirty
netbsduser has quit [Ping timeout: 264 seconds]
<geist> you are a bad perso and should feel bad
<gogs> wha
<heat> i know
<heat> if i keep using openbsd extensions i'll lose all credibility
<heat> i can't shit on openbsd constantly and then surrender to their extensions
<sham1> reallocarray is good, actually
<geist> yeah i actually no nothing at about, what's the specifics?
<heat> it's like realloc but for arrays
<sham1> So you know how calloc takes the element size and the element amount, and multiplies them but in a way that can detect the multiplication overflowing?
<heat> just saves you the (size * nr)
<sham1> Basically that, but for realloc
<heat> and guards against overflow
<sham1> And doesn't zero the allocated memory, the bastard
<mjg> it's UTTER SHIT API
<mjg> everyone happy about protection against overflow seems to be missing the part that whatever non-overflowed value gets computed
<mjg> may be big enough to DOS your program
<mjg> extra points if this is the kernel
<mjg> sensible routine would require a total count which you accept as upper limit
<mjg> so that the entire thing is bound to something sensible
<heat> UTTER SHIT
<mjg> this is basically typical openbsdism
<mjg> see strlcpy for another one
rpnx has joined #osdev
<heat> i like strlcpy
<mjg> what c needs is a notion of tainted variables
<heat> what C needs is rust
<mjg> 's why i'm using rust
<mjg> no strlcpy crate tho :[
<heat> i gave you all the crates you could ever need for a kernel, and you haven't built it yet
<heat> i'm starting to think you're not a fan of rust
<mjg> i'm busy levelling in World Of Warcraft
<mjg> i'll do it as soon as i clear a raid
<mjg> with my guild
<Ermine> LEEROY JENKINS
<mjg> (btw fuck that game)
<geist> mjg: okay can you be a bit less dramatic about it?
<geist> what is utter shit about it?
<sham1> That'sa name I haven't heard in a long time
<geist> was kinda hoping for a real discussion about the api
<mjg> geist: i described
<mjg> geist: it is marketed as a way to protect yourself against bad input which overflows in multiplication
<mjg> geist: but that's missing the real problem where input which does not overflow may already be big enough to DOS your program
<sham1> reallocarray just follows the model that calloc uses. calloc doesn't protect you from DOS either
<mjg> calloc is not claimed to be secure
<geist> yeah, i dont know if its the apis job to keep you from doing somehting too big
<heat> mjg is the least dramatic polish man. like a polish gordon ramsay
<mjg> they are making it sounds like you don't need to validate cause the api is doing it for you
<geist> heat: haha
<mjg> with that multiplication overflow handling
<geist> well, okay. sure, that's a legitimate concern. i dont think it's UTTER SHIT though
<Ermine> So the problem is marketing , not the api?
<mjg> the api is worthless
<geist> how is it worthless?
<mjg> i had personally seen people replace *bad* code which failed to validate
<mjg> with a call to mallocarray
<mjg> with a claim it's secure now bro
<geist> that's user error
<geist> that again sounds like marketing, not api
<mjg> so what's the use of the overflow check
<geist> the api does this, folks dont read the manual and use it incorrectly. that seems like not the apis fault
<mjg> if the user is expected to provide sane values to begin with
<geist> it solves a class of overflow problems, but does not solve *all* problems
<geist> but that's better than not solving them
<geist> if you take that attitude, Rust Wins
<geist> becuase they'll just say use a real language, etc
<mjg> or they could have made it so that a sane upper limit is rqeuired
<geist> then define a sane upper limit?
<mjg> dependso on your use case, clearly you had ot have one in mind anyway even in your approach
<geist> like another arg where you pass in an upper limit?
<mjg> for example, yes
<sham1> Rust doesn't let you define a sane upper limit either FWIW
<geist> why would dumbasses not just put UINT64_MAX
<mjg> you can't *stop* stupid, but you can prevent helping it
<geist> anyway i guess my point is there's a design issue with calloc this tries to solve. good. it oesn't solve all problems
<mjg> i'm saying it could have mostly solved the problem, but it does not
<geist> okay, but that's not UTTER SHIT
<geist> that's a MISSED HOMERUN
<mjg> and now i got actual cases of people using it *instead* of providing proper arg vlaidation
<mjg> so i would say that's explicitly harmful
<geist> okey dokey. so by that logic *all* problems should not be solved unless they're always the Final Solution
<geist> because anything short of that is dumb
<geist> and harmless
<geist> and harmfun!
<geist> full! damnt
<sham1> Final Solution? Yikes m8
rpnx has quit [Quit: My laptop has gone to sleep.]
<geist> well, okay i didn't mean *that*
<geist> i tend to capitalize stuff for emphasis
<geist> anyway, sorry i'm listening to this damn car alarm go off righ tnext to me (on a ferry right now) and it's really annoying
<gogs> hi
<gogs> it's very warm in my house
<gogs> idk why
<geist> the ground is feeling nice an toasty
<heat> reallocarray isn't supposed to validate bad data but rather usage such as "nr++; new_data = realloc(data, nr * sizeof(u64));" where nr * 8 overflows
<geist> yeah i've always been torn about the calloc thing
<geist> i remember for a particular embedded project at a previous company we had some sort of notion of a reasonable max size that was a #define
<geist> if you passed in larger than that in malloc/callc/memcpy/etc it was panicsville because it was obviously a bug
<geist> works great in an environment where there's no virtual memory
<mjg> what
<geist> memcpy with a negative number is also a fun class of problems
<mjg> going from what mallocarray is doing now to what i proposed is a trivial step
<mjg> there was no problem making it
<mjg> it just did not happen
<mjg> and now you got an api which gives people a false sense of security
<heat> mon
<heat> i fail to see what kind of API could come out of your complaints
<mjg> i literally described
<heat> do you want callers to eyeball a maximum size?
<geist> i think a pretty reasonable thing, considering that no OS (asterisk) has a single aspace > 63 bits, is to treat what a signed value of len is as failure
<mjg> what kind of validation would you do heat
<geist> but that's just 64bit only, and still hardware/os specific
<heat> none
<mjg> gg
<heat> users should validate untrusted input at some point earlier than a fucking realloc or calloc
<mjg> you do understand this means ultimately coming up with maximum size you are fine with
<heat> do you want realloc or calloc to read vmstat and get a heuristic for "maximum memory usage without blowing up your machine"?
<mjg> you are constructing a most peculiar strawman here
<geist> as a side note we have made a lot of effort to replace almsot all multiplies that have anything to do with size with 'safe' C++ versions in the kernel, works well, and not that expensive
<geist> kinda recommend doing something similar
<mjg> does c++ do tainting?
<geist> or base + len with some sort of safe version
<mjg> that's the one feature from PERL i'm missing
<heat> you can do tainting
<heat> it just needs some effort
<mjg> maybe there is a different term for it elsewhere
<geist> yah would have to have some value class i guess and always do maf through that
<mjg> so perl, despite being mostly shit, did provide something great: *any* input is considered unsafe to use unless validated
<mjg> optional ofc
<geist> i always thought it was fun that mips has the exception throwing math routine
<geist> dunoo how that ever got used
<geist> that seems like if anything the best use for userspace exceptions
<mjg> maybe it did not, for all i know someone lost a bet
<heat> fwiw you can also do tainting with C, it just needs sparse
<heat> actually I don't know if it applies to values too, maybe just ptrs
<geist> yah not tainting though, there are nice wrap detection intrinsics that are worth using
<geist> i think if you chain a few of those together the compiler might generate something kinda akin to tainting
<geist> where maybe it does a bunch in a row and then just accumulates a fail bool
<geist> depending on how you write the code
gogs has quit [Ping timeout: 255 seconds]
<Hammdist> when I try to define my own memset, gcc converts its code into a call to ... my own memset, resulting in arbitrary stack usage and crash. how to prevent this?
<heat> -fno-builtin
zxrom has quit [Ping timeout: 264 seconds]
<Hammdist> ah, found https://stackoverflow.com/a/33818680 gives a way to disable the optimization per function using an attribute, which I think is cooler
<bslsk05> ​stackoverflow.com: compiler construction - Getting GCC to compile without inserting call to memcpy - Stack Overflow