linux/include
Arnd Bergmann 7783c5c8ec UPSTREAM: page flags: prioritize kasan bits over last-cpuid
ARM64 randdconfig builds regularly run into a build error, especially
when NUMA_BALANCING and SPARSEMEM are enabled but not SPARSEMEM_VMEMMAP:

  #error "KASAN: not enough bits in page flags for tag"

The last-cpuid bits are already contitional on the available space, so
the result of the calculation is a bit random on whether they were
already left out or not.

Adding the kasan tag bits before last-cpuid makes it much more likely to
end up with a successful build here, and should be reliable for
randconfig at least, as long as that does not randomize NR_CPUS or
NODES_SHIFT but uses the defaults.

In order for the modified check to not trigger in the x86 vdso32 code
where all constants are wrong (building with -m32), enclose all the
definitions with an #ifdef.

[arnd@arndb.de: build fix]
  Link: http://lkml.kernel.org/r/CAK8P3a3Mno1SWTcuAOT0Wa9VS15pdU6EfnkxLbDpyS55yO04+g@mail.gmail.com
Link: http://lkml.kernel.org/r/20190722115520.3743282-1-arnd@arndb.de
Link: https://lore.kernel.org/lkml/20190618095347.3850490-1-arnd@arndb.de/
Fixes: 2813b9c029 ("kasan, mm, arm64: tag non slab memory allocated via pagealloc")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Andrey Konovalov <andreyknvl@google.com>
Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Andrey Konovalov <andreyknvl@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit ee38d94a0a)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I71d6f45d73cea80456a0e0b256221ba62216c86c
2020-11-16 09:22:35 +01:00
..
acpi x86: ACPI: fix CPU hotplug deadlock 2020-04-23 10:30:20 +02:00
asm-generic This is the 4.19.156 stable release 2020-11-10 13:23:09 +01:00
clocksource ANDROID: GKI: drivers: clksource: Add API to return cval 2020-04-02 23:32:47 +00:00
crypto UPSTREAM: crypto: x86/chacha-sse3 - use unaligned loads for state array 2020-10-25 11:48:06 +01:00
drm Revert "drm/dsi: Fix byte order of DCS set/get brightness" 2020-07-01 18:58:38 +00:00
dt-bindings
keys KEYS: Don't write out to userspace while holding key semaphore 2020-04-23 10:30:24 +02:00
kvm
linux UPSTREAM: page flags: prioritize kasan bits over last-cpuid 2020-11-16 09:22:35 +01:00
math-emu
media ANDROID: media: increase video max frame number 2020-04-16 23:00:21 +00:00
memory
misc
net UPSTREAM: ipv6: ndisc: RFC-ietf-6man-ra-pref64-09 is now published as RFC8781 2020-11-16 07:43:08 +01:00
pcmcia
ras
rdma RDMA/core: Fix double destruction of uobject 2020-06-03 08:19:43 +02:00
scsi This is the 4.19.154 stable release 2020-10-30 11:43:26 +01:00
soc irqchip/eznps: Fix build error for !ARC700 builds 2020-09-17 13:45:25 +02:00
sound This is the 4.19.135 stable release 2020-07-29 13:22:30 +02:00
target scsi: target: fix hang when multiple threads try to destroy the same iscsi session 2020-04-21 09:03:11 +02:00
trace This is the 4.19.154 stable release 2020-10-30 11:43:26 +01:00
uapi ANDROID: fuse: Add support for d_canonical_path 2020-11-09 13:11:29 +00:00
vdso UPSTREAM: vdso: Fix clocksource.h macro detection 2020-05-03 16:11:10 +00:00
video
xen xen/events: add a new "late EOI" evtchn framework 2020-11-05 11:08:36 +01:00