From patchwork Tue Apr 14 18:38:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giuliano Procida X-Patchwork-Id: 39090 From: gprocida@google.com (Giuliano Procida) Date: Tue, 14 Apr 2020 19:38:13 +0100 Subject: [PATCH] Fix variable suppression name_not_regex. Message-ID: <20200414183813.76227-1-gprocida@google.com> 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 Reviewed-by: Matthias Maennich Tested-by: Matthias Maennich --- 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(); 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_;