diff options
| author | Milton Miller <[email protected]> | 2020-07-16 09:37:04 +1000 |
|---|---|---|
| committer | Michael Ellerman <[email protected]> | 2020-07-16 13:12:47 +1000 |
| commit | a9f675f950a07d5c1dbcbb97aabac56f5ed085e3 (patch) | |
| tree | 4bc45d6637669d6ae3aa689cb2e347ea12782336 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 77ca3951cc37727ae8361d583a30da7a1b84e427 (diff) | |
powerpc/vdso: Fix vdso cpu truncation
The code in vdso_cpu_init that exposes the cpu and numa node to
userspace via SPRG_VDSO incorrctly masks the cpu to 12 bits. This means
that any kernel running on a box with more than 4096 threads (NR_CPUS
advertises a limit of of 8192 cpus) would expose userspace to two cpu
contexts running at the same time with the same cpu number.
Note: I'm not aware of any distro shipping a kernel with support for more
than 4096 threads today, nor of any system image that currently exceeds
4096 threads. Found via code browsing.
Fixes: 18ad51dd342a7eb09dbcd059d0b451b616d4dafc ("powerpc: Add VDSO version of getcpu")
Signed-off-by: Milton Miller <[email protected]>
Signed-off-by: Anton Blanchard <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions