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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 24 Sep 2020 20:24:45 +0300
From:   Sakari Ailus <sakari.ailus@....fi>
To:     Luca Ceresoli <luca@...aceresoli.net>
Cc:     Sowjanya Komatineni <skomatineni@...dia.com>,
        thierry.reding@...il.com, jonathanh@...dia.com, hverkuil@...all.nl,
        jacopo+renesas@...ndi.org, leonl@...pardimaging.com,
        robh+dt@...nel.org, lgirdwood@...il.com, broonie@...nel.org,
        linux-media@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 2/3] media: i2c: imx274: Remove stop stream i2c writes
 during remove

On Thu, Sep 24, 2020 at 12:09:22PM +0200, Luca Ceresoli wrote:
> On 22/09/20 10:47, Sakari Ailus wrote:
> > Hi Luca,
> > 
> > On Tue, Sep 22, 2020 at 10:09:33AM +0200, Luca Ceresoli wrote:
> >> Hi,
> >>
> >> On 21/09/20 23:39, Sowjanya Komatineni wrote:
> >>> Sensor should already be in standby during remove and there is no
> >>> need to configure sensor registers for stream stop.
> >>
> >> I beg your pardon for the newbie question: does the V4L2 framework
> >> guarantee that the stream is stopped (.s_stream(..., 0)) before removing
> >> the driver?
> > 
> > It doesn't. That's however one of the lesser concerns, and I don't think
> > it'd help if drivers tried to prepare for that.
> 
> Thanks for the clarification.
> 
> I've been working with hardware where the sensor is always powered. In
> this case, and with this patch applied, the sensor would keep producing
> frames after driver removal. This looks wrong, unless I'm overlooking
> something.
> 
> BTW at first sight it looks like the framework should take care of
> stopping the stream before removal, not the individual drivers, but
> maybe there are good reasons this is not done?

Yes, it should.

This is a complex problem area to address. The framework (V4L2) wasn't
originally built with object refcounting when support was added for complex
cameras that comprise multiple devices because it wasn't thought it would
be really needed. And it's hard to add that later on.

Either way, there's little individual drivers can do to address that; the
framework support needs to be there first.

The same goes with Media controller; it's not just V4L2.

-- 
Sakari Ailus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ