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] [day] [month] [year] [list]
Message-ID: <3ec4b399-48d8-0129-85b7-0fe30e6de9c5@starfivetech.com>
Date:   Mon, 15 May 2023 14:04:21 +0800
From:   Jia Jie Ho <jiajie.ho@...rfivetech.com>
To:     Herbert Xu <herbert@...dor.apana.org.au>
CC:     "David S . Miller" <davem@...emloft.net>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Emil Renner Berthing <kernel@...il.dk>,
        Conor Dooley <conor@...nel.org>,
        Palmer Dabbelt <palmer@...belt.com>,
        <linux-crypto@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linux-riscv@...ts.infradead.org>
Subject: Re: [PATCH v7 4/4] crypto: starfive - Add hash and HMAC support

On 15/5/2023 12:24 pm, Herbert Xu wrote:
> On Mon, May 15, 2023 at 11:27:35AM +0800, Jia Jie Ho wrote:
>>
>> I've added COMPILE_TEST in the Kconfig, then ran make W=1, sparse and smatch.
>> However it did not produce the error message.
> 
> I guess you weren't testing on a 64-bit platform.  BIT(2) is
> an unsigned long, so ~BIT(2) is 64-bit long on 64-bit platforms.
> 
I am cross-compiling on a 64-bit platform. 
I'll check my compiler settings again in case this masks errors in future patches.

> You're trying to feed it into writel which takes a 32-bit value,
> hence the warning.
> 
> If you have to use the BIT macro, then you need to cast the result
> to u32:
> 
> #define STARFIVE_IE_MASK_HASH_DONE ((u32)BIT(2))
> 
> But it's probably a lot clearer if you do it as:
> 
> #define STARFIVE_IE_MASK_HASH_DONE 0x4
Sure, I'll do this for the next version.

Thanks,
Jia Jie

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ