Conversation

Lorenzo Stoakes

oh shit what have I done
3
0
2
Trying to wrap my head around is_mergeable_anon_vma()
1
0
0

DougMerritt (log😅 = 💧log😄)

@ljs
Every line has a bug, which one are you referring to?

1
0
2
@jarkko after a fork there will be >1 anon_vma_chain objects, meaning the anon_vma would point at the parent anon_vma and merging with another vma without an anon_vma would be incorrect.

anon_vma handling is very, very fiddly exactly because of forking.

My book covers this ;)
1
0
2

DougMerritt (log😅 = 💧log😄)

@ljs
Always! Comments straight out lie, pay no attention to them. Even if you're the one who wrote them. They'll still lie to you.

1
0
1
@ljs Thanks! Is your book already in sale? I'll buy it for sure! BTW, just a suggestion but I'd add a short kdoc explaining "the obvious" ;-) It is a small function but getting its logic enrolls the gist of these changes pretty well. Great starting point for studying this code!

I can imagine it being fiddly given just experiences we had when trying to make SGX enclaves work without having the close callback (to address issue with merges, and enclaves do fork and can be even sent with SCM_RIGHTS and shared by multiple mm_structs's).
1
0
0
@ljs Just interested on topic because we tried to solve bunch of bottlenecks with SGX and mm locally in that stack. Like for instance we fought a lot with open device files, reserved memory which is also shared memory and do_exit() flow.
1
0
0

Jarkko Sakkinen

Edited 1 month ago
@ljs I'm waiting for the book, I'm really into memory management stuff so buying it is a no-brainer for me. I learned quite a bit of internals when working SGX so looking forward to build on top of that :-) Especially this VMA merge stuff is interesting given that I have had my fights with that side of mm.
0
0
0

HAMMER SMASHED FILESYSTEM 🇺🇦

@ljs when ran through cpp this expands to satanic verses

1
0
1