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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 16 Oct 2019 09:34:33 +0800
From:   Xu Zaibo <xuzaibo@...wei.com>
To:     Rikard Falkeborn <rikard.falkeborn@...il.com>
CC:     <davem@...emloft.net>, <forest.zhouchang@...wei.com>,
        <herbert@...dor.apana.org.au>, <linux-crypto@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linuxarm@...wei.com>,
        <tanghui20@...wei.com>
Subject: Re: [PATCH] crypto: hisilicon: Fix misuse of GENMASK macro

Agree with you, thanks!

Zaibo

.

On 2019/10/16 4:13, Rikard Falkeborn wrote:
> Arguments are supposed to be ordered high then low.
>
> Fixes: c8b4b477079d ("crypto: hisilicon - add HiSilicon HPRE accelerator")
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@...il.com>
> ---
> Spotted when trying to introduce compile time checking that the order
> of the arguments to GENMASK are correct [0]. I have only compile tested
> the patch.
>
> [0]: https://lore.kernel.org/lkml/20191009214502.637875-1-rikard.falkeborn@gmail.com/
>
>   drivers/crypto/hisilicon/hpre/hpre_main.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c b/drivers/crypto/hisilicon/hpre/hpre_main.c
> index ca945b29632b..34e0424410bf 100644
> --- a/drivers/crypto/hisilicon/hpre/hpre_main.c
> +++ b/drivers/crypto/hisilicon/hpre/hpre_main.c
> @@ -116,8 +116,8 @@ static const struct hpre_hw_error hpre_hw_errors[] = {
>   	{ .int_msk = BIT(7), .msg = "hpre_cltr2_htbt_tm_out_err" },
>   	{ .int_msk = BIT(8), .msg = "hpre_cltr3_htbt_tm_out_err" },
>   	{ .int_msk = BIT(9), .msg = "hpre_cltr4_htbt_tm_out_err" },
> -	{ .int_msk = GENMASK(10, 15), .msg = "hpre_ooo_rdrsp_err" },
> -	{ .int_msk = GENMASK(16, 21), .msg = "hpre_ooo_wrrsp_err" },
> +	{ .int_msk = GENMASK(15, 10), .msg = "hpre_ooo_rdrsp_err" },
> +	{ .int_msk = GENMASK(21, 16), .msg = "hpre_ooo_wrrsp_err" },
>   	{ /* sentinel */ }
>   };
>   


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ