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, 11 Mar 2019 21:23:27 +0000
From:   Roman Gushchin <guro@...com>
To:     "Tobin C. Harding" <tobin@...nel.org>
CC:     Andrew Morton <akpm@...ux-foundation.org>,
        Christopher Lameter <cl@...ux.com>,
        Pekka Enberg <penberg@...helsinki.fi>,
        Matthew Wilcox <willy@...radead.org>,
        Tycho Andersen <tycho@...ho.ws>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC 01/15] slub: Create sysfs field /sys/slab/<cache>/ops

On Fri, Mar 08, 2019 at 03:14:12PM +1100, Tobin C. Harding wrote:
> Create an ops field in /sys/slab/*/ops to contain all the callback
> operations defined for a slab cache. This will be used to display
> the additional callbacks that will be defined soon to enable movable
> objects.
> 
> Display the existing ctor callback in the ops fields contents.
> 
> Co-developed-by: Christoph Lameter <cl@...ux.com>
> Signed-off-by: Tobin C. Harding <tobin@...nel.org>

Hi Tobin!

> ---
>  mm/slub.c | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/mm/slub.c b/mm/slub.c
> index dc777761b6b7..69164aa7cbbf 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -5009,13 +5009,18 @@ static ssize_t cpu_partial_store(struct kmem_cache *s, const char *buf,
>  }
>  SLAB_ATTR(cpu_partial);
>  
> -static ssize_t ctor_show(struct kmem_cache *s, char *buf)
> +static ssize_t ops_show(struct kmem_cache *s, char *buf)
>  {
> +	int x = 0;
> +
>  	if (!s->ctor)
>  		return 0;
        ^^^^^^^^^^^^^^^^^
You can drop this part, can't you?

Also, it's not clear (without looking into following patches) why do you
make this refactoring. So, please, add a note, or move this change into
the patch 3.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ