<heat>
is it just me or do arm64 page table permissions map horribly with any actual use case
<heat>
s/with/to/
<heat>
you have 2 execute-nevers for some reason (how is this remotely useful), there's a read-only bit instead of a write bit, a not-global bit
<heat>
it's like everything is stupidly backwards
knusbaum has quit [Ping timeout: 246 seconds]
<mrvn>
heat: that's not the global bit, it's the process-memory bit
knusbaum has joined #osdev
<mrvn>
and execute-never is the data bit :)
<heat>
arm64 page table bits are the stupidly-backwards bit :P
<heat>
like seriously, a read-only bit?
<mrvn>
I bet it saved 1 NOT gate each time
<heat>
well this is arm64, not arm
<heat>
I would hope they're not trying to be cost-effective
<mrvn>
arm has the same not-X bits. changing it for 64bit mode would be horrible.
<mrvn>
saving a gate is probably less about cost than propagation times
<mrvn>
or just about writing the vrml easier
jack_rabbit has joined #osdev
knusbaum has quit [Ping timeout: 264 seconds]
<geist>
they just have two XN bits for user and kernel
<geist>
why though is a good case, would you ever want the kernel to be able to execute but not user? etc
<geist>
heat: which one is the read only bit you're tlaking about?
<geist>
i think the perm bits being the way they are is something to do with the modify bit mechanism
<geist>
which is a bit backwards, but makes sense
nyah has quit [Ping timeout: 268 seconds]
<heat>
geist, AP[2:1]
<heat>
per D4.4.4 "Data access permission controls"
<heat>
AP[2] Selects between read-only and read/write access.
<heat>
AP[1] Selects between Application level (EL0) control and the higher Exception level control.
<heat>
I don't know why you implemented those macros the way you did
<heat>
confusingly, when AP[2] is set, it's read-only instead of read-write
<heat>
geist, ok maybe a possible use for PXN is to try and stop kernel exploitation that leads to execution of user code
<heat>
that kinda makes sense I guess?
<heat>
if you mark everything user-space PXN
<gamozo>
That's literally the point of PXN
<gamozo>
it's a mitigation
<gamozo>
it means you can't jump to a user-provided code (you have to ROP/find an exploit path to load dynamic code into the kernel)
<heat>
why wouldn't you just not support it
<gamozo>
It's honestly one of the better mitigations (arguably, PAN matters way more). Back in the day we'd just get PC control in the kernel and point it to a (known) user address. Defeating ASLR in the same pass, it was great
<gamozo>
I miss those days
<heat>
just like you need special arm64 instructions (or touch a system register) to touch user-space memory
<heat>
does UXN on a kernel page make sense?
<heat>
or is the "access" on AP[1] just a data access and not an instruction fetch
<gamozo>
Might as well, reduces amount of ROP gadgets, and cleans up the address space a bit, but in this era we just switch page tables on syscalls anyways so *shrug*
<gamozo>
that being said, I'm not too familiar with ARM, I mainly know the x86 equivs of SMEP/SMAP
<heat>
wait didn't I discuss this with geist the other day
<heat>
im having a weird mix of a flashback and the early stages of a good old mandela effect
<heat>
lets see
<gamozo>
I thought every day we just rsetart the same convos on here
<heat>
ok yeah haha I did
<heat>
yeah right
<heat>
how about that itanium haha
<heat>
pretty cool
<gamozo>
unikernels amirite?
<gamozo>
"my USB driver is done"
<heat>
so just found out the windows iso doesn't support EL TORITO
<heat>
wtf microsoft
<gamozo>
more like, el doritos
<gamozo>
cause it's super dusty and old
<heat>
given it's a summer day, and the local hometown ice cream chain is UDF (United Dairy Farmers), I want to go for a shake now
<klys>
for something to talk about, looking for a UI: I want pages of gridded cels containing each: pile of pictures, picture, empty cel. this is for storyboarding.
<heat>
we're already discussing arm64 mmu details and breaking the time continuum
<klys>
oh sry
<heat>
not a problem
<heat>
this a kernel weirdos version of a time loop movie
<klys>
time loops should break traditional assumptions on where people come from and luck. ergo you get movie drama with this plot device
xenos1984 has quit [Remote host closed the connection]
gamozo has quit [Quit: Lost terminal]
<vdamewood>
heat: Do you even need El Torito with UEFI?
<klange>
Absolutely.
<klange>
EFI can not read ISO9660.
<klange>
(In so far as it is not in the list of required filesystems to support.)
<heat>
yeah you need it
<klange>
So you need some way to throw an EFI-compatible FAT filesystem on the disk.
<klange>
I've been doing this thing for years where the FAT blob is where all my files go, and I build it specially to have sector alignment with the enclosing ISO 9660, and then the ISO 9660 "files" reference the data in the FAT.
heat has quit [Ping timeout: 272 seconds]
tsraoien has quit [Ping timeout: 268 seconds]
<geist>
yah PAN on arm64 works even better: you just set the bit and now EL1 can't access EL0 period *except* via a set of dedicated load/store instructions
<geist>
so basically you implement user copy in terms of those laod/stores and then you dont have to toggle the bit or whatnot like you do on x86
SGautam has quit [Quit: Connection closed for inactivity]
wand has quit [Ping timeout: 268 seconds]
mrvn has quit [Ping timeout: 240 seconds]
wand has joined #osdev
Burgundy has joined #osdev
Burgundy has quit [Ping timeout: 246 seconds]
terrorjack has quit [Ping timeout: 272 seconds]
theruran has quit [Quit: Connection closed for inactivity]
thinkpol has quit [Ping timeout: 272 seconds]
terrorjack has joined #osdev
thinkpol has joined #osdev
xenos1984 has joined #osdev
kkd has quit [Quit: Connection closed for inactivity]
<bslsk05>
twitter: <janusrose> Supreme Court rules 6-3 that the mysterious organization known as SEELE can continue the Human Instrumentality Project and trigger the Third Impact as described in the Dead Sea Scrolls
<psykose>
LMAO
<zid>
My only regret is that the crossection of people who know about us politics and eva enough to get this is not infinite
<moon-child>
what's eva
<ptrc>
evangelion anime
<bauen1>
i think i still understand too little of the backstory of eva to understand it lol
sympt6 has joined #osdev
sympt has quit [Ping timeout: 260 seconds]
sympt6 is now known as sympt
mzxtuelkl has joined #osdev
<zid>
eva's not that hard to understand if told, but figuring out THAT is what it's saying from watching it is very hard
<zid>
like Primer
the_lanetly_052_ has quit [Ping timeout: 268 seconds]
<geist>
haha
GeDaMo has joined #osdev
xenos1984 has quit [Quit: Leaving.]
bauen1 has quit [Ping timeout: 246 seconds]
scoobydoo has joined #osdev
mrvn has joined #osdev
ethrl has joined #osdev
xenos1984 has joined #osdev
heat has joined #osdev
the_lanetly_052_ has joined #osdev
ethrl_ has joined #osdev
ethrl has quit [Ping timeout: 272 seconds]
gog has quit [Ping timeout: 255 seconds]
SGautam has joined #osdev
kingoffrance has quit [Ping timeout: 265 seconds]
henistein has joined #osdev
bauen1 has joined #osdev
<mrvn>
Why do people always ask: How to do X without the-one-feature-required-to-do X?
<clever>
mrvn: maybe they got half way to the solution, and think that is the only way there
<clever>
and are trying to help the helpers, to know where to start from
<bslsk05>
drewdevault.com: Porting Doom to Helios
<heat>
ddevault, congrats!
<ddevault>
thanks!
<heat>
i've never even tried it
<heat>
at this point i'll just wait for my opengl support first lol
<ddevault>
it's easy if your OS already has the important pieces, especially if it's a Unix-like OS
<ddevault>
doom does not use OpenGL
<heat>
it can though
<klange>
Hm, if I let the demo play it GPFs just a few seconds in.
<ddevault>
yeah, when the demo picks up the shotgun
<ddevault>
known issue, don't really care to fix it
<ddevault>
just start the game before that happens ;)
<heat>
WONTFIX
<ddevault>
or debug it and send a patch, it's just a null dereference which can probably be fixed fairly easily
<heat>
why does a null deref get a gpf
<ddevault>
make gdb/make gdbc will respectively start the VM with gdb remote and connect to it in a shell
<j`ey>
I dunno how to start the game, always goes to demo for me
<ddevault>
press enter until you enter gameplay
<ddevault>
but if your PC is fast enough it will probably hit the shotgun and crash before you have a chance to, see timing issues mentioned in the post
<j`ey>
doesnt work *shrug*
<klange>
I know upstream doomgeneric still has the finetangent buffer overrun; that segfaulted in my aarch64 builds 'cause the table was ending up at the end of a segment
<ddevault>
oh, and you need the doom branch of helios
<ddevault>
which expands the initial cspace size and configures the framebuffer appropriately
henistein has quit [Quit: Client closed]
<heat>
you'd never have a buffer overrun if it was written in R U S T
the_lanetly_052_ has quit [Ping timeout: 255 seconds]
<mrvn>
When they designed clang why did they make the frontend compile all codes for a stack machine just so the middle end can then compile that into SSA eliminating all the memory accesses first thing?
<heat>
because they designed llvm and not clang
<heat>
clang was just something they built on top of it
<mrvn>
doesn't change the question.
<heat>
not using llvm would've been horrible for clang and llvm
<j`ey>
makes it simpler to write frontends
<mrvn>
j`ey: that's the point I would disagree with
<heat>
in fact AFAIK llvm was a virtual machine before it ever was a backend
<j`ey>
mrvn: well that is why
<heat>
stack based vms aren't crazy :)
<mrvn>
a IL with unlimited registers would have been easier
<j`ey>
llvm has unlimited registers
Bonstra has quit [Quit: Pouf c'est tout !]
Bonstra has joined #osdev
<mrvn>
j`ey: only once it's turned into SSA
<j`ey>
it always has unlimited registers
Bonstra has quit [Client Quit]
Bonstra has joined #osdev
<mrvn>
How does llvm deal with spilled registers and setjmp/longjmp? Does it always spill registers the same way on every function call?
<mrvn>
or does it switch ways when it sees a setjmp?
gdd1 has quit [Ping timeout: 255 seconds]
gdd1 has joined #osdev
gdd1 has quit [Excess Flood]
gdd1 has joined #osdev
Bonstra has quit [Quit: Pouf c'est tout !]
Bonstra has joined #osdev
gdd1 has quit [Excess Flood]
gdd1 has joined #osdev
<zid>
heat you're a rust professional
<zid>
does it have designated initializers
<zid>
or does this guy have to write out 256 zeros for his array that I implemented via {[3] = "hello", [7] = "meow"} etc
<zid>
for this LUT
<mrvn>
does rust allow uninitialized variables at all?
<heat>
i think that at the end of the day the US prison system needs a good and thoughful reform so that ex-inmates can live a normal life after their sentence, reducing inequality and stopping them from becoming repeat offenders
<heat>
i help that answers your question
<heat>
hope*
<j`ey>
zid: it doesnt have that C way like that, no
Bonstra has quit [Quit: Pouf c'est tout !]
<heat>
please feel free to reach out to me if you have any more rust answers I can question
Bonstra has joined #osdev
<j`ey>
you can make an array with all 0s, then fill in with foo[3] = 'hello' etc
ethrl_ is now known as ethrl
<heat>
j`ey, hello local linux kernel business rep
<heat>
what does KBUILD_BUILD_VERSION do
<heat>
it's included in uname -v and it's bothering me
<j`ey>
thats all it does
<heat>
"#1 SMP PREEMPT_DYNAMIC Sat, 25 Jun 2022 20:22:01 +0000" WHAT IS HASHTAG ONE
<heat>
is it just something you manually increment for some reason?
<bslsk05>
queue.acm.org: Linear Address Spaces - ACM Queue
<zid>
This reads like one of those rants by a guy who thinks his teeth are talking to him
<mrvn>
GeDaMo: what's your point?
Ameisen has quit [Quit: Quitting]
Ameisen has joined #osdev
<GeDaMo>
No point, I thought it might be of interest
<mrvn>
I'm not sue what his point is actually.
<mrvn>
sure
<mrvn>
Does he wan't just a software controlled TLB cache? or does he want type and range checked pointers?
<mrvn>
He glorifies having tagged addressess but then vilifies CHERI which tags pointers.#
<mrvn>
but it gives him great hope.
<zid>
"TLB misses are annoying so I won't support arrays"
<zid>
not exactly an amazing take
<mrvn>
"The very first thing any realtime nucleus or operating system kernel does is implement an abstract object store on top of the linear space." What is that supposed to be? I just have a virtual Address space that gets used up linearly till it runs out (and then it should loop around).
<gorgonical>
mrvn: I took that to mean the slab allocator?
<gorgonical>
I think that's what he means
<gorgonical>
I also think his take on CHERI is really strange -- I see it as a really interesting way to "revive" segmentation with a modern take
<mrvn>
From what I understand it implements the C/C++ model of a pointer into memory. It has a start and and end and you can subdivide the memory. Each subdivision may only access memory within it's own start/end.
<mrvn>
After some dvisions you create objects via a return from new or an allocator.
theruran has joined #osdev
gxt_ has joined #osdev
gxt has quit [Remote host closed the connection]
GeDaMo has quit [Quit: There is as yet insufficient data for a meaningful answer.]