linux/drivers/acpi/acpica
Vegard Nossum 25928deeb1 ACPICA: Always create namespace nodes using acpi_ns_create_node()
ACPICA commit 29da9a2a3f5b2c60420893e5c6309a0586d7a329

ACPI is allocating an object using kmalloc(), but then frees it
using kmem_cache_free(<"Acpi-Namespace" kmem_cache>).

This is wrong and can lead to boot failures manifesting like this:

    hpet0: 3 comparators, 64-bit 100.000000 MHz counter
    clocksource: Switched to clocksource tsc-early
    BUG: unable to handle page fault for address: 000000003ffe0018
    #PF: supervisor read access in kernel mode
    #PF: error_code(0x0000) - not-present page
    PGD 0 P4D 0
    Oops: 0000 [#1] SMP PTI
    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.6.0+ #211
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
Ubuntu-1.8.2-1ubuntu1 04/01/2014
    RIP: 0010:kmem_cache_alloc+0x70/0x1d0
    Code: 00 00 4c 8b 45 00 65 49 8b 50 08 65 4c 03 05 6f cc e7 7e 4d 8b
20 4d 85 e4 0f 84 3d 01 00 00 8b 45 20 48 8b 7d 00 48 8d 4a 01 <49> 8b
   1c 04 4c 89 e0 65 48 0f c7 0f 0f 94 c0 84 c0 74 c5 8b 45 20
    RSP: 0000:ffffc90000013df8 EFLAGS: 00010206
    RAX: 0000000000000018 RBX: ffffffff81c49200 RCX: 0000000000000002
    RDX: 0000000000000001 RSI: 0000000000000dc0 RDI: 000000000002b300
    RBP: ffff88803e403d00 R08: ffff88803ec2b300 R09: 0000000000000001
    R10: 0000000000000dc0 R11: 0000000000000006 R12: 000000003ffe0000
    R13: ffffffff8110a583 R14: 0000000000000dc0 R15: ffffffff81c49a80
    FS:  0000000000000000(0000) GS:ffff88803ec00000(0000)
knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 000000003ffe0018 CR3: 0000000001c0a001 CR4: 00000000003606f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    Call Trace:
     __trace_define_field+0x33/0xa0
     event_trace_init+0xeb/0x2b4
     tracer_init_tracefs+0x60/0x195
     ? register_tracer+0x1e7/0x1e7
     do_one_initcall+0x74/0x160
     kernel_init_freeable+0x190/0x1f0
     ? rest_init+0x9a/0x9a
     kernel_init+0x5/0xf6
     ret_from_fork+0x35/0x40
    CR2: 000000003ffe0018
    ---[ end trace 707efa023f2ee960 ]---
    RIP: 0010:kmem_cache_alloc+0x70/0x1d0

Bisection leads to unrelated changes in slab; Vlastimil Babka
suggests an unrelated layout or slab merge change merely exposed
the underlying bug.

Link: https://lore.kernel.org/lkml/4dc93ff8-f86e-f4c9-ebeb-6d3153a78d03@oracle.com/
Link: https://lore.kernel.org/r/a1461e21-c744-767d-6dfc-6641fd3e3ce2@siemens.com
Link: https://github.com/acpica/acpica/commit/29da9a2a
Fixes: f79c8e4136 ("ACPICA: Namespace: simplify creation of the initial/default namespace")
Reported-by: Jan Kiszka <jan.kiszka@siemens.com>
Diagnosed-by: Vlastimil Babka <vbabka@suse.cz>
Diagnosed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Cc: 5.10+ <stable@vger.kernel.org> # 5.10+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2021-03-24 14:50:54 +01:00
..
acapps.h ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
accommon.h ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
acconvert.h ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
acdebug.h ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
acdispat.h ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
acevents.h ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
acglobal.h ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
achware.h ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
acinterp.h ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
aclocal.h ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
acmacros.h ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
acnamesp.h ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
acobject.h ACPICA: Fix race in generic_serial_bus (I2C) and GPIO op_region parameter handling 2021-02-19 16:03:25 +01:00
acopcode.h ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
acparser.h ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
acpredef.h ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
acresrc.h ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
acstruct.h ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
actables.h ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
acutils.h ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
amlcode.h ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
amlresrc.h ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
dbcmds.c
dbconvert.c ACPICA: debugger: remove leading whitespaces when converting a string to a buffer 2019-10-28 22:12:46 +01:00
dbdisply.c ACPICA: iASL: add new OperationRegion subtype keyword PlatformRtMechanism 2020-06-05 13:34:23 +02:00
dbexec.c ACPICA: Debugger: Add a new command: "ALL <NameSeg>" 2020-10-08 18:03:55 +02:00
dbfileio.c ACPICA: make acpi_load_table() return table index 2019-10-28 22:12:46 +01:00
dbhistry.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
dbinput.c ACPICA: add type casts for string functions 2021-01-22 15:51:53 +01:00
dbmethod.c ACPICA: Debugger: Add a new command: "ALL <NameSeg>" 2020-10-08 18:03:55 +02:00
dbnames.c ACPICA: debugger: surround field unit output with braces '{' 2019-10-28 22:12:46 +01:00
dbobject.c ACPICA: Clean up exception code class checks 2021-01-18 16:01:10 +01:00
dbstats.c ACPICA: Fully deploy ACPI_PRINTF_LIKE macro 2019-08-21 00:00:37 +02:00
dbtest.c ACPICA: Debugger: Fix possible fault with the "test objects" command 2019-02-18 11:21:10 +01:00
dbutils.c
dbxface.c ACPICA: acpiexec: remove redeclaration of acpi_gbl_db_opt_no_region_support 2020-03-30 14:52:32 +02:00
dsargs.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
dscontrol.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
dsdebug.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
dsfield.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
dsinit.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
dsmethod.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
dsmthdat.c
dsobject.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
dsopcode.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
dspkginit.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
dsutils.c ACPICA: Remove defines that use deprecated flag 2018-12-13 22:40:51 +01:00
dswexec.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
dswload2.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
dswload.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
dswscope.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
dswstate.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
evevent.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
evglock.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
evgpe.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
evgpeblk.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
evgpeinit.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
evgpeutil.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
evhandler.c ACPICA: Fix race in generic_serial_bus (I2C) and GPIO op_region parameter handling 2021-02-19 16:03:25 +01:00
evmisc.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
evregion.c ACPICA: Remove some code duplication from acpi_ev_address_space_dispatch 2021-02-19 16:03:25 +01:00
evrgnini.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
evsci.c
evxface.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
evxfevnt.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
evxfgpe.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
evxfregn.c ACPICA: Fix race in generic_serial_bus (I2C) and GPIO op_region parameter handling 2021-02-19 16:03:25 +01:00
exconcat.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exconfig.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exconvrt.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
excreate.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exdebug.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exdump.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exfield.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exfldio.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exmisc.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exmutex.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exnames.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exoparg1.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exoparg2.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exoparg3.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exoparg6.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exprep.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exregion.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exresnte.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exresolv.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exresop.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exserial.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exstore.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exstoren.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exstorob.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exsystem.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
extrace.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
exutils.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
hwacpi.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
hwesleep.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
hwgpe.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
hwpci.c
hwregs.c ACPICA: ACPICA: add status check for acpi_hw_read before assigning return value 2018-08-14 23:49:13 +02:00
hwsleep.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
hwtimer.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
hwvalid.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
hwxface.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
hwxfsleep.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
Makefile ACPICA: Remove PCI bits from ACPICA when CONFIG_PCI is unset 2018-12-20 10:19:49 +01:00
nsaccess.c ACPICA: Always create namespace nodes using acpi_ns_create_node() 2021-03-24 14:50:54 +01:00
nsalloc.c ACPICA: Remove unnecessary semicolon 2020-10-08 18:03:56 +02:00
nsarguments.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
nsconvert.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
nsdump.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
nsdumpdv.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
nseval.c ACPICA: remove legacy module-level code due to deprecation 2019-07-04 00:59:43 +02:00
nsinit.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
nsload.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
nsnames.c ACPICA: Fixes for acpiExec namespace init file 2020-03-30 14:52:33 +02:00
nsobject.c ACPICA: Namespace: remove address node from global list after method termination 2019-04-09 10:05:11 +02:00
nsparse.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
nspredef.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
nsprepkg.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
nsrepair2.c Merge back ACPICA material for v5.12. 2021-02-10 19:12:12 +01:00
nsrepair.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
nssearch.c ACPICA: Revert "iASL: change processing of external op namespace nodes for correctness" 2018-07-09 11:14:45 +02:00
nsutils.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
nswalk.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
nsxfeval.c
nsxfname.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
nsxfobj.c ACPICA: Tree-wide: fix various typos and spelling mistakes 2020-10-08 18:03:55 +02:00
psargs.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
psloop.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
psobject.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
psopcode.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
psopinfo.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
psparse.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
psscope.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
pstree.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
psutils.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
pswalk.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
psxface.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
rsaddr.c
rscalc.c
rscreate.c ACPICA: More Clang changes 2019-10-28 22:12:46 +01:00
rsdump.c ACPICA: Fix potential infinite loop in acpi_rs_dump_byte_list 2018-05-15 10:16:10 +02:00
rsdumpinfo.c ACPI/ACPICA: Trivial: fix spelling mistakes and fix whitespace formatting 2019-02-24 21:12:01 +01:00
rsinfo.c
rsio.c
rsirq.c ACPI/ACPICA: Trivial: fix spelling mistakes and fix whitespace formatting 2019-02-24 21:12:01 +01:00
rslist.c
rsmemory.c
rsmisc.c
rsserial.c ACPI/ACPICA: Trivial: fix spelling mistakes and fix whitespace formatting 2019-02-24 21:12:01 +01:00
rsutils.c
rsxface.c ACPICA: Rename nameseg compare macro for clarity 2019-04-09 10:08:28 +02:00
tbdata.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
tbfadt.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
tbfind.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
tbinstal.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
tbprint.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
tbutils.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
tbxface.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
tbxfload.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
tbxfroot.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utaddress.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utalloc.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utascii.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utbuffer.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utcache.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utcopy.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utdebug.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utdecode.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utdelete.c ACPICA: fix -Wfallthrough 2021-01-22 15:51:30 +01:00
uterror.c ACPICA: Increase total number of possible Owner IDs 2019-08-21 00:00:36 +02:00
uteval.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utexcep.c
utglobal.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
uthex.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utids.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utinit.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utlock.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utmath.c
utmisc.c ACPICA: Rename nameseg compare macro for clarity 2019-04-09 10:08:28 +02:00
utmutex.c ACPICA: Convert acpi_gbl_hardware lock back to an acpi_raw_spinlock 2018-05-10 17:18:45 +02:00
utnonansi.c
utobject.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utosi.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utownerid.c ACPICA: Increase total number of possible Owner IDs 2019-08-21 00:00:36 +02:00
utpredef.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utprint.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utresdecode.c
utresrc.c
utstate.c
utstring.c ACPICA: Rename nameseg length macro/define for clarity 2019-04-09 11:24:48 +02:00
utstrsuppt.c ACPICA: add type casts for string functions 2021-01-22 15:51:53 +01:00
utstrtoul64.c ACPICA: Utilities: split hex detection into smaller functions 2018-08-14 23:49:13 +02:00
uttrack.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utuuid.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utxface.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utxferror.c ACPICA: Convert more ACPI errors to firmware errors 2019-01-15 18:04:02 +01:00
utxfinit.c ACPICA: Updated all copyrights to 2021 2021-01-22 15:51:53 +01:00
utxfmutex.c