Re: [PATCH] sched.h: drop in_ubsan field when UBSAN is in trap mode

From: Kees Cook
Date: Thu Sep 10 2020 - 15:18:15 EST


On Thu, Sep 10, 2020 at 02:48:02PM +0100, Elena Petrova wrote:
> 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@xxxxxxxxxx>

Acked-by: Kees Cook <keescook@xxxxxxxxxxxx>

(This should be CCed to akpm who has been taking most of the ubsan
patches lately.)

--
Kees Cook