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] [thread-next>] [day] [month] [year] [list]
Message-ID: <aEFoCvPe4zE48UG7@kekkonen.localdomain>
Date: Thu, 5 Jun 2025 09:48:58 +0000
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: Hans Verkuil <hans@...erkuil.nl>
Cc: Nicolas Dufresne <nicolas.dufresne@...labora.com>,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	Hans Verkuil <hverkuil@...all.nl>,
	Tiffany Lin <tiffany.lin@...iatek.com>,
	Andrew-CT Chen <andrew-ct.chen@...iatek.com>,
	Yunfei Dong <yunfei.dong@...iatek.com>,
	Matthias Brugger <matthias.bgg@...il.com>,
	AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-mediatek@...ts.infradead.org, kernel@...labora.com,
	linux-media@...r.kernel.org,
	Sebastian Fricke <sebastian.fricke@...labora.com>
Subject: Re: [PATCH v3 1/5] media: mc: add manual request completion

Hi Hans,

On Thu, Jun 05, 2025 at 11:37:54AM +0200, Hans Verkuil wrote:
> >>>> @@ -499,3 +501,35 @@ void media_request_object_complete(struct media_request_object *obj)
> >>>>  		media_request_put(req);
> >>>>  }
> >>>>  EXPORT_SYMBOL_GPL(media_request_object_complete);
> >>>> +
> >>>> +void media_request_manual_complete(struct media_request *req)
> >>>> +{
> >>>> +	unsigned long flags;
> >>>
> >>> I'd declare flags as last.
> >>>
> >>>> +	bool completed = false;
> >>>> +
> >>>> +	if (WARN_ON(!req))
> >>>> +		return;
> >>>> +	if (WARN_ON(!req->manual_completion))
> >>>> +		return;
> >>>
> >>> I think I'd use WARN_ON_ONCE() consistently: this is a driver (or
> >>> framework) bug and telling once about it is very probably enough.
> >>
> >> Just to be sure, you only mean for the two checks above ? Or did
> >> you mean for the entire function ?
> > 
> > For the entire function. I thought that if this is user-triggerable, the
> > amount of data ending up in logs could be very large.
> 
> It's not user-triggerable, if this happens, then it is a driver bug.

If there is a driver bug, it could well be user-triggerable, wouldn't it?
Testing may not uncover all such cases.

-- 
Regards,

Sakari Ailus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ