linux/arch/mips
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
..
alchemy
ar7
ath25
ath79
bcm47xx
bcm63xx MIPS: BCM63XX: drop unused and broken DSP platform device 2020-01-27 14:50:10 +01:00
bmips
boot MIPS: Truncate link address into 32bit for 32bit kernel 2020-06-22 09:05:15 +02:00
cavium-octeon MIPS: OCTEON: add missing put_device() call in dwc3_octeon_device_init() 2020-08-19 08:14:58 +02:00
cobalt
configs This is the 4.19.134 stable release 2020-07-22 13:03:12 +02:00
crypto UPSTREAM: crypto: {arm,arm64,mips}/poly1305 - remove redundant non-reduction from emit 2020-10-25 11:47:56 +01:00
dec
emma
fw
generic
include UPSTREAM: page flags: prioritize kasan bits over last-cpuid 2020-11-16 09:22:35 +01:00
jazz
jz4740
kernel This is the 4.19.144 stable release 2020-09-09 19:48:58 +02:00
kvm This is the 4.19.147 stable release 2020-09-24 12:48:04 +02:00
lantiq
lasat
lib
loongson32
loongson64 MIPS: Loongson: Fix potential NULL dereference in loongson3_platform_init() 2020-02-24 08:34:37 +01:00
math-emu
mm MIPS: mm: BMIPS5000 has inclusive physical caches 2020-09-09 19:04:24 +02:00
mti-malta
net bpf, mips: Limit to 33 tail calls 2020-01-12 12:17:12 +01:00
netlogic
oprofile
paravirt
pci
pic32
pistachio
pmcs-msp71xx
pnx833x
power
ralink
rb532
sgi-ip22
sgi-ip27
sgi-ip32
sibyte
sni MIPS: SNI: Fix spurious interrupts 2020-09-23 12:11:00 +02:00
tools
txx9
vdso UPSTREAM: MIPS: VDSO: Fix build for binutils < 2.25 2020-11-16 09:22:34 +01:00
vr41xx
Kbuild
Kbuild.platforms
Kconfig This is the 4.19.147 stable release 2020-09-24 12:48:04 +02:00
Kconfig.debug
Makefile UPSTREAM: crypto: mips/chacha - wire up accelerated 32r2 code from Zinc 2020-10-24 14:43:39 +02:00
Makefile.postlink MIPS: fix indentation of the 'RELOCS' message 2020-02-11 04:33:58 -08:00