Re: [PATCH] mtd: rawnand: Annotate struct mtk_nfc_nand_chip with __counted_by

2023-10-16 Thread Miquel Raynal
On Fri, 2023-10-06 at 20:17:28 UTC, Kees Cook wrote: > 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 via CONFIG_UBSAN_BOUNDS (for > array indexing) and C

Re: [PATCH] mtd: rawnand: Annotate struct mtk_nfc_nand_chip with __counted_by

2023-10-06 Thread Gustavo A. R. Silva
On 10/6/23 22:17, Kees Cook wrote: 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 via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE

[PATCH] mtd: rawnand: Annotate struct mtk_nfc_nand_chip with __counted_by

2023-10-06 Thread Kees Cook
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 via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). A