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: <f1635547-2c18-b9d6-0fb2-2f69dcfd124e@collabora.com>
Date:   Tue, 17 Mar 2020 08:09:49 +0100
From:   Enric Balletbo i Serra <enric.balletbo@...labora.com>
To:     Bernardo Perez Priego <bernardo.perez.priego@...el.com>,
        Benson Leung <bleung@...omium.org>,
        Nick Crews <ncrews@...omium.org>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Daniel Campello <campello@...omium.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] platform/chrome: wilco_ec: Provide correct output format
 to 'h1_gpio' file

Hi,

On 14/3/20 0:27, Bernardo Perez Priego wrote:
> Function 'h1_gpio_get' is receiving 'val' parameter of type u64,
> this is being passed to 'send_ec_cmd' as type u8, thus, result
> is stored in least significant byte. Due to output format,
> the whole 'val' value was being displayed when any of the most
> significant bytes are different than zero.
> 
> This fix will make sure only least significant byte is displayed
> regardless of remaining bytes value.
> 
> Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@...el.com>

Daniel, could you give a try and give you Tested-by tag if you're fine with it?

Thanks,
 Enric

> ---
>  drivers/platform/chrome/wilco_ec/debugfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/chrome/wilco_ec/debugfs.c b/drivers/platform/chrome/wilco_ec/debugfs.c
> index df5a5f6c3ec6..c775b7d58c6d 100644
> --- a/drivers/platform/chrome/wilco_ec/debugfs.c
> +++ b/drivers/platform/chrome/wilco_ec/debugfs.c
> @@ -211,7 +211,7 @@ static int h1_gpio_get(void *arg, u64 *val)
>  	return send_ec_cmd(arg, SUB_CMD_H1_GPIO, (u8 *)val);
>  }
>  
> -DEFINE_DEBUGFS_ATTRIBUTE(fops_h1_gpio, h1_gpio_get, NULL, "0x%02llx\n");
> +DEFINE_DEBUGFS_ATTRIBUTE(fops_h1_gpio, h1_gpio_get, NULL, "0x%02hhx\n");
>  
>  /**
>   * test_event_set() - Sends command to EC to cause an EC test event.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ