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:	Wed, 22 Apr 2015 20:28:42 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Gavin Guo <gavin.guo@...onical.com>
Cc:	Christoph Lameter <cl@...ux.com>, penberg@...nel.org,
	rientjes@...gle.com, iamjoonsoo.kim@....com, linux-mm@...ck.org,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] mm/slab_common: Support the slub_debug boot option
 on specific object size

On Thu, 23 Apr 2015 11:10:40 +0800 Gavin Guo <gavin.guo@...onical.com> wrote:

> >>       for (i = KMALLOC_SHIFT_LOW; i <= KMALLOC_SHIFT_HIGH; i++) {
> >>               if (!kmalloc_caches[i]) {
> >> -                     kmalloc_caches[i] = create_kmalloc_cache(NULL,
> >> +                     kmalloc_caches[i] = create_kmalloc_cache(
> >> +                                                     kmalloc_names[i],
> >>                                                       1 << i, flags);
> >>               }
> >
> > You could do something like
> >
> >                 kmalloc_caches[i] = create_kmalloc_cache(
> >                                         kmalloc_names[i],
> >                                         kstrtoul(kmalloc_names[i] + 8),
> >                                         flags);
> >
> > here, and remove those weird "96" and "192" cases.
> 
> Thanks for your reply. I'm not sure if I am following your idea. Would you
> mean to simply replace the string like:
> 
>                 kmalloc_caches[1] = create_kmalloc_cache(
>                                         kmalloc_names[1], 96, flags);
> as follows:
> 
>                 kmalloc_caches[1] = create_kmalloc_cache(
>                                         kmalloc_names[1],
>                                         kstrtoul(kmalloc_names[i] + 8),
>                                         flags);
> 
> or if you like to merge the last 2 if conditions for 96 and 192 cases to
> the first if condition check:
> 
>                 if (!kmalloc_caches[i]) {
>                         kmalloc_caches[i] = create_kmalloc_cache(NULL,
>                                                         1 << i, flags);
>                 }

The latter - initialize all the caches in a single loop.
--
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