public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix variable suppression name_not_regex.
@ 2020-04-14 18:38 Giuliano Procida
  2020-04-14 19:49 ` Matthias Maennich
  2020-04-15 13:08 ` Dodji Seketeli
  0 siblings, 2 replies; 3+ messages in thread
From: Giuliano Procida @ 2020-04-14 18:38 UTC (permalink / raw)
  To: libabigail; +Cc: dodji, kernel-team, gprocida, maennich

Kernel symbol whitelisting symbol is implemented using a regex to
suppress all function and variable names that don't match the given
list. This was completely broken for variables, resulting in all
variables being filtered out if a kernel whitelist was specified.

	* src/abg-suppression-priv.h: In get_symbol_name_not_regex
	method of variable_suppression::priv, fix typo causing
	miscompilation of regex.

Signed-off-by: Giuliano Procida <gprocida@google.com>
---
 src/abg-suppression-priv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/abg-suppression-priv.h b/src/abg-suppression-priv.h
index 71057ce1..1a9a7207 100644
--- a/src/abg-suppression-priv.h
+++ b/src/abg-suppression-priv.h
@@ -680,7 +680,7 @@ struct variable_suppression::priv
       {
 	sptr_utils::regex_t_sptr r = sptr_utils::build_sptr<regex_t>();
 	if (regcomp(r.get(), symbol_name_not_regex_str_.c_str(),
-		    REG_EXTENDED == 0) == 0)
+		    REG_EXTENDED) == 0)
 	  symbol_name_not_regex_ = r;
       }
     return symbol_name_not_regex_;
-- 
2.26.0.110.g2183baf09c-goog


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-15 13:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-14 18:38 [PATCH] Fix variable suppression name_not_regex Giuliano Procida
2020-04-14 19:49 ` Matthias Maennich
2020-04-15 13:08 ` Dodji Seketeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).