linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [tip: x86/core] zstd: Increase DYNAMIC_BMI2 GCC version cutoff from 4.8 to 11.0 to work around compiler segfault
       [not found] <174254398939.14745.1644465295513159567.tip-bot2@tip-bot2>
@ 2025-03-21 12:48 ` Borislav Petkov
  2025-03-22  7:44   ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Borislav Petkov @ 2025-03-21 12:48 UTC (permalink / raw)
  To: linux-kernel, Nick Terrell
  Cc: linux-tip-commits, Michael Kelley, Ingo Molnar, Linus Torvalds,
	x86

(cleanup the botched CC: line :))

+ Nick.

Interesting - we were looking at a similar issue recently:

https://lore.kernel.org/r/20250317135539.GDZ9gp24DhTKBGmkd8@fat_crate.local

and upgrading my toolchain fixed it.

Weird.

On Fri, Mar 21, 2025 at 07:59:49AM -0000, tip-bot2 for Ingo Molnar wrote:
> The following commit has been merged into the x86/core branch of tip:
> 
> Commit-ID:     1400c87e6cac47eb243f260352c854474d9a9073
> Gitweb:        https://git.kernel.org/tip/1400c87e6cac47eb243f260352c854474d9a9073
> Author:        Ingo Molnar <mingo@kernel.org>
> AuthorDate:    Fri, 21 Mar 2025 08:38:43 +01:00
> Committer:     Ingo Molnar <mingo@kernel.org>
> CommitterDate: Fri, 21 Mar 2025 08:38:43 +01:00
> 
> zstd: Increase DYNAMIC_BMI2 GCC version cutoff from 4.8 to 11.0 to work around compiler segfault
> 
> Due to pending percpu improvements in -next, GCC9 and GCC10 are
> crashing during the build with:
> 
>     lib/zstd/compress/huf_compress.c:1033:1: internal compiler error: Segmentation fault
>      1033 | {
>           | ^
>     Please submit a full bug report,
>     with preprocessed source if appropriate.
>     See <file:///usr/share/doc/gcc-9/README.Bugs> for instructions.
> 
> The DYNAMIC_BMI2 feature is a known-challenging feature of
> the ZSTD library, with an existing GCC quirk turning it off
> for GCC versions below 4.8.
> 
> Increase the DYNAMIC_BMI2 version cutoff to GCC 11.0 - GCC 10.5
> is the last version known to crash.
> 
> Reported-by: Michael Kelley <mhklinux@outlook.com>
> Debugged-by: Ard Biesheuvel <ardb@kernel.org>
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> Cc: https://lore.kernel.org/r/SN6PR02MB415723FBCD79365E8D72CA5FD4D82@SN6PR02MB4157.namprd02.prod.outlook.com
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> ---
>  lib/zstd/common/portability_macros.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/zstd/common/portability_macros.h b/lib/zstd/common/portability_macros.h
> index 0e3b2c0..0dde8bf 100644
> --- a/lib/zstd/common/portability_macros.h
> +++ b/lib/zstd/common/portability_macros.h
> @@ -55,7 +55,7 @@
>  #ifndef DYNAMIC_BMI2
>    #if ((defined(__clang__) && __has_attribute(__target__)) \
>        || (defined(__GNUC__) \
> -          && (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)))) \
> +          && (__GNUC__ >= 11))) \
>        && (defined(__x86_64__) || defined(_M_X64)) \
>        && !defined(__BMI2__)
>    #  define DYNAMIC_BMI2 1

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [tip: x86/core] zstd: Increase DYNAMIC_BMI2 GCC version cutoff from 4.8 to 11.0 to work around compiler segfault
  2025-03-21 12:48 ` [tip: x86/core] zstd: Increase DYNAMIC_BMI2 GCC version cutoff from 4.8 to 11.0 to work around compiler segfault Borislav Petkov
@ 2025-03-22  7:44   ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2025-03-22  7:44 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: linux-kernel, Nick Terrell, linux-tip-commits, Michael Kelley,
	Linus Torvalds, x86


* Borislav Petkov <bp@alien8.de> wrote:

> (cleanup the botched CC: line :))
> 
> + Nick.
> 
> Interesting - we were looking at a similar issue recently:
> 
> https://lore.kernel.org/r/20250317135539.GDZ9gp24DhTKBGmkd8@fat_crate.local
> 
> and upgrading my toolchain fixed it.

Applying the ZSTD version quirk would likely also fix it under the 
original compiler version (GCC 10.3.0).

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-22  7:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <174254398939.14745.1644465295513159567.tip-bot2@tip-bot2>
2025-03-21 12:48 ` [tip: x86/core] zstd: Increase DYNAMIC_BMI2 GCC version cutoff from 4.8 to 11.0 to work around compiler segfault Borislav Petkov
2025-03-22  7:44   ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).