public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
To: Peter Schneider <pschneider1968@googlemail.com>,
	Sasha Levin <sashal@kernel.org>,
	Brett A C Sheffield <bacs@librecast.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Aditya Garg <gargaditya08@live.com>,
	"zohar@linux.ibm.com" <zohar@linux.ibm.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"ardb@kernel.org" <ardb@kernel.org>,
	"bp@alien8.de" <bp@alien8.de>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"graf@amazon.com" <graf@amazon.com>,
	"guoweikang.kernel@gmail.com" <guoweikang.kernel@gmail.com>,
	"henry.willard@oracle.com" <henry.willard@oracle.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"jbohac@suse.cz" <jbohac@suse.cz>,
	Vegard Nossum <vegard.nossum@oracle.com>,
	"joel.granados@kernel.org" <joel.granados@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"noodles@fb.com" <noodles@fb.com>,
	"paul.x.webb@oracle.com" <paul.x.webb@oracle.com>,
	"rppt@kernel.org" <rppt@kernel.org>,
	"sohil.mehta@intel.com" <sohil.mehta@intel.com>,
	"sourabhjain@linux.ibm.com" <sourabhjain@linux.ibm.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"x86@kernel.org" <x86@kernel.org>,
	"yifei.l.liu@oracle.com" <yifei.l.liu@oracle.com>
Subject: Re: [REGRESSION] Linux kernel 6.12.75 fails to compile with -Werror=implicit-function-declaration
Date: Fri, 6 Mar 2026 04:16:57 +0530	[thread overview]
Message-ID: <2ffaf154-3b5d-4e49-a0d3-4aedef3501d4@oracle.com> (raw)
In-Reply-To: <6f42cb43-c281-4565-b968-afc34502b9fb@googlemail.com>

Hi Peter,

On 06/03/26 03:36, Peter Schneider wrote:
> 
> The people who tacked their Tested-by on yesterday's 6.1.165, 6.6.128 
> and 6.12.75 RC2 did so after testing without the patch "x86/kexec: add a 
> sanity check on previous kernel's ima kexec buffer", because after my 
> initial report you dropped it, but in the final releases it was present 
> again (essentially invalidating the Tested-By), causing the same build 
> failure, but only on X86, and only with CONFIG_WERROR=Y.
> 


I think the kernel unconditionally adds 
-Werror=implicit-function-declaration whether we enable WERROR or not.

Notes:
------

$ grep "WERROR" .config
# CONFIG_WERROR is not set
# CONFIG_KVM_WERROR is not set
# CONFIG_DRM_AMDGPU_WERROR is not set
# CONFIG_DRM_I915_WERROR is not set
# CONFIG_DRM_XE_WERROR is not set
# CONFIG_DRM_WERROR is not set

$ make -j arch/x86/kernel/setup.o
   DESCEND bpf/resolve_btfids
   DESCEND objtool
   INSTALL libsubcmd_headers
   CALL    scripts/checksyscalls.sh
   INSTALL libsubcmd_headers
   CC      arch/x86/kernel/setup.o
arch/x86/kernel/setup.c: In function ‘ima_get_kexec_buffer’:
arch/x86/kernel/setup.c:380:15: error: implicit declaration of function 
‘ima_validate_range’ [-Werror=implicit-function-declaration]
   380 |         ret = ima_validate_range(ima_kexec_buffer_phys, 
ima_kexec_buffer_size);
       |               ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[4]: *** [scripts/Makefile.build:229: arch/x86/kernel/setup.o] Error 1
make[3]: *** [scripts/Makefile.build:466: arch/x86/kernel] Error 2
make[2]: *** [scripts/Makefile.build:466: arch/x86] Error 2
make[1]: *** [/home/opc/linux/Makefile:1954: .] Error 2
make: *** [Makefile:224: __sub-make] Error 2

$  make -n V=1 arch/x86/kernel/setup.o | grep -o 
"Werror=implicit-function-declaration"
Werror=implicit-function-declaration

this is likely because scripts/Makefile.extrawarn in line 13 has this 
and that is then included in Makefile.

Notes:

Patch 1: introducing a generic helper (stable CCed)
Patch 2: fixing a bug using that helper (stable CCed)

So while stable scripts picked up two these was no conflict because of 
not picking one and the build problem is not seen in few configs because 
the code is really gated by CONFIG_HAVE_IMA_KEXEC, and HAVE_IMA_KEXEC is 
selected by CONFIG_IMA, so the build problem seen on some configs is 
equivalent to having CONFIG_IMA or not.


> Now in todays three releases which fix this, you wrote in the release 
> announcements "Only upgrade if you've observed a build failure with 
> 6.1.165." / 6.6.128 / 6.12.75.
> 
> But this wording is, IMHO, inaccurate and inadquate, because people who 
> built yesterdays releases with CONFIG_WERROR=N will not have seen a 
> build failure, and if they now, because of your release announcement, DO 
> NOT upgrade to one of todays releases, they now have a kernel with an 
> incomplete patchset, i.e. with only the patch ""x86/kexec: add a sanity 
> check on previous kernel's ima kexec buffer" and not the three missing 
> prerequisite patches from Harshit's patch series which he said he will 
> properly backport later, and this could be built only by lucky 
> coincedence, and THIS is the combination of code nobody actually tested 
> which Brett talked about.
> 
> What does it do? Does is cause harm? I don't know. Do you know? Maybe 
> Harshit could tell us if it's a serious omission or if it's not 
> critical. This, IMHO, should have been avoided. The better wording in 
> the release announcements of today would have been: "All users on X86 
> must upgrade", so that nobody stays, unaware, on a kernel with that 
> incomplete patch set.

I think only people having CONFIG_IMA are affected by this patch, and 
whoever have that will run into build failure. (As missing function is a 
for-sure build failure).

A possible process improvement while tagging to stable ?
I should have really marked Patch2 as dependent on Patch1, (similar to 
what we have in stable, we do have stable-dep-of tag for prerequisites).
but we might not need, as, how it worked all this way then: we might be 
running different configs(allmodconfig, allnoconfig, randconfig etc.,.) 
like in this case few configs detected this build failure. But this 
might help if there is a functional dependency and not compile time.

Thanks,
Harshit

  reply	other threads:[~2026-03-05 22:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-04 17:35 [REGRESSION] Linux kernel 6.12.75 fails to compile with -Werror=implicit-function-declaration Aditya Garg
2026-03-04 17:52 ` [SEVERE] " Aditya Garg
2026-03-04 18:04   ` Aditya Garg
2026-03-04 19:00 ` Peter Schneider
2026-03-04 19:37   ` Peter Schneider
2026-03-05 17:40   ` Brett A C Sheffield
2026-03-05 20:21     ` Sasha Levin
2026-03-05 21:57       ` Brett A C Sheffield
2026-03-06  2:51         ` Sasha Levin
2026-03-05 22:06       ` Peter Schneider
2026-03-05 22:46         ` Harshit Mogalapalli [this message]
2026-03-06  0:23           ` Peter Schneider
2026-03-06  2:57         ` Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2ffaf154-3b5d-4e49-a0d3-4aedef3501d4@oracle.com \
    --to=harshit.m.mogalapalli@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=ardb@kernel.org \
    --cc=bacs@librecast.net \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=gargaditya08@live.com \
    --cc=graf@amazon.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=guoweikang.kernel@gmail.com \
    --cc=henry.willard@oracle.com \
    --cc=hpa@zytor.com \
    --cc=jbohac@suse.cz \
    --cc=joel.granados@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=noodles@fb.com \
    --cc=paul.x.webb@oracle.com \
    --cc=pschneider1968@googlemail.com \
    --cc=rppt@kernel.org \
    --cc=sashal@kernel.org \
    --cc=sohil.mehta@intel.com \
    --cc=sourabhjain@linux.ibm.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=vegard.nossum@oracle.com \
    --cc=x86@kernel.org \
    --cc=yifei.l.liu@oracle.com \
    --cc=zohar@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox