lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <553df45e-57fe-1066-ee4f-0dcd023c24c6@infradead.org>
Date:   Mon, 21 Jun 2021 16:30:04 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Stephen Rothwell <sfr@...b.auug.org.au>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Ingo Molnar <mingo@...nel.org>
Subject: Re: linux-next: Tree for Apr 16 (objtool: warnings)

On 6/21/21 7:23 AM, Peter Zijlstra wrote:
> On Mon, Jun 21, 2021 at 03:34:32PM +0200, Peter Zijlstra wrote:
>> On Fri, Apr 16, 2021 at 10:50:49AM -0700, Randy Dunlap wrote:
>>> On 4/16/21 4:36 AM, Stephen Rothwell wrote:
>>>> Hi all,
>>>>
>>>> Changes since 20210415:
>>>
>>>
>>> on x86_64, objtool is not liking retpoline.o:
>>>
>>> $ gcc --version
>>> gcc (SUSE Linux) 7.5.0
>>>
>>>
>>> Is there already a patch for these?
>>>
>>>
>>> ===== build-r8840.out =====
>>> arch/x86/lib/retpoline.o: warning: objtool: __x86_indirect_alt_call_rax()+0x0: call without frame pointer save/setup
>>> arch/x86/lib/retpoline.o: warning: objtool: __x86_indirect_alt_call_rbx()+0x0: call without frame pointer save/setup
>>> arch/x86/lib/retpoline.o: warning: objtool: __x86_indirect_alt_call_rcx()+0x0: call without frame pointer save/setup
>>> arch/x86/lib/retpoline.o: warning: objtool: __x86_indirect_alt_call_rdx()+0x0: call without frame pointer save/setup
>>> arch/x86/lib/retpoline.o: warning: objtool: __x86_indirect_alt_call_rsi()+0x0: call without frame pointer save/setup
>>> arch/x86/lib/retpoline.o: warning: objtool: __x86_indirect_alt_call_rdi()+0x0: call without frame pointer save/setup
>>> arch/x86/lib/retpoline.o: warning: objtool: __x86_indirect_alt_call_rbp()+0x0: call without frame pointer save/setup
>>> arch/x86/lib/retpoline.o: warning: objtool: __x86_indirect_alt_call_r8()+0x0: call without frame pointer save/setup
>>> arch/x86/lib/retpoline.o: warning: objtool: __x86_indirect_alt_call_r9()+0x0: call without frame pointer save/setup
>>> arch/x86/lib/retpoline.o: warning: objtool: __x86_indirect_alt_call_r10()+0x0: call without frame pointer save/setup
>>> arch/x86/lib/retpoline.o: warning: objtool: __x86_indirect_alt_call_r11()+0x0: call without frame pointer save/setup
>>> arch/x86/lib/retpoline.o: warning: objtool: __x86_indirect_alt_call_r12()+0x0: call without frame pointer save/setup
>>> arch/x86/lib/retpoline.o: warning: objtool: __x86_indirect_alt_call_r13()+0x0: call without frame pointer save/setup
>>> arch/x86/lib/retpoline.o: warning: objtool: __x86_indirect_alt_call_r14()+0x0: call without frame pointer save/setup
>>> arch/x86/lib/retpoline.o: warning: objtool: __x86_indirect_alt_call_r15()+0x0: call without frame pointer save/setup
>>
>> Damn, sorry I missed this. I know what the problem is, but I've yet to
>> find a solution that's not terrible... hold on.
> 
> ---
> Subject: objtool/x86: Ignore __x86_indirect_alt_* symbols
> From: Peter Zijlstra <peterz@...radead.org>
> Date: Mon Jun 21 16:13:55 CEST 2021
> 
> Because the __x86_indirect_alt* symbols are just that, objtool will
> try and validate them as regular symbols, instead of the alternative
> replacements that they are.
> 
> This goes sideways for FRAME_POINTER=y builds; which generate a fair
> amount of warnings.
> 
> Fixes: 9bc0bb50727c ("objtool/x86: Rewrite retpoline thunk calls")
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>

Looks good in my testing.  Thanks.

Acked-by: Randy Dunlap <rdunlap@...radead.org> # build-tested

> ---
>  arch/x86/lib/retpoline.S |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> --- a/arch/x86/lib/retpoline.S
> +++ b/arch/x86/lib/retpoline.S
> @@ -58,12 +58,16 @@ SYM_FUNC_START_NOALIGN(__x86_indirect_al
>  2:	.skip	5-(2b-1b), 0x90
>  SYM_FUNC_END(__x86_indirect_alt_call_\reg)
>  
> +STACK_FRAME_NON_STANDARD(__x86_indirect_alt_call_\reg)
> +
>  SYM_FUNC_START_NOALIGN(__x86_indirect_alt_jmp_\reg)
>  	ANNOTATE_RETPOLINE_SAFE
>  1:	jmp	*%\reg
>  2:	.skip	5-(2b-1b), 0x90
>  SYM_FUNC_END(__x86_indirect_alt_jmp_\reg)
>  
> +STACK_FRAME_NON_STANDARD(__x86_indirect_alt_jmp_\reg)
> +
>  .endm
>  
>  /*
> 


-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ