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] [day] [month] [year] [list]
Message-ID: <YtAh57FudrywhX67@lorien.usersys.redhat.com>
Date:   Thu, 14 Jul 2022 10:02:15 -0400
From:   Phil Auld <pauld@...hat.com>
To:     Barry Song <21cnbao@...il.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J . Wysocki" <rafael@...nel.org>,
        Tian Tao <tiantao6@...ilicon.com>
Subject: Re: [PATCH v3] drivers/base/node.c: fix userspace break from using
 bin_attributes for cpumap and cpulist

On Thu, Jul 14, 2022 at 08:59:25AM -0400 Phil Auld wrote:
> On Thu, Jul 14, 2022 at 12:23:01PM +1200 Barry Song wrote:
> > btw, we have a lot of other places which might need this, such as
> > drivers/base/topology.c
> > 
> > so perhaps we can move them to some common place,
> > 
> > #define cpu_bitmap_bytes  (((NR_CPUS >> 1) > PAGE_SIZE) ? NR_CPUS >> 1
> > : PAGE_SIZE)
> > #define cpu_list_bytes  (((NR_CPUS * 7) > PAGE_SIZE) ? NR_CPUS * 7 : PAGE_SIZE)
> > 
> > is include/linux/cpumask.h a good place for it?

drivers/base/base.h does not look like the right place, so I think your cpumask.h idea
is better. I'll put in there and update the topology.c BIN_ATTRs. 

Thanks,
Phil

> 
> My concern is the ones that are breaking actual userspace code. But yes, those
> otherwise have the same 0 size. 
> 
> It seems somewhat specific to drivers/base. Maybe there's a less global place to
> put those closer. I can look and do it this way if that will help get it fixed.
> 
> 
> Cheers,
> Phil
> 
> > 
> > >  /**
> > >   * struct node_access_nodes - Access class device to hold user visible
> > > --
> > > 2.31.1
> > >
> > 
> > Thanks
> > Barry
> > 
> 
> -- 

-- 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ