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] [day] [month] [year] [list]
Date:	Wed, 13 Sep 2006 09:17:11 -0700
From:	"Randy.Dunlap" <rdunlap@...otime.net>
To:	Alexey Dobriyan <adobriyan@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [RFC 1/2] kmemdup: introduce

On Sat, 9 Sep 2006 05:35:55 +0400 Alexey Dobriyan wrote:

> Not tested yet, this is for semantics commentary.
> 
>  include/linux/string.h |    1 +
>  mm/util.c              |   18 ++++++++++++++++++
>  2 files changed, 19 insertions(+)
> 
> --- a/mm/util.c
> +++ b/mm/util.c
> @@ -40,6 +40,24 @@ char *kstrdup(const char *s, gfp_t gfp)
>  }
>  EXPORT_SYMBOL(kstrdup);
>  
> +/**
> + * kmemdup - duplicate region of memory
> + *

No blank line here, please.  kernel-doc "language" doesn't allow
that.  Hopefully that will be fixed someday.

> + * @src: memory region to duplicate
> + * @len: memory region length
> + * @gfp: GFP mask to use
> + */
> +void *kmemdup(const void *src, size_t len, gfp_t gfp)
> +{
> +	void *p;
> +
> +	p = ____kmalloc(len, gfp);
> +	if (p)
> +		memcpy(p, src, len);
> +	return p;
> +}
> +EXPORT_SYMBOL(kmemdup);

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