From: Phil Auld <pauld@redhat.com>
To: Barry Song <21cnbao@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
Tian Tao <tiantao6@hisilicon.com>
Subject: Re: [PATCH v3] drivers/base/node.c: fix userspace break from using bin_attributes for cpumap and cpulist
Date: Thu, 14 Jul 2022 10:02:15 -0400 [thread overview]
Message-ID: <YtAh57FudrywhX67@lorien.usersys.redhat.com> (raw)
In-Reply-To: <YtATLNvojuvOOmys@lorien.usersys.redhat.com>
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
> >
>
> --
--
prev parent reply other threads:[~2022-07-14 14:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-13 18:38 [PATCH v3] drivers/base/node.c: fix userspace break from using bin_attributes for cpumap and cpulist Phil Auld
2022-07-14 0:23 ` Barry Song
2022-07-14 12:59 ` Phil Auld
2022-07-14 14:02 ` Phil Auld [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YtAh57FudrywhX67@lorien.usersys.redhat.com \
--to=pauld@redhat.com \
--cc=21cnbao@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=tiantao6@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox