From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com ([217.140.110.172]:38130 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727876AbfJGPf7 (ORCPT ); Mon, 7 Oct 2019 11:35:59 -0400 From: Andrew Murray Subject: [RFC PATCH 6/7] smdb.py: filter out __untagged from find_tagged results Date: Mon, 7 Oct 2019 16:35:44 +0100 Message-Id: <20191007153545.23231-7-andrew.murray@arm.com> In-Reply-To: <20191007153545.23231-1-andrew.murray@arm.com> References: <20191007153545.23231-1-andrew.murray@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: smatch-owner@vger.kernel.org List-ID: To: Dan Carpenter , Catalin.Marinas@arm.com Cc: smatch@vger.kernel.org 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 --- 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