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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 2 May 2022 20:09:03 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     Juergen Gross <jgross@...e.com>
Cc:     Lai Jiangshan <jiangshanlai@...il.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Andy Lutomirski <luto@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>, X86 ML <x86@...nel.org>,
        Lai Jiangshan <jiangshan.ljs@...group.com>,
        Ingo Molnar <mingo@...hat.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH V6 3/8] x86/entry: Move PUSH_AND_CLEAR_REGS out of
 error_entry()

On Mon, May 02, 2022 at 02:42:50PM +0200, Juergen Gross wrote:
> I think you could avoid the extra call/ret by doing something like:
> 
> SYM_CODE_START_LOCAL(error_exit_push_and_save)
> 	UNWIND_HINT_FUNC
> 	PUSH_AND_CLEAR_REGS save_ret=1
> 	ENCODE_FRAME_POINTER 8
> 	jmp error_exit
> SYM_CODE_END(error_exit_push_and_save)
> 
> ... and use this instead of patch 5:
> 
> 	ALTERNATIVE "call error_entry_push_and_save; movq %rax, %rsp", \
> 		"call push_and_clear_regs", X86_FEATURE_XENPV

I'm afraid I can't follow - you still need to call error_entry on
!XENPV. You have a function error_entry_push_and_save() but above it is
called error_*exit*_push_and_save...

Bottomline is, this should be as simple as possible code - an additional
CALL/RET doesn't really matter, perf-wise.

-- 
Regards/Gruss,
    Boris.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ