lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1530814776-16988-1-git-send-email-pheragu@codeaurora.org>
Date:   Thu,  5 Jul 2018 11:19:36 -0700
From:   Prakruthi Deepak Heragu <pheragu@...eaurora.org>
To:     apw@...onical.com, joe@...ches.com
Cc:     linux-kernel@...r.kernel.org, ckadabi@...eaurora.org,
        tsoni@...eaurora.org, bryanh@...eaurora.org,
        Prakruthi Deepak Heragu <pheragu@...eaurora.org>
Subject: [PATCH] checkpatch: Add exceptions for dsb keyword usage

mb() API can relpace the dsb() API in the kernel code. So, dsb() usage
is discouraged. However, there are exceptions when dsb is used in a
variable or a function name. Exceptions are when 'dsb' is prefixed with
class [-_>*\.] and/or suffixed with class [-_\.;].

Signed-off-by: Prakruthi Deepak Heragu <pheragu@...eaurora.org>
---
 scripts/checkpatch.pl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a9c0550..978c752 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -5372,6 +5372,12 @@ sub process {
 			     "Avoid line continuations in quoted strings\n" . $herecurr);
 		}
 
+# dsb is too ARMish, and should usually be mb.
+        if ($line =~ /[^-_>*\.]\bdsb\b[^-_\.;]/) {
+            WARN("ARM_BARRIER",
+                 "Use of dsb is discouranged: prefer mb.\n" .
+                 $herecurr);
+		}
 # warn about #if 0
 		if ($line =~ /^.\s*\#\s*if\s+0\b/) {
 			CHK("REDUNDANT_CODE",
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ