WSL2-Linux-Kernel/arch/mips
Masahiro Yamada 62d0fd591d 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-23 10:50:26 +09:00
..
alchemy
ar7
ath25
ath79
bcm47xx
bcm63xx
bmips
boot SPDX patches for 5.7-rc1. 2020-04-03 13:12:26 -07:00
cavium-octeon
cobalt
configs SCSI misc on 20200402 2020-04-02 17:03:53 -07:00
crypto
dec
emma
fw MIPS: fw: arc: add __weak to prom_meminit and prom_free_prom_memory 2020-04-09 00:13:45 +09:00
generic
include arch: split MODULE_ARCH_VERMAGIC definitions out to <asm/vermagic.h> 2020-04-23 10:50:26 +09:00
jazz
jz4740
kernel asm-generic: fix unistd_32.h generation format 2020-04-07 10:43:42 -07:00
kvm virtio: fixes, vdpa 2020-04-08 10:51:53 -07:00
lantiq
lasat
lib
loongson2ef
loongson32
loongson64
math-emu
mm mm/vma: append unlikely() while testing VMA access permissions 2020-04-07 10:43:38 -07:00
mti-malta
net
netlogic
oprofile
paravirt
pci
pic32
pistachio
pmcs-msp71xx
pnx833x
power
ralink
rb532
sgi-ip22
sgi-ip27
sgi-ip30
sgi-ip32
sibyte
sni
tools
txx9
vdso
vr41xx
Kbuild
Kbuild.platforms
Kconfig dma-mapping updates for 5.7 2020-04-04 10:12:47 -07:00
Kconfig.debug
Makefile
Makefile.postlink