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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cb90096ab76d4a55a59d0682fa786ba5@hisilicon.com>
Date:   Tue, 1 Jun 2021 07:04:33 +0000
From:   "Song Bao Hua (Barry Song)" <song.bao.hua@...ilicon.com>
To:     Greg KH <gregkh@...uxfoundation.org>,
        "tiantao (H)" <tiantao6@...ilicon.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>
Subject: RE: [PATCH 1/2] topology: use bin_attribute to avoid buff overflow



> -----Original Message-----
> From: Greg KH [mailto:gregkh@...uxfoundation.org]
> Sent: Tuesday, June 1, 2021 4:59 PM
> To: tiantao (H) <tiantao6@...ilicon.com>
> Cc: linux-kernel@...r.kernel.org; akpm@...ux-foundation.org; Song Bao Hua
> (Barry Song) <song.bao.hua@...ilicon.com>; Andy Shevchenko
> <andriy.shevchenko@...ux.intel.com>; Rafael J. Wysocki <rafael@...nel.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.

Right now, drivers/base/topology.c and drivers/base/node.c are the first
two examples involved. We are still having around 40 other places in
the todo list.

Thanks
Barry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ