linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] x86: um: vdso: Disable UBSAN instrumentation
@ 2024-05-13 13:10 Roberto Sassu
  2024-05-13 20:02 ` Kees Cook
  0 siblings, 1 reply; 2+ messages in thread
From: Roberto Sassu @ 2024-05-13 13:10 UTC (permalink / raw)
  To: richard, anton.ivanov, johannes, tglx, mingo, bp, dave.hansen, hpa
  Cc: x86, linux-um, linux-kernel, zohar, linux-integrity, keescook,
	Roberto Sassu

From: Roberto Sassu <roberto.sassu@huawei.com>

The UBSAN instrumentation cannot work in the vDSO since it is executing in
userspace, so disable it in the Makefile. Fixes the build failures such as:

  CALL    scripts/checksyscalls.sh
  VDSO    arch/x86/um/vdso/vdso.so.dbg
arch/x86/um/vdso/vdso.so.dbg: undefined symbols found

Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
---
 arch/x86/um/vdso/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/um/vdso/Makefile b/arch/x86/um/vdso/Makefile
index b86d634730b2..ca79c0de582e 100644
--- a/arch/x86/um/vdso/Makefile
+++ b/arch/x86/um/vdso/Makefile
@@ -3,8 +3,10 @@
 # Building vDSO images for x86.
 #
 
-# do not instrument on vdso because KASAN is not compatible with user mode
+# do not instrument on vdso because KASAN/UBSAN are not compatible with user
+# mode
 KASAN_SANITIZE			:= n
+UBSAN_SANITIZE			:= n
 
 # Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
 KCOV_INSTRUMENT                := n
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] x86: um: vdso: Disable UBSAN instrumentation
  2024-05-13 13:10 [PATCH v2] x86: um: vdso: Disable UBSAN instrumentation Roberto Sassu
@ 2024-05-13 20:02 ` Kees Cook
  0 siblings, 0 replies; 2+ messages in thread
From: Kees Cook @ 2024-05-13 20:02 UTC (permalink / raw)
  To: Roberto Sassu
  Cc: richard, anton.ivanov, johannes, tglx, mingo, bp, dave.hansen,
	hpa, x86, linux-um, linux-kernel, zohar, linux-integrity,
	Roberto Sassu

On Mon, May 13, 2024 at 03:10:24PM +0200, Roberto Sassu wrote:
> From: Roberto Sassu <roberto.sassu@huawei.com>
> 
> The UBSAN instrumentation cannot work in the vDSO since it is executing in
> userspace, so disable it in the Makefile. Fixes the build failures such as:
> 
>   CALL    scripts/checksyscalls.sh
>   VDSO    arch/x86/um/vdso/vdso.so.dbg
> arch/x86/um/vdso/vdso.so.dbg: undefined symbols found
> 
> Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>

This is fixed differently (and more universally) here:
https://lore.kernel.org/lkml/20240506133544.2861555-1-masahiroy@kernel.org/

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-13 20:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-13 13:10 [PATCH v2] x86: um: vdso: Disable UBSAN instrumentation Roberto Sassu
2024-05-13 20:02 ` Kees Cook

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).