1
0
Fork 0
alistair23-linux/arch/mips
Arnd Bergmann ee38d94a0a 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>
2019-08-03 07:02:01 -07:00
..
alchemy treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
ar7 The main MIPS changes for a pretty light v5.3 cycle, including: 2019-07-17 09:42:03 -07:00
ath25 PCI: consolidate PCI config entry in drivers/pci 2018-11-23 11:45:34 +09:00
ath79 The main MIPS changes for a pretty light v5.3 cycle, including: 2019-07-17 09:42:03 -07:00
bcm47xx treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
bcm63xx MIPS: fix some more fall through errors in arch/mips 2019-07-16 12:40:16 +01:00
bmips docs: arm: convert docs to ReST and rename to *.rst 2019-07-15 09:20:24 -03:00
boot The main MIPS changes for a pretty light v5.3 cycle, including: 2019-07-17 09:42:03 -07:00
cavium-octeon The main MIPS changes for a pretty light v5.3 cycle, including: 2019-07-17 09:42:03 -07:00
cobalt treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
configs The main MIPS changes for a pretty light v5.3 cycle, including: 2019-07-17 09:42:03 -07:00
crypto MIPS: crypto: Add crc32 and crc32c hw accelerated module 2018-02-19 20:50:36 +00:00
dec treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
emma treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
fw treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
generic treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
include This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
jazz MIPS: use the generic uncached segment support in dma-direct 2019-06-03 16:00:08 +02:00
jz4740 This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
kernel The main MIPS changes for a pretty light v5.3 cycle, including: 2019-07-17 09:42:03 -07:00
kvm KVM: Directly return result from kvm_arch_check_processor_compat() 2019-06-04 19:27:32 +02:00
lantiq The main MIPS changes for a pretty light v5.3 cycle, including: 2019-07-17 09:42:03 -07:00
lasat treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
lib treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 504 2019-06-19 17:09:56 +02:00
loongson32 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
loongson64 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
math-emu treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 454 2019-06-19 17:09:09 +02:00
mm dma-mapping updates for Linux 5.3 2019-07-12 15:13:55 -07:00
mti-malta treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
net treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
netlogic treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
oprofile Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
paravirt mips: unify prom_putchar() declarations 2018-07-17 09:40:17 -07:00
pci treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pic32 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 445 2019-06-05 17:37:18 +02:00
pistachio A batch of MIPS fixes: 2019-06-08 13:09:31 -07:00
pmcs-msp71xx treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
pnx833x A batch of MIPS fixes: 2019-06-08 13:09:31 -07:00
power treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 305 2019-06-05 17:37:04 +02:00
ralink treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
rb532 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
sgi-ip22 Merge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2019-07-08 21:48:15 -07:00
sgi-ip27 Merge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2019-07-08 21:48:15 -07:00
sgi-ip32 Merge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2019-07-08 21:48:15 -07:00
sibyte treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
sni treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 210 2019-05-30 11:29:53 -07:00
tools treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
txx9 A batch of MIPS fixes: 2019-06-08 13:09:31 -07:00
vdso page flags: prioritize kasan bits over last-cpuid 2019-08-03 07:02:01 -07:00
vr41xx treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
Kbuild treewide: Add SPDX license identifier - Kbuild 2019-05-30 11:32:33 -07:00
Kbuild.platforms treewide: Add SPDX license identifier - Kbuild 2019-05-30 11:32:33 -07:00
Kconfig dma-mapping updates for Linux 5.3 2019-07-12 15:13:55 -07:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile MIPS: have "plain" make calls build dtbs for selected platforms 2019-06-20 14:52:56 -07:00
Makefile.postlink License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00