|
Message-ID: <201911210942.3C9F299@keescook> Date: Thu, 21 Nov 2019 09:57:34 -0800 From: Kees Cook <keescook@...omium.org> To: Andrey Ryabinin <aryabinin@...tuozzo.com> Cc: Elena Petrova <lenaptr@...gle.com>, Alexander Potapenko <glider@...gle.com>, Dmitry Vyukov <dvyukov@...gle.com>, Linus Torvalds <torvalds@...ux-foundation.org>, Dan Carpenter <dan.carpenter@...cle.com>, "Gustavo A. R. Silva" <gustavo@...eddedor.com>, Arnd Bergmann <arnd@...db.de>, Ard Biesheuvel <ard.biesheuvel@...aro.org>, Andrew Morton <akpm@...ux-foundation.org>, kasan-dev@...glegroups.com, linux-kernel@...r.kernel.org, kernel-hardening@...ts.openwall.com Subject: Re: [PATCH 1/3] ubsan: Add trap instrumentation option On Thu, Nov 21, 2019 at 03:52:52PM +0300, Andrey Ryabinin wrote: > On 11/20/19 4:06 AM, Kees Cook wrote: > > +config UBSAN_TRAP > > + bool "On Sanitizer warnings, stop the offending kernel thread" BTW, is there a way (with either GCC or Clang implementations) to override the trap handler? If I could get the instrumentation to call an arbitrarily named function, we could build a better version of this that actually continued without the large increase in image size. For example, instead of __builtin_trap(), call __ubsan_warning(), which could be defined as something like: static __always_inline void __ubsan_warning(void) { WARN_ON_ONCE(1); } That would make the warning survivable without the overhead of all the debugging structures, etc. -- Kees Cook
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.