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: <E5AD5576-1E14-4B7A-AFF6-B3BB2E9335DC@intel.com>
Date:   Thu, 28 Jan 2021 16:10:32 +0000
From:   "Bae, Chang Seok" <chang.seok.bae@...el.com>
To:     "Rafael J. Wysocki" <rafael@...nel.org>
CC:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...e.de>,
        Andy Lutomirski <luto@...nel.org>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        "Williams, Dan J" <dan.j.williams@...el.com>,
        "Hansen, Dave" <dave.hansen@...el.com>,
        "Shankar, Ravi V" <ravi.v.shankar@...el.com>,
        "Sun, Ning" <ning.sun@...el.com>,
        "Dwarakanath, Kumar N" <kumar.n.dwarakanath@...el.com>,
        Linux Crypto Mailing List <linux-crypto@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux PM <linux-pm@...r.kernel.org>
Subject: Re: [RFC PATCH 4/8] x86/power: Restore Key Locker internal key from
 the ACPI S3/4 sleep states

On Jan 28, 2021, at 02:34, Rafael J. Wysocki <rafael@...nel.org> wrote:
> On Wed, Dec 16, 2020 at 6:47 PM Chang S. Bae <chang.seok.bae@...el.com> wrote:
>> 
>> +       keybackup_status = read_keylocker_backup_status();
>> +       if (!(keybackup_status & BIT(0))) {
>> +               pr_err("x86/keylocker: internal key restoration failed with %s\n",
>> +                      (keybackup_status & BIT(2)) ? "read error" : "invalid status");
>> +               WARN_ON(1);
>> +               goto disable_keylocker;
>> +       }
> 
> The above conditional could be consolidated a bit by using WARN():
> 
> if (WARN(!(keybackup_status & BIT(0)), "x86/keylocker: internal key
> restoration failed with %s\n",
>        (keybackup_status & BIT(2)) ? "read error" : "invalid status")
>                goto disable_keylocker;
> 
> Apart from this the patch LGTM.

Thanks for the review! I will make this change on my next revision.

Chang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ