mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Barry Song <21cnbao@gmail.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Qinxin Xia <xiaqinxin@huawei.com>,
	robin.murphy@arm.com, yangyicong@huawei.com, hch@lst.de,
	iommu@lists.linux.dev, prime.zeng@huawei.com,
	fanghao11@huawei.com, linux-kernel@vger.kernel.org,
	linuxarm@huawei.com
Subject: Re: [RESEND PATCH v4 1/4] dma-mapping: benchmark: Add padding to ensure uABI remained consistent
Date: Mon, 23 Jun 2025 14:01:23 +0200	[thread overview]
Message-ID: <ed07e57d-00e0-44b3-b53e-b5295aee8561@samsung.com> (raw)
In-Reply-To: <CAGsJ_4wOB+cmGzuzzacwJGeUYgGLuKg94wuWC+mA-_=r0TVuhQ@mail.gmail.com>

On 16.06.2025 12:40, Barry Song wrote:
> On Mon, Jun 16, 2025 at 9:53 PM Jonathan Cameron
> <Jonathan.Cameron@huawei.com> wrote:
>> On Sat, 14 Jun 2025 22:34:51 +0800
>> Qinxin Xia <xiaqinxin@huawei.com> wrote:
>>> The padding field in the structure was previously reserved to
>>> maintain a stable interface for potential new fields, ensuring
>>> compatibility with user-space shared data structures.
>>> However,it was accidentally removed by tiantao in a prior commit,
>>> which may lead to incompatibility between user space and the kernel.
>>>
>>> This patch reinstates the padding to restore the original structure
>>> layout and preserve compatibility.
>>>
>>> Fixes: 8ddde07a3d28 ("dma-mapping: benchmark: extract a common header file for map_benchmark definition")
>>> Cc: stable@vger.kernel.org
>>> Acked-by: Barry Song <baohua@kernel.org>
>>> Signed-off-by: Qinxin Xia <xiaqinxin@huawei.com>
>> FWIW I checked the patch above indeed accidentally dropped the padding and the structure
>> is copied to userspace so this fix is correct.  Given it's not in a uapi header this
>> only really affects the selftest I think this is mostly a case of there possibly being
>> out of tree tools with a local copy of this structure definition.
> Somehow, I feel we have placed
> tools/testing/selftests/dma/dma_map_benchmark.c in the wrong location.
> As a selftest, it should have a mechanism to check kernel dependencies,
> start properly and automatically, and report pass or fail.
>
> dma_map_benchmark.c seems more like a tool that belongs in tools/dma,
> rather than a test.

Indeed imho it would be better to move it out of selftests directory.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


  reply	other threads:[~2025-06-23 12:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-14 14:34 [RESEND PATCH v4 0/4] dma-mapping: benchmark: Add support for dma_map_sg Qinxin Xia
2025-06-14 14:34 ` [RESEND PATCH v4 1/4] dma-mapping: benchmark: Add padding to ensure uABI remained consistent Qinxin Xia
2025-06-16  9:53   ` Jonathan Cameron
2025-06-16 10:40     ` Barry Song
2025-06-23 12:01       ` Marek Szyprowski [this message]
2025-06-14 14:34 ` [RESEND PATCH v4 2/4] dma-mapping: benchmark: modify the framework to adapt to more map modes Qinxin Xia
2025-06-16 10:05   ` Jonathan Cameron
2025-06-14 14:34 ` [RESEND PATCH v4 3/4] dma-mapping: benchmark: add support for dma_map_sg Qinxin Xia
2025-06-16 10:15   ` Jonathan Cameron
2025-06-14 14:34 ` [RESEND PATCH v4 4/4] selftests/dma: Add dma_map_sg support for dma_map_benchmark Qinxin Xia
2025-06-16 10:16   ` Jonathan Cameron

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=ed07e57d-00e0-44b3-b53e-b5295aee8561@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=21cnbao@gmail.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=fanghao11@huawei.com \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=prime.zeng@huawei.com \
    --cc=robin.murphy@arm.com \
    --cc=xiaqinxin@huawei.com \
    --cc=yangyicong@huawei.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

all inboxes | Powered by JetHome®