[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221202144446.3395140-1-alexandr.lobakin@intel.com>
Date: Fri, 2 Dec 2022 15:44:46 +0100
From: Alexander Lobakin <alexandr.lobakin@...el.com>
To: Nathan Chancellor <nathan@...nel.org>
Cc: Alexander Lobakin <alexandr.lobakin@...el.com>,
Masahiro Yamada <masahiroy@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Tom Rix <trix@...hat.com>, Nicolas Schier <nicolas@...sle.eu>,
Sami Tolvanen <samitolvanen@...gle.com>,
Vincent Donnefort <vdonnefort@...gle.com>,
linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev, patches@...ts.linux.dev
Subject: Re: [PATCH 2/2] modpost: Include '.text.*' in TEXT_SECTIONS
From: Nathan Chancellor <nathan@...nel.org>
Date: Tue, 29 Nov 2022 12:01:23 -0700
> Commit 6c730bfc894f ("modpost: handle -ffunction-sections") added
> ".text.*" to the OTHER_TEXT_SECTIONS macro to fix certain section
> mismatch warnings. Unfortunately, this makes it impossible for modpost
> to warn about section mismatchs with LTO, which implies
> '-ffunction-sections', as all functions are put in their own
> '.text.<func_name>' sections, which may still reference functions in
> sections they are not supposed to, such as __init.
>
> Fix this by moving ".text.*" into TEXT_SECTIONS, so that configurations
> with '-ffunction-sections' will see warnings about mismatched sections.
>
> Link: https://lore.kernel.org/Y39kI3MOtVI5BAnV@google.com/
> Reported-by: Vincent Donnefort <vdonnefort@...gle.com>
> Signed-off-by: Nathan Chancellor <nathan@...nel.org>
This revealed a couple issues in the FG-KASLR kernel. None of them
are false-positive although FG-KASLR doesn't merge text.* into one
section in the final vmlinux. Nice!
Reviewed-and-tested-by: Alexander Lobakin <alexandr.lobakin@...el.com>
> ---
> scripts/mod/modpost.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
[...]
> --
> 2.38.1
Thanks,
Olek
Powered by blists - more mailing lists