mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zenghui Yu <yuzenghui@huawei.com>
To: <daniel.vetter@ffwll.ch>
Cc: <linux-media@vger.kernel.org>, <dri-devel@lists.freedesktop.org>,
	<linaro-mm-sig@lists.linaro.org>,
	<linux-kselftest@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<sumit.semwal@linaro.org>, <benjamin.gaignard@collabora.com>,
	<Brian.Starkey@arm.com>, <jstultz@google.com>,
	<tjmercier@google.com>, <shuah@kernel.org>,
	<wanghaibin.wang@huawei.com>
Subject: Re: [PATCH v2] kselftests: dmabuf-heaps: Ensure the driver name is null-terminated
Date: Mon, 29 Jul 2024 15:40:39 +0800	[thread overview]
Message-ID: <8d318883-4ea3-b1d8-6613-6ca21a4ba2d2@huawei.com> (raw)
In-Reply-To: <Zqc-ZWlTYwnKHoQK@phenom.ffwll.local>

On 2024/7/29 15:01, Daniel Vetter wrote:
> On Mon, Jul 29, 2024 at 10:46:04AM +0800, Zenghui Yu wrote:
> > Even if a vgem device is configured in, we will skip the import_vgem_fd()
> > test almost every time.
> >
> >   TAP version 13
> >   1..11
> >   # Testing heap: system
> >   # =======================================
> >   # Testing allocation and importing:
> >   ok 1 # SKIP Could not open vgem -1
> >
> > The problem is that we use the DRM_IOCTL_VERSION ioctl to query the driver
> > version information but leave the name field a non-null-terminated string.
> > Terminate it properly to actually test against the vgem device.
> >
> > While at it, let's check the length of the driver name is exactly 4 bytes
> > and return early otherwise (in case there is a name like "vgemfoo" that
> > gets converted to "vgem\0" unexpectedly).
> >
> > Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
> > ---
> > * From v1 [1]:
> >   - Check version.name_len is exactly 4 bytes and return early otherwise
> >
> > [1] https://lore.kernel.org/r/20240708134654.1725-1-yuzenghui@huawei.com
> 
> Thanks for your patch, I'll push it to drm-misc-next-fixes.
> 
> > P.S., Maybe worth including the kselftests file into "DMA-BUF HEAPS
> > FRAMEWORK" MAINTAINERS entry?
> 
> Good idea, want to do the patch for that too?

Sure, I can send a patch for that today.

Thanks,
Zenghui

      reply	other threads:[~2024-07-29  7:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-29  2:46 Zenghui Yu
2024-07-29  7:01 ` Daniel Vetter
2024-07-29  7:40   ` Zenghui Yu [this message]

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=8d318883-4ea3-b1d8-6613-6ca21a4ba2d2@huawei.com \
    --to=yuzenghui@huawei.com \
    --cc=Brian.Starkey@arm.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jstultz@google.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=tjmercier@google.com \
    --cc=wanghaibin.wang@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®