From: Chunjie Zhu <chunjie.zhu@cloud.com>
To: rafael@kernel.org
Cc: chunjie.zhu@cloud.com, lenb@kernel.org,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix kdump kernel cannot find ACPI RSDP
Date: Wed, 29 May 2024 09:21:15 +0000 [thread overview]
Message-ID: <20240529092115.375113-1-chunjie.zhu@cloud.com> (raw)
In-Reply-To: <CAJZ5v0gcyZM7PZPrKccLhNtNDhHvqrZsgD-+Xx+W9WesD3yhyw@mail.gmail.com>
> From: "Rafael J. Wysocki" <rafael@kernel.org>
> Date: Mon, 27 May 2024 12:52:19 +0200
> Subject: Re: [PATCH] fix kdump kernel cannot find ACPI RSDP
> To: Chunjie Zhu <chunjie.zhu@cloud.com>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>, Len Brown <lenb@kernel.org>, linux-acpi@vger.kernel.org,
> linux-kernel@vger.kernel.org
>
> On Fri, May 24, 2024 at 11:43=E2=80=AFAM Chunjie Zhu <chunjie.zhu@cloud.com=
> > wrote:
> >
> > kexec/kdump must pass acpi_rsdp (physical address of ACPI RSDP table) to =
> the
> > crash kernel, especially in EFI case, otherwise, the crash kernel fails t=
> o
> > locate ACPI RSDP table. Consequently, ACPI init runs into error, and APIC
> > mmio read page fault happens, finally crash kernel gets stuck.
>
> Fair enough.
>
> So has this ever worked before? Presumably it has, in which case it
> has regressed and so it would be prudent to say when it broke and why
> and explain why the proposed change is the right one to make.
The existing code works only if the kexec() system call (CONFIG_KEXEC) is
enabled, however, we can enter the kdump kernel by one of the following
methods,
1. kexec_file system call (CONFIG_KEXEC_FILE)
2. Xen-initiated crash
Instead of CONFIG_KEXEC, setup_acpi_rsdp should depend on CONFIG_KEXEC_CORE,
which should be enabled in any case where kernel is used as a kdump kernel.
>
> > Signed-off-by: Chunjie Zhu <chunjie.zhu@cloud.com>
> > ---
> > drivers/acpi/osl.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
> > index f725813d0cce..39474468dba1 100644
> > --- a/drivers/acpi/osl.c
> > +++ b/drivers/acpi/osl.c
> > @@ -174,7 +174,7 @@ void acpi_os_vprintf(const char *fmt, va_list args)
> > #endif
> > }
> >
> > -#ifdef CONFIG_KEXEC
> > +#ifdef CONFIG_KEXEC_CORE
> > static unsigned long acpi_rsdp;
> > static int __init setup_acpi_rsdp(char *arg)
> > {
> > @@ -187,7 +187,7 @@ acpi_physical_address __init acpi_os_get_root_pointer=
> (void)
> > {
> > acpi_physical_address pa;
> >
> > -#ifdef CONFIG_KEXEC
> > +#ifdef CONFIG_KEXEC_CORE
> > /*
> > * We may have been provided with an RSDP on the command line,
> > * but if a malicious user has done so they may be pointing us
> > --
> > 2.34.1
> >
>
prev parent reply other threads:[~2024-05-29 9:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-24 9:41 Chunjie Zhu
2024-05-27 10:52 ` Rafael J. Wysocki
2024-05-29 9:21 ` Chunjie Zhu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240529092115.375113-1-chunjie.zhu@cloud.com \
--to=chunjie.zhu@cloud.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®