|
Message-Id: <20200910134802.3160311-1-lenaptr@google.com> Date: Thu, 10 Sep 2020 14:48:02 +0100 From: Elena Petrova <lenaptr@...gle.com> To: kernel-hardening@...ts.openwall.com Cc: Elena Petrova <lenaptr@...gle.com>, linux-kernel@...r.kernel.org, Kees Cook <keescook@...omium.org> Subject: [PATCH] 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@...gle.com> --- include/linux/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index afe01e232935..5c7b8dec236e 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1008,7 +1008,7 @@ struct task_struct { struct held_lock held_locks[MAX_LOCK_DEPTH]; #endif -#ifdef CONFIG_UBSAN +#if defined(CONFIG_UBSAN) && !defined(CONFIG_UBSAN_TRAP) unsigned int in_ubsan; #endif -- 2.28.0.526.ge36021eeef-goog
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.