* Reference to non-existing config X86_SMAP in config UBSAN_UNREACHABLE
@ 2022-06-01 10:50 Lukas Bulwahn
2022-06-01 16:40 ` Josh Poimboeuf
0 siblings, 1 reply; 2+ messages in thread
From: Lukas Bulwahn @ 2022-06-01 10:50 UTC (permalink / raw)
To: Josh Poimboeuf
Cc: Borislav Petkov, Peter Zijlstra, kernel-janitors,
Linux Kernel Mailing List
Dear Josh,
Commit dbae0a934f09 ("x86/cpu: Remove CONFIG_X86_SMAP and "nosmap"")
from Borislav removes the config X86_SMAP and makes smap on x86
default.
Josh, your commit 03f16cd020eb ("objtool: Add CONFIG_OBJTOOL") makes
config UBSAN_UNREACHABLE in lib/Kconfig.ubsan refer to this
non-existing config X86_SMAP.
See this hunk in lib/Kconfig.ubsan:
diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan
index f3c57ed51838..c4fe15d38b60 100644
--- a/lib/Kconfig.ubsan
+++ b/lib/Kconfig.ubsan
@@ -94,7 +94,7 @@ config UBSAN_UNREACHABLE
bool "Perform checking for unreachable code"
# objtool already handles unreachable checking and gets angry about
# seeing UBSan instrumentation located in unreachable places.
- depends on !STACK_VALIDATION
+ depends on !(OBJTOOL && (STACK_VALIDATION || UNWINDER_ORC || X86_SMAP))
depends on $(cc-option,-fsanitize=unreachable)
help
This option enables -fsanitize=unreachable which checks for control
I think X86_SMAP can just be dropped in this line, but I leave it up
to you to change, as I am not completely certain on the needed change
and if that just breaks the config dependencies for stack validation.
By the way, this issue was identified with the script
./scripts/checkkconfigsymbols.py
Best regards,
Lukas
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Reference to non-existing config X86_SMAP in config UBSAN_UNREACHABLE
2022-06-01 10:50 Reference to non-existing config X86_SMAP in config UBSAN_UNREACHABLE Lukas Bulwahn
@ 2022-06-01 16:40 ` Josh Poimboeuf
0 siblings, 0 replies; 2+ messages in thread
From: Josh Poimboeuf @ 2022-06-01 16:40 UTC (permalink / raw)
To: Lukas Bulwahn
Cc: Josh Poimboeuf, Borislav Petkov, Peter Zijlstra, kernel-janitors,
Linux Kernel Mailing List
On Wed, Jun 01, 2022 at 12:50:47PM +0200, Lukas Bulwahn wrote:
> Dear Josh,
>
> Commit dbae0a934f09 ("x86/cpu: Remove CONFIG_X86_SMAP and "nosmap"")
> from Borislav removes the config X86_SMAP and makes smap on x86
> default.
>
> Josh, your commit 03f16cd020eb ("objtool: Add CONFIG_OBJTOOL") makes
> config UBSAN_UNREACHABLE in lib/Kconfig.ubsan refer to this
> non-existing config X86_SMAP.
>
> See this hunk in lib/Kconfig.ubsan:
>
> diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan
> index f3c57ed51838..c4fe15d38b60 100644
> --- a/lib/Kconfig.ubsan
> +++ b/lib/Kconfig.ubsan
> @@ -94,7 +94,7 @@ config UBSAN_UNREACHABLE
> bool "Perform checking for unreachable code"
> # objtool already handles unreachable checking and gets angry about
> # seeing UBSan instrumentation located in unreachable places.
> - depends on !STACK_VALIDATION
> + depends on !(OBJTOOL && (STACK_VALIDATION || UNWINDER_ORC || X86_SMAP))
> depends on $(cc-option,-fsanitize=unreachable)
> help
> This option enables -fsanitize=unreachable which checks for control
>
> I think X86_SMAP can just be dropped in this line, but I leave it up
> to you to change, as I am not completely certain on the needed change
> and if that just breaks the config dependencies for stack validation.
>
> By the way, this issue was identified with the script
> ./scripts/checkkconfigsymbols.py
Hi Lukas,
Thanks for reporting this. I'll post a fix shortly.
--
Josh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-01 16:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-01 10:50 Reference to non-existing config X86_SMAP in config UBSAN_UNREACHABLE Lukas Bulwahn
2022-06-01 16:40 ` Josh Poimboeuf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).