2024-02-01 00:15:19

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the tip tree

Hi all,

After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
produced this warning:

vmlinux.o: warning: objtool: fred_extint+0x1c: call to array_index_mask_nospec.constprop.0() leaves .noinstr.text section

Probably introduced by commit

6786137bf8fd ("x86/fred: FRED entry/exit and dispatch code")

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2024-02-01 05:27:17

by Xin Li (Intel)

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the tip tree

On 1/31/2024 4:14 PM, Stephen Rothwell wrote:
> Hi all,
>
> After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
>
> vmlinux.o: warning: objtool: fred_extint+0x1c: call to array_index_mask_nospec.constprop.0() leaves .noinstr.text section
>
> Probably introduced by commit
>
> 6786137bf8fd ("x86/fred: FRED entry/exit and dispatch code")
>

Thanks for reporting, I will take care of it.
Xin


2024-02-01 09:01:11

by Xin Li (Intel)

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the tip tree

On 1/31/2024 4:14 PM, Stephen Rothwell wrote:
> Hi all,
>
> After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
>
> vmlinux.o: warning: objtool: fred_extint+0x1c: call to array_index_mask_nospec.constprop.0() leaves .noinstr.text section
>
> Probably introduced by commit
>
> 6786137bf8fd ("x86/fred: FRED entry/exit and dispatch code")
>

The following patch gets rid of the warning.

Boris, should I send a format patch?

Thanks!
Xin

diff --git a/arch/x86/include/asm/barrier.h b/arch/x86/include/asm/barrier.h
index 0216f63a366b..fe1e7e3cc844 100644
--- a/arch/x86/include/asm/barrier.h
+++ b/arch/x86/include/asm/barrier.h
@@ -33,7 +33,7 @@
* Returns:
* 0 - (index < size)
*/
-static inline unsigned long array_index_mask_nospec(unsigned long index,
+static __always_inline unsigned long array_index_mask_nospec(unsigned
long index,
unsigned long size)
{
unsigned long mask;



2024-02-01 14:16:28

by Borislav Petkov

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the tip tree

On Thu, Feb 01, 2024 at 12:59:54AM -0800, Xin Li wrote:
> The following patch gets rid of the warning.
>
> Boris, should I send a format patch?

This is how kernel development is usually done. People send formal
patches and maintainers apply them.

:-)

Make sure you explain why you're fixing it.

Thx.

--
Regards/Gruss,
Boris.

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