[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190923150942.GD2369@hirez.programming.kicks-ass.net>
Date: Mon, 23 Sep 2019 17:09:42 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Michal Hocko <mhocko@...nel.org>
Cc: Yunsheng Lin <linyunsheng@...wei.com>,
Greg KH <gregkh@...uxfoundation.org>, rafael@...nel.org,
linux-kernel@...r.kernel.org, mingo@...nel.org, linuxarm@...wei.com
Subject: Re: [PATCH] driver core: ensure a device has valid node id in
device_add()
On Wed, Sep 11, 2019 at 08:49:26AM +0200, Michal Hocko wrote:
> On Wed 11-09-19 14:15:51, Yunsheng Lin wrote:
> > >>>>>> When passing the return value of dev_to_node() to cpumask_of_node()
> > >>>>>> without checking the node id if the node id is not valid, there is
> > >>>>>> global-out-of-bounds detected by KASAN as below:
> > >>>>>
> > >>>>> OK, I seem to remember this being brought up already. And now when I
> > >>>>> think about it, we really want to make cpumask_of_node NUMA_NO_NODE
> > >>>>> aware. That means using the same trick the allocator does for this
> > >>>>> special case.
> No. Please read the above paragraph again. NUMA_NO_NODE really means no
> node affinity. So all cpus should be usable. Making any assumptions
> about a local context is just wrong.
So none of this makes sense to me. How can a device have NUMA_NO_NODE on
a NUMA machine. It needs to have a physical presence _somwhere_; and
that cannot be equidistant from all CPUs.
Please explain how this makes physical sense.
Powered by blists - more mailing lists