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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20131031155253.79a21d6a126be11a64153d8b@linux-foundation.org>
Date:	Thu, 31 Oct 2013 15:52:53 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	"Du, Changbin" <changbin.du@...il.com>
Cc:	jbaron@...mai.com, joe@...ches.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] dynamic_debug: add wildcard support to filter
 files/functions/modules

On Mon, 28 Oct 2013 23:29:10 +0800 "Du, Changbin" <changbin.du@...il.com> wrote:

> This patch add wildcard '*'(matches zero or more characters) and '?'
> (matches one character) support when qurying debug flags.
> 
> Now we can open debug messages using keywords. eg:
> 1. open debug logs in all usb drivers
>     echo "file drivers/usb/* +p" > <debugfs>/dynamic_debug/control
> 2.  open debug logs for usb xhci code
>     echo "file *xhci* +p" > <debugfs>/dynamic_debug/control

This patch would be a lot easier to understand (and hence review) if
you had remembered to update Documentation/dynamic-debug-howto.txt!

> --- a/lib/dynamic_debug.c
> +++ b/lib/dynamic_debug.c
> @@ -127,6 +127,41 @@ static void vpr_info_dq(const struct ddebug_query *query, const char *msg)
>  		 query->first_lineno, query->last_lineno);
>  }
>  
> +/* check if the string matches given pattern which includes wildcards */
> +static int match_pattern(const char *pattern, const char *string)

No, something like this should be in lib/ so that other callers can use
it.  We already have at least one copy handy in
drivers/ata/libata-core.c:glob_match().  A better approach would be to
move that glob_match() into lib/glob_match.c then teach dynamic_debug
to use it.

There are probably other private globbing functions lying around the
kernel, but it's rather a hard thing to grep for...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ