[PATCH 2/3] acpica: Check that the EBDA pointer is in valid range
by Vit Kabele
If the memory at 0x40e is uninitialized, the retrieved physical_memory
address of EBDA may be beyond the low memory (i.e. above 640K).
If so, the kernel may unintentionally access the VGA memory, that
might not be decoded or even present in case of virtualization.
Signed-off-by: Vit Kabele <vit(a)kabele.me>
Reviewed-by: Rudolf Marek <r.marek(a)assembler.cz>
---
drivers/acpi/acpica/tbxfroot.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/acpica/tbxfroot.c b/drivers/acpi/acpica/tbxfroot.c
index 9fec3df6c3ba..67b7df1c0520 100644
--- a/drivers/acpi/acpica/tbxfroot.c
+++ b/drivers/acpi/acpica/tbxfroot.c
@@ -138,8 +138,11 @@ acpi_find_root_pointer(acpi_physical_address *table_address)
acpi_os_unmap_memory(table_ptr, ACPI_EBDA_PTR_LENGTH);
/* EBDA present? */
-
- if (physical_address > 0x400) {
+ /* Check that the EBDA pointer from 0x40e is sane and does not point
+ * above valid low memory
+ */
+ if (physical_address > 0x400 &&
+ physical_address < 0xA0000) {
/*
* 1b) Search EBDA paragraphs (EBDA is required to be a
* minimum of 1K length)
--
2.30.2
2 months, 3 weeks
[PATCH 1/3] platform/x86: Check validity of EBDA pointer in mpparse.c
by Vit Kabele
The pointer to EBDA area is retrieved from a word at 0x40e in BDA.
In case that the memory there is not initialized and contains garbage,
it might happen that the kernel touches memory above 640K.
This may cause unwanted reads from VGA memory which may not be decoded,
or even present when running under virtualization.
This patch adds sanity check for the EBDA pointer retrieved from the memory
so that scanning EBDA does not leave the low memory.
Signed-off-by: Vit Kabele <vit(a)kabele.me>
Reviewed-by: Rudolf Marek <r.marek(a)assembler.cz>
---
arch/x86/include/asm/bios_ebda.h | 3 +++
arch/x86/kernel/ebda.c | 3 ---
arch/x86/kernel/mpparse.c | 12 +++++++++++-
3 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/arch/x86/include/asm/bios_ebda.h b/arch/x86/include/asm/bios_ebda.h
index 4d5a17e2febe..c3133c01d5b7 100644
--- a/arch/x86/include/asm/bios_ebda.h
+++ b/arch/x86/include/asm/bios_ebda.h
@@ -4,6 +4,9 @@
#include <asm/io.h>
+#define BIOS_START_MIN 0x20000U /* 128K, less than this is insane */
+#define BIOS_START_MAX 0x9f000U /* 640K, absolute maximum */
+
/*
* Returns physical address of EBDA. Returns 0 if there is no EBDA.
*/
diff --git a/arch/x86/kernel/ebda.c b/arch/x86/kernel/ebda.c
index 38e7d597b660..86c0801fc3ce 100644
--- a/arch/x86/kernel/ebda.c
+++ b/arch/x86/kernel/ebda.c
@@ -50,9 +50,6 @@
#define BIOS_RAM_SIZE_KB_PTR 0x413
-#define BIOS_START_MIN 0x20000U /* 128K, less than this is insane */
-#define BIOS_START_MAX 0x9f000U /* 640K, absolute maximum */
-
void __init reserve_bios_regions(void)
{
unsigned int bios_start, ebda_start;
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index fed721f90116..6bba0744d32d 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -633,7 +633,17 @@ void __init default_find_smp_config(void)
*/
address = get_bios_ebda();
- if (address)
+
+ /* Check that the EBDA address is sane and the get_bios_ebda() did not
+ * return just garbage from memory.
+ * The upper bound is considered valid if it points below 1K before
+ * end of the lower memory (i.e. 639K). The EBDA can be smaller
+ * than 1K in which case the pointer will point above 639K but that
+ * case is handled in step 2) above, and we don't need to adjust scan
+ * size to not bump into the memory above 640K.
+ */
+ if (address >= BIOS_START_MIN &&
+ address < 639 * 0x400)
smp_scan_config(address, 0x400);
}
--
2.30.2
2 months, 3 weeks
ACPICA version 20220331 released
by Moore, Robert
31 March 2022. Summary of changes for version 20220331:
This release is available at https://acpica.org/downloads
0) Global changes:
Update all copyright notices to the year 2022. This effects all source modules, as well as utility signons.
1) ACPICA kernel-resident subsystem:
For the ASL Sleep() operator, issue a warning if the sleep value is greater than 10 Milliseconds. Quick boottime is important, so warn about sleeps greater than 10 ms. Distribution Linux kernels reach initrd in 350 ms, so excessive delays should be called out. 10 ms is chosen randomly, but three of such delays would already make up ten percent of the boottime.
Namespace: Avoid attempting to walk the Namespace if the Namespace does not exist.
AML interpreter/iASL compiler: Add new Acpi 6.4 semantics for the LoadTable and Load operators. DDB_HANDLE is gone, now loadtable returns a pass/fail integer. Now load returns a pass/fail integer, as well as storing the return value in an optional 2nd argument.
Headers: Use uintptr_t and offsetof() in Linux kernel builds. To avoid "performing pointer subtraction with a null pointer has undefined behavior" compiler warnings, use uintptr_t and offsetof() that are always available during Linux kernel builds to define ACPI_UINTPTR_T and the ACPI_TO_INTEGER() and ACPI_OFFSET() macros when building the ACPICA code in the Linux kernel.
Added support for the Windows 11 _OSI string ("Windows 2021"). Submitted by superm1.
executer/exsystem: Inform users about ACPI spec violation for the Stall() operator. Values greater than 100 microseconds violate the ACPI specification, so warn users about it. From the ACPI Specification version 6.2 Errata A, 19.6.128 *Stall (Stall for a Short Time)*:
> The implementation of Stall is OS-specific, but must not relinquish
> control of the processor. Because of this, delays longer than 100
> microseconds must use Sleep instead of Stall.
2) iASL Compiler/Disassembler and ACPICA tools:
Data Table Compiler/Disassembler: Add support for the APMT table - ARM Performance Monitoring Unit table. Submitted by @bwicaksononv.
Data Table Compiler/Disassembler: For MADT, add support for the OEM-defined subtables (Types 0x80-0x7F).
Data Table Compiler: Fixed a problem with support for the SDEV table, where a subtable Length was not computed correctly.
Data Table Compiler/Disassembler: Add/fix the CFMWS subtable to the CEDT Acpi table support.
Data Table Compiler/Disassembler: Fix a compile issue with the CEDT and add template. Submitted by MasterDrogo.
Data Table Compiler/Disassembler: NHLT Changes provided by Piotr Maziarz:
iASL/NHLT: Rename linux specific structures to DeviceInfo to improve readability of the code.
iASL/NHLT: Fix parsing undocumented bytes at the end of Endpoint. Undocumented bytes at the end of Endpoint Descriptor can be present independently of Linux-specific structures. Their size can also vary.
iASL/NHLT: Treat TableTerminator as SpecificConfig. SpecificConfig has 4 bytes of size and then an amount of bytes specified by size. All of the terminators that I've seen had a size equal to 4, but theoretically it can vary.
iASL/AcpiExec: Use _exit instead of exit in signal handers (ctrl-C).
iASL: Remove a remark due to excessive output. Removed a remark for duplicate Offset() operators, due to a user complaint.
2 months, 3 weeks
[rafael-pm:bleeding-edge] BUILD SUCCESS bd19672308663b45ebecd8010fa1c51515719dc4
by kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
branch HEAD: bd19672308663b45ebecd8010fa1c51515719dc4 Merge branch 'pm-docs' into linux-next
elapsed time: 739m
configs tested: 198
configs skipped: 4
The following configs have been built successfully.
More configs may be tested in the coming days.
gcc tested configs:
arm defconfig
arm64 allyesconfig
arm64 defconfig
arm allyesconfig
arm allmodconfig
i386 randconfig-c001
mips randconfig-c004-20220329
m68k allyesconfig
m68k allmodconfig
s390 allmodconfig
powerpc allmodconfig
powerpc allyesconfig
s390 allyesconfig
sh landisk_defconfig
sh edosk7760_defconfig
powerpc rainier_defconfig
um i386_defconfig
xtensa smp_lx200_defconfig
arm mini2440_defconfig
arm integrator_defconfig
sh se7751_defconfig
sh migor_defconfig
arm clps711x_defconfig
arm xcep_defconfig
arm badge4_defconfig
m68k q40_defconfig
nios2 10m50_defconfig
mips fuloong2e_defconfig
sh microdev_defconfig
arc nsim_700_defconfig
arm nhk8815_defconfig
powerpc sam440ep_defconfig
mips ar7_defconfig
arm hisi_defconfig
ia64 zx1_defconfig
sh ecovec24_defconfig
arm pxa_defconfig
arc defconfig
i386 defconfig
mips xway_defconfig
xtensa common_defconfig
sh hp6xx_defconfig
arc axs101_defconfig
sparc sparc32_defconfig
parisc alldefconfig
h8300 h8s-sim_defconfig
sh magicpanelr2_defconfig
parisc generic-32bit_defconfig
m68k m5275evb_defconfig
mips cobalt_defconfig
arm trizeps4_defconfig
sh lboxre2_defconfig
sh ap325rxa_defconfig
arm lart_defconfig
arm lpd270_defconfig
powerpc ppc40x_defconfig
m68k m5249evb_defconfig
arm pleb_defconfig
arm s3c6400_defconfig
mips vocore2_defconfig
sh sh7724_generic_defconfig
mips bigsur_defconfig
sh sh7757lcr_defconfig
arm qcom_defconfig
mips db1xxx_defconfig
sh sdk7786_defconfig
powerpc wii_defconfig
powerpc mpc85xx_cds_defconfig
arm randconfig-c002-20220329
arm randconfig-c002-20220327
arm randconfig-c002-20220330
ia64 allmodconfig
ia64 defconfig
ia64 allyesconfig
m68k defconfig
nios2 defconfig
arc allyesconfig
nios2 allyesconfig
csky defconfig
alpha defconfig
alpha allyesconfig
xtensa allyesconfig
h8300 allyesconfig
sh allmodconfig
parisc defconfig
parisc64 defconfig
parisc allyesconfig
s390 defconfig
i386 allyesconfig
sparc allyesconfig
sparc defconfig
i386 debian-10.3-kselftests
i386 debian-10.3
mips allyesconfig
mips allmodconfig
powerpc allnoconfig
x86_64 randconfig-a006
x86_64 randconfig-a004
x86_64 randconfig-a002
x86_64 randconfig-a001-20220328
x86_64 randconfig-a003-20220328
x86_64 randconfig-a004-20220328
x86_64 randconfig-a002-20220328
x86_64 randconfig-a005-20220328
x86_64 randconfig-a006-20220328
i386 randconfig-a003
i386 randconfig-a001
i386 randconfig-a005
i386 randconfig-a001-20220328
i386 randconfig-a003-20220328
i386 randconfig-a006-20220328
i386 randconfig-a005-20220328
i386 randconfig-a004-20220328
i386 randconfig-a002-20220328
x86_64 randconfig-a013
x86_64 randconfig-a011
x86_64 randconfig-a015
riscv randconfig-r042-20220330
s390 randconfig-r044-20220330
arc randconfig-r043-20220330
arc randconfig-r043-20220329
s390 randconfig-r044-20220327
arc randconfig-r043-20220328
arc randconfig-r043-20220327
riscv randconfig-r042-20220329
s390 randconfig-r044-20220329
riscv randconfig-r042-20220327
riscv nommu_k210_defconfig
riscv allyesconfig
riscv nommu_virt_defconfig
riscv allnoconfig
riscv defconfig
riscv rv32_defconfig
riscv allmodconfig
x86_64 rhel-8.3-kselftests
um x86_64_defconfig
x86_64 allyesconfig
x86_64 defconfig
x86_64 rhel-8.3
x86_64 rhel-8.3-func
x86_64 rhel-8.3-kunit
x86_64 kexec
clang tested configs:
mips randconfig-c004-20220329
x86_64 randconfig-c007
mips randconfig-c004-20220327
arm randconfig-c002-20220327
arm randconfig-c002-20220329
riscv randconfig-c006-20220327
powerpc randconfig-c003-20220327
powerpc randconfig-c003-20220329
riscv randconfig-c006-20220329
i386 randconfig-c001
s390 randconfig-c005-20220327
s390 randconfig-c005-20220329
mips randconfig-c004-20220330
powerpc randconfig-c003-20220330
riscv randconfig-c006-20220330
arm randconfig-c002-20220330
powerpc mpc8313_rdb_defconfig
mips mtx1_defconfig
mips cu1830-neo_defconfig
powerpc socrates_defconfig
mips rs90_defconfig
powerpc mpc5200_defconfig
arm am200epdkit_defconfig
mips sb1250_swarm_defconfig
powerpc lite5200b_defconfig
powerpc kilauea_defconfig
riscv alldefconfig
x86_64 randconfig-a001
x86_64 randconfig-a003
x86_64 randconfig-a005
i386 randconfig-a002
i386 randconfig-a004
i386 randconfig-a006
x86_64 randconfig-a012
x86_64 randconfig-a014
x86_64 randconfig-a016
x86_64 randconfig-a016-20220328
x86_64 randconfig-a012-20220328
x86_64 randconfig-a011-20220328
x86_64 randconfig-a014-20220328
x86_64 randconfig-a013-20220328
x86_64 randconfig-a015-20220328
i386 randconfig-a012-20220328
i386 randconfig-a016-20220328
i386 randconfig-a015-20220328
i386 randconfig-a011-20220328
i386 randconfig-a013-20220328
i386 randconfig-a014-20220328
i386 randconfig-a011
i386 randconfig-a013
i386 randconfig-a015
riscv randconfig-r042-20220328
hexagon randconfig-r045-20220329
hexagon randconfig-r045-20220328
hexagon randconfig-r045-20220327
hexagon randconfig-r041-20220327
hexagon randconfig-r045-20220330
hexagon randconfig-r041-20220329
hexagon randconfig-r041-20220328
hexagon randconfig-r041-20220330
s390 randconfig-r044-20220328
--
0-DAY CI Kernel Test Service
https://01.org/lkp
2 months, 4 weeks
Re: [PATCH 05/22] acpica: Replace comments with C99 initializers
by Rafael J. Wysocki
On Sat, Mar 26, 2022 at 6:09 PM Benjamin Stürz <benni(a)stuerz.xyz> wrote:
>
> This replaces comments with C99's designated
> initializers because the kernel supports them now.
However, note that all of the ACPICA material should be submitted to
the upstream ACPICA project via https://github.com/acpica/acpica
Also please note that the set of compilers that need to be supported
by the ACPICA project is greater than the set of compilers that can
build the Linux kernel.
> Signed-off-by: Benjamin Stürz <benni(a)stuerz.xyz>
> ---
> drivers/acpi/acpica/utdecode.c | 183 ++++++++++++++++-----------------
> 1 file changed, 90 insertions(+), 93 deletions(-)
>
> diff --git a/drivers/acpi/acpica/utdecode.c b/drivers/acpi/acpica/utdecode.c
> index bcd3871079d7..d19868d2ea46 100644
> --- a/drivers/acpi/acpica/utdecode.c
> +++ b/drivers/acpi/acpica/utdecode.c
> @@ -156,37 +156,37 @@ static const char acpi_gbl_bad_type[] = "UNDEFINED";
> /* Printable names of the ACPI object types */
>
> static const char *acpi_gbl_ns_type_names[] = {
> - /* 00 */ "Untyped",
> - /* 01 */ "Integer",
> - /* 02 */ "String",
> - /* 03 */ "Buffer",
> - /* 04 */ "Package",
> - /* 05 */ "FieldUnit",
> - /* 06 */ "Device",
> - /* 07 */ "Event",
> - /* 08 */ "Method",
> - /* 09 */ "Mutex",
> - /* 10 */ "Region",
> - /* 11 */ "Power",
> - /* 12 */ "Processor",
> - /* 13 */ "Thermal",
> - /* 14 */ "BufferField",
> - /* 15 */ "DdbHandle",
> - /* 16 */ "DebugObject",
> - /* 17 */ "RegionField",
> - /* 18 */ "BankField",
> - /* 19 */ "IndexField",
> - /* 20 */ "Reference",
> - /* 21 */ "Alias",
> - /* 22 */ "MethodAlias",
> - /* 23 */ "Notify",
> - /* 24 */ "AddrHandler",
> - /* 25 */ "ResourceDesc",
> - /* 26 */ "ResourceFld",
> - /* 27 */ "Scope",
> - /* 28 */ "Extra",
> - /* 29 */ "Data",
> - /* 30 */ "Invalid"
> + [0] = "Untyped",
> + [1] = "Integer",
> + [2] = "String",
> + [3] = "Buffer",
> + [4] = "Package",
> + [5] = "FieldUnit",
> + [6] = "Device",
> + [7] = "Event",
> + [8] = "Method",
> + [9] = "Mutex",
> + [10] = "Region",
> + [11] = "Power",
> + [12] = "Processor",
> + [13] = "Thermal",
> + [14] = "BufferField",
> + [15] = "DdbHandle",
> + [16] = "DebugObject",
> + [17] = "RegionField",
> + [18] = "BankField",
> + [19] = "IndexField",
> + [20] = "Reference",
> + [21] = "Alias",
> + [22] = "MethodAlias",
> + [23] = "Notify",
> + [24] = "AddrHandler",
> + [25] = "ResourceDesc",
> + [26] = "ResourceFld",
> + [27] = "Scope",
> + [28] = "Extra",
> + [29] = "Data",
> + [30] = "Invalid"
> };
>
> const char *acpi_ut_get_type_name(acpi_object_type type)
> @@ -284,22 +284,22 @@ const char *acpi_ut_get_node_name(void *object)
> /* Printable names of object descriptor types */
>
> static const char *acpi_gbl_desc_type_names[] = {
> - /* 00 */ "Not a Descriptor",
> - /* 01 */ "Cached Object",
> - /* 02 */ "State-Generic",
> - /* 03 */ "State-Update",
> - /* 04 */ "State-Package",
> - /* 05 */ "State-Control",
> - /* 06 */ "State-RootParseScope",
> - /* 07 */ "State-ParseScope",
> - /* 08 */ "State-WalkScope",
> - /* 09 */ "State-Result",
> - /* 10 */ "State-Notify",
> - /* 11 */ "State-Thread",
> - /* 12 */ "Tree Walk State",
> - /* 13 */ "Parse Tree Op",
> - /* 14 */ "Operand Object",
> - /* 15 */ "Namespace Node"
> + [0] = "Not a Descriptor",
> + [1] = "Cached Object",
> + [2] = "State-Generic",
> + [3] = "State-Update",
> + [4] = "State-Package",
> + [5] = "State-Control",
> + [6] = "State-RootParseScope",
> + [7] = "State-ParseScope",
> + [8] = "State-WalkScope",
> + [9] = "State-Result",
> + [10] = "State-Notify",
> + [11] = "State-Thread",
> + [12] = "Tree Walk State",
> + [13] = "Parse Tree Op",
> + [14] = "Operand Object",
> + [15] = "Namespace Node"
> };
>
> const char *acpi_ut_get_descriptor_name(void *object)
> @@ -331,13 +331,13 @@ const char *acpi_ut_get_descriptor_name(void *object)
> /* Printable names of reference object sub-types */
>
> static const char *acpi_gbl_ref_class_names[] = {
> - /* 00 */ "Local",
> - /* 01 */ "Argument",
> - /* 02 */ "RefOf",
> - /* 03 */ "Index",
> - /* 04 */ "DdbHandle",
> - /* 05 */ "Named Object",
> - /* 06 */ "Debug"
> + [0] = "Local",
> + [1] = "Argument",
> + [2] = "RefOf",
> + [3] = "Index",
> + [4] = "DdbHandle",
> + [5] = "Named Object",
> + [6] = "Debug"
> };
>
> const char *acpi_ut_get_reference_name(union acpi_operand_object *object)
> @@ -416,25 +416,22 @@ const char *acpi_ut_get_mutex_name(u32 mutex_id)
> /* Names for Notify() values, used for debug output */
>
> static const char *acpi_gbl_generic_notify[ACPI_GENERIC_NOTIFY_MAX + 1] = {
> - /* 00 */ "Bus Check",
> - /* 01 */ "Device Check",
> - /* 02 */ "Device Wake",
> - /* 03 */ "Eject Request",
> - /* 04 */ "Device Check Light",
> - /* 05 */ "Frequency Mismatch",
> - /* 06 */ "Bus Mode Mismatch",
> - /* 07 */ "Power Fault",
> - /* 08 */ "Capabilities Check",
> - /* 09 */ "Device PLD Check",
> - /* 0A */ "Reserved",
> - /* 0B */ "System Locality Update",
> - /* 0C */ "Reserved (was previously Shutdown Request)",
> - /* Reserved in ACPI 6.0 */
> - /* 0D */ "System Resource Affinity Update",
> - /* 0E */ "Heterogeneous Memory Attributes Update",
> - /* ACPI 6.2 */
> - /* 0F */ "Error Disconnect Recover"
> - /* ACPI 6.3 */
> + [0] = "Bus Check",
> + [1] = "Device Check",
> + [2] = "Device Wake",
> + [3] = "Eject Request",
> + [4] = "Device Check Light",
> + [5] = "Frequency Mismatch",
> + [6] = "Bus Mode Mismatch",
> + [7] = "Power Fault",
> + [8] = "Capabilities Check",
> + [9] = "Device PLD Check",
> + [10] = "Reserved",
> + [11] = "System Locality Update",
> + [12] = "Reserved (was previously Shutdown Request)", /* Reserved in ACPI 6.0 */
> + [13] = "System Resource Affinity Update",
> + [14] = "Heterogeneous Memory Attributes Update", /* ACPI 6.2 */
> + [15] = "Error Disconnect Recover" /* ACPI 6.3 */
> };
>
> static const char *acpi_gbl_device_notify[5] = {
> @@ -521,26 +518,26 @@ const char *acpi_ut_get_notify_name(u32 notify_value, acpi_object_type type)
> ******************************************************************************/
>
> static const char *acpi_gbl_argument_type[20] = {
> - /* 00 */ "Unknown ARGP",
> - /* 01 */ "ByteData",
> - /* 02 */ "ByteList",
> - /* 03 */ "CharList",
> - /* 04 */ "DataObject",
> - /* 05 */ "DataObjectList",
> - /* 06 */ "DWordData",
> - /* 07 */ "FieldList",
> - /* 08 */ "Name",
> - /* 09 */ "NameString",
> - /* 0A */ "ObjectList",
> - /* 0B */ "PackageLength",
> - /* 0C */ "SuperName",
> - /* 0D */ "Target",
> - /* 0E */ "TermArg",
> - /* 0F */ "TermList",
> - /* 10 */ "WordData",
> - /* 11 */ "QWordData",
> - /* 12 */ "SimpleName",
> - /* 13 */ "NameOrRef"
> + [0x00] = "Unknown ARGP",
> + [0x01] = "ByteData",
> + [0x02] = "ByteList",
> + [0x03] = "CharList",
> + [0x04] = "DataObject",
> + [0x05] = "DataObjectList",
> + [0x06] = "DWordData",
> + [0x07] = "FieldList",
> + [0x08] = "Name",
> + [0x09] = "NameString",
> + [0x0A] = "ObjectList",
> + [0x0B] = "PackageLength",
> + [0x0C] = "SuperName",
> + [0x0D] = "Target",
> + [0x0E] = "TermArg",
> + [0x0F] = "TermList",
> + [0x10] = "WordData",
> + [0x11] = "QWordData",
> + [0x12] = "SimpleName",
> + [0x13] = "NameOrRef"
> };
>
> const char *acpi_ut_get_argument_type_name(u32 arg_type)
> --
> 2.35.1
>
3 months
[rafael-pm:bleeding-edge] BUILD SUCCESS 81bbf3bb3aecb62a539f57a1d81381f0f95ff6ec
by kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
branch HEAD: 81bbf3bb3aecb62a539f57a1d81381f0f95ff6ec Merge branch 'pm-opp' into linux-next
elapsed time: 727m
configs tested: 200
configs skipped: 3
The following configs have been built successfully.
More configs may be tested in the coming days.
gcc tested configs:
arm defconfig
arm64 allyesconfig
arm64 defconfig
arm allyesconfig
arm allmodconfig
i386 randconfig-c001
s390 allmodconfig
m68k allmodconfig
m68k allyesconfig
powerpc allmodconfig
powerpc allyesconfig
s390 allyesconfig
i386 randconfig-c001-20220321
mips randconfig-c004-20220320
arm shmobile_defconfig
ia64 tiger_defconfig
ia64 bigsur_defconfig
arm nhk8815_defconfig
arm keystone_defconfig
h8300 defconfig
powerpc mpc85xx_cds_defconfig
sparc sparc32_defconfig
sh polaris_defconfig
i386 defconfig
sh rsk7201_defconfig
h8300 edosk2674_defconfig
mips capcella_defconfig
sh shx3_defconfig
sh sh7757lcr_defconfig
arm multi_v7_defconfig
sh se7780_defconfig
arm pxa_defconfig
nios2 alldefconfig
arm aspeed_g5_defconfig
sh sh7785lcr_32bit_defconfig
arm at91_dt_defconfig
xtensa xip_kc705_defconfig
m68k m5407c3_defconfig
mips decstation_r4k_defconfig
h8300 allyesconfig
m68k sun3x_defconfig
powerpc taishan_defconfig
arc axs101_defconfig
mips decstation_defconfig
powerpc tqm8548_defconfig
parisc allyesconfig
mips tb0226_defconfig
powerpc canyonlands_defconfig
sh hp6xx_defconfig
mips maltasmvp_defconfig
powerpc motionpro_defconfig
sh sh7763rdp_defconfig
arc tb10x_defconfig
parisc64 defconfig
arc nsimosci_hs_smp_defconfig
sh j2_defconfig
ia64 defconfig
powerpc mpc837x_rdb_defconfig
powerpc64 defconfig
powerpc maple_defconfig
arm clps711x_defconfig
arm qcom_defconfig
arc axs103_smp_defconfig
xtensa iss_defconfig
sh microdev_defconfig
sh ul2_defconfig
um defconfig
nios2 3c120_defconfig
arm lpc18xx_defconfig
sparc alldefconfig
m68k mvme16x_defconfig
openrisc simple_smp_defconfig
mips cobalt_defconfig
powerpc mpc834x_itx_defconfig
sh sh03_defconfig
sh edosk7705_defconfig
arm vf610m4_defconfig
powerpc rainier_defconfig
arm s3c6400_defconfig
powerpc storcenter_defconfig
sh sh7785lcr_defconfig
arm hisi_defconfig
arc nsimosci_defconfig
nios2 allyesconfig
sh titan_defconfig
arm assabet_defconfig
sh se7619_defconfig
arm trizeps4_defconfig
arm omap2plus_defconfig
mips db1xxx_defconfig
mips xway_defconfig
parisc generic-64bit_defconfig
arm viper_defconfig
nds32 defconfig
m68k mvme147_defconfig
powerpc sam440ep_defconfig
sh defconfig
xtensa common_defconfig
riscv allmodconfig
arm randconfig-c002-20220321
arm randconfig-c002-20220320
arm randconfig-c002-20220322
ia64 allmodconfig
ia64 allyesconfig
m68k defconfig
nios2 defconfig
arc allyesconfig
nds32 allnoconfig
csky defconfig
alpha defconfig
alpha allyesconfig
xtensa allyesconfig
arc defconfig
sh allmodconfig
parisc defconfig
s390 defconfig
i386 allyesconfig
sparc allyesconfig
sparc defconfig
i386 debian-10.3-kselftests
i386 debian-10.3
mips allyesconfig
mips allmodconfig
powerpc allnoconfig
x86_64 randconfig-a016-20220321
x86_64 randconfig-a011-20220321
x86_64 randconfig-a012-20220321
x86_64 randconfig-a013-20220321
x86_64 randconfig-a014-20220321
x86_64 randconfig-a015-20220321
i386 randconfig-a015-20220321
i386 randconfig-a016-20220321
i386 randconfig-a013-20220321
i386 randconfig-a012-20220321
i386 randconfig-a014-20220321
i386 randconfig-a011-20220321
arc randconfig-r043-20220320
riscv randconfig-r042-20220321
s390 randconfig-r044-20220321
arc randconfig-r043-20220321
riscv nommu_k210_defconfig
riscv allyesconfig
riscv nommu_virt_defconfig
riscv allnoconfig
riscv defconfig
riscv rv32_defconfig
x86_64 rhel-8.3-kselftests
x86_64 allyesconfig
um x86_64_defconfig
um i386_defconfig
x86_64 defconfig
x86_64 rhel-8.3
x86_64 rhel-8.3-func
x86_64 rhel-8.3-kunit
x86_64 kexec
clang tested configs:
x86_64 randconfig-c007
mips randconfig-c004-20220320
arm randconfig-c002-20220320
powerpc randconfig-c003-20220320
riscv randconfig-c006-20220320
i386 randconfig-c001
arm randconfig-c002-20220322
powerpc randconfig-c003-20220322
riscv randconfig-c006-20220322
s390 randconfig-c005-20220322
mips randconfig-c004-20220322
powerpc gamecube_defconfig
mips maltaup_defconfig
hexagon alldefconfig
powerpc mpc5200_defconfig
arm orion5x_defconfig
powerpc akebono_defconfig
arm lpc32xx_defconfig
powerpc allyesconfig
powerpc mpc8272_ads_defconfig
arm neponset_defconfig
arm moxart_defconfig
arm64 allyesconfig
arm mvebu_v5_defconfig
powerpc fsp2_defconfig
arm am200epdkit_defconfig
hexagon defconfig
x86_64 randconfig-a001-20220321
x86_64 randconfig-a003-20220321
x86_64 randconfig-a005-20220321
x86_64 randconfig-a004-20220321
x86_64 randconfig-a002-20220321
x86_64 randconfig-a006-20220321
i386 randconfig-a001-20220321
i386 randconfig-a006-20220321
i386 randconfig-a003-20220321
i386 randconfig-a005-20220321
i386 randconfig-a004-20220321
i386 randconfig-a002-20220321
x86_64 randconfig-a012
x86_64 randconfig-a014
x86_64 randconfig-a016
riscv randconfig-r042-20220320
hexagon randconfig-r045-20220321
hexagon randconfig-r045-20220320
hexagon randconfig-r041-20220321
hexagon randconfig-r041-20220320
riscv randconfig-r042-20220322
hexagon randconfig-r045-20220322
hexagon randconfig-r041-20220322
s390 randconfig-r044-20220320
--
0-DAY CI Kernel Test Service
https://01.org/lkp
3 months
[rafael-pm:bleeding-edge] BUILD SUCCESS c4869334ceaf0b0d33b2b606a68221a486d4c7d6
by kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
branch HEAD: c4869334ceaf0b0d33b2b606a68221a486d4c7d6 Merge branch 'pm-docs-next' into bleeding-edge
elapsed time: 817m
configs tested: 119
configs skipped: 3
The following configs have been built successfully.
More configs may be tested in the coming days.
gcc tested configs:
arm defconfig
arm allmodconfig
arm allyesconfig
arm64 defconfig
arm64 allyesconfig
i386 randconfig-c001
powerpc tqm8xx_defconfig
mips ar7_defconfig
sh microdev_defconfig
sh polaris_defconfig
arm exynos_defconfig
arm iop32x_defconfig
sh se7343_defconfig
mips tb0226_defconfig
powerpc ep8248e_defconfig
sh se7619_defconfig
ia64 alldefconfig
powerpc maple_defconfig
mips maltasmvp_defconfig
arm randconfig-c002-20220318
arm randconfig-c002-20220317
ia64 defconfig
ia64 allmodconfig
ia64 allyesconfig
m68k defconfig
m68k allyesconfig
m68k allmodconfig
csky defconfig
alpha defconfig
nds32 defconfig
alpha allyesconfig
nios2 allyesconfig
arc defconfig
sh allmodconfig
h8300 allyesconfig
xtensa allyesconfig
parisc defconfig
s390 defconfig
parisc64 defconfig
s390 allmodconfig
s390 allyesconfig
parisc allyesconfig
i386 allyesconfig
i386 debian-10.3
i386 debian-10.3-kselftests
i386 defconfig
sparc allyesconfig
sparc defconfig
nds32 allnoconfig
nios2 defconfig
arc allyesconfig
mips allyesconfig
mips allmodconfig
powerpc allnoconfig
powerpc allmodconfig
powerpc allyesconfig
x86_64 randconfig-a006
x86_64 randconfig-a002
x86_64 randconfig-a004
i386 randconfig-a003
i386 randconfig-a001
i386 randconfig-a005
x86_64 randconfig-a013
x86_64 randconfig-a011
x86_64 randconfig-a015
i386 randconfig-a014
i386 randconfig-a012
i386 randconfig-a016
arc randconfig-r043-20220318
riscv randconfig-r042-20220317
arc randconfig-r043-20220317
s390 randconfig-r044-20220317
riscv allyesconfig
riscv allnoconfig
riscv defconfig
riscv rv32_defconfig
riscv allmodconfig
riscv nommu_k210_defconfig
riscv nommu_virt_defconfig
um i386_defconfig
um x86_64_defconfig
x86_64 defconfig
x86_64 allyesconfig
x86_64 kexec
x86_64 rhel-8.3
x86_64 rhel-8.3-func
x86_64 rhel-8.3-kunit
x86_64 rhel-8.3-kselftests
clang tested configs:
arm randconfig-c002-20220318
x86_64 randconfig-c007
s390 randconfig-c005-20220317
s390 randconfig-c005-20220318
arm randconfig-c002-20220317
mips randconfig-c004-20220318
mips randconfig-c004-20220317
riscv randconfig-c006-20220318
powerpc randconfig-c003-20220318
powerpc randconfig-c003-20220317
i386 randconfig-c001
riscv randconfig-c006-20220317
arm milbeaut_m10v_defconfig
powerpc icon_defconfig
arm orion5x_defconfig
mips mtx1_defconfig
x86_64 randconfig-a001
x86_64 randconfig-a003
x86_64 randconfig-a005
i386 randconfig-a002
i386 randconfig-a006
i386 randconfig-a004
x86_64 randconfig-a012
x86_64 randconfig-a014
x86_64 randconfig-a016
i386 randconfig-a011
i386 randconfig-a013
i386 randconfig-a015
hexagon randconfig-r045-20220318
hexagon randconfig-r041-20220318
hexagon randconfig-r041-20220317
s390 randconfig-r044-20220318
hexagon randconfig-r045-20220317
riscv randconfig-r042-20220318
---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
3 months, 1 week
[rafael-pm:bleeding-edge] BUILD SUCCESS 1887e35ee99cdab28fdd1cfd97412b10926fc1e9
by kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
branch HEAD: 1887e35ee99cdab28fdd1cfd97412b10926fc1e9 Merge branch 'thermal-int340x' into bleeding-edge
elapsed time: 731m
configs tested: 109
configs skipped: 4
The following configs have been built successfully.
More configs may be tested in the coming days.
gcc tested configs:
arm defconfig
arm64 defconfig
arm allmodconfig
arm allyesconfig
arm64 allyesconfig
i386 randconfig-c001
arm zeus_defconfig
arm lubbock_defconfig
sh espt_defconfig
powerpc bamboo_defconfig
ia64 alldefconfig
mips jazz_defconfig
arc alldefconfig
arm clps711x_defconfig
m68k m5208evb_defconfig
sh rsk7201_defconfig
arm jornada720_defconfig
alpha alldefconfig
sh dreamcast_defconfig
arm cerfcube_defconfig
arm stm32_defconfig
sh sdk7780_defconfig
arm randconfig-c002-20220317
ia64 allmodconfig
ia64 allyesconfig
ia64 defconfig
m68k defconfig
m68k allyesconfig
m68k allmodconfig
csky defconfig
alpha defconfig
nds32 defconfig
alpha allyesconfig
nios2 allyesconfig
nds32 allnoconfig
nios2 defconfig
arc allyesconfig
arc defconfig
sh allmodconfig
h8300 allyesconfig
xtensa allyesconfig
parisc defconfig
parisc64 defconfig
s390 allmodconfig
parisc allyesconfig
s390 defconfig
s390 allyesconfig
i386 allyesconfig
i386 debian-10.3
i386 debian-10.3-kselftests
i386 defconfig
sparc allyesconfig
sparc defconfig
mips allyesconfig
mips allmodconfig
powerpc allnoconfig
powerpc allmodconfig
powerpc allyesconfig
x86_64 randconfig-a002
x86_64 randconfig-a004
x86_64 randconfig-a006
i386 randconfig-a003
i386 randconfig-a001
i386 randconfig-a005
x86_64 randconfig-a015
x86_64 randconfig-a013
x86_64 randconfig-a011
i386 randconfig-a014
i386 randconfig-a012
i386 randconfig-a016
arc randconfig-r043-20220317
riscv randconfig-r042-20220317
s390 randconfig-r044-20220317
riscv nommu_k210_defconfig
riscv nommu_virt_defconfig
riscv allyesconfig
riscv allnoconfig
riscv defconfig
riscv rv32_defconfig
riscv allmodconfig
um i386_defconfig
um x86_64_defconfig
x86_64 defconfig
x86_64 allyesconfig
x86_64 kexec
x86_64 rhel-8.3
x86_64 rhel-8.3-func
x86_64 rhel-8.3-kunit
x86_64 rhel-8.3-kselftests
clang tested configs:
mips ip28_defconfig
powerpc mpc832x_rdb_defconfig
mips lemote2f_defconfig
powerpc ppc64e_defconfig
powerpc gamecube_defconfig
powerpc ebony_defconfig
x86_64 randconfig-a001
x86_64 randconfig-a003
x86_64 randconfig-a005
i386 randconfig-a002
i386 randconfig-a004
i386 randconfig-a006
x86_64 randconfig-a012
x86_64 randconfig-a016
x86_64 randconfig-a014
i386 randconfig-a011
i386 randconfig-a013
i386 randconfig-a015
hexagon randconfig-r045-20220317
hexagon randconfig-r041-20220317
---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
3 months, 1 week
[PATCH 3/3 RESEND] acpica: Do not touch VGA memory when EBDA < 1KiB
by Vit Kabele
The ACPICA code assumes that EBDA region must be at least 1KiB in size.
Because this is not guaranteed, it might happen that while scanning the
memory for RSDP pointer, the kernel touches memory above 640KiB.
This is unwanted as the VGA memory range may not be decoded or
even present when running under virtualization.
Signed-off-by: Vit Kabele <vit(a)kabele.me>
Reviewed-by: Rudolf Marek <r.marek(a)assembler.cz>
---
drivers/acpi/acpica/tbxfroot.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/drivers/acpi/acpica/tbxfroot.c b/drivers/acpi/acpica/tbxfroot.c
index 67b7df1c0520..b1f4a91044d9 100644
--- a/drivers/acpi/acpica/tbxfroot.c
+++ b/drivers/acpi/acpica/tbxfroot.c
@@ -114,6 +114,7 @@ acpi_find_root_pointer(acpi_physical_address *table_address)
u8 *table_ptr;
u8 *mem_rover;
u32 physical_address;
+ u32 ebda_window_size;
ACPI_FUNCTION_TRACE(acpi_find_root_pointer);
@@ -143,25 +144,32 @@ acpi_find_root_pointer(acpi_physical_address *table_address)
*/
if (physical_address > 0x400 &&
physical_address < 0xA0000) {
+ /* Calculate the scan window size
+ * The EBDA is not guaranteed to be larger than a KiB
+ * and in case that it is smaller the scanning function would
+ * leave the low memory and continue to the VGA range.
+ */
+ ebda_window_size = ACPI_MIN(ACPI_EBDA_WINDOW_SIZE,
+ 0xA0000 - physical_address);
+
/*
- * 1b) Search EBDA paragraphs (EBDA is required to be a
- * minimum of 1K length)
+ * 1b) Search EBDA paragraphs
*/
table_ptr = acpi_os_map_memory((acpi_physical_address)
physical_address,
- ACPI_EBDA_WINDOW_SIZE);
+ ebda_window_size);
if (!table_ptr) {
ACPI_ERROR((AE_INFO,
"Could not map memory at 0x%8.8X for length %u",
- physical_address, ACPI_EBDA_WINDOW_SIZE));
+ physical_address, ebda_window_size));
return_ACPI_STATUS(AE_NO_MEMORY);
}
mem_rover =
acpi_tb_scan_memory_for_rsdp(table_ptr,
- ACPI_EBDA_WINDOW_SIZE);
- acpi_os_unmap_memory(table_ptr, ACPI_EBDA_WINDOW_SIZE);
+ ebda_window_size);
+ acpi_os_unmap_memory(table_ptr, ebda_window_size);
if (mem_rover) {
--
2.30.2
3 months, 1 week
[PATCH 2/3 RESEND] acpica: Check that the EBDA pointer is in valid range
by Vit Kabele
If the memory at 0x40e is uninitialized, the retrieved physical_memory
address of EBDA may be beyond the low memory (i.e. above 640K).
If so, the kernel may unintentionally access the VGA memory, that
might not be decoded or even present in case of virtualization.
Signed-off-by: Vit Kabele <vit(a)kabele.me>
Reviewed-by: Rudolf Marek <r.marek(a)assembler.cz>
---
drivers/acpi/acpica/tbxfroot.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/acpica/tbxfroot.c b/drivers/acpi/acpica/tbxfroot.c
index 9fec3df6c3ba..67b7df1c0520 100644
--- a/drivers/acpi/acpica/tbxfroot.c
+++ b/drivers/acpi/acpica/tbxfroot.c
@@ -138,8 +138,11 @@ acpi_find_root_pointer(acpi_physical_address *table_address)
acpi_os_unmap_memory(table_ptr, ACPI_EBDA_PTR_LENGTH);
/* EBDA present? */
-
- if (physical_address > 0x400) {
+ /* Check that the EBDA pointer from 0x40e is sane and does not point
+ * above valid low memory
+ */
+ if (physical_address > 0x400 &&
+ physical_address < 0xA0000) {
/*
* 1b) Search EBDA paragraphs (EBDA is required to be a
* minimum of 1K length)
--
2.30.2
3 months, 1 week