Re: [REGRESSION] linux 6.6.18 and later fails to boot with "initramfs unpacking failed: invalid magic at start of compressed archive"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi ard, thanks for the effort!

so, your first recommended patch (the memset thing), applied to current mainline (6.8) DOES NOT resolve the issue.

the second recommendation, a revert patch, applied to the same mainline tree, indeed DOES resolve the problem.

just to be sure, i'm attaching the revert patch.

as for the information to find the cause:

* boot logs - can't really give you as the boot process just stops - i can send you a picture of the screen taken with my phone.

* dmi data - attaching dmidecode output

* distro - current arch linux (rolling distro) - attaching list of installed packages with versions

* versions of boot components - should be included in the listing above

feel free to send me any patches, i'll be happy to try them out!

cheers,
R.


On 3/15/24 08:42, Ard Biesheuvel wrote:
On Thu, 14 Mar 2024 at 22:53, Ard Biesheuvel <ardb@xxxxxxxxxx> wrote:

On Thu, 14 Mar 2024 at 20:35, Ard Biesheuvel <ardb@xxxxxxxxxx> wrote:

On Thu, 14 Mar 2024 at 19:32, Radek Podgorny <radek@xxxxxxxxxxx> wrote:

hi,

i seem to be the only one in the world to have this problem. :-(

on one of my machines, updating to 6.6.18 and later (including mainline
branch) leads to unbootable system. all other computers are unaffected.

bisecting the history leads to:

commit 8117961d98fb2d335ab6de2cad7afb8b6171f5fe
Author: Ard Biesheuvel <ardb@xxxxxxxxxx>


Thanks for the report.

I'd like to get to the bottom of this if we can.

Please share as much information as you can about the system
- boot logs
- DMI data to identify the system and firmware etc
- distro version
- versions of boot components (shim, grub, systemd-boot, etc including
config files)
- other information that might help narrow this down.

Also, please check whether the below change makes a difference or not

--- a/drivers/firmware/efi/libstub/x86-stub.c
+++ b/drivers/firmware/efi/libstub/x86-stub.c
@@ -477,6 +477,8 @@
                 efi_exit(handle, status);
         }

+       memset(&boot_params, 0, sizeof(boot_params));
+
         /* Assign the setup_header fields that the kernel actually
cares about */
         hdr->root_flags = 1;
         hdr->vid_mode   = 0xffff;

Another thing you might try is reverting commit

commit 5f51c5d0e905608ba7be126737f7c84a793ae1aa
Author: Ard Biesheuvel <ardb@xxxxxxxxxx>
Date:   Tue Sep 12 09:00:52 2023 +0000

     x86/efi: Drop EFI stub .bss from .data section

(in v6.6 the commit id is fa244085025f4a8fb38ec67af635aed04297758d)
# dmidecode 3.5
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.
75 structures occupying 3069 bytes.
Table at 0x000EB420.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
	Vendor: American Megatrends Inc.
	Version: F4
	Release Date: 03/23/2012
	Address: 0xF0000
	Runtime Size: 64 kB
	ROM Size: 2560 kB
	Characteristics:
		PCI is supported
		BIOS is upgradeable
		BIOS shadowing is allowed
		Boot from CD is supported
		Selectable boot is supported
		BIOS ROM is socketed
		EDD is supported
		5.25"/1.2 MB floppy services are supported (int 13h)
		3.5"/720 kB floppy services are supported (int 13h)
		3.5"/2.88 MB floppy services are supported (int 13h)
		Print screen service is supported (int 5h)
		8042 keyboard services are supported (int 9h)
		Serial services are supported (int 14h)
		Printer services are supported (int 17h)
		ACPI is supported
		USB legacy is supported
		BIOS boot specification is supported
		Targeted content distribution is supported
		UEFI is supported
	BIOS Revision: 4.6

Handle 0x0001, DMI type 1, 27 bytes
System Information
	Manufacturer: Gigabyte Technology Co., Ltd.
	Product Name: To be filled by O.E.M.
	Version: To be filled by O.E.M.
	Serial Number: To be filled by O.E.M.
	UUID: 03000200-0400-0500-0006-000700080009
	Wake-up Type: Power Switch
	SKU Number: To be filled by O.E.M.
	Family: To be filled by O.E.M.

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
	Manufacturer: Gigabyte Technology Co., Ltd.
	Product Name: H61MA-D2V
	Version: x.x
	Serial Number: To be filled by O.E.M.
	Asset Tag: To be filled by O.E.M.
	Features:
		Board is a hosting board
		Board is replaceable
	Location In Chassis: To be filled by O.E.M.
	Chassis Handle: 0x0003
	Type: Motherboard
	Contained Object Handles: 0

Handle 0x0003, DMI type 3, 22 bytes
Chassis Information
	Manufacturer: Gigabyte Technology Co., Ltd.
	Type: Desktop
	Lock: Not Present
	Version: To Be Filled By O.E.M.
	Serial Number: To Be Filled By O.E.M.
	Asset Tag: To Be Filled By O.E.M.
	Boot-up State: Safe
	Power Supply State: Safe
	Thermal State: Safe
	Security Status: None
	OEM Information: 0x00000000
	Height: Unspecified
	Number Of Power Cords: 1
	Contained Elements: 0
	SKU Number: To be filled by O.E.M.

Handle 0x0004, DMI type 7, 19 bytes
Cache Information
	Socket Designation: CPU Internal L1
	Configuration: Enabled, Not Socketed, Level 1
	Operational Mode: Write Through
	Location: Internal
	Installed Size: 64 kB
	Maximum Size: 64 kB
	Supported SRAM Types:
		Unknown
	Installed SRAM Type: Unknown
	Speed: Unknown
	Error Correction Type: Parity
	System Type: Other
	Associativity: 16-way Set-associative

Handle 0x0005, DMI type 7, 19 bytes
Cache Information
	Socket Designation: CPU Internal L2
	Configuration: Enabled, Not Socketed, Level 2
	Operational Mode: Write Through
	Location: Internal
	Installed Size: 512 kB
	Maximum Size: 512 kB
	Supported SRAM Types:
		Unknown
	Installed SRAM Type: Unknown
	Speed: Unknown
	Error Correction Type: Multi-bit ECC
	System Type: Instruction
	Associativity: 16-way Set-associative

Handle 0x0006, DMI type 7, 19 bytes
Cache Information
	Socket Designation: CPU Internal L3
	Configuration: Enabled, Not Socketed, Level 3
	Operational Mode: Write Back
	Location: Internal
	Installed Size: 3 MB
	Maximum Size: 3 MB
	Supported SRAM Types:
		Unknown
	Installed SRAM Type: Unknown
	Speed: Unknown
	Error Correction Type: Multi-bit ECC
	System Type: Instruction
	Associativity: 48-way Set-associative

Handle 0x0007, DMI type 16, 23 bytes
Physical Memory Array
	Location: System Board Or Motherboard
	Use: System Memory
	Error Correction Type: None
	Maximum Capacity: 32 GB
	Error Information Handle: Not Provided
	Number Of Devices: 4

Handle 0x0008, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J1A1
	Internal Connector Type: None
	External Reference Designator: PS2Mouse
	External Connector Type: PS/2
	Port Type: Mouse Port

Handle 0x0009, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J1A1
	Internal Connector Type: None
	External Reference Designator: Keyboard
	External Connector Type: PS/2
	Port Type: Keyboard Port

Handle 0x000A, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J2A1
	Internal Connector Type: None
	External Reference Designator: TV Out
	External Connector Type: Mini Centronics Type-14
	Port Type: Other

Handle 0x000B, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J2A2A
	Internal Connector Type: None
	External Reference Designator: COM A
	External Connector Type: DB-9 male
	Port Type: Serial Port 16550A Compatible

Handle 0x000C, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J2A2B
	Internal Connector Type: None
	External Reference Designator: Video
	External Connector Type: DB-15 female
	Port Type: Video Port

Handle 0x000D, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J3A1
	Internal Connector Type: None
	External Reference Designator: USB1
	External Connector Type: Access Bus (USB)
	Port Type: USB

Handle 0x000E, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J3A1
	Internal Connector Type: None
	External Reference Designator: USB2
	External Connector Type: Access Bus (USB)
	Port Type: USB

Handle 0x000F, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J3A1
	Internal Connector Type: None
	External Reference Designator: USB3
	External Connector Type: Access Bus (USB)
	Port Type: USB

Handle 0x0010, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J9A1 - TPM HDR
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x0011, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J9C1 - PCIE DOCKING CONN
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x0012, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J2B3 - CPU FAN
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x0013, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J6C2 - EXT HDMI
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x0014, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J3C1 - GMCH FAN
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x0015, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J1D1 - ITP
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x0016, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J9E2 - MDC INTPSR
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x0017, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J9E4 - MDC INTPSR
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x0018, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J9E3 - LPC HOT DOCKING
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x0019, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J9E1 - SCAN MATRIX
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x001A, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J9G1 - LPC SIDE BAND
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x001B, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J8F1 - UNIFIED
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x001C, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J6F1 - LVDS
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x001D, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J2F1 - LAI FAN
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x001E, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J2G1 - GFX VID
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x001F, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J1G6 - AC JACK
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x0020, DMI type 9, 17 bytes
System Slot Information
	Designation: J6B2
	Type: x16 PCI Express
	Current Usage: In Use
	Length: Long
	ID: 0
	Characteristics:
		3.3 V is provided
		Opening is shared
		PME signal is supported
	Bus Address: 0000:00:02.0

Handle 0x0021, DMI type 9, 17 bytes
System Slot Information
	Designation: J6B1
	Type: x1 PCI Express
	Current Usage: In Use
	Length: Short
	ID: 1
	Characteristics:
		3.3 V is provided
		Opening is shared
		PME signal is supported
	Bus Address: 0000:00:1c.0

Handle 0x0022, DMI type 9, 17 bytes
System Slot Information
	Designation: J6D1
	Type: x8 PCI Express
	Current Usage: In Use
	Length: Short
	ID: 2
	Characteristics:
		3.3 V is provided
		Opening is shared
		PME signal is supported
	Bus Address: 0000:00:01.0

Handle 0x0023, DMI type 9, 17 bytes
System Slot Information
	Designation: J7B1
	Type: x16 PCI Express
	Current Usage: In Use
	Length: Short
	ID: 3
	Characteristics:
		3.3 V is provided
		Opening is shared
		PME signal is supported
	Bus Address: 0000:00:03.0

Handle 0x0024, DMI type 9, 17 bytes
System Slot Information
	Designation: J8B4
	Type: x1 PCI Express
	Current Usage: In Use
	Length: Short
	ID: 4
	Characteristics:
		3.3 V is provided
		Opening is shared
		PME signal is supported
	Bus Address: 0000:00:1c.7

Handle 0x0025, DMI type 9, 17 bytes
System Slot Information
	Designation: J8B3
	Type: 32-bit PCI
	Current Usage: In Use
	Length: Short
	ID: 6
	Characteristics:
		3.3 V is provided
		Opening is shared
		PME signal is supported
	Bus Address: 0000:14:1e.0

Handle 0x0026, DMI type 10, 6 bytes
On Board Device Information
	Type: Video
	Status: Enabled
	Description:    To Be Filled By O.E.M.

Handle 0x0027, DMI type 11, 5 bytes
OEM Strings
	String 1: To Be Filled By O.E.M.

Handle 0x0028, DMI type 12, 5 bytes
System Configuration Options
	Option 1: To Be Filled By O.E.M.

Handle 0x0029, DMI type 32, 20 bytes
System Boot Information
	Status: No errors detected

Handle 0x002A, DMI type 34, 11 bytes
Management Device
	Description: LM78-1
	Type: LM78
	Address: 0x00000000
	Address Type: I/O Port

Handle 0x002B, DMI type 26, 22 bytes
Voltage Probe
	Description: LM78A
	Location: <OUT OF SPEC>
	Status: <OUT OF SPEC>
	Maximum Value: Unknown
	Minimum Value: Unknown
	Resolution: Unknown
	Tolerance: Unknown
	Accuracy: Unknown
	OEM-specific Information: 0x00000000
	Nominal Value: Unknown

Handle 0x002C, DMI type 36, 16 bytes
Management Device Threshold Data
	Lower Non-critical Threshold: 1
	Upper Non-critical Threshold: 2
	Lower Critical Threshold: 3
	Upper Critical Threshold: 4
	Lower Non-recoverable Threshold: 5
	Upper Non-recoverable Threshold: 6

Handle 0x002D, DMI type 35, 11 bytes
Management Device Component
	Description: To Be Filled By O.E.M.
	Management Device Handle: 0x002A
	Component Handle: 0x002A
	Threshold Handle: 0x002B

Handle 0x002E, DMI type 28, 22 bytes
Temperature Probe
	Description: LM78A
	Location: <OUT OF SPEC>
	Status: <OUT OF SPEC>
	Maximum Value: Unknown
	Minimum Value: Unknown
	Resolution: Unknown
	Tolerance: Unknown
	Accuracy: Unknown
	OEM-specific Information: 0x00000000
	Nominal Value: Unknown

Handle 0x002F, DMI type 36, 16 bytes
Management Device Threshold Data
	Lower Non-critical Threshold: 1
	Upper Non-critical Threshold: 2
	Lower Critical Threshold: 3
	Upper Critical Threshold: 4
	Lower Non-recoverable Threshold: 5
	Upper Non-recoverable Threshold: 6

Handle 0x0030, DMI type 35, 11 bytes
Management Device Component
	Description: To Be Filled By O.E.M.
	Management Device Handle: 0x002A
	Component Handle: 0x002D
	Threshold Handle: 0x002E

Handle 0x0031, DMI type 27, 15 bytes
Cooling Device
	Temperature Probe Handle: 0x002E
	Type: <OUT OF SPEC>
	Status: <OUT OF SPEC>
	Cooling Unit Group: 1
	OEM-specific Information: 0x00000000
	Nominal Speed: Unknown Or Non-rotating
	Description: Cooling Dev 1

Handle 0x0032, DMI type 36, 16 bytes
Management Device Threshold Data
	Lower Non-critical Threshold: 1
	Upper Non-critical Threshold: 2
	Lower Critical Threshold: 3
	Upper Critical Threshold: 4
	Lower Non-recoverable Threshold: 5
	Upper Non-recoverable Threshold: 6

Handle 0x0033, DMI type 35, 11 bytes
Management Device Component
	Description: To Be Filled By O.E.M.
	Management Device Handle: 0x002A
	Component Handle: 0x0030
	Threshold Handle: 0x0031

Handle 0x0034, DMI type 27, 15 bytes
Cooling Device
	Temperature Probe Handle: 0x002E
	Type: <OUT OF SPEC>
	Status: <OUT OF SPEC>
	Cooling Unit Group: 1
	OEM-specific Information: 0x00000000
	Nominal Speed: Unknown Or Non-rotating
	Description: Not Specified

Handle 0x0035, DMI type 36, 16 bytes
Management Device Threshold Data
	Lower Non-critical Threshold: 1
	Upper Non-critical Threshold: 2
	Lower Critical Threshold: 3
	Upper Critical Threshold: 4
	Lower Non-recoverable Threshold: 5
	Upper Non-recoverable Threshold: 6

Handle 0x0036, DMI type 35, 11 bytes
Management Device Component
	Description: To Be Filled By O.E.M.
	Management Device Handle: 0x002A
	Component Handle: 0x0033
	Threshold Handle: 0x0034

Handle 0x0037, DMI type 29, 22 bytes
Electrical Current Probe
	Description: ABC
	Location: <OUT OF SPEC>
	Status: <OUT OF SPEC>
	Maximum Value: Unknown
	Minimum Value: Unknown
	Resolution: Unknown
	Tolerance: Unknown
	Accuracy: Unknown
	OEM-specific Information: 0x00000000
	Nominal Value: Unknown

Handle 0x0038, DMI type 36, 16 bytes
Management Device Threshold Data

Handle 0x0039, DMI type 35, 11 bytes
Management Device Component
	Description: To Be Filled By O.E.M.
	Management Device Handle: 0x002A
	Component Handle: 0x0036
	Threshold Handle: 0x0034

Handle 0x003A, DMI type 26, 22 bytes
Voltage Probe
	Description: LM78A
	Location: Power Unit
	Status: OK
	Maximum Value: Unknown
	Minimum Value: Unknown
	Resolution: Unknown
	Tolerance: Unknown
	Accuracy: Unknown
	OEM-specific Information: 0x00000000
	Nominal Value: Unknown

Handle 0x003B, DMI type 28, 22 bytes
Temperature Probe
	Description: LM78A
	Location: Power Unit
	Status: OK
	Maximum Value: Unknown
	Minimum Value: Unknown
	Resolution: Unknown
	Tolerance: Unknown
	Accuracy: Unknown
	OEM-specific Information: 0x00000000
	Nominal Value: Unknown

Handle 0x003C, DMI type 27, 15 bytes
Cooling Device
	Temperature Probe Handle: 0x003B
	Type: Power Supply Fan
	Status: OK
	Cooling Unit Group: 1
	OEM-specific Information: 0x00000000
	Nominal Speed: Unknown Or Non-rotating
	Description: Cooling Dev 1

Handle 0x003D, DMI type 29, 22 bytes
Electrical Current Probe
	Description: ABC
	Location: Power Unit
	Status: OK
	Maximum Value: Unknown
	Minimum Value: Unknown
	Resolution: Unknown
	Tolerance: Unknown
	Accuracy: Unknown
	OEM-specific Information: 0x00000000
	Nominal Value: Unknown

Handle 0x003E, DMI type 39, 22 bytes
System Power Supply
	Power Unit Group: 1
	Location: To Be Filled By O.E.M.
	Name: To Be Filled By O.E.M.
	Manufacturer: To Be Filled By O.E.M.
	Serial Number: To Be Filled By O.E.M.
	Asset Tag: To Be Filled By O.E.M.
	Model Part Number: To Be Filled By O.E.M.
	Revision: To Be Filled By O.E.M.
	Max Power Capacity: Unknown
	Status: Present, OK
	Type: Switching
	Input Voltage Range Switching: Auto-switch
	Plugged: Yes
	Hot Replaceable: No
	Input Voltage Probe Handle: 0x003A
	Cooling Device Handle: 0x003C
	Input Current Probe Handle: 0x003D

Handle 0x003F, DMI type 41, 11 bytes
Onboard Device
	Reference Designation:  Onboard LAN
	Type: Ethernet
	Status: Enabled
	Type Instance: 1
	Bus Address: 0000:00:19.0

Handle 0x0040, DMI type 17, 34 bytes
Memory Device
	Array Handle: 0x0007
	Error Information Handle: Not Provided
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 4 GB
	Form Factor: DIMM
	Set: None
	Locator: ChannelA-DIMM0
	Bank Locator: BANK 0
	Type: DDR3
	Type Detail: Synchronous
	Speed: 1333 MT/s
	Manufacturer: 029E
	Serial Number: 00000000
	Asset Tag: 9876543210
	Part Number: CML8GX3M2A1600C9  
	Rank: 1
	Configured Memory Speed: 1333 MT/s

Handle 0x0041, DMI type 20, 35 bytes
Memory Device Mapped Address
	Starting Address: 0x00000000000
	Ending Address: 0x000FFFFFFFF
	Range Size: 4 GB
	Physical Device Handle: 0x0040
	Memory Array Mapped Address Handle: 0x0047
	Partition Row Position: Unknown
	Interleave Position: 1
	Interleaved Data Depth: 2

Handle 0x0042, DMI type 17, 34 bytes
Memory Device
	Array Handle: 0x0007
	Error Information Handle: Not Provided
	Total Width: Unknown
	Data Width: Unknown
	Size: No Module Installed
	Form Factor: DIMM
	Set: None
	Locator: ChannelA-DIMM1
	Bank Locator: BANK 1
	Type: Unknown
	Type Detail: None

Handle 0x0043, DMI type 4, 42 bytes
Processor Information
	Socket Designation: Intel(R) Core(TM) i3-3240 CPU @ 3.40GHz
	Type: Central Processor
	Family: Core i7
	Manufacturer: Intel
	ID: A9 06 03 00 FF FB EB BF
	Signature: Type 0, Family 6, Model 58, Stepping 9
	Flags:
		FPU (Floating-point unit on-chip)
		VME (Virtual mode extension)
		DE (Debugging extension)
		PSE (Page size extension)
		TSC (Time stamp counter)
		MSR (Model specific registers)
		PAE (Physical address extension)
		MCE (Machine check exception)
		CX8 (CMPXCHG8 instruction supported)
		APIC (On-chip APIC hardware supported)
		SEP (Fast system call)
		MTRR (Memory type range registers)
		PGE (Page global enable)
		MCA (Machine check architecture)
		CMOV (Conditional move instruction supported)
		PAT (Page attribute table)
		PSE-36 (36-bit page size extension)
		CLFSH (CLFLUSH instruction supported)
		DS (Debug store)
		ACPI (ACPI supported)
		MMX (MMX technology supported)
		FXSR (FXSAVE and FXSTOR instructions supported)
		SSE (Streaming SIMD extensions)
		SSE2 (Streaming SIMD extensions 2)
		SS (Self-snoop)
		HTT (Multi-threading)
		TM (Thermal monitor supported)
		PBE (Pending break enabled)
	Version: Intel(R) Core(TM) i3-3240 CPU @ 3.40GHz
	Voltage: 1.0 V
	External Clock: 100 MHz
	Max Speed: 7000 MHz
	Current Speed: 3400 MHz
	Status: Populated, Enabled
	Upgrade: Other
	L1 Cache Handle: 0x0004
	L2 Cache Handle: 0x0005
	L3 Cache Handle: 0x0006
	Serial Number: Not Specified
	Asset Tag: Fill By OEM
	Part Number: Fill By OEM
	Core Count: 2
	Core Enabled: 1
	Thread Count: 2
	Characteristics:
		64-bit capable

Handle 0x0044, DMI type 17, 34 bytes
Memory Device
	Array Handle: 0x0007
	Error Information Handle: Not Provided
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 2 GB
	Form Factor: DIMM
	Set: None
	Locator: ChannelB-DIMM0
	Bank Locator: BANK 2
	Type: DDR3
	Type Detail: Synchronous
	Speed: 1333 MT/s
	Manufacturer: 04EF
	Serial Number: 00000000
	Asset Tag: 9876543210
	Part Number: Team-Elite-1333   
	Rank: 2
	Configured Memory Speed: 1333 MT/s

Handle 0x0045, DMI type 20, 35 bytes
Memory Device Mapped Address
	Starting Address: 0x00100000000
	Ending Address: 0x0017FFFFFFF
	Range Size: 2 GB
	Physical Device Handle: 0x0044
	Memory Array Mapped Address Handle: 0x0047
	Partition Row Position: Unknown
	Interleave Position: 2
	Interleaved Data Depth: 2

Handle 0x0046, DMI type 17, 34 bytes
Memory Device
	Array Handle: 0x0007
	Error Information Handle: Not Provided
	Total Width: Unknown
	Data Width: Unknown
	Size: No Module Installed
	Form Factor: DIMM
	Set: None
	Locator: ChannelB-DIMM1
	Bank Locator: BANK 3
	Type: Unknown
	Type Detail: None

Handle 0x0047, DMI type 19, 31 bytes
Memory Array Mapped Address
	Starting Address: 0x00000000000
	Ending Address: 0x0017FFFFFFF
	Range Size: 6 GB
	Physical Array Handle: 0x0007
	Partition Width: 4

Handle 0x004C, DMI type 131, 64 bytes
OEM-specific Type
	Header and Data:
		83 40 4C 00 31 00 00 00 00 00 00 00 00 00 00 00
		F8 00 5C 1C FF FF FF FF 01 00 00 00 00 00 08 00
		47 05 00 00 00 00 00 00 C8 00 FF FF 00 00 00 00
		00 00 00 00 36 00 00 00 76 50 72 6F 00 00 00 00

Handle 0x004D, DMI type 13, 22 bytes
BIOS Language Information
	Language Description Format: Long
	Installable Languages: 6
		en|US|iso8859-1
		de|DE|iso8859-1
		ru|RU|iso8859-5
		ja|JP|unicode
		zh|CS|unicode
		zh|CT|unicode
	Currently Installed Language: en|US|iso8859-1

Handle 0x004F, DMI type 127, 4 bytes
End Of Table

abseil-cpp 20230802.1-1
acl 2.3.2-1
archlinux-keyring 20240208-1
argon2 20190702-5
attr 2.5.2-1
audit 4.0-1
bash 5.2.026-2
binutils 2.42-2
boost 1.83.0-5
boost-libs 1.83.0-5
bridge-utils 1.7.1-2
brotli 1.1.0-1
btrfs-progs 6.7.1-1
bzip2 1.0.8-5
ca-certificates 20220905-1
ca-certificates-mozilla 3.98-1
ca-certificates-utils 20220905-1
containerd 1.7.13-1
coreutils 9.4-3
cracklib 2.9.11-1
cryptsetup 2.7.1-1
curl 8.6.0-3
db 6.2.32-1
db5.3 5.3.28-4
dbus 1.14.10-2
dbus-broker 35-2
dbus-broker-units 35-2
device-mapper 2.03.23-3
dhcpcd 10.0.6-1
diffutils 3.10-1
dmidecode 3.5-1
dnssec-anchors 20190629-3
docker 1:25.0.3-1
dool 1.3.1-1
downgrade 11.2.1-1
e2fsprogs 1.47.0-1
encfs 1.9.5-7
expat 2.6.1-1
faddnsc-git r200.b9fd931-9
fakeroot 1.34-1
file 5.45-1
filesystem 2024.01.19-1
findutils 4.9.0-3
fish 3.7.0-1
fuse-common 3.16.2-1
fuse2 2.9.9-4
fuse3 3.16.2-1
fzf 0.46.1-1
gawk 5.3.0-1
gcc-libs 13.2.1-5
gdbm 1.23-2
gettext 0.22.4-1
git 2.44.0-1
glib2 2.78.4-1
glibc 2.39-1
gmp 6.3.0-1
gnupg 2.4.4-1
gnutls 3.8.3-1
gpgme 1.23.2-1
gpm 1.20.7.r38.ge82d1a6-5
grep 3.11-1
groff 1.23.0-5
gzip 1.13-2
haveged 1.9.18-1
htop 3.3.0-1
hwdata 0.380-1
hwloc 2.10.0-1
iana-etc 20231228-1
icu 74.2-1
inetutils 2.5-1
intel-ucode 20231114-2
iotop 0.6-10
iproute2 6.7.0-1
iptables 1:1.8.10-1
iputils 20240117-1
jansson 2.14-2
jfsutils 1.1.15-8
jq 1.7.1-1
json-c 0.17-1
kbd 2.6.4-1
keyutils 1.6.3-2
kmod 32-1
krb5 1.21.2-2
ldns 1.8.3-2
less 1:643-1
libaio 0.3.113-3
libarchive 3.7.2-1
libassuan 2.5.6-1
libbpf 1.3.0-1
libcap 2.69-3
libcap-ng 0.8.4-1
libcroco 0.6.13-2
libedit 20230828_3.1-1
libelf 0.191-1
libevent 2.1.12-4
libffi 3.4.6-1
libgcrypt 1.10.3-1
libgpg-error 1.48-1
libidn2 2.3.7-1
libinih 57-1
libksba 1.6.6-1
libldap 2.6.6-2
libmicrohttpd 1.0.1-1
libmnl 1.0.5-1
libnetfilter_conntrack 1.0.9-1
libnfnetlink 1.0.2-1
libnftnl 1.2.6-1
libnghttp2 1.60.0-1
libnghttp3 1.2.0-1
libnl 3.9.0-1
libnsl 2.0.1-1
libp11-kit 0.25.3-1
libpcap 1.10.4-1
libpciaccess 0.18-1
libpipeline 1.5.7-1
libpsl 0.21.2-1
libsasl 2.1.28-4
libseccomp 2.5.5-2
libsecret 0.21.4-1
libssh2 1.11.0-1
libsysprof-capture 45.2-1
libtasn1 4.19.0-1
libtirpc 1.3.4-1
libtool 2.4.7+4+g1ec8fa28-7
libunistring 1.1-2
liburcu 0.14.0-1
liburing 2.5-1
libusb 1.0.27-1
libutempter 1.2.1-4
libuv 1.48.0-1
libverto 0.3.2-4
libxcrypt 4.4.36-1
libxml2 2.12.5-1
licenses 20240206-1
linux 6.6.10.arch1-1
linux-api-headers 6.7-1
linux-firmware 20240220.97b693d2-1
linux-firmware-whence 20240220.97b693d2-1
linux-git 6.6.17.r316.8117961d98fb.stable.linux-1
linux-lts 6.6.21-1
linux-mainline 6.8-3
logrotate 3.21.0-2
lvm2 2.03.23-3
lz4 1:1.9.4-2
lzo 2.10-5
man-db 2.12.0-1
man-pages 6.06-2
mariadb-libs 11.3.2-1
mdadm 4.3-2
mfs_utils 3.0.117-4
mkinitcpio 38-4
mkinitcpio-busybox 1.36.1-1
moosefs 3.0.117-1
mosh 1.4.0-6
mpfr 4.2.1-2
nano 7.2-1
ncdu 2.3-1
ncurses 6.4_20230520-1
netctl 1.29-1
nettle 3.9.1-1
nheqminer-cpu-git 0.5c.r1.gb9900ff-2
npth 1.7-1
oniguruma 6.9.9-1
openresolv 3.13.2-2
openssh 9.6p1-3
openssl 3.2.1-1
p11-kit 0.25.3-1
pacman 6.0.2-9
pacman-contrib 1.10.4-3
pacman-mirrorlist 20231001-1
pam 1.6.0-4
pambase 20230918-1
parted 3.6-1
pciutils 3.11.1-1
pcre 8.45-4
pcre2 10.42-2
perl 5.38.2-1
perl-error 0.17029-5
perl-io-tty 1.20-1
perl-mailtools 2.21-7
perl-timedate 2.33-5
pinentry 1.2.1-3
popt 1.19-1
postfix 3.8.6-1
postfix-pcre 3.8.6-1
postgresql-libs 16.1-6
procps-ng 4.0.4-2
protobuf 25.3-1
psmisc 23.7-1
python 3.11.8-1
python-docopt 0.6.2-12
python-six 1.16.0-8
readline 8.2.010-1
reiserfsprogs 3.6.27-4
runc 1.1.12-1
s-nail 14.9.24-2
sed 4.9-3
shadow 4.14.6-1
smartmontools 7.4-1
sqlite 3.45.1-1
sudo 1.9.15.p5-1
sysfsutils 2.1.1-1
systemd 255.4-2
systemd-check-failed 0.7-1
systemd-libs 255.4-2
systemd-sysvcompat 255.4-2
tar 1.35-2
texinfo 7.1-2
thin-provisioning-tools 1.0.12-1
tinycdb 0.81-1
tinyxml2 10.0.0-1
tmux 3.4-4
tpm2-tss 4.0.1-1
tzdata 2024a-1
uptimed 0.4.6-3
usbutils 017-1
util-linux 2.39.3-2
util-linux-libs 2.39.3-2
vi 1:070224-6
vim 9.1.0151-2
vim-runtime 9.1.0151-2
which 2.21-6
xfsprogs 6.6.0-1
xmrig-donateless 6.21.1-1
xz 5.6.0-1
zlib 1:1.3.1-1
zstd 1.5.5-1
diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c
index 7bcc5170043f..4a11470bed5e 100644
--- a/drivers/firmware/efi/libstub/x86-stub.c
+++ b/drivers/firmware/efi/libstub/x86-stub.c
@@ -458,8 +458,9 @@ void __noreturn efi_stub_entry(efi_handle_t handle,
 efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
 				   efi_system_table_t *sys_table_arg)
 {
-	static struct boot_params boot_params __page_aligned_bss;
-	struct setup_header *hdr = &boot_params.hdr;
+	struct boot_params *boot_params;
+	struct setup_header *hdr;
+	void *image_base;
 	efi_guid_t proto = LOADED_IMAGE_PROTOCOL_GUID;
 	int options_size = 0;
 	efi_status_t status;
@@ -477,9 +478,30 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
 		efi_exit(handle, status);
 	}
 
-	/* Assign the setup_header fields that the kernel actually cares about */
+	image_base = efi_table_attr(image, image_base);
+
+	status = efi_allocate_pages(sizeof(struct boot_params),
+				    (unsigned long *)&boot_params, ULONG_MAX);
+	if (status != EFI_SUCCESS) {
+		efi_err("Failed to allocate lowmem for boot params\n");
+		efi_exit(handle, status);
+	}
+
+	memset(boot_params, 0x0, sizeof(struct boot_params));
+
+	hdr = &boot_params->hdr;
+
+	/* Copy the setup header from the second sector to boot_params */
+	memcpy(&hdr->jump, image_base + 512,
+	       sizeof(struct setup_header) - offsetof(struct setup_header, jump));
+
+	/*
+	 * Fill out some of the header fields ourselves because the
+	 * EFI firmware loader doesn't load the first sector.
+	 */
 	hdr->root_flags	= 1;
 	hdr->vid_mode	= 0xffff;
+	hdr->boot_flag	= 0xAA55;
 
 	hdr->type_of_loader = 0x21;
 
@@ -488,13 +510,25 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
 	if (!cmdline_ptr)
 		goto fail;
 
-	efi_set_u64_split((unsigned long)cmdline_ptr, &hdr->cmd_line_ptr,
-			  &boot_params.ext_cmd_line_ptr);
+	efi_set_u64_split((unsigned long)cmdline_ptr,
+			  &hdr->cmd_line_ptr, &boot_params->ext_cmd_line_ptr);
+
+	hdr->ramdisk_image = 0;
+	hdr->ramdisk_size = 0;
+
+	/*
+	 * Disregard any setup data that was provided by the bootloader:
+	 * setup_data could be pointing anywhere, and we have no way of
+	 * authenticating or validating the payload.
+	 */
+	hdr->setup_data = 0;
 
-	efi_stub_entry(handle, sys_table_arg, &boot_params);
+	efi_stub_entry(handle, sys_table_arg, boot_params);
 	/* not reached */
 
 fail:
+	efi_free(sizeof(struct boot_params), (unsigned long)boot_params);
+
 	efi_exit(handle, status);
 }
 

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux