From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Al Stone <ahs3@redhat.com>
Cc: Al Stone <al.stone@linaro.org>,
linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org,
linux-pm@vger.kernel.org, linaro-acpi@lists.linaro.org,
linaro-kernel@lists.linaro.org, patches@linaro.org,
"lenb@kernel.org" <lenb@kernel.org>,
"tony.luck@intel.com" <tony.luck@intel.com>,
"fenghua.yu@intel.com" <fenghua.yu@intel.com>,
Pavel Machek <pavel@ucw.cz>,
"tglx@linutronix.de" <tglx@linutronix.de>,
mingo@redhat.com, "H. Peter Anvin" <hpa@linux.intel.com>
Subject: Re: [PATCH v3 0/5] ACPI: Provide better MADT subtable sanity checks
Date: Wed, 16 Sep 2015 02:44:25 +0000 [thread overview]
Message-ID: <1880799.vMhNVMG5Vc@vostro.rjw.lan> (raw)
In-Reply-To: <55F889E8.3070706@redhat.com>
On Tuesday, September 15, 2015 03:13:12 PM Al Stone wrote:
> On 09/09/2015 03:09 PM, Al Stone wrote:
> > Currently, the BAD_MADT_ENTRY macro is used to do a very simple sanity
> > check on the various subtables that are defined for the MADT. The check
> > compares the size of the subtable data structure as defined by ACPICA to
> > the length entry in the subtable. If they are not the same, the assumption
> > is that the subtable is incorrect.
> >
> > Over time, the ACPI spec has allowed for MADT subtables where this can
> > never be true (the local SAPIC subtable, for example). Or, more recently,
> > the spec has accumulated some minor flaws where there are three possible
> > sizes for a subtable, all of which are valid, but only for specific versions
> > of the spec (the GICC subtable). In both cases, BAD_MADT_ENTRY reports these
> > subtables as bad when they are not. In order to retain some sanity check
> > on the MADT subtables, we now have to special case these subtables. Of
> > necessity, these special cases have ended up in arch-dependent code (arm64)
> > or an arch has simply decided to forgo the check (ia64).
> >
> > This patch set replaces the BAD_MADT_ENTRY macro with a function called
> > bad_madt_entry(). This function uses a data set of details about the
> > subtables to provide more sanity checking than before:
> >
> > -- is the subtable legal for the version given in the FADT?
> >
> > -- is the subtable legal for the revision of the MADT in use?
> >
> > -- is the subtable of the proper length (including checking
> > on the one variable length subtable that is currently ignored),
> > given the FADT version and the MADT revision?
> >
> > Further, this patch set adds in the call to bad_madt_entry() from the
> > acpi_table_parse_madt() function, allowing it to be used consistently
> > by all architectures, for all subtables, and removing the need for each
> > of the subtable traversal callback functions to use BAD_MADT_ENTRY.
> >
> > In theory, as the ACPI specification changes, we would only have to add
> > additional information to the data set describing the MADT subtables in
> > order to continue providing sanity checks, even when new subtables are
> > added.
> >
> > These patches have been tested on an APM Mustang (arm64) and are known to
> > work there. They have also been cross-compiled for x86 and ia64 with no
> > known failures.
> >
> > Changes for v3:
> > -- Reviewed-and-tested-by from Sudeep Holla for arm64 parts
> > -- Clearer language in error messages (Graeme Gregory, Timur Tabi)
> > -- Double checked that inserting call to bad_madt_entry() into the
> > function acpi_parse_entries() does not impact current behavior
> > (Sudeep Holla)
> >
> > Changes for v2:
> > -- Acked-by on 2/5 from Marc Zyngier and Catalin Marinas for ARM
> > -- Correct faulty end of loop test found by Timur Tabi
> >
> >
> > Al Stone (5):
> > ACPI: add in a bad_madt_entry() function to eventually replace the
> > macro
> > ACPI / ARM64: remove usage of BAD_MADT_ENTRY/BAD_MADT_GICC_ENTRY
> > ACPI / IA64: remove usage of BAD_MADT_ENTRY
> > ACPI / X86: remove usage of BAD_MADT_ENTRY
> > ACPI: remove definition of BAD_MADT_ENTRY macro
> >
> > arch/arm64/include/asm/acpi.h | 8 --
> > arch/arm64/kernel/smp.c | 2 -
> > arch/ia64/kernel/acpi.c | 20 ----
> > arch/x86/kernel/acpi/boot.c | 27 -----
> > drivers/acpi/tables.c | 245 +++++++++++++++++++++++++++++++++++++++++-
> > drivers/irqchip/irq-gic.c | 6 --
> > include/linux/acpi.h | 4 -
> > 7 files changed, 244 insertions(+), 68 deletions(-)
> >
>
> Ping? Any additional comments on this version? I have only received
> feedback from arm64 reviewers so far, over three revisions, even though
> everyone that needs to be (ACPI, ia64, x86) has also been CCd.
>
> Anyone else before I fix a couple of things for v4 that the arm64 folks
> found? ACKs? NAKs? Please don't bother me, I'm in the merge window :)?
The merge window is actually over, so why would you expect anything like that?
I'm going to apply this series if people have no problems with it. I do think
it is slightly overkill, but then as long as it works ...
Thanks,
Rafael
next prev parent reply other threads:[~2015-09-16 2:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-09 21:09 [PATCH v3 0/5] ACPI: Provide better MADT subtable sanity checks Al Stone
2015-09-09 21:09 ` [PATCH v3 1/5] ACPI: add in a bad_madt_entry() function to eventually replace the macro Al Stone
2015-09-10 12:14 ` [Linaro-acpi] [PATCH v3 1/5] ACPI: add in a bad_madt_entry() function to eventually replace the Graeme Gregory
2015-09-10 14:13 ` Al Stone
2015-09-09 21:09 ` [PATCH v3 2/5] ACPI / ARM64: remove usage of BAD_MADT_ENTRY/BAD_MADT_GICC_ENTRY Al Stone
2015-09-09 21:09 ` [PATCH v3 3/5] ACPI / IA64: remove usage of BAD_MADT_ENTRY Al Stone
2015-09-09 21:09 ` [PATCH v3 4/5] ACPI / X86: " Al Stone
2015-09-09 21:09 ` [PATCH v3 5/5] ACPI: remove definition of BAD_MADT_ENTRY macro Al Stone
2015-09-10 12:16 ` [Linaro-acpi] [PATCH v3 0/5] ACPI: Provide better MADT subtable sanity checks Graeme Gregory
2015-09-15 21:13 ` Al Stone
2015-09-16 2:44 ` Rafael J. Wysocki [this message]
2015-09-16 16:24 ` Al Stone
2015-09-16 16:27 ` Al Stone
2015-09-16 19:26 ` Al Stone
2015-09-17 0:34 ` Rafael J. Wysocki
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=1880799.vMhNVMG5Vc@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=ahs3@redhat.com \
--cc=al.stone@linaro.org \
--cc=fenghua.yu@intel.com \
--cc=hpa@linux.intel.com \
--cc=lenb@kernel.org \
--cc=linaro-acpi@lists.linaro.org \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=patches@linaro.org \
--cc=pavel@ucw.cz \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
/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