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]
Date:	Sat, 10 May 2014 10:29:18 -0700
From:	Randy Dunlap <rdunlap@...radead.org>
To:	George Spelvin <linux@...izon.com>, tj@...nel.org
CC:	akpm@...ux-foundation.org, linux-ide@...r.kernel.org,
	linux-kernel@...r.kernel.org, mingo@...hat.com,
	torvalds@...ux-foundation.org
Subject: Re: [PATCH 1/2] Add lib/glob.c

On 05/09/2014 08:13 PM, George Spelvin wrote:
> This is a helper function from drivers/ata/libata_core.c, where it is used
> to blacklist particular device models.  It's being moved to lib/ so other
> drivers may use it for the same purpose.
> 
> This implementation in non-recursive, so is safe for the kernel stack.
> 
> Signed-off-by: George Spelvin <linux@...izon.com>
> ---
> Finally rescued this from the back burner.  The code size will go back
> down in the second patch which removes the old implementation, although
> the number of source line reflects more comments and a test driver.
> 
> The infrastructure parts of this, such as the module name and Kconfig
> declarations, are something I haven't done before, and comments are
> appreciated.
> 
> Tejun Heo <htejun@...il.com> wrote:
>> On Wed, Mar 12, 2014 at 06:52:44PM -0400, George Spelvin wrote:
>>> Sure; I'll prepare some patches.  May I feed it through you, or
>>> is there a lib/ maintainer I need to go through?
>>
>> Please keep me cc'd but you'd probably also want to cc Linus, Andrew
>> Morton and Ingo.
> 
>  include/linux/glob.h |  10 +++
>  lib/Kconfig          |  14 ++++
>  lib/Makefile         |   2 +
>  lib/glob.c           | 225 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 251 insertions(+)
>  create mode 100644 include/linux/glob.h
>  create mode 100644 lib/glob.c

> diff --git a/lib/Kconfig b/lib/Kconfig
> index 991c98b..5333d10 100644
> --- a/lib/Kconfig
> +++ b/lib/Kconfig
> @@ -373,6 +373,20 @@ config CPU_RMAP
>  config DQL
>  	bool
>  
> +config GLOB
> +	tristate
> +#	(Prompt disabled to reduce kbuild clutter until someone needs it.)
> +#	prompt "glob_match() function"
> +	help
> +	  This option provides a glob_match function for performing simple
> +	  text pattern matching.  It is primarily used by the ATA code
> +	  to blacklist particular drive models, but other device drivers
> +	  may need similar functionality.
> +
> +	  All in-kernel drivers that require this function automatically

	I would drop "automatically". It has to be coded.

> +	  select this option.  Say N unless you are compiling an out-of
> +	  tree driver which tells you it depend on it.

	To support out-of-tree drivers, I'm pretty sure that you will need
	to use obj- instead of lib-.  lib- drops unused code, like Tejun said.

> +
>  #
>  # Netlink attribute parsing support is select'ed if needed
>  #


-- 
~Randy
--
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