[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z9K3GXSaZUcVr8cb@gmail.com>
Date: Thu, 13 Mar 2025 11:44:41 +0100
From: Ingo Molnar <mingo@...nel.org>
To: David Woodhouse <dwmw2@...radead.org>
Cc: kexec@...ts.infradead.org, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H . Peter Anvin" <hpa@...or.com>,
David Woodhouse <dwmw@...zon.co.uk>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Kai Huang <kai.huang@...el.com>,
Nikolay Borisov <nik.borisov@...e.com>,
linux-kernel@...r.kernel.org, Simon Horman <horms@...nel.org>,
Dave Young <dyoung@...hat.com>,
Peter Zijlstra <peterz@...radead.org>, jpoimboe@...nel.org,
bsz@...zon.de
Subject: Re: [PATCH v7 7/8] [DO NOT MERGE] x86/kexec: Add int3 in kexec path
for testing
* David Woodhouse <dwmw2@...radead.org> wrote:
> From: David Woodhouse <dwmw@...zon.co.uk>
>
> Signed-off-by: David Woodhouse <dwmw@...zon.co.uk>
> ---
> arch/x86/kernel/relocate_kernel_64.S | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S
> index 17d41e6e1a4b..2b7fc59af373 100644
> --- a/arch/x86/kernel/relocate_kernel_64.S
> +++ b/arch/x86/kernel/relocate_kernel_64.S
> @@ -158,7 +158,7 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped)
> lidt (%rsp)
> addq $10, %rsp
>
> - //int3
> + int3
So this is all boot-serialized functionality with no SMP concerns
whatsoever, right?
If yes then we could use something like this:
static int exception_selftest = 1;
and add the INT3 point:
int3
.globl after_int3
after_int3:
And do this in the early exception handler:
...
if (exception_selftest) {
exception_selftest = 0;
print_something_warm_and_fuzzy();
IRET-to-after_int3;
}
...
... regular exception path ...
... but all in assembly or so ;-)
This would make it reasonably certain that the most complex bits of
this new debuging code are in working order, all the time.
Thanks,
Ingo
Powered by blists - more mailing lists