Fix variable suppression name_not_regex.
Commit Message
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(-)
Comments
On Tue, Apr 14, 2020 at 07:38:13PM +0100, Giuliano Procida wrote:
>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.
>
Nice catch!
Reviewed-by: Matthias Maennich <maennich@google.com>
Tested-by: Matthias Maennich <maennich@google.com>
Cheers,
Matthias
>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
>
Giuliano Procida <gprocida@google.com> a ?crit:
> 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.
Applied to master, thanks!
Cheers,
@@ -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_;