Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 21 Nov 2019 09:57:34 -0800
From: Kees Cook <>
To: Andrey Ryabinin <>
Cc: Elena Petrova <>,
	Alexander Potapenko <>,
	Dmitry Vyukov <>,
	Linus Torvalds <>,
	Dan Carpenter <>,
	"Gustavo A. R. Silva" <>,
	Arnd Bergmann <>,
	Ard Biesheuvel <>,
	Andrew Morton <>,,,
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)

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.