diff options
author | Simon Horman <[email protected]> | 2024-09-04 19:29:36 +0100 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2024-09-06 18:23:49 -0700 |
commit | 92218f108f510ac66715a7700479acacb18335f5 (patch) | |
tree | c00e836e2209f6fc55005c445cd98cb31273264f /tools/perf/scripts/python/failed-syscalls-by-pid.py | |
parent | cca0d69baf950e5a82c21d09917b4cc654c83fe9 (diff) |
octeontx2-af: Pass string literal as format argument of alloc_workqueue()
Recently I noticed that both gcc-14 and clang-18 report that passing
a non-string literal as the format argument of alloc_workqueue()
is potentially insecure.
E.g. clang-18 says:
.../rvu.c:2493:32: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
2493 | mw->mbox_wq = alloc_workqueue(name,
| ^~~~
.../rvu.c:2493:32: note: treat the string as an argument to avoid this
2493 | mw->mbox_wq = alloc_workqueue(name,
| ^
| "%s",
It is always the case where the contents of name is safe to pass as the
format argument. That is, in my understanding, it never contains any
format escape sequences.
But, it seems better to be safe than sorry. And, as a bonus, compiler
output becomes less verbose by addressing this issue as suggested by
clang-18.
Compile tested only by author.
Tested-by: Geetha sowjanya <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/failed-syscalls-by-pid.py')
0 files changed, 0 insertions, 0 deletions