public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Maxime Ripard <maxime@cerno.tech>
Cc: "Ricardo Ribalda" <ribalda@chromium.org>,
	"Linux Media Mailing List" <linux-media@vger.kernel.org>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Kieran Bingham" <kieran.bingham@ideasonboard.com>,
	"Nicolas Dufresne" <nicolas@ndufresne.ca>,
	"Benjamin Gaignard" <benjamin.gaignard@collabora.com>,
	"Hidenori Kobayashi" <hidenorik@chromium.org>,
	"Paul Kocialkowski" <paul.kocialkowski@bootlin.com>,
	"Michael Olbrich" <m.olbrich@pengutronix.de>,
	"Daniel Scally" <djrscally@gmail.com>,
	"Jernej Škrabec" <jernej.skrabec@gmail.com>,
	"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
	"Michael Tretter" <m.tretter@pengutronix.de>,
	"Hans Verkuil" <hverkuil@xs4all.nl>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Benjamin MUGNIER" <benjamin.mugnier@foss.st.com>,
	"Jacopo Mondi" <jacopo@jmondi.org>,
	"Dave Stevenson" <dave.stevenson@raspberrypi.com>
Subject: Re: [Media Summit] ChromeOS Kernel CAM
Date: Thu, 8 Sep 2022 17:14:41 +0300	[thread overview]
Message-ID: <Yxn40Y5HDzXHITwP@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20220908080846.wursajjtc3mbja4u@houat>

On Thu, Sep 08, 2022 at 10:08:46AM +0200, Maxime Ripard wrote:
> Hi Ricardo,
> 
> On Thu, Sep 08, 2022 at 09:11:11AM +0200, Ricardo Ribalda wrote:
> > > - Still on slide 16, V4L2 as an API is usable without disclosing vendor
> > >   IP. What is not possible is upstreaming a driver. I don't see this as
> > >   significantly different between V4L2 and the new API proposal. I
> > >   expect this to be discussed on Monday.
> > 
> > I am only considering upstream drivers. There is not much to discuss
> > for downstream or closed drivers :)
> 
> Are we really discussing upstream *drivers*? If anything, it looks like
> the Kcam proposal moves most of the drivers out of upstream.

Given that the API proposal sets at a significant lower level than V4L2
in the stack, the concept of "userspace driver" (I meant it in the sense
of GPU support in mesa) plays a bigger role. It would be good to clarify
what is meant by "driver" and maybe use the term "kernel driver" when
only the kernel part is covered, to avoid misunderstandings.

> > > - Slide 31 mentions that entities can send operations internally and
> > >   listen to each other events. I'd like to better understand how that
> > >   will work without any abstraction in the API (as that is one of the
> > >   main design decision behind this new API) when those entities are from
> > >   different vendors, and handled by different drivers that are developed
> > >   independently (for instance, the camera sensor and the CSI-2 receiver,
> > >   or even the CSI-2 receiver and the ISP).
> > 
> > It is still under work.
> > 
> > Hardware, specially for standard buses,  should be resilient (not
> > crash) to format mismatches. Otherwise a mal-functionling sensor or
> > too much noise could crash the system (with or without kcam).
> > 
> > Drivers developed together should know about the rest of the system,
> > so that is not the issue here.
> > 
> > For drivers developed by different vendors for a standard bus, on
> > hardware that is not resilient (that was a mouthful), then we need to
> > prepare a set of read-only standard registers.
> 
> I'm not even sure that read-only registers would be enough. I've
> experienced first-hand DMA controllers that, when the camera has its
> timings completely off, end up completely confused and write way outside
> of its assigned buffer creating big chunks of corrupted memory in the
> system.
> 
> And that was by writing fairly legit values to registers that were meant
> for that, so we wouldn't be able to defend against it even with the
> smartest whitelist.
> 
> And we were in a "good faith" situation. Giving an attacker basically
> programmable access to DMA engines that might not be sitting behind an
> IOMMU seems like a very dangerous idea to me.

Do we need to preassign a range of CVE numbers ? :-)

> > > - Does the bike on slide 32 illustrate the difficult discussions we've
> > >   had in the past and how progress was hindered ? :-)
> > 
> > This is how we do code review at Google when two developers do not
> > want to work together. We take the bike to the rooftop and the two
> > developers that disagree tries to push the other developer to the edge
> > of the building.
> > 
> > The first second, when you see your colleague falling you think that
> > you have won.... then you realise that you are falling with them.
> 
> So the optimal solution would be that both stop pushing, or push the
> other just as hard without bulging? That doesn't seem like a good way to
> end up with a compromise ;)

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2022-09-08 14:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07  7:55 [Media Summit] ChromeOS Kernel CAM Ricardo Ribalda
2022-09-07 10:50 ` Laurent Pinchart
2022-09-08  7:11   ` Ricardo Ribalda
2022-09-08  8:08     ` Maxime Ripard
2022-09-08 14:14       ` Laurent Pinchart [this message]
2022-09-08 14:59         ` Maxime Ripard
2022-09-08 15:16           ` Laurent Pinchart
2022-09-08 15:34             ` Maxime Ripard
2022-09-08 18:13               ` Ricardo Ribalda
2022-09-08 18:13                 ` Ricardo Ribalda
2022-09-08 19:30                   ` Laurent Pinchart
2022-09-08 20:04                     ` Ricardo Ribalda
2022-09-08 20:59                       ` Laurent Pinchart
2022-09-09  8:00                 ` Maxime Ripard
2022-09-09  8:39                   ` Ricardo Ribalda
2022-09-09  9:06                     ` Maxime Ripard
2022-09-09 10:00                       ` Ricardo Ribalda
2022-09-09 11:58                         ` Maxime Ripard
2022-09-09 12:40                           ` Ricardo Ribalda
2022-09-09  9:11                     ` Laurent Pinchart

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=Yxn40Y5HDzXHITwP@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=benjamin.mugnier@foss.st.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=djrscally@gmail.com \
    --cc=hidenorik@chromium.org \
    --cc=hverkuil@xs4all.nl \
    --cc=jacopo@jmondi.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m.olbrich@pengutronix.de \
    --cc=m.tretter@pengutronix.de \
    --cc=maxime@cerno.tech \
    --cc=mchehab@kernel.org \
    --cc=nicolas@ndufresne.ca \
    --cc=niklas.soderlund@ragnatech.se \
    --cc=p.zabel@pengutronix.de \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=ribalda@chromium.org \
    --cc=sakari.ailus@linux.intel.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