IOMMU Archive mirror
 help / color / mirror / Atom feed
From: Fedor Pchelkin <pchelkin@ispras.ru>
To: Xiang Chen <chenxiang66@hisilicon.com>, Barry Song <21cnbao@gmail.com>
Cc: Fedor Pchelkin <pchelkin@ispras.ru>,
	Christoph Hellwig <hch@lst.de>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Robin Murphy <robin.murphy@arm.com>,
	iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
	Alexey Khoroshilov <khoroshilov@ispras.ru>,
	lvc-project@linuxtesting.org
Subject: [PATCH v2 0/4] dma-mapping: benchmark: fixes and error handling improvements
Date: Sat,  4 May 2024 14:47:00 +0300	[thread overview]
Message-ID: <20240504114713.567164-1-pchelkin@ispras.ru> (raw)

Some of the error paths inside do_map_benchmark() do not behave well.
There is also an insufficient node id validation and an out-of-bounds
access in NUMA_NO_NODE case.

Adjust these issues with the following patches.

Changelog
v2:
 * Rework kthread-related error handling patch (thanks to Robin Murphy) and
   merge patches 1/2 and 2/2 from v1 into a single patch - 1/4 in v2.
 * Three additional patches:
 * * Avoid needless copy_to_user if benchmark fails (suggested by Barry Song).
 * * Fix node id validation (found while testing the previous ones).
 * * Handle NUMA_NO_NODE correctly.
v1:
 * https://lore.kernel.org/linux-iommu/20240502161827.403338-1-pchelkin@ispras.ru/

Fedor Pchelkin (4):
  dma-mapping: benchmark: fix up kthread-related error handling
  dma-mapping: benchmark: avoid needless copy_to_user if benchmark fails
  dma-mapping: benchmark: fix node id validation
  dma-mapping: benchmark: handle NUMA_NO_NODE correctly

 kernel/dma/map_benchmark.c | 25 ++++++++++++++++---------
 1 file changed, 16 insertions(+), 9 deletions(-)

-- 
2.45.0


             reply	other threads:[~2024-05-04 11:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-04 11:47 Fedor Pchelkin [this message]
2024-05-04 11:47 ` [PATCH v2 1/4] dma-mapping: benchmark: fix up kthread-related error handling Fedor Pchelkin
2024-05-10 17:35   ` Robin Murphy
2024-05-15 12:14     ` Fedor Pchelkin
2024-05-04 11:47 ` [PATCH v2 2/4] dma-mapping: benchmark: avoid needless copy_to_user if benchmark fails Fedor Pchelkin
2024-05-10 17:52   ` Robin Murphy
2024-05-04 11:47 ` [PATCH v2 3/4] dma-mapping: benchmark: fix node id validation Fedor Pchelkin
2024-05-10 17:45   ` Robin Murphy
2024-05-04 11:47 ` [PATCH v2 4/4] dma-mapping: benchmark: handle NUMA_NO_NODE correctly Fedor Pchelkin
2024-05-07  6:56   ` Barry Song
2024-05-23 13:10 ` [PATCH v2 0/4] dma-mapping: benchmark: fixes and error handling improvements Christoph Hellwig

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=20240504114713.567164-1-pchelkin@ispras.ru \
    --to=pchelkin@ispras.ru \
    --cc=21cnbao@gmail.com \
    --cc=chenxiang66@hisilicon.com \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux.dev \
    --cc=khoroshilov@ispras.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=m.szyprowski@samsung.com \
    --cc=robin.murphy@arm.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 read-only IMAP folder(s) and NNTP newsgroup(s).