lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a053afb1-bd3c-78f2-6414-e43014692a56@gmail.com>
Date:   Mon, 26 Apr 2021 18:38:48 +0200
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Shuo Chen <giantchen@...il.com>, Jim Cromie <jim.cromie@...il.com>,
        Jason Baron <jbaron@...mai.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, Shuo Chen <shuochen@...gle.com>
Subject: Re: [PATCH] dyndbg: fix parsing file query without a line-range
 suffix



On 4/14/21 11:24 PM, Shuo Chen wrote:
> From: Shuo Chen <shuochen@...gle.com>
> 
> Query like 'file tcp_input.c line 1234 +p' was broken by
> commit aaebe329bff0 ("dyndbg: accept 'file foo.c:func1' and 'file
> foo.c:10-100'") because a file name without a ':' now makes the loop in
> ddebug_parse_query() exits early before parsing the 'line 1234' part.
> As a result, all pr_debug() in tcp_input.c will be enabled, instead of only
> the one on line 1234.  Changing 'break' to 'continue' fixes this.
> 
> Fixes: aaebe329bff0 ("dyndbg: accept 'file foo.c:func1' and 'file foo.c:10-100'")
> Signed-off-by: Shuo Chen <shuochen@...gle.com>
> ---
>  lib/dynamic_debug.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
> index c70d6347afa2..921d0a654243 100644
> --- a/lib/dynamic_debug.c
> +++ b/lib/dynamic_debug.c
> @@ -396,7 +396,7 @@ static int ddebug_parse_query(char *words[], int nwords,
>  			/* tail :$info is function or line-range */
>  			fline = strchr(query->filename, ':');
>  			if (!fline)
> -				break;
> +				continue;
>  			*fline++ = '\0';
>  			if (isalpha(*fline) || *fline == '*' || *fline == '?') {
>  				/* take as function name */
> 

SGTM, thanks !

Reviewed-by: Eric Dumazet <edumazet@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ