[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YjUwQ1kgjHF2AMBV@google.com>
Date: Fri, 18 Mar 2022 18:22:11 -0700
From: Brian Norris <briannorris@...omium.org>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Benson Leung <bleung@...omium.org>,
chrome-platform@...ts.linux.dev, linux-kernel@...r.kernel.org,
Daisuke Nojiri <dnojiri@...omium.org>,
Rob Barnes <robbarnes@...gle.com>,
Rajat Jain <rajatja@...gle.com>,
Parth Malkan <parthmalkan@...gle.com>
Subject: Re: [PATCH v2] platform/chrome: Re-introduce cros_ec_cmd_xfer and
use it for ioctls
On Fri, Mar 18, 2022 at 09:54:22AM -0700, Guenter Roeck wrote:
> Commit 413dda8f2c6f ("platform/chrome: cros_ec_chardev: Use
> cros_ec_cmd_xfer_status helper") inadvertendly changed the userspace ABI.
> Previously, cros_ec ioctls would only report errors if the EC communication
> failed, and otherwise return success and the result of the EC
> communication. An EC command execution failure was reported in the EC
> response field. The above mentioned commit changed this behavior, and the
> ioctl itself would fail. This breaks userspace commands trying to analyze
> the EC command execution error since the actual EC command response is no
> longer reported to userspace.
>
> Fix the problem by re-introducing the cros_ec_cmd_xfer() helper, and use it
> to handle ioctl messages.
>
> Fixes: 413dda8f2c6f ("platform/chrome: cros_ec_chardev: Use cros_ec_cmd_xfer_status helper")
Probably could use a Cc: <stable@...r.kernel.org> in here, since this is
a user-space ABI regression. But these days, there's effectively no
difference vs. just a Fixes tag, because someone's bot will usually pick
it up.
> Cc: Daisuke Nojiri <dnojiri@...omium.org>
> Cc: Rob Barnes <robbarnes@...gle.com>
> Cc: Rajat Jain <rajatja@...gle.com>
> Cc: Brian Norris <briannorris@...omium.org>
> Cc: Parth Malkan <parthmalkan@...gle.com>
> Signed-off-by: Guenter Roeck <linux@...ck-us.net>
> ---
> v2: Updated comments / return value description. No functional change.
Reviewed-by: Brian Norris <briannorris@...omium.org>
Powered by blists - more mailing lists