Re: mmotm 2020-05-05-15-28 uploaded (objtool warning)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 08, 2020 at 12:38:30PM +0200, Peter Zijlstra wrote:
> Subject: objtool: Allow no-op CFI ops in alternatives
> From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Date: Fri May 8 12:34:33 CEST 2020
> 
> Randy reported a false-positive: "alternative modifies stack".
> 
> What happens is that:
> 
> 	alternative_io("movl %0, %P1", "xchgl %0, %P1", X86_BUG_11AP,
>  13d:   89 9d 00 d0 7f ff       mov    %ebx,-0x803000(%rbp)
> 
> decodes to an instruction with CFI-ops because it modifies RBP.
> However, due to this being a !frame-pointer build, that should not in
> fact change the CFI state.
> 
> So instead of dis-allowing any CFI-op, verify the op would've actually
> changed the CFI state.
> 
> Fixes: 7117f16bf460 ("objtool: Fix ORC vs alternatives")
> Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>

It helps to put an example of the fixed warning in the commit log, like:

This fixes the following warning:

  arch/x86/hyperv/hv_apic.o: warning: objtool: hv_apic_write()+0x25: alternative modifies stack

Otherwise it looks good.

Acked-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>

-- 
Josh





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux