aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/clang-tools/run-clang-tools.py
diff options
context:
space:
mode:
authorGuru Das Srinagesh <[email protected]>2022-08-04 17:46:14 +0000
committerMasahiro Yamada <[email protected]>2022-08-20 17:47:49 +0000
commit4be72c1b9f298b4ad42391322eaddef64b282716 (patch)
tree5efedfdbeb3761c2a5c30d8788dc6ba6246d45f9 /scripts/clang-tools/run-clang-tools.py
parentkbuild: fix the modules order between drivers and libs (diff)
downloadkernel-4be72c1b9f298b4ad42391322eaddef64b282716.tar.gz
kernel-4be72c1b9f298b4ad42391322eaddef64b282716.zip
scripts/clang-tools: Remove DeprecatedOrUnsafeBufferHandling check
This `clang-analyzer` check flags the use of memset(), suggesting a more secure version of the API, such as memset_s(), which does not exist in the kernel: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] Signed-off-by: Guru Das Srinagesh <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
Diffstat (limited to 'scripts/clang-tools/run-clang-tools.py')
-rwxr-xr-xscripts/clang-tools/run-clang-tools.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/clang-tools/run-clang-tools.py b/scripts/clang-tools/run-clang-tools.py
index f754415af398..1337cedca096 100755
--- a/scripts/clang-tools/run-clang-tools.py
+++ b/scripts/clang-tools/run-clang-tools.py
@@ -51,6 +51,7 @@ def run_analysis(entry):
checks += "linuxkernel-*"
else:
checks += "clang-analyzer-*"
+ checks += ",-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling"
p = subprocess.run(["clang-tidy", "-p", args.path, checks, entry["file"]],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,