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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 25 Feb 2019 23:58:50 +0000
From:   Peng Fan <peng.fan@....com>
To:     Dennis Zhou <dennis@...nel.org>
CC:     "tj@...nel.org" <tj@...nel.org>, "cl@...ux.com" <cl@...ux.com>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "van.freenix@...il.com" <van.freenix@...il.com>
Subject: RE: [PATCH 1/2] percpu: km: remove SMP check

Hi Dennis,

> -----Original Message-----
> From: Dennis Zhou [mailto:dennis@...nel.org]
> Sent: 2019年2月25日 23:14
> To: Peng Fan <peng.fan@....com>
> Cc: dennis@...nel.org; tj@...nel.org; cl@...ux.com; linux-mm@...ck.org;
> linux-kernel@...r.kernel.org; van.freenix@...il.com
> Subject: Re: [PATCH 1/2] percpu: km: remove SMP check
> 
> On Sun, Feb 24, 2019 at 01:13:43PM +0000, Peng Fan wrote:
> > percpu-km could only be selected by NEED_PER_CPU_KM which depends
> on
> > !SMP, so CONFIG_SMP will be false when choose percpu-km.
> >
> > Signed-off-by: Peng Fan <peng.fan@....com>
> > ---
> >  mm/percpu-km.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/mm/percpu-km.c b/mm/percpu-km.c index
> > 0f643dc2dc65..66e5598be876 100644
> > --- a/mm/percpu-km.c
> > +++ b/mm/percpu-km.c
> > @@ -27,7 +27,7 @@
> >   *   chunk size is not aligned.  percpu-km code will whine about it.
> >   */
> >
> > -#if defined(CONFIG_SMP) &&
> > defined(CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK)
> > +#if defined(CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK)
> >  #error "contiguous percpu allocation is incompatible with paged first
> chunk"
> >  #endif
> >
> > --
> > 2.16.4
> >
> 
> Hi,
> 
> I think keeping CONFIG_SMP makes this easier to remember dependencies
> rather than having to dig into the config. So this is a NACK from me.

You might be wrong here.
In mm/Kconfig, NEED_PER_CPU_KM default y depends on !SMP. So if CONFIG_SMP
is not defined, NEED_PER_CPU_KM will be true. If we also define
CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK, the #error will have no chance
to be detected because CONFIG_SMP already be false.
That means CONFIG_SMP will always be false if percpu-km is used.
So need to drop the CONFIG_SMP check here.

Thanks,
Peng.

> 
> Thanks,
> Dennis

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ