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: <aGOiu-sXFj1EUQAB@google.com>
Date: Tue, 1 Jul 2025 08:56:27 +0000
From: Tzung-Bi Shih <tzungbi@...nel.org>
To: Dawid Niedźwiecki <dawidn@...gle.com>
Cc: Benson Leung <bleung@...omium.org>, chrome-platform@...ts.linux.dev,
	linux-kernel@...r.kernel.org, chromeos-krk-upstreaming@...gle.com,
	Łukasz Bartosik <ukaszb@...omium.org>
Subject: Re: [PATCH] platform/chrome: Add ChromeOS EC USB driver

On Mon, Jun 30, 2025 at 01:59:39PM +0200, Dawid Niedźwiecki wrote:
> On Fri, Jun 27, 2025 at 9:53 AM Tzung-Bi Shih <tzungbi@...nel.org> wrote:
> > On Tue, Jun 24, 2025 at 11:00:28AM +0000, Dawid Niedzwiecki wrote:
> > > +     /*
> > > +      * Do not register the same EC device twice. The probing is performed every
> > > +      * reboot, sysjump, crash etc. Recreating the /dev/cros_X file every time
> > > +      * would force all application to reopen the file, which is not a case for
> > > +      * other cros_ec_x divers. Instead, keep the cros_ec_device and cros_ec_usb
> > > +      * structures constant and replace USB related structures for the same EC
> > > +      * that is reprobed.
> > > +      *
> > > +      * The driver doesn't support handling two devices with the same idProduct,
> > > +      * but it will never be a real usecase.
> > > +      */
> >
> > I don't quite understand why does it need to memorize the registered ECs.
> > Supposedly, the probe function is only called few times during booting, and
> > gets success once. Hot-plugs?
> >
> 
> The probe is called every time the EC device boots from the beginning
> - sysjumps, crashes, reboots etc. It succeeds the first time.
> Once the /dev/cros_X file is created, we need the possibility to
> access the same EC device, with the same, previously created file.
> The only way to do that is to reused the already created
> cros_ec_device structure.

What are the shortcomings if it re-creates /dev/cros_X everytime? Isn't it
also a way for userland programs to be aware of the EC device crashes?

Why other cros_ec_X drivers doesn't need the mechanism?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ