2019-03-17 05:01:09 +03:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
#
|
|
|
|
# asm headers that all architectures except um should have
|
|
|
|
# (This file is not included when SRCARCH=um since UML borrows several
|
|
|
|
# asm headers from the host architecutre.)
|
2019-07-29 12:55:21 +03:00
|
|
|
|
2020-04-02 07:03:12 +03:00
|
|
|
mandatory-y += atomic.h
|
random: remove CONFIG_ARCH_RANDOM
When RDRAND was introduced, there was much discussion on whether it
should be trusted and how the kernel should handle that. Initially, two
mechanisms cropped up, CONFIG_ARCH_RANDOM, a compile time switch, and
"nordrand", a boot-time switch.
Later the thinking evolved. With a properly designed RNG, using RDRAND
values alone won't harm anything, even if the outputs are malicious.
Rather, the issue is whether those values are being *trusted* to be good
or not. And so a new set of options were introduced as the real
ones that people use -- CONFIG_RANDOM_TRUST_CPU and "random.trust_cpu".
With these options, RDRAND is used, but it's not always credited. So in
the worst case, it does nothing, and in the best case, maybe it helps.
Along the way, CONFIG_ARCH_RANDOM's meaning got sort of pulled into the
center and became something certain platforms force-select.
The old options don't really help with much, and it's a bit odd to have
special handling for these instructions when the kernel can deal fine
with the existence or untrusted existence or broken existence or
non-existence of that CPU capability.
Simplify the situation by removing CONFIG_ARCH_RANDOM and using the
ordinary asm-generic fallback pattern instead, keeping the two options
that are actually used. For now it leaves "nordrand" for now, as the
removal of that will take a different route.
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Borislav Petkov <bp@suse.de>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-07-05 21:48:41 +03:00
|
|
|
mandatory-y += archrandom.h
|
2020-04-02 07:03:12 +03:00
|
|
|
mandatory-y += barrier.h
|
|
|
|
mandatory-y += bitops.h
|
|
|
|
mandatory-y += bug.h
|
|
|
|
mandatory-y += bugs.h
|
|
|
|
mandatory-y += cacheflush.h
|
|
|
|
mandatory-y += checksum.h
|
|
|
|
mandatory-y += compat.h
|
|
|
|
mandatory-y += current.h
|
|
|
|
mandatory-y += delay.h
|
|
|
|
mandatory-y += device.h
|
|
|
|
mandatory-y += div64.h
|
|
|
|
mandatory-y += dma-mapping.h
|
|
|
|
mandatory-y += dma.h
|
|
|
|
mandatory-y += emergency-restart.h
|
|
|
|
mandatory-y += exec.h
|
|
|
|
mandatory-y += fb.h
|
|
|
|
mandatory-y += ftrace.h
|
|
|
|
mandatory-y += futex.h
|
|
|
|
mandatory-y += hardirq.h
|
|
|
|
mandatory-y += hw_irq.h
|
|
|
|
mandatory-y += io.h
|
|
|
|
mandatory-y += irq.h
|
|
|
|
mandatory-y += irq_regs.h
|
|
|
|
mandatory-y += irq_work.h
|
|
|
|
mandatory-y += kdebug.h
|
2020-11-03 12:27:17 +03:00
|
|
|
mandatory-y += kmap_size.h
|
2020-04-02 07:03:12 +03:00
|
|
|
mandatory-y += kprobes.h
|
|
|
|
mandatory-y += linkage.h
|
|
|
|
mandatory-y += local.h
|
2020-12-30 02:14:49 +03:00
|
|
|
mandatory-y += local64.h
|
2020-04-02 07:03:12 +03:00
|
|
|
mandatory-y += mmiowb.h
|
|
|
|
mandatory-y += mmu.h
|
|
|
|
mandatory-y += mmu_context.h
|
|
|
|
mandatory-y += module.h
|
2020-09-08 07:27:08 +03:00
|
|
|
mandatory-y += module.lds.h
|
2019-10-25 09:10:37 +03:00
|
|
|
mandatory-y += msi.h
|
2020-04-02 07:03:12 +03:00
|
|
|
mandatory-y += pci.h
|
|
|
|
mandatory-y += percpu.h
|
|
|
|
mandatory-y += pgalloc.h
|
|
|
|
mandatory-y += preempt.h
|
2019-10-16 02:29:32 +03:00
|
|
|
mandatory-y += rwonce.h
|
2020-04-02 07:03:12 +03:00
|
|
|
mandatory-y += sections.h
|
|
|
|
mandatory-y += serial.h
|
|
|
|
mandatory-y += shmparam.h
|
2019-07-29 12:55:21 +03:00
|
|
|
mandatory-y += simd.h
|
2021-02-10 02:40:53 +03:00
|
|
|
mandatory-y += softirq_stack.h
|
2020-04-02 07:03:12 +03:00
|
|
|
mandatory-y += switch_to.h
|
|
|
|
mandatory-y += timex.h
|
|
|
|
mandatory-y += tlbflush.h
|
|
|
|
mandatory-y += topology.h
|
|
|
|
mandatory-y += trace_clock.h
|
|
|
|
mandatory-y += uaccess.h
|
|
|
|
mandatory-y += unaligned.h
|
arch: split MODULE_ARCH_VERMAGIC definitions out to <asm/vermagic.h>
As the bug report [1] pointed out, <linux/vermagic.h> must be included
after <linux/module.h>.
I believe we should not impose any include order restriction. We often
sort include directives alphabetically, but it is just coding style
convention. Technically, we can include header files in any order by
making every header self-contained.
Currently, arch-specific MODULE_ARCH_VERMAGIC is defined in
<asm/module.h>, which is not included from <linux/vermagic.h>.
Hence, the straight-forward fix-up would be as follows:
|--- a/include/linux/vermagic.h
|+++ b/include/linux/vermagic.h
|@@ -1,5 +1,6 @@
| /* SPDX-License-Identifier: GPL-2.0 */
| #include <generated/utsrelease.h>
|+#include <linux/module.h>
|
| /* Simply sanity version stamp for modules. */
| #ifdef CONFIG_SMP
This works enough, but for further cleanups, I split MODULE_ARCH_VERMAGIC
definitions into <asm/vermagic.h>.
With this, <linux/module.h> and <linux/vermagic.h> will be orthogonal,
and the location of MODULE_ARCH_VERMAGIC definitions will be consistent.
For arc and ia64, MODULE_PROC_FAMILY is only used for defining
MODULE_ARCH_VERMAGIC. I squashed it.
For hexagon, nds32, and xtensa, I removed <asm/modules.h> entirely
because they contained nothing but MODULE_ARCH_VERMAGIC definition.
Kbuild will automatically generate <asm/modules.h> at build-time,
wrapping <asm-generic/module.h>.
[1] https://lore.kernel.org/lkml/20200411155623.GA22175@zn.tnic
Reported-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Jessica Yu <jeyu@kernel.org>
2020-04-21 19:13:55 +03:00
|
|
|
mandatory-y += vermagic.h
|
2020-04-02 07:03:12 +03:00
|
|
|
mandatory-y += vga.h
|
|
|
|
mandatory-y += word-at-a-time.h
|
|
|
|
mandatory-y += xor.h
|