Re: [PATCH] [v2] landlock: work around gcc-16 -Wuninitialized warning

From: Arnd Bergmann

Date: Thu Sep 17 2026 - 06:27:33 EST


On Thu, Sep 17, 2026, at 09:09, Sebastian Andrzej Siewior wrote:
> On 2026-09-16 23:06:30 [+0200], Arnd Bergmann wrote:
>> As far as I can tell, 16.2 is still affected, even though it should be
>> fixed in HEAD. gcc-16.3 won't be released until spring 2027 though.
>>
>> It is possible that there are additional configuration options that
>> have to be set just right to reproduce the issue. I've attached a
>> configuration that triggered it for me this week.
>
> This is from v7.2. I tried this and v7.3-rc3 and did not notice a
> warning (other than unrelated stack size from drm). I did notice:
>
> -CONFIG_CC_VERSION_TEXT="x86_64-linux-gcc (GCC) 16.2.0"
> +CONFIG_CC_VERSION_TEXT="gcc (Debian 16.2.0-2) 16.2.0"
> CONFIG_GCC_VERSION=160200
> -CONFIG_AS_VERSION=20285426
> +CONFIG_AS_VERSION=24700
> -CONFIG_LD_VERSION=20285426
> +CONFIG_LD_VERSION=24700
> +CONFIG_CC_HAS_MARCH_NATIVE=y
>
> which might be the culprit. There were other things, too, so the
> oldconfig was not clean (such as missing CONFIG_VIRTUALIZATION).

I checked again and found that this is a config that did produce
the issue a few weeks ago, but doesn't today for me.
I found a different config from this week and managed to reproduce
the problem on today's linux-next using both gcc-16.2 and gcc-17.0
from yesterday, so there is still a related issue that is not
fixed in gcc, even though one at least one of them was fixed.

Arnd

Attachment: config.gz
Description: application/gzip