mirror of https://github.com/torvalds/linux.git
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:
|
||
|---|---|---|
| .. | ||
| bpf | ||
| breakpoints | ||
| capabilities | ||
| cpu-hotplug | ||
| cpufreq | ||
| drivers/gpu | ||
| efivarfs | ||
| exec | ||
| filesystems | ||
| firmware | ||
| ftrace | ||
| futex | ||
| gpio | ||
| ia64 | ||
| intel_pstate | ||
| ipc | ||
| kcmp | ||
| lib | ||
| locking | ||
| media_tests | ||
| membarrier | ||
| memfd | ||
| memory-hotplug | ||
| mount | ||
| mqueue | ||
| net | ||
| networking/timestamping | ||
| nsfs | ||
| ntb | ||
| powerpc | ||
| prctl | ||
| pstore | ||
| ptp | ||
| ptrace | ||
| rcutorture | ||
| seccomp | ||
| sigaltstack | ||
| size | ||
| splice | ||
| static_keys | ||
| sync | ||
| sysctl | ||
| timers | ||
| user | ||
| vDSO | ||
| vm | ||
| watchdog | ||
| x86 | ||
| zram | ||
| .gitignore | ||
| Makefile | ||
| gen_kselftest_tar.sh | ||
| kselftest.h | ||
| kselftest_install.sh | ||
| lib.mk | ||