From: Daniel Gomez <da.gomez@kernel.org>
To: Coiby Xu <coxu@redhat.com>, linux-modules@vger.kernel.org
Cc: linux-integrity@vger.kernel.org,
kernel test robot <lkp@intel.com>,
Luis Chamberlain <mcgrof@kernel.org>,
Petr Pavlu <petr.pavlu@suse.com>,
Sami Tolvanen <samitolvanen@google.com>,
"open list:MODULE SUPPORT" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] module: Only declare set_module_sig_enforced when CONFIG_MODULE_SIG=y
Date: Sat, 1 Nov 2025 23:10:51 +0100 [thread overview]
Message-ID: <3bf85718-8cea-4982-944d-b4c7a4faaf8f@kernel.org> (raw)
In-Reply-To: <20251031080949.2001716-1-coxu@redhat.com>
On 31/10/2025 09.09, Coiby Xu wrote:
> Currently, set_module_sig_enforced is declared as long as CONFIG_MODULES
> is enabled. This can lead to a linking error if
> set_module_sig_enforced is called with CONFIG_MODULE_SIG=n,
>
> ld: security/integrity/ima/ima_appraise.o: in function `ima_appraise_measurement':
> security/integrity/ima/ima_appraise.c:587:(.text+0xbbb): undefined reference to `set_module_sig_enforced'
It's a bit unclear whether you're referring to a current upstream issue (which I
couldn't find as of -rc3), or if this is just a hypothetical scenario.
>
> So only declare set_module_sig_enforced when CONFIG_MODULE_SIG is
> enabled.
I only see cases where code has a safeguard like in
security/integrity/ima/ima_efi.c:71
if (IS_ENABLED(CONFIG_MODULE_SIG))
set_module_sig_enforced();
>
> Note this issue hasn't caused a real problem because all current callers
> of set_module_sig_enforced e.g. security/integrity/ima/ima_efi.c
> depend on CONFIG_MODULE_SIG=y.
I think the correct term we should use here is runtime safeguard. The code does
not actually depend on that config, nor is there any dep in Kconfig.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202510030029.VRKgik99-lkp@intel.com/
> Signed-off-by: Coiby Xu <coxu@redhat.com>
Just minor nits regarding the commit message structure. This change should allow
us to remove the safeguard from users of set_module_sig_enforced().
Other than that, LGTM,
Reviewed-by: Daniel Gomez <da.gomez@samsung.com>
next prev parent reply other threads:[~2025-11-01 22:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-31 8:09 [PATCH] module: Only declare set_module_sig_enforced when CONFIG_MODULE_SIG=y Coiby Xu
2025-10-31 20:09 ` Aaron Tomlin
2025-11-04 3:05 ` Coiby Xu
2025-11-01 22:10 ` Daniel Gomez [this message]
2025-11-04 3:04 ` Coiby Xu
2025-12-01 3:06 ` [PATCH v2] " Coiby Xu
2025-12-22 20:24 ` Sami Tolvanen
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=3bf85718-8cea-4982-944d-b4c7a4faaf8f@kernel.org \
--to=da.gomez@kernel.org \
--cc=coxu@redhat.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mcgrof@kernel.org \
--cc=petr.pavlu@suse.com \
--cc=samitolvanen@google.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