Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ACPICA: Apply ACPI_NONSTRING

ACPICA commit ed68cb8e082e3bfbba02814af4fd5a61247f491b

Add ACPI_NONSTRING annotations for places found that are using char
arrays without a terminating NUL character. These were found during
Linux kernel builds and after looking for instances of arrays of size
ACPI_NAMESEG_SIZE.

Link: https://github.com/acpica/acpica/commit/ed68cb8e
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/2039736.usQuhbGJ8B@rjwysocki.net

authored by

Kees Cook and committed by
Rafael J. Wysocki
2b821188 6da5e6f3

+4 -4
+2 -2
drivers/acpi/acpica/aclocal.h
··· 293 293 * expected_return_btypes - Allowed type(s) for the return value 294 294 */ 295 295 struct acpi_name_info { 296 - char name[ACPI_NAMESEG_SIZE] __nonstring; 296 + char name[ACPI_NAMESEG_SIZE] ACPI_NONSTRING; 297 297 u16 argument_list; 298 298 u8 expected_btypes; 299 299 }; ··· 370 370 converted_object); 371 371 372 372 struct acpi_simple_repair_info { 373 - char name[ACPI_NAMESEG_SIZE] __nonstring; 373 + char name[ACPI_NAMESEG_SIZE] ACPI_NONSTRING; 374 374 u32 unexpected_btypes; 375 375 u32 package_index; 376 376 acpi_object_converter object_converter;
+1 -1
drivers/acpi/acpica/nsnames.c
··· 194 194 char *full_path, u32 path_size, u8 no_trailing) 195 195 { 196 196 u32 length = 0, i; 197 - char name[ACPI_NAMESEG_SIZE]; 197 + char name[ACPI_NAMESEG_SIZE] ACPI_NONSTRING; 198 198 u8 do_no_trailing; 199 199 char c, *left, *right; 200 200 struct acpi_namespace_node *next_node;
+1 -1
drivers/acpi/acpica/nsrepair2.c
··· 25 25 return_object_ptr); 26 26 27 27 typedef struct acpi_repair_info { 28 - char name[ACPI_NAMESEG_SIZE] __nonstring; 28 + char name[ACPI_NAMESEG_SIZE] ACPI_NONSTRING; 29 29 acpi_repair_function repair_function; 30 30 31 31 } acpi_repair_info;