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: <aG4zf8rGnmt5xVtG@google.com>
Date: Wed, 9 Jul 2025 09:16:47 +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 Fri, Jul 04, 2025 at 11:03:01AM +0200, Dawid Niedźwiecki wrote:
> > Given that:
> > - The crash you encountered is a common issue for all cros_ec_X drivers.
> > - I prefer to keep cros_ec_X drivers simple and similar rather than have
> >   something special (e.g. the memorized `struct cros_ec_device` in current
> >   cros_ec_usb) for fixing the crash.
> > Could you give [3] a try to see if it fixes the crash and also call
> > cros_ec_register()/cros_ec_unregister() everytime in the probe/disconnect?
> 
> I agree that the drivers should be simple and similar as much as possible.
> But to be precise, I think, it should behave in a similar way as much
> as possible
> (e.g. reboot EC device doesn't cause re-registering), not be implemented in the
> same way. That's why I believe the current implementation of the drivers follows
> the already present drivers in a better way.

FWIW: It depends on the bus details.  If you find my previous message, SCP
over RPMSG also re-registers everytime after the firmware reboot.

One challenge for current version: it makes the driver more complicated than
others.  E.g. what would be happening if some friend drivers try to access
`ec_dev` while the `cros_ec_usb_probe` is writing to `ec_usb` at a time?
It tries to manage the device's lifecycle one level upper than USB (don't
know what it should call, "session"?).

Another challenge: it doesn't call cros_ec_unregister() in its driver removal
entry.  What would be happening if someone re-inserts the module multiple
times?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ