Re: [PATCH] x86/hweight: Fix and improve __arch_hweight{32,64}() assembly

From: Uros Bizjak
Date: Mon Mar 10 2025 - 17:19:13 EST


On Mon, Mar 10, 2025 at 10:08 PM Borislav Petkov <bp@xxxxxxxxx> wrote:
>
> On Mon, Mar 10, 2025 at 09:54:25PM +0100, Uros Bizjak wrote:
> > Ok, so let it be your way and let's just sweep the issue under the carpet.
>
> Can you please read my mails more carefilly? Where did I say we should sweep
> the issue under the carpet?

The "stop with this silliness" part? But let's put this at rest.

> The commit message should be *perfectly* clear what it is fixing. This
>
> "a) Use ASM_CALL_CONSTRAINT to prevent inline asm that includes call
> instruction from being scheduled before the frame pointer gets set
> up by the containing function, causing objtool to print a "call
> without frame pointer save/setup" warning."
>
> says that objool is printing a warning. When I ask, it is not really printing
> a warning but it can potentially do so because the compiler is allowed to
> schedule things wrongly.
>
> Do you notice the difference?

So, rewording this part to:

a) Use ASM_CALL_CONSTRAINT to prevent inline asm that includes call
instruction from being scheduled by the compiler before the frame
pointer gets set
up by the containing function. This unconstrained scheduling might
cause objtool to print a "call without frame pointer save/setup"
warning.

would be ok?

Thanks,
Uros.