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: <3ed3054d-0ede-4557-4590-a01861c338e3@roeck-us.net>
Date:   Mon, 27 Feb 2023 07:06:21 -0800
From:   Guenter Roeck <linux@...ck-us.net>
To:     Mario Limonciello <mario.limonciello@....com>
Cc:     Peter Huewe <peterhuewe@....de>,
        Jarkko Sakkinen <jarkko@...nel.org>,
        Jason Gunthorpe <jgg@...pe.ca>,
        Dominik Brodowski <linux@...inikbrodowski.net>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        stable@...r.kernel.org,
        Thorsten Leemhuis <regressions@...mhuis.info>,
        James Bottomley <James.Bottomley@...senpartnership.com>,
        "Jason A . Donenfeld" <Jason@...c4.com>,
        linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] tpm: disable hwrng for fTPM on some AMD designs

On 2/27/23 06:58, Mario Limonciello wrote:
[ ... ]
>>> +    version = ((u64)val1 << 32) | val2;
>>> +    if ((version >> 48) == 6) {
>>> +        if (version >= 0x0006000000180006ULL)
>>> +            return false;
>>> +    } else if ((version >> 48) == 3) {
>>> +        if (version >= 0x0003005700000005ULL)
>>> +            return false;
>>> +    } else
>>> +        return false;
>>
>> checkpatch:
>>
>> CHECK: braces {} should be used on all arms of this statement
>> #200: FILE: drivers/char/tpm/tpm-chip.c:557:
>> +    if ((version >> 48) == 6) {
>> [...]
>> +    } else if ((version >> 48) == 3) {
>> [...]
>> +    } else
>> [...]
> 
> It was requested by Jarko explicitly in v1 to do it this way.
> 
> https://lore.kernel.org/lkml/Y+%2F6G+UlTI7GpW6o@kernel.org/
> 

Interesting. We live and learn.

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ