This is a note to let you know that I've just added the patch titled modpost: disallow *driver to reference .meminit* sections to the 6.6-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: modpost-disallow-driver-to-reference-.meminit-sectio.patch and it can be found in the queue-6.6 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 0fd96cb00e573ef95c68a8de55c06e5c6f06db77 Author: Masahiro Yamada <masahiroy@xxxxxxxxxx> Date: Mon Oct 23 02:06:06 2023 +0900 modpost: disallow *driver to reference .meminit* sections [ Upstream commit 50cccec15c48814765895891ca0d95d989b6a419 ] Drivers must not reference .meminit* sections, which are discarded when CONFIG_MEMORY_HOTPLUG=n. The reason for whitelisting "*driver" in the section mismatch check was to allow drivers to reference symbols annotated as __devinit or __devexit that existed in the past. Those annotations were removed by the following commits: - 54b956b90360 ("Remove __dev* markings from init.h") - 92e9e6d1f984 ("modpost.c: Stop checking __dev* section mismatches") Remove the stale whitelist. Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx> Stable-dep-of: bb43a59944f4 ("Rename .data.unlikely to .data..unlikely") Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index f6cbf70e455ee..7e88e6437540e 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1007,12 +1007,6 @@ static int secref_whitelist(const char *fromsec, const char *fromsym, "*_console"))) return 0; - /* symbols in data sections that may refer to meminit sections */ - if (match(fromsec, PATTERNS(DATA_SECTIONS)) && - match(tosec, PATTERNS(ALL_XXXINIT_SECTIONS)) && - match(fromsym, PATTERNS("*driver"))) - return 0; - /* * symbols in data sections must not refer to .exit.*, but there are * quite a few offenders, so hide these unless for W=1 builds until