Hi all, This series addresses the issues that I brought up at [1]. The first change is the actual functional fix and the second change is something I noticed while auditing this code, which is related but tangential to the actual fix, since the current code has a correct calculation.
This resolves the issue for me when testing both clang 19 and GCC 15 (tip of tree, which is the only version that has __counted_by support). [1]: https://lore.kernel.org/20241022205557.GA3004519@thelio-3990X/ --- Nathan Chancellor (2): kprobes: Fix __get_insn_slot() after __counted_by annotation kprobes: Use struct_size() in __get_insn_slot() kernel/kprobes.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) --- base-commit: b5f348cbce367d5dcd34bf2b6c02c39a5be3fb97 change-id: 20241029-kprobes-fix-counted-by-annotation-ddeb95228b32 Best regards, -- Nathan Chancellor <[email protected]>
