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:   Mon, 12 Mar 2018 12:13:15 -0700
From:   Matthew Wilcox <willy@...radead.org>
To:     Igor Stoppa <igor.stoppa@...wei.com>
Cc:     david@...morbit.com, keescook@...omium.org, mhocko@...nel.org,
        labbott@...hat.com, linux-security-module@...r.kernel.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        kernel-hardening@...ts.openwall.com
Subject: Re: [PATCH 4/7] Protectable Memory

On Wed, Feb 28, 2018 at 10:06:17PM +0200, Igor Stoppa wrote:
> struct gen_pool *pmalloc_create_pool(const char *name,
> 					 int min_alloc_order);
> int is_pmalloc_object(const void *ptr, const unsigned long n);
> bool pmalloc_prealloc(struct gen_pool *pool, size_t size);
> void *pmalloc(struct gen_pool *pool, size_t size, gfp_t gfp);
> static inline void *pzalloc(struct gen_pool *pool, size_t size, gfp_t gfp)
> static inline void *pmalloc_array(struct gen_pool *pool, size_t n,
> 				  size_t size, gfp_t flags)
> static inline void *pcalloc(struct gen_pool *pool, size_t n,
> 			    size_t size, gfp_t flags)
> static inline char *pstrdup(struct gen_pool *pool, const char *s, gfp_t gfp)
> int pmalloc_protect_pool(struct gen_pool *pool);
> static inline void pfree(struct gen_pool *pool, const void *addr)
> int pmalloc_destroy_pool(struct gen_pool *pool);

Do you have users for all these functions?  I'm particularly sceptical of
pfree().  To my mind, a user wants to:

pmalloc_create();
pmalloc(); * N
pmalloc_protect();
...
pmalloc_destroy();

I don't mind the pstrdup, pcalloc, pmalloc_array, pzalloc variations, but
I don't know why you need is_pmalloc_object().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ