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: <Y1f/U8NxyJo/pMAH@aptenodytes>
Date:   Tue, 25 Oct 2022 17:22:59 +0200
From:   Paul Kocialkowski <paul.kocialkowski@...tlin.com>
To:     Jernej Škrabec <jernej.skrabec@...il.com>
Cc:     Dan Carpenter <dan.carpenter@...cle.com>, mripard@...nel.org,
        mchehab@...nel.org, gregkh@...uxfoundation.org, wens@...e.org,
        samuel@...lland.org, hverkuil-cisco@...all.nl,
        linux-media@...r.kernel.org, linux-staging@...ts.linux.dev,
        linux-arm-kernel@...ts.infradead.org, linux-sunxi@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 04/11] media: cedrus: Add helper for checking capabilities

Hi Jernej,

On Tue 25 Oct 22, 17:17, Jernej Škrabec wrote:
> Dne torek, 25. oktober 2022 ob 08:30:28 CEST je Dan Carpenter napisal(a):
> > On Mon, Oct 24, 2022 at 10:15:08PM +0200, Jernej Skrabec wrote:
> > > There is several different Cedrus cores with varying capabilities, so
> > > some operations like listing formats depends on checks if feature is
> > > supported or not.
> > > 
> > > Currently check for capabilities is only in format enumeration helper,
> > > but it will be used also elsewhere later. Let's convert this check to
> > > helper and while at it, also simplify it. There is no need to check if
> > > capability mask is zero, condition will still work properly.
> > 
> > Sure.  That's true.  Out of curiousity, can cedrus_formats[i].capabilities
> > be zero?  Because it feels like that's what should be checked.
> 
> Yes, it can be. It's the case for V4L2_PIX_FMT_NV12_32L32. All variants 
> supports it, so there is no special capability needed in order to be listed. 
> What would you check in such case? Condition still works for this case.

I think the problem is that (bits & 0) == 0 is always true.
So if the input caps are 0, we need to make sure to return false.

Cheers,

Paul

-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ