ACPICA: Use designated initializers
The struct layout randomization plugin detects and randomizes any structs that contain only function pointers. Once layout is randomized, all initialization must be designated or the compiler will misalign the assignments. This switches all the ACPICA function pointer struct to use designated initializers, using the proposed upstream ACPICA macro: https://github.com/acpica/acpica/pull/248/ Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
a976c2951d
commit
3d867f6c5f
@@ -382,4 +382,8 @@
|
||||
#define ACPI_INIT_FUNCTION
|
||||
#endif
|
||||
|
||||
#ifndef ACPI_STRUCT_INIT
|
||||
#define ACPI_STRUCT_INIT(field, value) value
|
||||
#endif
|
||||
|
||||
#endif /* __ACENV_H__ */
|
||||
|
@@ -178,6 +178,8 @@
|
||||
#define ACPI_MSG_BIOS_ERROR KERN_ERR "ACPI BIOS Error (bug): "
|
||||
#define ACPI_MSG_BIOS_WARNING KERN_WARNING "ACPI BIOS Warning (bug): "
|
||||
|
||||
#define ACPI_STRUCT_INIT(field, value) .field = value
|
||||
|
||||
#else /* !__KERNEL__ */
|
||||
|
||||
#define ACPI_USE_STANDARD_HEADERS
|
||||
|
Reference in New Issue
Block a user