summaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2025-02-13 23:13:52 +0100
committerPetr Pavlu <petr.pavlu@suse.com>2025-03-10 11:54:46 +0100
commit3690f4a86005b4b15fabc606d2bbf39bb6290aff (patch)
tree8f689ee55a365a7ddad1738aeb7d0e056db2bdc3 /tools/perf/scripts/python/export-to-sqlite.py
parentf47d2a3f7542a5507b4072fb768a2258071ff519 (diff)
downloadlinux-stable-3690f4a86005b4b15fabc606d2bbf39bb6290aff.tar.gz
linux-stable-3690f4a86005b4b15fabc606d2bbf39bb6290aff.tar.bz2
linux-stable-3690f4a86005b4b15fabc606d2bbf39bb6290aff.zip
params: Annotate struct module_param_attrs with __counted_by()
Add the __counted_by compiler attribute to the flexible array member attrs to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. Increment num before adding a new param_attribute to the attrs array and adjust the array index accordingly. Increment num immediately after the first reallocation such that the reallocation for the NULL terminator only needs to add 1 (instead of 2) to mk->mp->num. Use struct_size() instead of manually calculating the size for the reallocation. Use krealloc_array() for the additional NULL terminator. Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Luis Chamberlain <mcgrof@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Luis Chamberlain <mcgrof@kernel.org> Link: https://lore.kernel.org/r/20250213221352.2625-3-thorsten.blum@linux.dev Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions