[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230718113936.GEZLZ5+ICZvIQa8Hl3@fat_crate.local>
Date: Tue, 18 Jul 2023 13:39:36 +0200
From: Borislav Petkov <bp@...en8.de>
To: Ard Biesheuvel <ardb@...nel.org>
Cc: linux-efi@...r.kernel.org, linux-kernel@...r.kernel.org,
Evgeniy Baskov <baskov@...ras.ru>,
Andy Lutomirski <luto@...nel.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Alexey Khoroshilov <khoroshilov@...ras.ru>,
Peter Jones <pjones@...hat.com>,
Gerd Hoffmann <kraxel@...hat.com>,
Dave Young <dyoung@...hat.com>,
Mario Limonciello <mario.limonciello@....com>,
Kees Cook <keescook@...omium.org>,
Tom Lendacky <thomas.lendacky@....com>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Joerg Roedel <jroedel@...e.de>
Subject: Re: [PATCH v6 01/21] x86/head_64: Store boot_params pointer in
callee save register
On Tue, Jul 11, 2023 at 11:14:33AM +0200, Ard Biesheuvel wrote:
> Instead of pushing/popping %RSI to/from the stack every time a function
> is called from startup_64(), store it in callee preserved register R15
> and grab it from there when its value is actually needed.
>
> Secondary boot does not and should not care about the value of %RSI at
> entry, and all the C handlers except the primary boot C entrypoint all
> ignore the function arguments entirely. Avoid inadvertent surprises by
> zeroing R15 on the secondary boot path explicitly.
>
> Signed-off-by: Ard Biesheuvel <ardb@...nel.org>
> ---
> arch/x86/kernel/head_64.S | 23 +++++---------------
> 1 file changed, 5 insertions(+), 18 deletions(-)
LGTM.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists