[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201009144215.GA3302@suse.de>
Date: Fri, 9 Oct 2020 16:42:15 +0200
From: Joerg Roedel <jroedel@...e.de>
To: Arvind Sankar <nivedita@...m.mit.edu>
Cc: x86@...nel.org, Borislav Petkov <bp@...en8.de>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/5] x86/boot/64: Show original faulting address in
case of error
On Thu, Oct 08, 2020 at 03:16:21PM -0400, Arvind Sankar wrote:
> This makes the #PF handler print the original CR2 value in case of
> error, instead of after aligning to PMD_SIZE.
>
> Signed-off-by: Arvind Sankar <nivedita@...m.mit.edu>
> ---
> arch/x86/boot/compressed/ident_map_64.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/boot/compressed/ident_map_64.c b/arch/x86/boot/compressed/ident_map_64.c
> index 063a60edcf99..fd957b2625e9 100644
> --- a/arch/x86/boot/compressed/ident_map_64.c
> +++ b/arch/x86/boot/compressed/ident_map_64.c
> @@ -327,9 +327,6 @@ void do_boot_page_fault(struct pt_regs *regs, unsigned long error_code)
>
> ghcb_fault = sev_es_check_ghcb_fault(address);
>
> - address &= PMD_MASK;
> - end = address + PMD_SIZE;
> -
> /*
> * Check for unexpected error codes. Unexpected are:
> * - Faults on present pages
> @@ -345,5 +342,8 @@ void do_boot_page_fault(struct pt_regs *regs, unsigned long error_code)
> * Error code is sane - now identity map the 2M region around
> * the faulting address.
> */
> + address &= PMD_MASK;
> + end = address + PMD_SIZE;
> +
> add_identity_map(address, end);
> }
Reviewed-by: Joerg Roedel <jroedel@...e.de>
Powered by blists - more mailing lists