Messages in this thread | | | Date | Tue, 1 Jun 2021 09:13:27 +0200 | From | Greg KH <> | Subject | Re: [PATCH 1/2] topology: use bin_attribute to avoid buff overflow |
| |
On Tue, Jun 01, 2021 at 07:04:33AM +0000, Song Bao Hua (Barry Song) wrote: > > > > -----Original Message----- > > From: Greg KH [mailto:gregkh@linuxfoundation.org] > > Sent: Tuesday, June 1, 2021 4:59 PM > > To: tiantao (H) <tiantao6@hisilicon.com> > > Cc: linux-kernel@vger.kernel.org; akpm@linux-foundation.org; Song Bao Hua > > (Barry Song) <song.bao.hua@hisilicon.com>; Andy Shevchenko > > <andriy.shevchenko@linux.intel.com>; Rafael J. Wysocki <rafael@kernel.org> > > Subject: Re: [PATCH 1/2] topology: use bin_attribute to avoid buff overflow > > > > On Tue, Jun 01, 2021 at 10:56:49AM +0800, Tian Tao wrote: > > > Reading sys/devices/system/cpu/cpuX/topology/ returns cpu topology. > > > However, the size of this file is limited to PAGE_SIZE because of the > > > limitation for sysfs attribute. so we use bin_attribute instead of > > > attribute to avoid NR_CPUS too big to cause buff overflow. > > > > > > This patch is based on the following discussion. > > > https://www.spinics.net/lists/linux-doc/msg95921.html > > > > Please use lore.kernel.org for links as we have no control over other > > sites to ensure that they will work in the future. Use the message id > > in the link as well, so that if something were to happen to lore, we can > > figure it out. > > > > Also, you are modifying a bunch of different files here, do you mean to > > do it for all of them? > > The plan is providing a common wrapper similar with cpumap_print_to_pagebuf > so that all modules which have bitmap and list topology ABI can move to use > it.
Ok, then create the new function and then convert to use it, do not bundle it together in the same patch.
thanks,
greg k-h
| |