From: Barry Song <song.bao.hua@hisilicon.com>
To: <gregkh@linuxfoundation.org>, <andriy.shevchenko@linux.intel.com>,
<linux-kernel@vger.kernel.org>
Cc: <linux@rasmusvillemoes.dk>, <rafael@kernel.org>,
<akpm@linux-foundation.org>, <rdunlap@infradead.org>,
<agordeev@linux.ibm.com>, <sbrivio@redhat.com>,
<jianpeng.ma@intel.com>, <yury.norov@gmail.com>,
<valentin.schneider@arm.com>, <peterz@infradead.org>,
<bristot@redhat.com>, <guodong.xu@linaro.org>,
<tangchengchang@huawei.com>, <prime.zeng@hisilicon.com>,
<yangyicong@huawei.com>, <tim.c.chen@linux.intel.com>,
<tiantao6@hisilicon.com>, <Jonathan.Cameron@huawei.com>,
<linuxarm@huawei.com>, Barry Song <song.bao.hua@hisilicon.com>
Subject: [PATCH v4 0/4] use bin_attribute to avoid cpumap buff overflow
Date: Thu, 17 Jun 2021 22:19:06 +1200 [thread overview]
Message-ID: <20210617101910.13228-1-song.bao.hua@hisilicon.com> (raw)
patch #1 adds a new function cpumap_print_to_buf and patch #2 uses
this function in drivers/base/topology.c, and patch #3 uses this new
function in drivers/base/node.c.
patch #4 adds test cases for the new API.
v4:
add test cases for bitmap_print_to_buf API;
add Reviewed-by of Jonathan Cameron for patches 1-3, thanks!
v3:
fixed the strlen issue and patch #1,#2,#3 minor formatting issues, thanks
to Andy Shevchenko and Jonathan Cameron.
v2:
split the original patch #1 into two patches and use kasprintf() in
patch #1 to simplify the code. do some minor formatting adjustments.
Barry Song (1):
lib: test_bitmap: add bitmap_print_to_buf test cases
Tian Tao (3):
lib: bitmap: introduce bitmap_print_to_buf
topology: use bin_attribute to avoid buff overflow
drivers/base/node.c: use bin_attribute to avoid buff overflow
drivers/base/node.c | 52 +++++++++-----
drivers/base/topology.c | 115 +++++++++++++++++--------------
include/linux/bitmap.h | 2 +
include/linux/cpumask.h | 21 ++++++
lib/bitmap.c | 37 +++++++++-
lib/test_bitmap.c | 149 ++++++++++++++++++++++++++++++++++++++++
6 files changed, 304 insertions(+), 72 deletions(-)
--
2.25.1
next reply other threads:[~2021-06-17 10:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-17 10:19 Barry Song [this message]
2021-06-17 10:19 ` [PATCH v4 1/4] lib: bitmap: introduce bitmap_print_to_buf Barry Song
2021-06-17 10:47 ` Greg KH
2021-06-18 2:14 ` Song Bao Hua (Barry Song)
2021-06-17 20:54 ` Yury Norov
2021-07-01 11:59 ` Song Bao Hua (Barry Song)
2021-06-17 10:19 ` [PATCH v4 2/4] topology: use bin_attribute to avoid buff overflow Barry Song
2021-06-17 10:54 ` Greg KH
2021-06-17 11:06 ` Song Bao Hua (Barry Song)
2021-06-17 10:55 ` Greg KH
2021-06-17 11:03 ` Song Bao Hua (Barry Song)
2021-06-17 10:19 ` [PATCH v4 3/4] drivers/base/node.c: " Barry Song
2021-06-17 10:55 ` Greg KH
2021-06-17 10:19 ` [PATCH v4 4/4] lib: test_bitmap: add bitmap_print_to_buf test cases Barry Song
2021-06-17 21:17 ` [PATCH v4 0/4] use bin_attribute to avoid cpumap buff overflow Yury Norov
2021-06-17 23:48 ` Song Bao Hua (Barry Song)
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=20210617101910.13228-1-song.bao.hua@hisilicon.com \
--to=song.bao.hua@hisilicon.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bristot@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=guodong.xu@linaro.org \
--cc=jianpeng.ma@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=linuxarm@huawei.com \
--cc=peterz@infradead.org \
--cc=prime.zeng@hisilicon.com \
--cc=rafael@kernel.org \
--cc=rdunlap@infradead.org \
--cc=sbrivio@redhat.com \
--cc=tangchengchang@huawei.com \
--cc=tiantao6@hisilicon.com \
--cc=tim.c.chen@linux.intel.com \
--cc=valentin.schneider@arm.com \
--cc=yangyicong@huawei.com \
--cc=yury.norov@gmail.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;
as well as URLs for NNTP newsgroup(s).