lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <6592d024-8d43-4b0c-8036-16df2bac9446@nokia.com>
Date: Tue, 21 Jan 2025 09:18:44 +0100
From: Stefan Wiehler <stefan.wiehler@...ia.com>
To: Rob Herring <robh+dt@...nel.org>, Frank Rowand <frowand.list@...il.com>,
 Thomas Gleixner <tglx@...utronix.de>
Cc: "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
 "x86@...nel.org" <x86@...nel.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Keep bootloader DTB when ACPI is enabled

Hi all,

We store various metadata (e.g. IDs and serial numbers) in the DT which must be
consistent over multiple product generations; therefore we enable CONFIG_OF
even when ACPI is used for boot. On such ACPI-based (i.e. x86) boards, ACPI is
used for boot while the DT holds only product-specific nodes not of any
interest to the core kernel. While this is currently not an issue on our 6.1
kernel, I noticed that commit 7b937cc243e5 ("of: Create of_root if no dtb
provided by firmware") drops the bootloader provided DTB if ACPI is not
disabled [1]. When one removes this check, several warnings are emitted because
register_lapic_address() and topology_register_boot_apic() are called from both
ACPI and DT initialization [2] [3].

As we need to maintain above use case for the foreseeable future, we would like
to introduce an alternate mode that keeps the bootloader provided DTB even if
ACPI is enabled, via e.g. a new command line parameter "acpi_keep_dtb".
Regarding above warnings, ACPI initialization should take precedence and we
would simply skip the following initialization from DT code if the
"acpi_keep_dtb" command line parameter is present.

Please provide feedback if you would accept such a solution before I start to
implement something.

Kind regards,

Stefan

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/of/fdt.c?id=ffd294d346d185b70e28b1a28abe367bbfe53c04#n1219
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/kernel/apic/apic.c?id=ffd294d346d185b70e28b1a28abe367bbfe53c04#n2083
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/kernel/cpu/topology.c?id=ffd294d346d185b70e28b1a28abe367bbfe53c04#n305

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ