[RFC PATCH 6/7] smdb.py: filter out __untagged from find_tagged results

Andrew Murray <[email protected]>
Newsgroups org.kernel.vger.smatch
Message-ID <[email protected]>
The find_tagged command lists call sites that may lead to a tagged
pointer detection deeper in the call tree - let's filter out any
that we know to be annotated with __untagged.

Signed-off-by: Andrew Murray <[email protected]>
---
 smatch_data/db/smdb.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/smatch_data/db/smdb.py b/smatch_data/db/smdb.py
index ba46b01a4d08..04bff00be45a 100755
--- a/smatch_data/db/smdb.py
+++ b/smatch_data/db/smdb.py
@@ -574,6 +574,12 @@ def rl_is_tagged(txt):
 
     return 1
 
+def rl_is_treat_untagged(txt):
+    if "[u]" in txt:
+        return 1;
+
+    return 0
+
 def parse_warns_tagged(filename):
     proc = subprocess.Popen(['cat %s | grep "potentially tagged" | sort | uniq' %(filename)], shell=True, stdout=subprocess.PIPE)
     while True:
@@ -622,6 +628,8 @@ def find_tagged(func, param, caller_call_id, printed):
         for row in cur:
             if not rl_is_tagged(row[2]):
                 continue
+	    if rl_is_treat_untagged(row[2]):
+	        continue
             found = 1
             if row[1] not in callers:
                 callers[row[1]] = {}
-- 
2.21.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.