Files
Linux/security/landlock
Kees Cook 246c713a36 landlock: Annotate struct landlock_rule with __counted_by
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct landlock_rule.

[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci

Cc: Paul Moore <[email protected]>
Cc: James Morris <[email protected]>
Cc: "Serge E. Hallyn" <[email protected]>
Cc: [email protected]
Signed-off-by: Kees Cook <[email protected]>
Reviewed-by: Justin Stitt <[email protected]>
Reviewed-by: "Gustavo A. R. Silva" <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mickaël Salaün <[email protected]>
2023-08-18 11:44:42 +02:00
..
2022-05-09 12:31:10 +02:00
2022-10-19 09:01:44 +02:00
2023-06-12 21:26:19 +02:00
2022-10-19 09:01:44 +02:00
2021-04-22 12:22:11 -07:00
2022-05-09 12:31:10 +02:00
2022-05-09 12:31:10 +02:00
2021-04-22 12:22:10 -07:00
2022-10-19 09:01:44 +02:00