Skip to content

Commit 5cf53f3

Browse files
Elena Petrovatorvalds
authored andcommitted
sched.h: drop in_ubsan field when UBSAN is in trap mode
in_ubsan field of task_struct is only used in lib/ubsan.c, which in its turn is used only `ifneq ($(CONFIG_UBSAN_TRAP),y)`. Removing unnecessary field from a task_struct will help preserve the ABI between vanilla and CONFIG_UBSAN_TRAP'ed kernels. In particular, this will help enabling bounds sanitizer transparently for Android's GKI. Signed-off-by: Elena Petrova <lenaptr@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Kees Cook <keescook@chromium.org> Cc: Jann Horn <jannh@google.com> Link: https://lkml.kernel.org/r/20200910134802.3160311-1-lenaptr@google.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 4fbe310 commit 5cf53f3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/linux/sched.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ struct task_struct {
10131013
struct held_lock held_locks[MAX_LOCK_DEPTH];
10141014
#endif
10151015

1016-
#ifdef CONFIG_UBSAN
1016+
#if defined(CONFIG_UBSAN) && !defined(CONFIG_UBSAN_TRAP)
10171017
unsigned int in_ubsan;
10181018
#endif
10191019

0 commit comments

Comments
 (0)