Linux kernel -stable discussions
 help / color / mirror / Atom feed
* stable-rc: 4.14 and 4.19: arch/x86/kernel/head_32.S:126: Error: invalid character '(' in mnemonic
@ 2023-11-03 15:37 Naresh Kamboju
  2023-11-03 15:57 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 5+ messages in thread
From: Naresh Kamboju @ 2023-11-03 15:37 UTC (permalink / raw)
  To: linux-stable, lkft-triage
  Cc: Greg Kroah-Hartman, Sasha Levin, Nathan Chancellor,
	Josh Poimboeuf, Peter Zijlstra

Following warnings and errors have been noticed while building i386 build
on stable-rc linux.4.19.y and linux.4.14.y.

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

Build log:
==========
kernel/profile.c: In function 'profile_dead_cpu':
kernel/profile.c:346:27: warning: the comparison will always evaluate
as 'true' for the address of 'prof_cpu_mask' will never be NULL
[-Waddress]
  346 |         if (prof_cpu_mask != NULL)
      |                           ^~
kernel/profile.c:49:22: note: 'prof_cpu_mask' declared here
   49 | static cpumask_var_t prof_cpu_mask;
      |                      ^~~~~~~~~~~~~
kernel/profile.c: In function 'profile_online_cpu':
kernel/profile.c:383:27: warning: the comparison will always evaluate
as 'true' for the address of 'prof_cpu_mask' will never be NULL
[-Waddress]
  383 |         if (prof_cpu_mask != NULL)
      |                           ^~
kernel/profile.c:49:22: note: 'prof_cpu_mask' declared here
   49 | static cpumask_var_t prof_cpu_mask;
      |                      ^~~~~~~~~~~~~
kernel/profile.c: In function 'profile_tick':
kernel/profile.c:413:47: warning: the comparison will always evaluate
as 'true' for the address of 'prof_cpu_mask' will never be NULL
[-Waddress]
  413 |         if (!user_mode(regs) && prof_cpu_mask != NULL &&
      |                                               ^~
kernel/profile.c:49:22: note: 'prof_cpu_mask' declared here
   49 | static cpumask_var_t prof_cpu_mask;
      |                      ^~~~~~~~~~~~~
arch/x86/kernel/head_32.S: Assembler messages:
arch/x86/kernel/head_32.S:126: Error: invalid character '(' in mnemonic
arch/x86/kernel/head_32.S:57:  Info: macro invoked from here
arch/x86/kernel/head_32.S:128: Error: invalid character '(' in mnemonic
arch/x86/kernel/head_32.S:57:  Info: macro invoked from here
make[3]: *** [scripts/Makefile.build:403: arch/x86/kernel/head_32.o] Error 1
make[3]: Target '__build' not remade because of errors.
make[2]: *** [scripts/Makefile.build:544: arch/x86/kernel] Error 2

Links:
 - https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-4.19.y/build/v4.19.297-41-g46e03d3c6192/testrun/20909218/suite/build/test/gcc-12-lkftconfig-debug-kmemleak/log

--
Linaro LKFT
https://lkft.linaro.org

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

* Re: stable-rc: 4.14 and 4.19: arch/x86/kernel/head_32.S:126: Error: invalid character '(' in mnemonic
  2023-11-03 15:37 stable-rc: 4.14 and 4.19: arch/x86/kernel/head_32.S:126: Error: invalid character '(' in mnemonic Naresh Kamboju
@ 2023-11-03 15:57 ` Greg Kroah-Hartman
  2023-11-03 15:59   ` Greg Kroah-Hartman
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-03 15:57 UTC (permalink / raw)
  To: Naresh Kamboju
  Cc: linux-stable, lkft-triage, Sasha Levin, Nathan Chancellor,
	Josh Poimboeuf, Peter Zijlstra

On Fri, Nov 03, 2023 at 09:07:32PM +0530, Naresh Kamboju wrote:
> Following warnings and errors have been noticed while building i386 build
> on stable-rc linux.4.19.y and linux.4.14.y.
> 
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> 
> Build log:
> ==========
> kernel/profile.c: In function 'profile_dead_cpu':
> kernel/profile.c:346:27: warning: the comparison will always evaluate
> as 'true' for the address of 'prof_cpu_mask' will never be NULL
> [-Waddress]
>   346 |         if (prof_cpu_mask != NULL)
>       |                           ^~
> kernel/profile.c:49:22: note: 'prof_cpu_mask' declared here
>    49 | static cpumask_var_t prof_cpu_mask;
>       |                      ^~~~~~~~~~~~~
> kernel/profile.c: In function 'profile_online_cpu':
> kernel/profile.c:383:27: warning: the comparison will always evaluate
> as 'true' for the address of 'prof_cpu_mask' will never be NULL
> [-Waddress]
>   383 |         if (prof_cpu_mask != NULL)
>       |                           ^~
> kernel/profile.c:49:22: note: 'prof_cpu_mask' declared here
>    49 | static cpumask_var_t prof_cpu_mask;
>       |                      ^~~~~~~~~~~~~
> kernel/profile.c: In function 'profile_tick':
> kernel/profile.c:413:47: warning: the comparison will always evaluate
> as 'true' for the address of 'prof_cpu_mask' will never be NULL
> [-Waddress]
>   413 |         if (!user_mode(regs) && prof_cpu_mask != NULL &&
>       |                                               ^~
> kernel/profile.c:49:22: note: 'prof_cpu_mask' declared here
>    49 | static cpumask_var_t prof_cpu_mask;
>       |                      ^~~~~~~~~~~~~

Those are not due to this set of patches, right?

> arch/x86/kernel/head_32.S: Assembler messages:
> arch/x86/kernel/head_32.S:126: Error: invalid character '(' in mnemonic
> arch/x86/kernel/head_32.S:57:  Info: macro invoked from here
> arch/x86/kernel/head_32.S:128: Error: invalid character '(' in mnemonic
> arch/x86/kernel/head_32.S:57:  Info: macro invoked from here

This is odd, nothing touches this file either.

7e09ac27f43b ("x86: Fix .brk attribute in linker script") is backported
here, perhaps that is the issue?  If you revert that, does the error go
away?

Let me see if I can build a 32 bit kernel anymore...

thanks,

greg k-h

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

* Re: stable-rc: 4.14 and 4.19: arch/x86/kernel/head_32.S:126: Error: invalid character '(' in mnemonic
  2023-11-03 15:57 ` Greg Kroah-Hartman
@ 2023-11-03 15:59   ` Greg Kroah-Hartman
  2023-11-03 16:09     ` Nathan Chancellor
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-03 15:59 UTC (permalink / raw)
  To: Naresh Kamboju
  Cc: linux-stable, lkft-triage, Sasha Levin, Nathan Chancellor,
	Josh Poimboeuf, Peter Zijlstra

On Fri, Nov 03, 2023 at 04:57:40PM +0100, Greg Kroah-Hartman wrote:
> On Fri, Nov 03, 2023 at 09:07:32PM +0530, Naresh Kamboju wrote:
> > Following warnings and errors have been noticed while building i386 build
> > on stable-rc linux.4.19.y and linux.4.14.y.
> > 
> > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> > 
> > Build log:
> > ==========
> > kernel/profile.c: In function 'profile_dead_cpu':
> > kernel/profile.c:346:27: warning: the comparison will always evaluate
> > as 'true' for the address of 'prof_cpu_mask' will never be NULL
> > [-Waddress]
> >   346 |         if (prof_cpu_mask != NULL)
> >       |                           ^~
> > kernel/profile.c:49:22: note: 'prof_cpu_mask' declared here
> >    49 | static cpumask_var_t prof_cpu_mask;
> >       |                      ^~~~~~~~~~~~~
> > kernel/profile.c: In function 'profile_online_cpu':
> > kernel/profile.c:383:27: warning: the comparison will always evaluate
> > as 'true' for the address of 'prof_cpu_mask' will never be NULL
> > [-Waddress]
> >   383 |         if (prof_cpu_mask != NULL)
> >       |                           ^~
> > kernel/profile.c:49:22: note: 'prof_cpu_mask' declared here
> >    49 | static cpumask_var_t prof_cpu_mask;
> >       |                      ^~~~~~~~~~~~~
> > kernel/profile.c: In function 'profile_tick':
> > kernel/profile.c:413:47: warning: the comparison will always evaluate
> > as 'true' for the address of 'prof_cpu_mask' will never be NULL
> > [-Waddress]
> >   413 |         if (!user_mode(regs) && prof_cpu_mask != NULL &&
> >       |                                               ^~
> > kernel/profile.c:49:22: note: 'prof_cpu_mask' declared here
> >    49 | static cpumask_var_t prof_cpu_mask;
> >       |                      ^~~~~~~~~~~~~
> 
> Those are not due to this set of patches, right?
> 
> > arch/x86/kernel/head_32.S: Assembler messages:
> > arch/x86/kernel/head_32.S:126: Error: invalid character '(' in mnemonic
> > arch/x86/kernel/head_32.S:57:  Info: macro invoked from here
> > arch/x86/kernel/head_32.S:128: Error: invalid character '(' in mnemonic
> > arch/x86/kernel/head_32.S:57:  Info: macro invoked from here
> 
> This is odd, nothing touches this file either.
> 
> 7e09ac27f43b ("x86: Fix .brk attribute in linker script") is backported
> here, perhaps that is the issue?  If you revert that, does the error go
> away?

Nope, that's not the issue.

> Let me see if I can build a 32 bit kernel anymore...

I can do this now, let me figure it out...

thanks,

greg k-h

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

* Re: stable-rc: 4.14 and 4.19: arch/x86/kernel/head_32.S:126: Error: invalid character '(' in mnemonic
  2023-11-03 15:59   ` Greg Kroah-Hartman
@ 2023-11-03 16:09     ` Nathan Chancellor
  2023-11-03 16:47       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 5+ messages in thread
From: Nathan Chancellor @ 2023-11-03 16:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Naresh Kamboju, linux-stable, lkft-triage, Sasha Levin,
	Josh Poimboeuf, Peter Zijlstra

On Fri, Nov 03, 2023 at 04:59:59PM +0100, Greg Kroah-Hartman wrote:
> On Fri, Nov 03, 2023 at 04:57:40PM +0100, Greg Kroah-Hartman wrote:
> > On Fri, Nov 03, 2023 at 09:07:32PM +0530, Naresh Kamboju wrote:
> > > Following warnings and errors have been noticed while building i386 build
> > > on stable-rc linux.4.19.y and linux.4.14.y.
> > > 
> > > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> > > 
> > > Build log:
> > > ==========
> > > kernel/profile.c: In function 'profile_dead_cpu':
> > > kernel/profile.c:346:27: warning: the comparison will always evaluate
> > > as 'true' for the address of 'prof_cpu_mask' will never be NULL
> > > [-Waddress]
> > >   346 |         if (prof_cpu_mask != NULL)
> > >       |                           ^~
> > > kernel/profile.c:49:22: note: 'prof_cpu_mask' declared here
> > >    49 | static cpumask_var_t prof_cpu_mask;
> > >       |                      ^~~~~~~~~~~~~
> > > kernel/profile.c: In function 'profile_online_cpu':
> > > kernel/profile.c:383:27: warning: the comparison will always evaluate
> > > as 'true' for the address of 'prof_cpu_mask' will never be NULL
> > > [-Waddress]
> > >   383 |         if (prof_cpu_mask != NULL)
> > >       |                           ^~
> > > kernel/profile.c:49:22: note: 'prof_cpu_mask' declared here
> > >    49 | static cpumask_var_t prof_cpu_mask;
> > >       |                      ^~~~~~~~~~~~~
> > > kernel/profile.c: In function 'profile_tick':
> > > kernel/profile.c:413:47: warning: the comparison will always evaluate
> > > as 'true' for the address of 'prof_cpu_mask' will never be NULL
> > > [-Waddress]
> > >   413 |         if (!user_mode(regs) && prof_cpu_mask != NULL &&
> > >       |                                               ^~
> > > kernel/profile.c:49:22: note: 'prof_cpu_mask' declared here
> > >    49 | static cpumask_var_t prof_cpu_mask;
> > >       |                      ^~~~~~~~~~~~~
> > 
> > Those are not due to this set of patches, right?
> > 
> > > arch/x86/kernel/head_32.S: Assembler messages:
> > > arch/x86/kernel/head_32.S:126: Error: invalid character '(' in mnemonic
> > > arch/x86/kernel/head_32.S:57:  Info: macro invoked from here
> > > arch/x86/kernel/head_32.S:128: Error: invalid character '(' in mnemonic
> > > arch/x86/kernel/head_32.S:57:  Info: macro invoked from here
> > 
> > This is odd, nothing touches this file either.
> > 
> > 7e09ac27f43b ("x86: Fix .brk attribute in linker script") is backported
> > here, perhaps that is the issue?  If you revert that, does the error go
> > away?
> 
> Nope, that's not the issue.
> 
> > Let me see if I can build a 32 bit kernel anymore...
> 
> I can do this now, let me figure it out...

Sorry, I think this is my bad. 4.14 and 4.19 do not have
SYM_DATA_START() or SYM_DATA_END() but I did not do a 32-bit x86 build
to see the error. I think this should be the fix, it builds for me at
least. Would you prefer a new set of patches for 4.14 and 4.19 or could
this just be squashed in to my existing backport of a1e2c031ec39
("x86/mm: Simplify RESERVE_BRK()")? Sorry for not catching 7e09ac27f43b
as a fix for that either.

Cheers,
Nathan

diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h
index e0e6aad9cd51..c5ed79159975 100644
--- a/arch/x86/include/asm/setup.h
+++ b/arch/x86/include/asm/setup.h
@@ -123,9 +123,9 @@ asmlinkage void __init x86_64_start_reservations(char *real_mode_data);
 
 .macro __RESERVE_BRK name, size
 	.pushsection .bss..brk, "aw"
-SYM_DATA_START(__brk_\name)
+GLOBAL(__brk_\name)
 	.skip \size
-SYM_DATA_END(__brk_\name)
+END(__brk_\name)
 	.popsection
 .endm
 

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

* Re: stable-rc: 4.14 and 4.19: arch/x86/kernel/head_32.S:126: Error: invalid character '(' in mnemonic
  2023-11-03 16:09     ` Nathan Chancellor
@ 2023-11-03 16:47       ` Greg Kroah-Hartman
  0 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-03 16:47 UTC (permalink / raw)
  To: Nathan Chancellor, Guenter Roeck
  Cc: Naresh Kamboju, linux-stable, lkft-triage, Sasha Levin,
	Josh Poimboeuf, Peter Zijlstra

On Fri, Nov 03, 2023 at 09:09:32AM -0700, Nathan Chancellor wrote:
> On Fri, Nov 03, 2023 at 04:59:59PM +0100, Greg Kroah-Hartman wrote:
> > On Fri, Nov 03, 2023 at 04:57:40PM +0100, Greg Kroah-Hartman wrote:
> > > On Fri, Nov 03, 2023 at 09:07:32PM +0530, Naresh Kamboju wrote:
> > > > Following warnings and errors have been noticed while building i386 build
> > > > on stable-rc linux.4.19.y and linux.4.14.y.
> > > > 
> > > > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> > > > 
> > > > Build log:
> > > > ==========
> > > > kernel/profile.c: In function 'profile_dead_cpu':
> > > > kernel/profile.c:346:27: warning: the comparison will always evaluate
> > > > as 'true' for the address of 'prof_cpu_mask' will never be NULL
> > > > [-Waddress]
> > > >   346 |         if (prof_cpu_mask != NULL)
> > > >       |                           ^~
> > > > kernel/profile.c:49:22: note: 'prof_cpu_mask' declared here
> > > >    49 | static cpumask_var_t prof_cpu_mask;
> > > >       |                      ^~~~~~~~~~~~~
> > > > kernel/profile.c: In function 'profile_online_cpu':
> > > > kernel/profile.c:383:27: warning: the comparison will always evaluate
> > > > as 'true' for the address of 'prof_cpu_mask' will never be NULL
> > > > [-Waddress]
> > > >   383 |         if (prof_cpu_mask != NULL)
> > > >       |                           ^~
> > > > kernel/profile.c:49:22: note: 'prof_cpu_mask' declared here
> > > >    49 | static cpumask_var_t prof_cpu_mask;
> > > >       |                      ^~~~~~~~~~~~~
> > > > kernel/profile.c: In function 'profile_tick':
> > > > kernel/profile.c:413:47: warning: the comparison will always evaluate
> > > > as 'true' for the address of 'prof_cpu_mask' will never be NULL
> > > > [-Waddress]
> > > >   413 |         if (!user_mode(regs) && prof_cpu_mask != NULL &&
> > > >       |                                               ^~
> > > > kernel/profile.c:49:22: note: 'prof_cpu_mask' declared here
> > > >    49 | static cpumask_var_t prof_cpu_mask;
> > > >       |                      ^~~~~~~~~~~~~
> > > 
> > > Those are not due to this set of patches, right?
> > > 
> > > > arch/x86/kernel/head_32.S: Assembler messages:
> > > > arch/x86/kernel/head_32.S:126: Error: invalid character '(' in mnemonic
> > > > arch/x86/kernel/head_32.S:57:  Info: macro invoked from here
> > > > arch/x86/kernel/head_32.S:128: Error: invalid character '(' in mnemonic
> > > > arch/x86/kernel/head_32.S:57:  Info: macro invoked from here
> > > 
> > > This is odd, nothing touches this file either.
> > > 
> > > 7e09ac27f43b ("x86: Fix .brk attribute in linker script") is backported
> > > here, perhaps that is the issue?  If you revert that, does the error go
> > > away?
> > 
> > Nope, that's not the issue.
> > 
> > > Let me see if I can build a 32 bit kernel anymore...
> > 
> > I can do this now, let me figure it out...
> 
> Sorry, I think this is my bad. 4.14 and 4.19 do not have
> SYM_DATA_START() or SYM_DATA_END() but I did not do a 32-bit x86 build
> to see the error. I think this should be the fix, it builds for me at
> least. Would you prefer a new set of patches for 4.14 and 4.19 or could
> this just be squashed in to my existing backport of a1e2c031ec39
> ("x86/mm: Simplify RESERVE_BRK()")? Sorry for not catching 7e09ac27f43b
> as a fix for that either.
> 
> Cheers,
> Nathan
> 
> diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h
> index e0e6aad9cd51..c5ed79159975 100644
> --- a/arch/x86/include/asm/setup.h
> +++ b/arch/x86/include/asm/setup.h
> @@ -123,9 +123,9 @@ asmlinkage void __init x86_64_start_reservations(char *real_mode_data);
>  
>  .macro __RESERVE_BRK name, size
>  	.pushsection .bss..brk, "aw"
> -SYM_DATA_START(__brk_\name)
> +GLOBAL(__brk_\name)
>  	.skip \size
> -SYM_DATA_END(__brk_\name)
> +END(__brk_\name)
>  	.popsection
>  .endm
>  

Yes, Guenter also just bisected to this one:
	https://lore.kernel.org/r/7e8bb270-871f-4324-9c73-d4abfd177b35@roeck-us.net

Let me squash this into the existing commits, thanks.

greg k-h

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

end of thread, other threads:[~2023-11-03 16:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-03 15:37 stable-rc: 4.14 and 4.19: arch/x86/kernel/head_32.S:126: Error: invalid character '(' in mnemonic Naresh Kamboju
2023-11-03 15:57 ` Greg Kroah-Hartman
2023-11-03 15:59   ` Greg Kroah-Hartman
2023-11-03 16:09     ` Nathan Chancellor
2023-11-03 16:47       ` Greg Kroah-Hartman

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