mirror of https://github.com/torvalds/linux.git
The generic vDSO library uses the UAPI headers. On arm64 __BITS_PER_LONG is
always '64' even when used from the compat vDSO. In that case __GENMASK()
does an illegal bitshift, invoking undefined behaviour.
Change __BITS_PER_LONG to also work when used from the comapt vDSO.
To not confuse real userspace, only do this when building the kernel.
Reported-by: John Stultz <jstultz@google.com>
Closes: https://lore.kernel.org/lkml/CANDhNCqvKOc9JgphQwr0eDyJiyG4oLFS9R8rSFvU0fpurrJFDg@mail.gmail.com/
Fixes:
|
||
|---|---|---|
| .. | ||
| Kbuild | ||
| auxvec.h | ||
| bitsperlong.h | ||
| bpf_perf_event.h | ||
| byteorder.h | ||
| fcntl.h | ||
| hwcap.h | ||
| kvm.h | ||
| mman.h | ||
| param.h | ||
| perf_regs.h | ||
| posix_types.h | ||
| ptrace.h | ||
| setup.h | ||
| sigcontext.h | ||
| signal.h | ||
| statfs.h | ||
| sve_context.h | ||
| ucontext.h | ||
| unistd.h | ||