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] [day] [month] [year] [list]
Message-ID: <8d318883-4ea3-b1d8-6613-6ca21a4ba2d2@huawei.com>
Date: Mon, 29 Jul 2024 15:40:39 +0800
From: Zenghui Yu <yuzenghui@...wei.com>
To: <daniel.vetter@...ll.ch>
CC: <linux-media@...r.kernel.org>, <dri-devel@...ts.freedesktop.org>,
	<linaro-mm-sig@...ts.linaro.org>, <linux-kselftest@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <sumit.semwal@...aro.org>,
	<benjamin.gaignard@...labora.com>, <Brian.Starkey@....com>,
	<jstultz@...gle.com>, <tjmercier@...gle.com>, <shuah@...nel.org>,
	<wanghaibin.wang@...wei.com>
Subject: Re: [PATCH v2] kselftests: dmabuf-heaps: Ensure the driver name is
 null-terminated

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@...wei.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ