8b8cf4ece6
This also fixes a minor issue that was missed in the initial review; the layout of the MFD_HUGE_* flags is actually not 1:1 bit:flag -- it instead borrowed the Linux convention of how this is laid out since it was originally implemented on Linux, the top 6 bits represent the shift required for the requested page size. This allows us to remove the flag <-> pgsize mapping table and simplify the logic just prior to validation of the requested page size. While we're here, fix two small nits: - HUGETLB memfd shouldn't exhibit the SHM_GROW_ON_WRITE behavior. We can only grow largepage shm by appropriately aligned (i.e. requested pagesize) sizes, so it can't work in the typical/sane fashion. Furthermore, Linux does the same, so let's be compatible. - We don't allow MFD_HUGETLB without specifying a pagesize, so no need to check for that later. Reviewed by: kib (slightly earlier version) |
||
---|---|---|
.. | ||
aarch64 | ||
amd64 | ||
arm | ||
capability | ||
compat-43 | ||
db | ||
gdtoa | ||
gen | ||
gmon | ||
i386 | ||
iconv | ||
include | ||
inet | ||
isc | ||
locale | ||
md | ||
mips | ||
nameser | ||
net | ||
nls | ||
posix1e | ||
powerpc | ||
powerpc64 | ||
powerpcspe | ||
quad | ||
regex | ||
resolv | ||
riscv | ||
rpc | ||
secure | ||
softfloat | ||
stdio | ||
stdlib | ||
stdtime | ||
string | ||
sys | ||
tests | ||
uuid | ||
x86 | ||
xdr | ||
yp | ||
libc_nossp.ldscript | ||
libc.ldscript | ||
Makefile | ||
Makefile.depend | ||
Makefile.depend.options | ||
Versions.def |