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: <CABXOdTe+M909H8J2QcAY2_OF1jw=4d9EXb6oerWHNdqjFndPfA@mail.gmail.com>
Date:   Wed, 13 Jul 2022 11:25:49 -0700
From:   Guenter Roeck <groeck@...gle.com>
To:     Tzung-Bi Shih <tzungbi@...nel.org>
Cc:     Benson Leung <bleung@...omium.org>,
        Guenter Roeck <groeck@...omium.org>,
        "open list:CHROME HARDWARE PLATFORM SUPPORT" 
        <chrome-platform@...ts.linux.dev>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [RESEND PATCH 11/11] platform/chrome: cros_ec_proto: return
 -EPROTO if empty payload

On Mon, Jun 27, 2022 at 7:49 PM Tzung-Bi Shih <tzungbi@...nel.org> wrote:
>
> cros_ec_wait_until_complete() sends EC_CMD_GET_COMMS_STATUS which expects
> to receive sizeof(struct ec_response_get_comms_status) from
> cros_ec_xfer_command().
>
> Return -EPROTO if cros_ec_xfer_command() returns 0.
>
> Signed-off-by: Tzung-Bi Shih <tzungbi@...nel.org>

Reviewed-by: Guenter Roeck <groeck@...omium.org>

> ---
>  drivers/platform/chrome/cros_ec_proto.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/platform/chrome/cros_ec_proto.c b/drivers/platform/chrome/cros_ec_proto.c
> index 5323edddb540..0c7042aa2640 100644
> --- a/drivers/platform/chrome/cros_ec_proto.c
> +++ b/drivers/platform/chrome/cros_ec_proto.c
> @@ -166,6 +166,11 @@ static int cros_ec_wait_until_complete(struct cros_ec_device *ec_dev, uint32_t *
>                         break;
>                 }
>
> +               if (ret == 0) {
> +                       ret = -EPROTO;
> +                       break;
> +               }
> +
>                 if (!(status->flags & EC_COMMS_STATUS_PROCESSING))
>                         break;
>         }
> --
> 2.37.0.rc0.161.g10f37bed90-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ