<heat>
"why is my llvm /bin/clang link taking 20 minutes?"
<heat>
>-DLLVM_ENABLE_LTO=OF
<heat>
shoot me
basil has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
bas1l has joined #osdev
<mjg>
it may or may not be running with asserts btw
<mjg>
--version will tell you
<heat>
no, i'm building llvm
<heat>
and my clang most definitely does not have asserts
<heat>
not like that matters much IIRC
<heat>
mjg, has there been movement on the randstruct front for freebsd?
<heat>
apparently new llvm has randstruct built in
<mjg>
not that i know of
<mjg>
it is a rather dodgy subject innit tho
<heat>
is it?
<heat>
it sounds pretty legit as a security measure - makes it harder for you to exploit the kernel, and is opt in
<heat>
in theory you can Carefully Measure and hopefully not lose too much perf
<mjg>
for security is defo great
<mjg>
but is a smp perf fucker
<mjg>
probably worth it for things like creds
<heat>
just don't tag it on perf sensitive shit
<heat>
also apparently grsecurity had a version that tried to only randomize cacheline-sized groups of elements
<mjg>
now that makes sense
<mjg>
afair linukkz slaps the randomizer all over
<mjg>
as in all structs
<heat>
no? that's pretty impossible
<heat>
will go haywire as soon as it tries to randomize struct stat or something
<heat>
or struct pt_regs
<mjg>
not literally every single one
<mjg>
there is clearly abi concerns
<mjg>
but for example dentry is treated with it
<heat>
shrug, hopefully they measured it
<mjg>
:d
<mjg>
makes me wonder if ubuntu builds with it
<mjg>
it's not like the kernel randomizes at boot time and hotpatches all accessors
<heat>
*openbsd theme song*
<mjg>
[:
<mjg>
rly tho, everyone in ubuntu land is running the same binary
<mjg>
assuming the package version matches ofc
<mjg>
point being, 0 benefit in that case
<heat>
yeah
<heat>
and you'd need to know the seed anyway, for kernel modules
<mjg>
i think making the image patch itself would be interesting
<mjg>
the current code is the easy way out
<moon-child>
seems like you should be able to specify an interference graph or whatever
<moon-child>
'these things should be on the same cache line, these different, these don't care'
<moon-child>
and it constructs a random layout based on those constraints
<mjg>
here comes a mandatory remark how someone randomized for lulz and got a speed up
<moon-child>
gets you further than just intra-cacheline
<moon-child>
lol
<mjg>
it's a classic
<heat>
save the seeds that speed you up :^
<mjg>
someone turns __read_mostly into a nop and got a speed up
<mjg>
gets
<mjg>
it's ok unless they claim __read_mostly is therefore bad
<moon-child>
profile-guided randomisation?
* moon-child
hides
* mjg
takes the bong from moon-child
<mjg>
you had enough youg man
<klange>
So... sdlquake does not like 'large' resolutions... I changed my resolution preference table to prefer 1080p in my BIOS loader recently - that alone was fine, but then I also changed my panel design to make it smaller (and drop the floating thing I did for the last year or two) and _that_ put it over the top and now some things crash unexpectedly...
[itchyjunk] has quit [Read error: Connection reset by peer]
v28p has quit [Ping timeout: 276 seconds]
joe9 has quit [Quit: leaving]
<klange>
#define MAXHEIGHT 1024 ← this of course gets used in an array definition, and then completely ignored for a loop that fills it up based on screen height
<Mutabah>
kwality
heat has quit [Ping timeout: 252 seconds]
elastic_dog has quit [Remote host closed the connection]
elastic_dog has joined #osdev
<kazinsal>
Vintage Programming (tm)
osmten has joined #osdev
_whitelogger has joined #osdev
<sham1>
Is there even a FIXME there
<klange>
Simply changing it to a larger value does work; though there is a FIXME about it being duplicated in another header and that you must not forget to change both
<klange>
I could probably also fix up the lack of a bounds check, but I am lazy, and also rather disinterested at the moment
<moon-child>
1g pages are interesting. Used to suck, but on recent uarches, you can fit all your memory into the l2 tlb
<mrvn>
assuming you have 1G pages.
<mrvn>
where 1G pages ever worse than 2M pages? I know some archs had a split TLB for 4k and for other pages, and not a lot of those. So too many large pages are worse than none.
<moon-child>
yes, exactly
<moon-child>
there used to be only 4 1g tlb entries. 4g is still a bigger working set then you get with all 2m or 4k pages, but you need to have good locality
<moon-child>
or else you're screwed
<moon-child>
now you have 1024 1g tlb entries. Can almost certainly cover all your physical memory
gog has quit [Ping timeout: 240 seconds]
<mrvn>
but those old systems did they have more than 4 2M tlb entries?
<moon-child>
yes
<ddevault>
how do I find the size of my 2M TLB on my CPU?
<moon-child>
intel optimisation manual lists sizes for some recent intel uarchs
<mrvn>
good question. Is there some MSR or cpu info field for that?
<ddevault>
1024 entries is a number I saw in a random SO thread just now
<mrvn>
hardcoding a list of uarchs in the kernel to get the TLB sizes would be really bad.
<ddevault>
shared with 4K
<ddevault>
it can be fetched out of cpuid
<moon-child>
mrvn: would it
<moon-child>
you can have a reasonable fallback obviously
<mrvn>
and if you are really good you mix 1G and 2M pages to use all the TLB slots, assuming they are independent on that uarch.
<ddevault>
what use is a 1G page if you aren't going to fill it, you just going to randomly map 1G to fulfill a process's request for a couple megs?
<ddevault>
transparent large/huge pages is (probably) a good idea though
Burgundy has joined #osdev
GeDaMo has joined #osdev
nyah has joined #osdev
slidercrank has quit [Ping timeout: 252 seconds]
gog has joined #osdev
<mrvn>
ddevault: a 1G page has a faster page table walk. So even if you only need 4k it will fill the TLB faster than 2M or 4k. A 1G page is only bad if it means more evictions in the TLB.
<ddevault>
perhaps, but you're mapping 1G into userspace even if they aren't going to use it
<mrvn>
who says it's mapping into user space?
<ddevault>
they can wantonly overwrite their desired allocation and you'd have to check the access bits if you want to split it up
<ddevault>
ah, well.
<mrvn>
The most likely use for 1G pages is to map the phys memory
<ddevault>
sure
<ddevault>
I use them for that purpose
<mrvn>
But hey, if userspace allocates 1GB and you have a 1G page to map then why not?
<ddevault>
oh for sure
bas1l is now known as basil
<ddevault>
something something overcommit
<ddevault>
but screw overcommit tbh
<mrvn>
ddevault: rounding error if you have 1TB ram
<mrvn>
You won't have a free 1GB page to map if you are running out of memory.
<mrvn>
You might want to add some code to the swapping out to a) split a 1GB/2M pages into 4k chunks and b) eliminate 4k pages that are all zero.
<mrvn>
Some people like to compress their swap, in which case you can easily check for zero pages while compressing.
slidercrank has joined #osdev
dh` has quit [Ping timeout: 276 seconds]
bauen1 has quit [Ping timeout: 276 seconds]
bnchs has joined #osdev
jjuran has quit [Quit: Killing Colloquy first, before it kills me…]
jjuran has joined #osdev
<gog>
hi
<gog>
i hate azure api
wlemuel has quit [Ping timeout: 240 seconds]
wlemuel has joined #osdev
<sham1>
s/ api//
<sham1>
FIFY
<gog>
true
xenos1984 has quit [Quit: Leaving.]
<Ermine>
hi gog, may I pet you instead
<gog>
yes
* bnchs
pets gog instead
* gog
prr
theboringkid has joined #osdev
pmaz has quit [Quit: Konversation terminated!]
xenos1984 has joined #osdev
bauen1 has joined #osdev
bnchs has quit [Remote host closed the connection]
osmten has quit [Ping timeout: 245 seconds]
Left_Turn has joined #osdev
theboringkid has quit [Ping timeout: 252 seconds]
Brnocrist has quit [Read error: Connection reset by peer]
<bslsk05>
en.cppreference.com: Standard library header <print> (C++23) - cppreference.com
<sham1>
Those don't seem like the kind of stuff one can feasibly implement in userland. Shame
<sham1>
If you need compiler support anyway, you might as well as proper interpolation IMO
<heat>
oh, you totally get
<heat>
can*
Brnocrist has joined #osdev
<heat>
<format> and <print> have been in fmt since forever
<heat>
<source_location> did in fact need compiler support though, the current facilities for getting the current line, etc don't really work well with it
<sham1>
Oh yeah, forgot about fmt
<sham1>
I suppose that the compiler support would really only be validation and checking that your template string is sane
Brnocrist has quit [Read error: Connection reset by peer]
<heat>
no, i'm pretty sure that's all done through compile time template garbage
<heat>
hence why C++ standard library headers take fun amounts of time to parse and compile :)
<Ermine>
what good is print? looks like printf with blackjack and hookers
<GeDaMo>
But templates! :P
<heat>
it is printf with blackjack and hookers
<heat>
and this time, no fucky specifiers, and no unsafeness, and AFAIK possibility to add your custom print code
Brnocrist has joined #osdev
<pitust>
heat: some printfs let you add custom formatters
<pitust>
and since the only printf anyone cares about is the gnu one, all of them support it
<heat>
wrong
<heat>
musl doesn't because <vague philosophical reasons>
xenos1984 has quit [Read error: Connection reset by peer]
<moon-child>
wanted a low effort way to demonstrate that my thing is clearly better than the existing thing, by virtue of not being absurd
<moon-child>
hammering just one mutex gave somewhat strange results, and I suspect I know why
<moon-child>
one thing I don't get is that the timing seems to be super bimodal, everywhere I've tested this. Shouldn't be numa, and two of the machines had a lot more cores than threads, so scheduler seems unlikely
<moon-child>
oh maybe collision in the hash table or something
Jari-- has joined #osdev
danilogondolfo has quit [Remote host closed the connection]
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<mrvn>
moon-child: is the mutex >= cache line size?
<mrvn>
might be false sharing of the cache line
<mrvn>
also are you using lock or try_lock?
bauen1 has joined #osdev
<Jari-->
I got 2,500 EUR donation on my open source projects
<Jari-->
happy
<heat>
what
<heat>
u get paid??
<Jari-->
heat, and I joined #hamradio
<heat>
motherfuckers I take paypal, bank transfer, may open a patreon, onlyfans or fansly upon request
<zid>
His mother just happens to love him heat
<heat>
i can make vids doing hot steamy kernel development
<sham1>
Hot tub programming streams on Twitch
innegatives has joined #osdev
<zid>
heat trying to sell out, typical
<zid>
what happened to glorious oss communism
<sham1>
It's actually incredible how many loopholes twitch adds for the whole "no nudity"-rule
<zid>
he hears about someone *else* getting paid and suddenly he's in a hot tub
<sham1>
Like yeah, it brings money, but some of these workarounds are just silly. Just allow nudity and such and be done with it
<zid>
It's mainly credit card processors that stop you doing that sham
<innegatives>
Say you've got INC instruction with mod of 01 (1 displacement byte) and r/m of 000 (base register BX, index register SI), does that meanto find the offset you add "BX + SI + displacement"?
<innegatives>
s/meanto/mean to/
<zid>
innegatives: You know assemblers and disassemblers exist right?
<zid>
You can just verify this against them
<innegatives>
its hard
<sham1>
zid: right, and IMO that's BS. I understand that payment processors have rules but jeez
<heat>
it's not hard dude
<heat>
you have a fucking 8086 under your desk
<innegatives>
How do I find out what offset it calculated tho after running it?
<zid>
innegatives: give me an instruction to decode
<innegatives>
ok
<innegatives>
wait
<sham1>
Like, that somewhat infamously lead to PH removing like all non-big producer content for a while
<zid>
sham1: onlyfans had to threaten to remove adult content at one point
<zid>
*onlyfans*
<innegatives>
1111,1111,0100,0000,0101,1100
<sham1>
Credit card companies are the best worst thing. The problem is that the alternative is even more terrible
<zid>
It would have just been my parody account left that has pictures of 120mm cooling solutions left
<zid>
FF 40 ..
<heat>
hi sham1 have you heard about cryptocurrencies?
<zid>
5c
<innegatives>
we are talking in binary and hex from now on
<heat>
i have invented a new coin, pessimalcoin
<zid>
inc [A+0x5c]
<heat>
please buy it (from me)
<zid>
that was hard.
<innegatives>
dude i know the instruction
<innegatives>
I'm trying to find out how offset is calculated
<zid>
You told me me doing that was 'too hard'
<sham1>
The problem is that the alternative is even more terrible. I actually referred to crypto
<heat>
do u want onyx nfts
<innegatives>
What's A?
<zid>
The register A
<zid>
ax/eax/rax
<zid>
depends on cpu mode
<zid>
There's some vague encoding differences between 8086 and modern cpus though, and I was too lazy to dig out a real 8086 disassembler though
<heat>
i hope you understand what inc [ax + 0x5c] means
<bslsk05>
www.sandpile.org: sandpile.org -- x86 architecture -- mod R/M byte
<heat>
you know at some point I just started playing around with godbolt asm and the opcodes it shits out, it was more useful than reading the SDM really
<zid>
It's not too hard to understand if you have the table, and a couple of instructions to reference
<zid>
figuring it out with just one or the other is hard
<heat>
maybe I went about it the wrong way
<moon-child>
I found the sdm super confusing
<zid>
see how it goes ax cx dx bx sib * si di? sp/bp are the regs that go in the sib and * slots
<zid>
if you go by reg number
<zid>
afaik
<zid>
so you need extended encodings for them
<zid>
but the sp one is just the displacement form I think so that works out "how you want it except [sp] has to be [sp+0]" or something
<zid>
man this is crusty memory
<zid>
but afaik some things have a direct [sp] encoding by not using modrm at all
<zid>
so whatever
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
sortie has joined #osdev
<moon-child>
you mean like push?
wlemuel has quit [Quit: Ping timeout (120 seconds)]
wlemuel has joined #osdev
<Brain___>
im in need of a name for the irc client im making for my OS
<Brain___>
please highlight me if you have any good ideas, the OS is called 'retro rocket' and its userland is all written in BASIC, so that might help give some inspiration as to naming. naming things is hard.
<Jari-->
locking symbols of resources at the moment, no time to find the locked resources, there are like 10 000 structures
<zid>
dogcock
<zid>
oh wait no I mean, red rocket
<Brain___>
lmao, dogcock?
<zid>
sorry typo
<sortie>
Brain___, haha I just called mine irc(1)
<Brain___>
dont remind me, we have two dogs male and female and just went through her being in season, jesus christ too much dog cock to handle, cannot unsee
<Brain___>
sortie: yeah thats what the command is called, and it'll still be called that no matter what i put in the title bar
<Brain___>
because then people actually know what its for without going "oojimaflop? whats that for?"
<zid>
"Retro Rocket IRC Client" then if you just want a titlebar name
<zid>
and not an executable name
<zid>
boring and functional yay
<Brain___>
you think someone who's NIH'ing the entire ecosystem goes for boring and functional? :D
<zid>
only by necessity
<zid>
too many things to do and name to not
<Brain___>
this is true
<Brain___>
i ended up just calling my editor edit
<zid>
EDIT.COM
<zid>
Timeless.
<Brain___>
lol, no just edit :D
<zid>
If you need a name for your debugger, pick me
<zid>
I have the best name for it
<Brain___>
but its basically similar, somewhere between that and nano
<bslsk05>
github.com: retro-rocket/edit.rrbasic at master · brainboxdotcc/retro-rocket · GitHub
<Brain___>
this is what the source looks like for the user programs
<Brain___>
unfortunately looks a bit more ugly in github, because github doesnt know how to syntax highlight it, i had to make my own vscode plugin for that
<zid>
When standard defines for keys
<zid>
VK_ESCAPE
<Brain___>
there are, just they arent exposed to BASIC
<Brain___>
not yet anyway
<Brain___>
i found lots of other little glitches in my attempt to write bigger more useful programs in the language, that i need to fix before that :D
<Brain___>
like, if you are in a procedure (PROC) and you then enter a loop (FOR/REPEAT) you lose visibility of local parameter variables *facepalm*
<Brain___>
which is why im making copies as workarounds
<Brain___>
i should probably create github issues so i dont forget these
<Brain___>
another one is i really really need some kind of block IF/THEN/ELSE
<Brain___>
complex logic sucks ass without it
slidercrank has quit [Ping timeout: 248 seconds]
innegatives has quit [Quit: WeeChat 3.8]
Burgundy has quit [Ping timeout: 255 seconds]
nyah has quit [Quit: leaving]
Left_Turn has quit [Read error: Connection reset by peer]
awita has quit [Remote host closed the connection]
sortie has quit [Ping timeout: 240 seconds]
tiggster has joined #osdev
Jari-- has quit [Ping timeout: 255 seconds]
sortie has joined #osdev
dutch has quit [Quit: WeeChat 3.7.1]
dutch has joined #osdev
<mrvn>
did someone mention yet that x86 is a horrible mess?
<mrvn>
Brain___: if then else end? Or how do you deal with nested ifs? "else pass"?
<tiggster>
mrvn, but its the most widely documented. :)
nvmd has quit [Ping timeout: 255 seconds]
<mrvn>
tiggster: every cpu you can easily buy is documented extensively.
<mrvn>
Brain___: or is there BEGIN ... END to make a block?
<mrvn>
oehm, string variables must end with "$" and then () is index access? Otherwise it's a function call?
<klange>
It's not that "x86" is "widely documented" it's that the "PC platform" is.
tiggster has quit [Remote host closed the connection]