<bslsk05>
lore.kernel.org: Re: [PATCH 07/32] mm: Bring back vmalloc_exec - Kent Overstreet
Arthuria has quit [Ping timeout: 240 seconds]
<morgan>
oh there it is
[itchyjunk] has quit [Ping timeout: 240 seconds]
[itchyjunk] has joined #osdev
<zid>
aww I ran out of thread
<zid>
heat: Did you figure out why he's so obsessed with making a jit, rather than just pre-writing the output of his jit?
<morgan>
he says he benched it and it was worse
<zid>
if it's "a few versions, that are 50 bytes each, and we pack them into a single page" surely he could just fucking.. provide an #ifdef x86 asm() block
<morgan>
mm
<zid>
no he benched a guessed implementation of what the other guy was saying for one C variant
<morgan>
yeah but that's his justification
<heat>
i think his filesystem does like a completely dynamic layout
<morgan>
i don't think it's a *good* justification
<heat>
so you get a few versions, but you can't know what those few versions are beforehand
xenos1984 has quit [Read error: Connection reset by peer]
<zid>
I don't understand how there can enough enough dynamism that I can't do an 'attack' and provide a fs with every possible variant
<zid>
meaning every single variant needs to be compiled and kept
<zid>
so that's no an argument over pre-writing the variants imo
xenos1984 has joined #osdev
<zid>
I also recursively don't understand *why* it's dynamic enough that there isn't a common case, the fuck is he up to lol
Ameisen has quit [Server closed connection]
Ameisen has joined #osdev
goliath has quit [Quit: SIGSEGV]
Andrew has quit [Killed (lithium.libera.chat (Nickname regained by services))]
AndrewYu has joined #osdev
gog has quit [Ping timeout: 240 seconds]
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
rnicholl1 has joined #osdev
<rnicholl1>
Question about ARMv8a MMU, when the stride determined by TGx doesn't evenly divine the bits left over by TxSZ and TGx after the ignored bits and page walk bits are taken out, what happens? Does the first table become shorter or the last one?
<rnicholl1>
I tried asking chat gpt but I got nonsense answers :/
<rnicholl1>
"To clarify, let's consider an example: Suppose TxSZ for a specific level is 9, TGx is 4, and the remaining bits after ignoring the bits and page walk bits are 11. In this case, the stride (TGx) cannot evenly divide the remaining 11 bits, as 11 is not divisible by 4. Consequently, the number of entries in the translation table for that level will be adjusted to account for the mismatch."
terminalpusher has joined #osdev
<rnicholl1>
3.5 says it will shorten the last entry and gpt 4 says it shortens the first table :/
<bslsk05>
developer.arm.com: Documentation – Arm Developer
<xenos1984>
I just checked that the sections numbers have changed - page D8-5830 in that manual has it.
<xenos1984>
"For a stage 1 translation in the 4KB translation granule, depending on the IA size, the initial lookup level is indexed by up to 9 bits and all remaining lookup levels are indexed by exactly 9 bits."
<xenos1984>
or page D8-5837 for 16KB granule size.
relipse has quit [Server closed connection]
relipse has joined #osdev
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
terminalpusher has joined #osdev
<sham1>
Maw
Arthuria has joined #osdev
GeDaMo has joined #osdev
nadja has quit [Server closed connection]
nadja has joined #osdev
[itchyjunk] has quit [Read error: Connection reset by peer]
Arthuria has quit [Ping timeout: 258 seconds]
Vercas has quit [Remote host closed the connection]
Vercas has joined #osdev
zxrom has quit [Quit: Leaving]
zxrom has joined #osdev
xenos1984 has quit [Ping timeout: 240 seconds]
xenos1984 has joined #osdev
xenos1984 has quit [Ping timeout: 260 seconds]
xenos1984 has joined #osdev
benlyn has joined #osdev
<sortie>
<mjg> sortie: whoa there, you hosting sortix on baremetal with qemu support?
<sortie>
^ Yeah. I mean that screenshot was made in qemu itself but I could totally do this on a real machinne
<sortie>
Although the /dev/ata0 forwarding trick only works if I boot off a CD
<sham1>
Most impressive
PapaFrog has quit [Remote host closed the connection]
terminalpusher has quit [Remote host closed the connection]
gmacd has joined #osdev
goliath has joined #osdev
gmacd has quit [Ping timeout: 240 seconds]
wootehfoot has joined #osdev
toastloop has joined #osdev
xenos1984 has quit [Ping timeout: 240 seconds]
xenos1984 has joined #osdev
geist has quit [Server closed connection]
geist has joined #osdev
heat has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
xenos1984 has quit [Ping timeout: 240 seconds]
xenos1984 has joined #osdev
<mcrod>
hi
DynamiteDan has quit [Excess Flood]
DynamiteDan has joined #osdev
DynamiteDan has quit [Excess Flood]
DynamiteDan has joined #osdev
DynamiteDan has quit [Excess Flood]
DynamiteDan has joined #osdev
rnicholl1 has joined #osdev
<rnicholl1>
xenos1984 thanks
<rnicholl1>
Would it be normal if I reserved certain memory ranges in the OS for some data?
<rnicholl1>
for example, I was thinking of putting a system call table at a fixed address in memory
<rnicholl1>
it seems like the right place to put it would be 0x0000_0000_0001_0000 maybe?
<rnicholl1>
but I understand some binaries want to run at a specific location in memory right?
DynamiteDan has quit [Excess Flood]
DynamiteDan has joined #osdev
DynamiteDan has quit [Excess Flood]
<geist>
it's not particularly normal to do that no
DynamiteDan has joined #osdev
<geist>
syscalls are usuaally made to the kernel via a trapped instruction, so the table doesn't need to be in any particular place
<geist>
but you could have a library or whatnot that is mapped into user space with the traps in them
<geist>
in which case then what you're talking about is kinda true, but even that doesn't necessarily have to be in a fixed location if you make the library relocatable
<sham1>
This starts to sound like vDSOs
nanovad has joined #osdev
DynamiteDan has quit [Excess Flood]
<mjg>
what is meant by system call table in this context tho
<mjg>
like the actual table kernels normally use to go from syscall number to the func which implemnets it?
<geist>
yeah that's why i didn't go into too much more data until they responded
<geist>
it could be a vdso, could be in the kernel, etc. not sure what they're asking about yet
<rnicholl1>
yeah basically a vdso
<geist>
ah. okay. in that case you could hypothetically put it in the kernel, like say -1MB
frkzoid has quit [Ping timeout: 240 seconds]
<geist>
some OSes do that on some architectures
<geist>
darwin on arm32, for example, i think upt the 'commpage' at something like -64K
<geist>
or you could do something like put it at the end of the user address space - some distance
<geist>
or you could export it as a full ELF binary or whatnot and have the user space dynamic linker link it in somewhere
<geist>
or just make it fully relocatable so user space can plonk it where it wants
DynamiteDan has joined #osdev
DynamiteDan has quit [Excess Flood]
DynamiteDan has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
zxrom_ has joined #osdev
zxrom has quit [Ping timeout: 258 seconds]
zxrom_ is now known as zxrom
vdamewood has quit [Quit: Life beckons]
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<heat>
doing fixed addresses is a bad idea
<heat>
see vsyscall
<heat>
it completely defeats ASLR by giving attackers a useful, fixed gadged by which they can make arbitrary syscalls
<heat>
linux goes around it by either not having vsyscall at all (because it sucks, is old and completely surpassed by vdso) or by doing emulation of syscalls only at the functions' *entry points*
<heat>
like jmp __vsyscall_clock_gettime works, jmp __vsyscall_clock_gettime+<syscall insn offset> does not
* Ermine
pets gog
<heat>
also worth noting that the linux vDSO is not a full shared object (i.e it's completely position independent) and as such does not need to get linked explicitly
<gog>
hi
* gog
prr
lsdeesm has joined #osdev
<lsdeesm>
Hi, are there any books/tutorials about simple network integrations?
<sham1>
Define "simple" and "network integration"
<heat>
what's a network integration
<lsdeesm>
recommend any books or tutorials that guide through the process of implementing a basic networking stack in a custom operating system? I am interested in understanding the low-level details including device drivers, packet sending/receiving, and handling of basic networking protocols.
<heat>
not really
<lsdeesm>
:c
<heat>
you have the standard books which are pretty good at explaining networking, also unix network programming can give you *some* insights into how networking + sockets works
<heat>
but none of these will tell you how to do it
<rnicholl1>
ASLR is mostly just a way to like... work around C bugs
<rnicholl1>
if you don't code in C. those bugs aren't impactful
<rnicholl1>
so rust or go for example
<sham1>
Or C# if you're Singularityu
<heat>
oh yes definitely, no exploits have been found for other programs, ever
<heat>
just C
<rnicholl1>
I mean, that ASLR addresses?
<rnicholl1>
I think that's a C and c++ problem for the most part
<rnicholl1>
maybe fortran if anyone uses that sitll
<sham1>
Fortran is used for numeric stuff
<sham1>
heat: I do get your point. However... many of these problems are more prevalent in C, and while that doesn't make it a bad language anyhow, it's certainly something to be considered
<heat>
confidently saying "oh yes, these languages are all IMMUNE from rop or address attacks" is what got us into this mess in the first place
<heat>
defense-in-depth, not defense-in-haha-great-language-perfect
ThinkT510 has quit [Quit: WeeChat 3.8]
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
<mcrod>
from a security perspective, all guarantees are lies until you yourself have proven them otherwise in your own software
rnicholl1 has joined #osdev
<mcrod>
although I did work at a company which rolled their own crypto
<mcrod>
so, there aren't many smart people in the world.
<kof123>
that's why i only write asm. all these weird languages with all these exploits
DynamiteDan has quit []
<mcrod>
heat: wait until we start going to space with unchecked Rust code
ThinkT510 has joined #osdev
<mcrod>
hm, where's gog
<heat>
mcrod, some random crate.io crate gets hijacked and suddenly the ISS starts falling from orbit
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
<sham1>
I can't hear you from Lisp perfection
<kof123>
those who live in glass houses...are liable to be featured in a john wick movie
wootehfoot has quit [Quit: Leaving]
<gog>
hi
<sham1>
hi
<gog>
i looked into cosmos and i'll either need to use my visual studio subscription from work or download a 20-some gig vm with visual studio community installed
<gog>
or figure out how to run it on linux
<gog>
maybe i'll just keep writing in c
<heat>
yes
<heat>
cccccccccccccc
<gog>
c c c c c
<gog>
forget libraries or integrated build systems or all of that
<gog>
if you're not writing it yourself by reimplementing a subset of it and poorly then you're doing it wrong
<heat>
integrated build systems? more like intecrapped buildumb shitstems
<heat>
gnu make poggers
<gog>
yes
<gog>
make make make
<sham1>
gog make
<heat>
gnu gog
<heat>
gcc gog compiler collection
<gog>
what you call gog is actulaly gog/linux
<gog>
gnu gog/killumos
<heat>
i'm going to revive glibc/kFreeBSD
<gog>
why would yo do something like that
<gog>
sorry
<gog>
you do you friend
<gog>
i'll support u
<heat>
annoy freebsd people
<gog>
oh ok i'm in then
<heat>
luuk at what i did with ur kernal mr mckusick
<heat>
its doing the gnu
eau has joined #osdev
lsdeesm has quit [Ping timeout: 240 seconds]
rnicholl1 has joined #osdev
<sham1>
you wouldn't dare
<mjg>
why not annoy illumos people
<mjg>
:(
<mjg>
or are they already sufficiently annoyed
<mcrod>
gog may I pet you
Bonstra has quit [Quit: Pouf c'est tout !]
Bonstra has joined #osdev
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
kerravon has joined #osdev
lsdeesm has joined #osdev
xenos1984 has quit [Read error: Connection reset by peer]
<lsdeesm>
Do you think it's possible, against all odds and rationality, to build an operating system entirely using Python? I know, I know, Python is often seen as a "slow" language, but imagine the potential for memes D:
<mcrod>
not python, but can give you some insights
benlyn has joined #osdev
rnicholl1 has joined #osdev
<kof123>
ditto...a question of how much work one is willing to put in https://en.wikipedia.org/wiki/Reflection_(computer_science) Reflection can be implemented for languages without built-in reflection by using a program transformation system to define automated source-code changes.
<kof123>
aka my little preprocessor pragma is magic
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
rnicholl1 has joined #osdev
<lsdeesm>
I assume learning assembly language is most needed in OS dev :D
Arthuria has joined #osdev
lsdeesm has quit [Quit: WeeChat 3.8]
<heat>
mjg, what illumos people
* kof123
i predicted this joke and kept my mouth shut
<heat>
have you met an "illumos" "person"? i haven't
slidercrank has quit [Ping timeout: 252 seconds]
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
vdamewood has joined #osdev
kerravon has quit [Ping timeout: 246 seconds]
unjust has joined #osdev
rnicholl1 has joined #osdev
Left_Turn has quit [Read error: Connection reset by peer]
<gog>
mcrod: yes
* mcrod
pets gog
unjust has left #osdev [#osdev]
goliath has quit [Quit: SIGSEGV]
nyah has quit [Quit: leaving]
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]