diff options
author | Kees Cook <keescook@chromium.org> | 2023-09-15 23:06:12 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2023-09-30 21:19:43 +0300 |
commit | bd94d501c0c99753497f8396e96738a560bac10e (patch) | |
tree | 153c41f14461adc36c91348c38c418553d29df38 /include/linux/pci_ids.h | |
parent | 09382d8f8641bc12fffc41a93eb9b37be0e653c0 (diff) | |
download | linux-bd94d501c0c99753497f8396e96738a560bac10e.tar.xz |
wifi: mt76: Annotate struct mt76_rx_tid 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 mt76_rx_tid.
[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci
Cc: Felix Fietkau <nbd@nbd.name>
Cc: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: Ryder Lee <ryder.lee@mediatek.com>
Cc: Shayne Chen <shayne.chen@mediatek.com>
Cc: Sean Wang <sean.wang@mediatek.com>
Cc: Kalle Valo <kvalo@kernel.org>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: linux-wireless@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'include/linux/pci_ids.h')
0 files changed, 0 insertions, 0 deletions