Skip to content

Commit 2b82118

Browse files
keesrafaeljw
authored andcommitted
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: acpica/acpica@ed68cb8e Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 6da5e6f commit 2b82118

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

drivers/acpi/acpica/aclocal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ acpi_status (*acpi_internal_method) (struct acpi_walk_state * walk_state);
293293
* expected_return_btypes - Allowed type(s) for the return value
294294
*/
295295
struct acpi_name_info {
296-
char name[ACPI_NAMESEG_SIZE] __nonstring;
296+
char name[ACPI_NAMESEG_SIZE] ACPI_NONSTRING;
297297
u16 argument_list;
298298
u8 expected_btypes;
299299
};
@@ -370,7 +370,7 @@ typedef acpi_status (*acpi_object_converter) (struct acpi_namespace_node *
370370
converted_object);
371371

372372
struct acpi_simple_repair_info {
373-
char name[ACPI_NAMESEG_SIZE] __nonstring;
373+
char name[ACPI_NAMESEG_SIZE] ACPI_NONSTRING;
374374
u32 unexpected_btypes;
375375
u32 package_index;
376376
acpi_object_converter object_converter;

drivers/acpi/acpica/nsnames.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ acpi_ns_build_normalized_path(struct acpi_namespace_node *node,
194194
char *full_path, u32 path_size, u8 no_trailing)
195195
{
196196
u32 length = 0, i;
197-
char name[ACPI_NAMESEG_SIZE];
197+
char name[ACPI_NAMESEG_SIZE] ACPI_NONSTRING;
198198
u8 do_no_trailing;
199199
char c, *left, *right;
200200
struct acpi_namespace_node *next_node;

drivers/acpi/acpica/nsrepair2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ acpi_status (*acpi_repair_function) (struct acpi_evaluate_info * info,
2525
return_object_ptr);
2626

2727
typedef struct acpi_repair_info {
28-
char name[ACPI_NAMESEG_SIZE] __nonstring;
28+
char name[ACPI_NAMESEG_SIZE] ACPI_NONSTRING;
2929
acpi_repair_function repair_function;
3030

3131
} acpi_repair_info;

0 commit comments

Comments
 (0)