Skip to contentSkip to conversation

x86/vdso: Enable sanitizers for vma.o

PATCH Applied Jann Horn 2 participants 2 messages Jan 6, 2020 – Jan 10, 2020

Subsystems (3)
lore
Share & tools
lore

Jann Horn

author
#0 lore raw

PATCH 1/1 x86/vdso: Enable sanitizers for vma.o

The vDSO makefile opts out of all sanitizers (and objtool validation); however, vma.o is a normal kernel object file (and already has objtool validation selectively enabled), so turn the sanitizers back on for that file.

---

Notes:
This should probably go on top of the locking/kcsan branch?

 arch/x86/entry/vdso/Makefile | 3 +++
 1 file changed, 3 insertions(+)
arch/x86/entry/vdso/Makefile +3 -0
index 0f46273b4556..50a1c9008864 100644
@@ -30,6 +30,9 @@ vobjs-y := vdso-note.o vclock_gettime.o vgetcpu.o
 
 # files to link into kernel
 obj-y				+= vma.o
+KASAN_SANITIZE_vma.o		:= y
+UBSAN_SANITIZE_vma.o		:= y
+KCSAN_SANITIZE_vma.o		:= y
 OBJECT_FILES_NON_STANDARD_vma.o	:= n
 
 # vDSO images to build
Signature · 1 line
2.24.1.735.g03f4e72817-goog
merge bot Applied
#1 lore raw
The following commit has been merged into the locking/kcsan branch of tip:

The following commit has been merged into the locking/kcsan branch of tip:

Commit-ID:     c29a59e43829beabc4c26036ebcc6a32dd0b6a01
Gitweb:        https://git.kernel.org/tip/c29a59e43829beabc4c26036ebcc6a32dd0b6a01
Author:        Jann Horn <[email protected]>
AuthorDate:    Mon, 06 Jan 2020 21:02:04 +01:00
Committer:     Ingo Molnar <[email protected]>
CommitterDate: Fri, 10 Jan 2020 16:47:32 +01:00

x86/vdso: Enable sanitizers for vma.o

The vDSO makefile opts out of all sanitizers (and objtool validation); however, vma.o is a normal kernel object file (and already has objtool validation selectively enabled), so turn the sanitizers back on for that file.

Cc Andy Lutomirski <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Marco Elver <[email protected]>
Cc Paul E. McKenney <[email protected]>
---
 arch/x86/entry/vdso/Makefile | 3 +++
 1 file changed, 3 insertions(+)
arch/x86/entry/vdso/Makefile +3 -0
index 0f46273..50a1c90 100644
@@ -30,6 +30,9 @@ vobjs-y := vdso-note.o vclock_gettime.o vgetcpu.o
 
 # files to link into kernel
 obj-y				+= vma.o
+KASAN_SANITIZE_vma.o		:= y
+UBSAN_SANITIZE_vma.o		:= y
+KCSAN_SANITIZE_vma.o		:= y
 OBJECT_FILES_NON_STANDARD_vma.o	:= n
 
 # vDSO images to build