]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ACPICA: actypes.h: Expand the ACPI_ACCESS_ definitions
authorMark Langsdorf <mlangsdo@redhat.com>
Wed, 22 Dec 2021 15:57:34 +0000 (16:57 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 08:04:27 +0000 (09:04 +0100)
commitf68c8cf54e0391daad152b2354bfd4f4b936cd60
tree7d2020f7a29e223a5f4070b03eeebc5a5d825010
parentc0b59abaf8effbac022f6d8b526c4b0b620920b3
ACPICA: actypes.h: Expand the ACPI_ACCESS_ definitions

[ Upstream commit f81bdeaf816142e0729eea0cc84c395ec9673151 ]

ACPICA commit bc02c76d518135531483dfc276ed28b7ee632ce1

The current ACPI_ACCESS_*_WIDTH defines do not provide a way to
test that size is small enough to not cause an overflow when
applied to a 32-bit integer.

Rather than adding more magic numbers, add ACPI_ACCESS_*_SHIFT,
ACPI_ACCESS_*_MAX, and ACPI_ACCESS_*_DEFAULT #defines and
redefine ACPI_ACCESS_*_WIDTH in terms of the new #defines.

This was inititally reported on Linux where a size of 102 in
ACPI_ACCESS_BIT_WIDTH caused an overflow error in the SPCR
initialization code.

Link: https://github.com/acpica/acpica/commit/bc02c76d
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/acpi/actypes.h