public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: crypto: comment out gcc warning that breaks clang builds
@ 2022-07-31 10:05 Greg Kroah-Hartman
  2022-07-31 10:17 ` Ard Biesheuvel
  2022-07-31 11:22 ` Arnd Bergmann
  0 siblings, 2 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2022-07-31 10:05 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, Jason A. Donenfeld, Justin M. Forbes,
	Ard Biesheuvel, Arnd Bergmann, Nicolas Pitre, Nathan Chancellor,
	Nick Desaulniers

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

The gcc build warning prevents all clang-built kernels from working
properly, so comment it out to fix the build.

This is a -stable kernel only patch for now, it will be resolved
differently in mainline releases in the future.

Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: "Justin M. Forbes" <jforbes@fedoraproject.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@kernel.org>
Cc: Nicolas Pitre <nico@linaro.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm/lib/xor-neon.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/lib/xor-neon.c b/arch/arm/lib/xor-neon.c
index b99dd8e1c93f..7ba6cf826162 100644
--- a/arch/arm/lib/xor-neon.c
+++ b/arch/arm/lib/xor-neon.c
@@ -26,8 +26,9 @@ MODULE_LICENSE("GPL");
  * While older versions of GCC do not generate incorrect code, they fail to
  * recognize the parallel nature of these functions, and emit plain ARM code,
  * which is known to be slower than the optimized ARM code in asm-arm/xor.h.
+ *
+ * #warning This code requires at least version 4.6 of GCC
  */
-#warning This code requires at least version 4.6 of GCC
 #endif
 
 #pragma GCC diagnostic ignored "-Wunused-variable"
-- 
2.37.1


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

* Re: [PATCH] ARM: crypto: comment out gcc warning that breaks clang builds
  2022-07-31 10:05 [PATCH] ARM: crypto: comment out gcc warning that breaks clang builds Greg Kroah-Hartman
@ 2022-07-31 10:17 ` Ard Biesheuvel
  2022-07-31 10:39   ` Greg Kroah-Hartman
  2022-07-31 11:22 ` Arnd Bergmann
  1 sibling, 1 reply; 6+ messages in thread
From: Ard Biesheuvel @ 2022-07-31 10:17 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: # 3.4.x, Jason A. Donenfeld, Justin M. Forbes, Arnd Bergmann,
	Nicolas Pitre, Nathan Chancellor, Nick Desaulniers

On Sun, 31 Jul 2022 at 12:05, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> The gcc build warning prevents all clang-built kernels from working
> properly, so comment it out to fix the build.
>
> This is a -stable kernel only patch for now, it will be resolved
> differently in mainline releases in the future.
>
> Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>
> Cc: "Justin M. Forbes" <jforbes@fedoraproject.org>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Arnd Bergmann <arnd@kernel.org>
> Cc: Nicolas Pitre <nico@linaro.org>
> Cc: Nathan Chancellor <nathan@kernel.org>
> Cc: Nick Desaulniers <ndesaulniers@google.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  arch/arm/lib/xor-neon.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/lib/xor-neon.c b/arch/arm/lib/xor-neon.c
> index b99dd8e1c93f..7ba6cf826162 100644
> --- a/arch/arm/lib/xor-neon.c
> +++ b/arch/arm/lib/xor-neon.c
> @@ -26,8 +26,9 @@ MODULE_LICENSE("GPL");
>   * While older versions of GCC do not generate incorrect code, they fail to
>   * recognize the parallel nature of these functions, and emit plain ARM code,
>   * which is known to be slower than the optimized ARM code in asm-arm/xor.h.
> + *
> + * #warning This code requires at least version 4.6 of GCC
>   */
> -#warning This code requires at least version 4.6 of GCC
>  #endif
>
>  #pragma GCC diagnostic ignored "-Wunused-variable"

LGTM but doesn't Clang also complain about the GCC specific pragma?

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

* Re: [PATCH] ARM: crypto: comment out gcc warning that breaks clang builds
  2022-07-31 10:17 ` Ard Biesheuvel
@ 2022-07-31 10:39   ` Greg Kroah-Hartman
  2022-07-31 11:13     ` Ard Biesheuvel
  0 siblings, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2022-07-31 10:39 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: # 3.4.x, Jason A. Donenfeld, Justin M. Forbes, Arnd Bergmann,
	Nicolas Pitre, Nathan Chancellor, Nick Desaulniers

On Sun, Jul 31, 2022 at 12:17:40PM +0200, Ard Biesheuvel wrote:
> On Sun, 31 Jul 2022 at 12:05, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >
> > The gcc build warning prevents all clang-built kernels from working
> > properly, so comment it out to fix the build.
> >
> > This is a -stable kernel only patch for now, it will be resolved
> > differently in mainline releases in the future.
> >
> > Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>
> > Cc: "Justin M. Forbes" <jforbes@fedoraproject.org>
> > Cc: Ard Biesheuvel <ardb@kernel.org>
> > Cc: Arnd Bergmann <arnd@kernel.org>
> > Cc: Nicolas Pitre <nico@linaro.org>
> > Cc: Nathan Chancellor <nathan@kernel.org>
> > Cc: Nick Desaulniers <ndesaulniers@google.com>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > ---
> >  arch/arm/lib/xor-neon.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/arm/lib/xor-neon.c b/arch/arm/lib/xor-neon.c
> > index b99dd8e1c93f..7ba6cf826162 100644
> > --- a/arch/arm/lib/xor-neon.c
> > +++ b/arch/arm/lib/xor-neon.c
> > @@ -26,8 +26,9 @@ MODULE_LICENSE("GPL");
> >   * While older versions of GCC do not generate incorrect code, they fail to
> >   * recognize the parallel nature of these functions, and emit plain ARM code,
> >   * which is known to be slower than the optimized ARM code in asm-arm/xor.h.
> > + *
> > + * #warning This code requires at least version 4.6 of GCC
> >   */
> > -#warning This code requires at least version 4.6 of GCC
> >  #endif
> >
> >  #pragma GCC diagnostic ignored "-Wunused-variable"
> 
> LGTM but doesn't Clang also complain about the GCC specific pragma?

I don't know, all clang builds always failed at the first #warning line :)

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

* Re: [PATCH] ARM: crypto: comment out gcc warning that breaks clang builds
  2022-07-31 10:39   ` Greg Kroah-Hartman
@ 2022-07-31 11:13     ` Ard Biesheuvel
  2022-08-01  8:38       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 6+ messages in thread
From: Ard Biesheuvel @ 2022-07-31 11:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: # 3.4.x, Jason A. Donenfeld, Justin M. Forbes, Arnd Bergmann,
	Nicolas Pitre, Nathan Chancellor, Nick Desaulniers

On Sun, 31 Jul 2022 at 12:39, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Sun, Jul 31, 2022 at 12:17:40PM +0200, Ard Biesheuvel wrote:
> > On Sun, 31 Jul 2022 at 12:05, Greg Kroah-Hartman
> > <gregkh@linuxfoundation.org> wrote:
> > >
> > > From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > >
> > > The gcc build warning prevents all clang-built kernels from working
> > > properly, so comment it out to fix the build.
> > >
> > > This is a -stable kernel only patch for now, it will be resolved
> > > differently in mainline releases in the future.
> > >
> > > Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>
> > > Cc: "Justin M. Forbes" <jforbes@fedoraproject.org>
> > > Cc: Ard Biesheuvel <ardb@kernel.org>
> > > Cc: Arnd Bergmann <arnd@kernel.org>
> > > Cc: Nicolas Pitre <nico@linaro.org>
> > > Cc: Nathan Chancellor <nathan@kernel.org>
> > > Cc: Nick Desaulniers <ndesaulniers@google.com>
> > > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > ---
> > >  arch/arm/lib/xor-neon.c | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/arch/arm/lib/xor-neon.c b/arch/arm/lib/xor-neon.c
> > > index b99dd8e1c93f..7ba6cf826162 100644
> > > --- a/arch/arm/lib/xor-neon.c
> > > +++ b/arch/arm/lib/xor-neon.c
> > > @@ -26,8 +26,9 @@ MODULE_LICENSE("GPL");
> > >   * While older versions of GCC do not generate incorrect code, they fail to
> > >   * recognize the parallel nature of these functions, and emit plain ARM code,
> > >   * which is known to be slower than the optimized ARM code in asm-arm/xor.h.
> > > + *
> > > + * #warning This code requires at least version 4.6 of GCC
> > >   */
> > > -#warning This code requires at least version 4.6 of GCC
> > >  #endif
> > >
> > >  #pragma GCC diagnostic ignored "-Wunused-variable"
> >
> > LGTM but doesn't Clang also complain about the GCC specific pragma?
>
> I don't know, all clang builds always failed at the first #warning line :)

Just tried it, and it appears to ignore the #pragma so we're all good.

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

* Re: [PATCH] ARM: crypto: comment out gcc warning that breaks clang builds
  2022-07-31 10:05 [PATCH] ARM: crypto: comment out gcc warning that breaks clang builds Greg Kroah-Hartman
  2022-07-31 10:17 ` Ard Biesheuvel
@ 2022-07-31 11:22 ` Arnd Bergmann
  1 sibling, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2022-07-31 11:22 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: stable, Jason A. Donenfeld, Justin M. Forbes, Ard Biesheuvel,
	Nicolas Pitre, Nathan Chancellor, Nick Desaulniers

On Sun, Jul 31, 2022 at 12:05 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> The gcc build warning prevents all clang-built kernels from working
> properly, so comment it out to fix the build.
>
> This is a -stable kernel only patch for now, it will be resolved
> differently in mainline releases in the future.
>
> Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>
> Cc: "Justin M. Forbes" <jforbes@fedoraproject.org>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Arnd Bergmann <arnd@kernel.org>
> Cc: Nicolas Pitre <nico@linaro.org>
> Cc: Nathan Chancellor <nathan@kernel.org>
> Cc: Nick Desaulniers <ndesaulniers@google.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Acked-by: Arnd Bergmann <arnd@arndb.de>

I always resisted this from going into mainline without actually
making the code work
as intended on clang, but now that mainline kernels get it right and we have
decided not to backport the new version, this is the best we can do
for LTS backports.

        Arnd

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

* Re: [PATCH] ARM: crypto: comment out gcc warning that breaks clang builds
  2022-07-31 11:13     ` Ard Biesheuvel
@ 2022-08-01  8:38       ` Greg Kroah-Hartman
  0 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2022-08-01  8:38 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: # 3.4.x, Jason A. Donenfeld, Justin M. Forbes, Arnd Bergmann,
	Nicolas Pitre, Nathan Chancellor, Nick Desaulniers

On Sun, Jul 31, 2022 at 01:13:14PM +0200, Ard Biesheuvel wrote:
> On Sun, 31 Jul 2022 at 12:39, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > On Sun, Jul 31, 2022 at 12:17:40PM +0200, Ard Biesheuvel wrote:
> > > On Sun, 31 Jul 2022 at 12:05, Greg Kroah-Hartman
> > > <gregkh@linuxfoundation.org> wrote:
> > > >
> > > > From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > >
> > > > The gcc build warning prevents all clang-built kernels from working
> > > > properly, so comment it out to fix the build.
> > > >
> > > > This is a -stable kernel only patch for now, it will be resolved
> > > > differently in mainline releases in the future.
> > > >
> > > > Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>
> > > > Cc: "Justin M. Forbes" <jforbes@fedoraproject.org>
> > > > Cc: Ard Biesheuvel <ardb@kernel.org>
> > > > Cc: Arnd Bergmann <arnd@kernel.org>
> > > > Cc: Nicolas Pitre <nico@linaro.org>
> > > > Cc: Nathan Chancellor <nathan@kernel.org>
> > > > Cc: Nick Desaulniers <ndesaulniers@google.com>
> > > > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > > ---
> > > >  arch/arm/lib/xor-neon.c | 3 ++-
> > > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/arch/arm/lib/xor-neon.c b/arch/arm/lib/xor-neon.c
> > > > index b99dd8e1c93f..7ba6cf826162 100644
> > > > --- a/arch/arm/lib/xor-neon.c
> > > > +++ b/arch/arm/lib/xor-neon.c
> > > > @@ -26,8 +26,9 @@ MODULE_LICENSE("GPL");
> > > >   * While older versions of GCC do not generate incorrect code, they fail to
> > > >   * recognize the parallel nature of these functions, and emit plain ARM code,
> > > >   * which is known to be slower than the optimized ARM code in asm-arm/xor.h.
> > > > + *
> > > > + * #warning This code requires at least version 4.6 of GCC
> > > >   */
> > > > -#warning This code requires at least version 4.6 of GCC
> > > >  #endif
> > > >
> > > >  #pragma GCC diagnostic ignored "-Wunused-variable"
> > >
> > > LGTM but doesn't Clang also complain about the GCC specific pragma?
> >
> > I don't know, all clang builds always failed at the first #warning line :)
> 
> Just tried it, and it appears to ignore the #pragma so we're all good.

Wonderful, thanks for testing.

greg k-h

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

end of thread, other threads:[~2022-08-01  8:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-31 10:05 [PATCH] ARM: crypto: comment out gcc warning that breaks clang builds Greg Kroah-Hartman
2022-07-31 10:17 ` Ard Biesheuvel
2022-07-31 10:39   ` Greg Kroah-Hartman
2022-07-31 11:13     ` Ard Biesheuvel
2022-08-01  8:38       ` Greg Kroah-Hartman
2022-07-31 11:22 ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox