mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-29 07:34:06 +08:00
89087c456f
Maps of per-cpu type have their value element size adjusted to 8 if it
is specified smaller during various map operations.
This makes test_maps as a 32-bit binary fail, in fact the kernel
writes past the end of the value's array on the user's stack.
To be quite honest, I think the kernel should reject creation of a
per-cpu map that doesn't have a value size of at least 8 if that's
what the kernel is going to silently adjust to later.
If the user passed something smaller, it is a sizeof() calcualtion
based upon the type they will actually use (just like in this testcase
code) in later calls to the map operations.
Fixes:
|
||
---|---|---|
.. | ||
.gitignore | ||
bpf_util.h | ||
config | ||
Makefile | ||
test_kmod.sh | ||
test_lpm_map.c | ||
test_lru_map.c | ||
test_maps.c | ||
test_tag.c | ||
test_verifier.c |