Re: [PATCH] ubsan: Avoid i386 UBSAN handler crashes with Clang

2024-04-24 Thread Kees Cook
On Wed, Apr 24, 2024 at 12:26:52PM -0700, Nathan Chancellor wrote: > Hi Kees, > > On Wed, Apr 24, 2024 at 09:29:43AM -0700, Kees Cook wrote: > > When generating Runtime Calls, Clang doesn't respect the -mregparm=3 > > option used on i386. Hopefully this will be fixed correctly in Clang 19: > >

Re: [PATCH] ubsan: Avoid i386 UBSAN handler crashes with Clang

2024-04-24 Thread Nathan Chancellor
Hi Kees, On Wed, Apr 24, 2024 at 09:29:43AM -0700, Kees Cook wrote: > When generating Runtime Calls, Clang doesn't respect the -mregparm=3 > option used on i386. Hopefully this will be fixed correctly in Clang 19: > https://github.com/llvm/llvm-project/pull/89707 > but we need to fix this for

[PATCH] ubsan: Avoid i386 UBSAN handler crashes with Clang

2024-04-24 Thread Kees Cook
When generating Runtime Calls, Clang doesn't respect the -mregparm=3 option used on i386. Hopefully this will be fixed correctly in Clang 19: https://github.com/llvm/llvm-project/pull/89707 but we need to fix this for earlier Clang versions today. Force the calling convention to use non-register