Re: [PATCH v2] kcsan: Silence -Wmaybe-uninitialized when calling __kcsan_check_access()

From: Arnd Bergmann

Date: Thu Apr 30 2026 - 09:38:31 EST


On Thu, Apr 30, 2026, at 15:30, Marco Elver wrote:
> On Wed, 22 Apr 2026 at 14:53, Marco Elver <elver@xxxxxxxxxx> wrote:

>>
>> Link: https://lore.kernel.org/all/5da10cca-875b-418d-b54e-6be3ea32c266@xxxxxxxxxxxxxxxx/ [1]
>> Reported-by: Arnd Bergmann <arnd@xxxxxxxx>
>> Signed-off-by: Marco Elver <elver@xxxxxxxxxx>
>
> Arnd, are you ok with this version?
>
> I don't think there's a simpler option - the name "absolute_pointer"
> might be misleading, but the underlying RELOC_HIDE is what we need
> here. Could use RELOC_HIDE directly.
>
> The attribute would have been nice, but comes with a whole set of new
> problems. :-/

Agreed, I had tried a few things but haven't been able to come up
with anything better than this or my original patch.

I've tested this version in my randconfig tree using gcc-16
and found no more regressions.

Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx>
Tested-by: Arnd Bergmann <arnd@xxxxxxxx>