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]
Message-Id: <20221122151718.4f7ffcb656dd7dc0eceb0ad2@linux-foundation.org>
Date:   Tue, 22 Nov 2022 15:17:18 -0800
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Feng Tang <feng.tang@...el.com>
Cc:     Vlastimil Babka <vbabka@...e.cz>, Christoph Lameter <cl@...ux.com>,
        "Pekka Enberg" <penberg@...nel.org>,
        David Rientjes <rientjes@...gle.com>,
        "Joonsoo Kim" <iamjoonsoo.kim@....com>,
        Roman Gushchin <roman.gushchin@...ux.dev>,
        Hyeonggon Yoo <42.hyeyoo@...il.com>,
        Andrey Konovalov <andreyknvl@...il.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Andrey Ryabinin <ryabinin.a.a@...il.com>,
        Alexander Potapenko <glider@...gle.com>,
        Vincenzo Frascino <vincenzo.frascino@....com>,
        <linux-mm@...ck.org>, <kasan-dev@...glegroups.com>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next 1/2] mm/slab: add is_kmalloc_cache() helper macro

On Tue, 22 Nov 2022 13:30:19 +0800 Feng Tang <feng.tang@...el.com> wrote:

> > If so, that's always best.  For (silly) example, consider the behaviour
> > of
> > 
> > 	x = is_kmalloc_cache(s++);
> > 
> > with and without CONFIG_SLOB.
> 
> Another solution I can think of is putting the implementation into
> slab_common.c, like the below?

I'm not sure that's much of an improvement on the macro :(

How about we go with the macro and avoid the
expression-with-side-effects gotcha (and the potential CONFIG_SLOB=n
unused-variable gotcha)?  That would involve evaluating the arg within
the CONFIG_SLOB=y version of the macro.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ