Re: [PATCH] ubsan: disable unsigned-integer-overflow sanitizer with clang

From: Arnd Bergmann
Date: Thu Jan 07 2021 - 15:42:33 EST


On Thu, Jan 7, 2021 at 7:15 PM Nathan Chancellor
<natechancellor@xxxxxxxxx> wrote:
> On Thu, Jan 07, 2021 at 09:22:00AM -0800, Kees Cook wrote:

> > I think this is:
> > https://github.com/ClangBuiltLinux/linux/issues/256
> > and that bug needs re-opening? Or maybe there's a new bug I can't find?
>
> The problem is that applying the fix for that issue does not work, nor
> does converting p4d_index to a macro like mips and s390. I am not sure
> what exactly is going on there, it appears that clang cannot reason
> about ptrs_per_p4d because it is an extern variable with no assigned
> value in its translation unit?

Right, I tried the __always_inline trick already and concluded the same.

Arnd