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]
Date:   Fri, 9 Mar 2018 08:54:36 +0100
From:   Ingo Molnar <mingo@...nel.org>
To:     Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc:     linux-efi@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
        Jia-Ju Bai <baijiaju1990@...il.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 06/12] x86: efi: Replace GFP_ATOMIC with GFP_KERNEL in
 efi_query_variable_store


* Ard Biesheuvel <ard.biesheuvel@...aro.org> wrote:

> From: Jia-Ju Bai <baijiaju1990@...il.com>
> 
> The function kzalloc here is not called in atomic context.
> If nonblocking in efi_query_variable_store is true,
> namely it is in atomic context, efi_query_variable_store will return before
> this kzalloc is called.
> Thus GFP_ATOMIC is not necessary, and it can be replaced with GFP_KERNEL.
> 
> This is found by a static analysis tool named DCNS written by myself.

Please fix typos/spelling in changelogs when applying patches.

I improved the above to:

  efi_query_variable_store() does an atomic kzalloc() unnecessarily,
  because we can never get this far when called in an atomic context,
  namely when nonblocking == 1.

  Replace it with GFP_KERNEL.

  This was found by the DCNS static analysis tool written by myself.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ