* [Bug Report] A compilation failure occurs when landlock and RANDSTRUCT are combined with GCC 14.2.0.
@ 2025-04-10 8:11 WangYuli
2025-04-10 15:33 ` Günther Noack
0 siblings, 1 reply; 4+ messages in thread
From: WangYuli @ 2025-04-10 8:11 UTC (permalink / raw)
To: mic, gnoack, paul, jmorris, serge, kees, masahiroy, nathan,
nicolas
Cc: linux-security-module, linux-kernel@vger.kernel.org,
linux-hardening, linux-kbuild
[-- Attachment #1.1.1: Type: text/plain, Size: 1912 bytes --]
[ Compilation failure log: ]
*** WARNING *** there are active plugins, do not report this as a bug
unless you can reproduce it without enabling an
y plugins.
Event | Plugins
PLUGIN_FINISH_TYPE | randomize_layout_plugin
PLUGIN_FINISH_DECL | randomize_layout_plugin
PLUGIN_ATTRIBUTES | latent_entropy_plugin
randomize_layout_plugin
PLUGIN_START_UNIT | latent_entropy_plugin stackleak_plugin
PLUGIN_ALL_IPA_PASSES_START | randomize_layout_plugin
security/landlock/fs.c:In function ‘hook_file_ioctl_common’:
security/landlock/fs.c:1745:61:internal compiler error: in
count_type_elements, at expr.cc:7075
1745 | .u.op = &(struct lsm_ioctlop_audit) {
| ^
0x7f27fa6bdca7 __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
0x7f27fa6bdd64 __libc_start_main_impl
../csu/libc-start.c:360
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-14/README.Bugs> for instructions.
make[4]: *** [scripts/Makefile.build:203: security/landlock/fs.o] Error 1
make[3]: *** [scripts/Makefile.build:461: security/landlock] Error 2
make[2]: *** [scripts/Makefile.build:461: security] Error 2
[ Reproducing steps: ]
os-release: Debian GNU/Linux trixie/sid
Compiler: gcc version 14.2.0 (Debian 14.2.0-19)
Target: x86_64-linux-gnu
Step: make allmodconfig && make -j$(nproc)
[ Full config ]
Will be repiled to this mail.
Thanks,
--
WangYuli
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 645 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Bug Report] A compilation failure occurs when landlock and RANDSTRUCT are combined with GCC 14.2.0.
2025-04-10 8:11 [Bug Report] A compilation failure occurs when landlock and RANDSTRUCT are combined with GCC 14.2.0 WangYuli
@ 2025-04-10 15:33 ` Günther Noack
2025-04-10 17:05 ` Mickaël Salaün
0 siblings, 1 reply; 4+ messages in thread
From: Günther Noack @ 2025-04-10 15:33 UTC (permalink / raw)
To: WangYuli
Cc: mic, gnoack, paul, jmorris, serge, kees, masahiroy, nathan,
nicolas, linux-security-module, linux-kernel@vger.kernel.org,
linux-hardening, linux-kbuild
Hello!
On Thu, Apr 10, 2025 at 04:11:15PM +0800, WangYuli wrote:
> [ Compilation failure log: ]
>
> *** WARNING *** there are active plugins, do not report this as a bug unless
> you can reproduce it without enabling an
> y plugins.
> Event | Plugins
> PLUGIN_FINISH_TYPE | randomize_layout_plugin
> PLUGIN_FINISH_DECL | randomize_layout_plugin
> PLUGIN_ATTRIBUTES | latent_entropy_plugin
> randomize_layout_plugin
> PLUGIN_START_UNIT | latent_entropy_plugin stackleak_plugin
> PLUGIN_ALL_IPA_PASSES_START | randomize_layout_plugin
> security/landlock/fs.c:In function ‘hook_file_ioctl_common’:
> security/landlock/fs.c:1745:61:internal compiler error: in
> count_type_elements, at expr.cc:7075
> 1745 | .u.op = &(struct lsm_ioctlop_audit) {
> | ^
> 0x7f27fa6bdca7 __libc_start_call_main
> ../sysdeps/nptl/libc_start_call_main.h:58
> 0x7f27fa6bdd64 __libc_start_main_impl
> ../csu/libc-start.c:360
> Please submit a full bug report, with preprocessed source (by using
> -freport-bug).
> Please include the complete backtrace with any bug report.
> See <file:///usr/share/doc/gcc-14/README.Bugs> for instructions.
> make[4]: *** [scripts/Makefile.build:203: security/landlock/fs.o] Error 1
> make[3]: *** [scripts/Makefile.build:461: security/landlock] Error 2
> make[2]: *** [scripts/Makefile.build:461: security] Error 2
Thank you for the report!
This is in my understanding a duplicate of the discussion in
https://lore.kernel.org/all/20250407-kbuild-disable-gcc-plugins-v1-1-5d46ae583f5e@kernel.org/
–Günther
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Bug Report] A compilation failure occurs when landlock and RANDSTRUCT are combined with GCC 14.2.0.
2025-04-10 15:33 ` Günther Noack
@ 2025-04-10 17:05 ` Mickaël Salaün
2025-04-11 2:50 ` WangYuli
0 siblings, 1 reply; 4+ messages in thread
From: Mickaël Salaün @ 2025-04-10 17:05 UTC (permalink / raw)
To: Günther Noack
Cc: WangYuli, gnoack, paul, jmorris, serge, kees, masahiroy, nathan,
nicolas, linux-security-module, linux-kernel@vger.kernel.org,
linux-hardening, linux-kbuild
On Thu, Apr 10, 2025 at 05:33:21PM +0200, Günther Noack wrote:
> Hello!
>
> On Thu, Apr 10, 2025 at 04:11:15PM +0800, WangYuli wrote:
> > [ Compilation failure log: ]
> >
> > *** WARNING *** there are active plugins, do not report this as a bug unless
> > you can reproduce it without enabling an
> > y plugins.
> > Event | Plugins
> > PLUGIN_FINISH_TYPE | randomize_layout_plugin
> > PLUGIN_FINISH_DECL | randomize_layout_plugin
> > PLUGIN_ATTRIBUTES | latent_entropy_plugin
> > randomize_layout_plugin
> > PLUGIN_START_UNIT | latent_entropy_plugin stackleak_plugin
> > PLUGIN_ALL_IPA_PASSES_START | randomize_layout_plugin
> > security/landlock/fs.c:In function ‘hook_file_ioctl_common’:
> > security/landlock/fs.c:1745:61:internal compiler error: in
> > count_type_elements, at expr.cc:7075
> > 1745 | .u.op = &(struct lsm_ioctlop_audit) {
> > | ^
> > 0x7f27fa6bdca7 __libc_start_call_main
> > ../sysdeps/nptl/libc_start_call_main.h:58
> > 0x7f27fa6bdd64 __libc_start_main_impl
> > ../csu/libc-start.c:360
> > Please submit a full bug report, with preprocessed source (by using
> > -freport-bug).
> > Please include the complete backtrace with any bug report.
> > See <file:///usr/share/doc/gcc-14/README.Bugs> for instructions.
> > make[4]: *** [scripts/Makefile.build:203: security/landlock/fs.o] Error 1
> > make[3]: *** [scripts/Makefile.build:461: security/landlock] Error 2
> > make[2]: *** [scripts/Makefile.build:461: security] Error 2
>
> Thank you for the report!
>
> This is in my understanding a duplicate of the discussion in
> https://lore.kernel.org/all/20250407-kbuild-disable-gcc-plugins-v1-1-5d46ae583f5e@kernel.org/
Yes, a new patch has been submitted:
https://lore.kernel.org/all/20250409151154.work.872-kees@kernel.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Bug Report] A compilation failure occurs when landlock and RANDSTRUCT are combined with GCC 14.2.0.
2025-04-10 17:05 ` Mickaël Salaün
@ 2025-04-11 2:50 ` WangYuli
0 siblings, 0 replies; 4+ messages in thread
From: WangYuli @ 2025-04-11 2:50 UTC (permalink / raw)
To: Mickaël Salaün, Günther Noack
Cc: gnoack, paul, jmorris, serge, kees, masahiroy, nathan, nicolas,
linux-security-module, linux-kernel@vger.kernel.org,
linux-hardening, linux-kbuild, 陈麟轩,
占俊, 聂诚, 关文涛
[-- Attachment #1.1.1: Type: text/plain, Size: 849 bytes --]
Hi Günther and Mickaël Salaün,
On 2025/4/11 01:05, Mickaël Salaün wrote:
>> This is in my understanding a duplicate of the discussion in
>> https://lore.kernel.org/all/20250407-kbuild-disable-gcc-plugins-v1-1-5d46ae583f5e@kernel.org/
> Yes, a new patch has been submitted:
> https://lore.kernel.org/all/20250409151154.work.872-kees@kernel.org/
Thank you both for the reminder!
But I'm still a bit lost.
With GCC 14, I can reproduce this problem by merely enabling landlock
and RANDSTRUCT on top of the base x86_64_defconfig.
It doesn't appear that making GCC_PLUGINS depend on !COMPILE_TEST or
restricting RANDSTRUCT to only be enabled when CC_HAS_RANDSTRUCT is set
actually addresses the root cause.
I'm quite curious to know what the actual direct cause of this internal
GCC error is.
Thanks,
--
WangYuli
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 645 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-04-11 2:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-10 8:11 [Bug Report] A compilation failure occurs when landlock and RANDSTRUCT are combined with GCC 14.2.0 WangYuli
2025-04-10 15:33 ` Günther Noack
2025-04-10 17:05 ` Mickaël Salaün
2025-04-11 2:50 ` WangYuli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox