From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 737D2C34021 for ; Mon, 17 Feb 2020 15:54:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4926A2464E for ; Mon, 17 Feb 2020 15:54:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="fz1MSp15"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="M7qmy6o4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729616AbgBQPyL (ORCPT ); Mon, 17 Feb 2020 10:54:11 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:55133 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729597AbgBQPyJ (ORCPT ); Mon, 17 Feb 2020 10:54:09 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 35B3621F8E; Mon, 17 Feb 2020 10:54:08 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 17 Feb 2020 10:54:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=pH6LbW1d+9z/pKqgAnE2oTt95TL YHMKEHXXSWG12OpY=; b=fz1MSp15NoqXtMldTuI4f70SdLJM9gtuZ8T1jj+Tm8u HHsz3f+ASnYZn7f0yiXpLV+sMqIy0Z9LFVzJBMIQ4s438dkMNxyjy6/vvFoHbwqT vkR+eYDZzGb+NHbQIyJQ4uhlXeC2Oq3jKw4k2lOfL4QQyeuMgcejvxLh4oqD5B7y CFhQkPJflvixnz1B/CpRcCXIG63CvqgYBIHW5j5eFd9iZgqpw0oHUowYsIGzDEBJ LEC8ODnX/9FJUDlRib4ZnJhl7QfdL4zqlR67HAPy3lSplqqEQK2GwTaIl4U73Bsz YRSUqXnGrkFTY8WqVeR1sFNuiUCIYK0n4tC3XpPimfw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=pH6LbW 1d+9z/pKqgAnE2oTt95TLYHMKEHXXSWG12OpY=; b=M7qmy6o4Ccor9R38lhCAHE i3H2JacdWAuU8ZMCDgS1XryK3NJBP8fwMm2ZPpt8/FmqqJO3UkzL2LRb4J0w9Vno DXY3MUGbUld12vlmjeOuPYR21kuwxLCAJTu+DXFkBY5Kbmrh5EtRYipkme4NZ9DR A+73jv+7EHYWNbFP413/2nyWuqrWoCaDHOlOuXBQST+eYnbDusHZ+MLd3H9X2lWz afqVuaJMMJ3J/U6yEHrSUdB91TLYcnN3X73rjMI6N9y0q3ZKAWrIh0EqtHCeUYqt 4ldkWJPWEHouyC+DAeNl0H16ZyK9fS72nKWjVgm9A6NMULu5yTqfQjI7w1dkRGTQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrjeeigdekvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepifhrvghgucfm jfcuoehgrhgvgheskhhrohgrhhdrtghomheqnecukfhppeekfedrkeeirdekledruddtje enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgv gheskhhrohgrhhdrtghomh X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id AF2A73060BE4; Mon, 17 Feb 2020 10:54:07 -0500 (EST) Date: Mon, 17 Feb 2020 16:54:02 +0100 From: Greg KH To: Ard Biesheuvel Cc: "Jason A. Donenfeld" , linux-efi , Linux Kernel Mailing List , stable Subject: Re: [PATCH] efi: READ_ONCE rng seed size before munmap Message-ID: <20200217155402.GB1461852@kroah.com> References: <20200217123354.21140-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 17, 2020 at 04:23:03PM +0100, Ard Biesheuvel wrote: > On Mon, 17 Feb 2020 at 13:34, Jason A. Donenfeld wrote: > > > > This function is consistent with using size instead of seed->size > > (except for one place that this patch fixes), but it reads seed->size > > without using READ_ONCE, which means the compiler might still do > > something unwanted. So, this commit simply adds the READ_ONCE > > wrapper. > > > > Signed-off-by: Jason A. Donenfeld > > Cc: Ard Biesheuvel > > Cc: stable@vger.kernel.org > > Thanks Jason > > I've queued this in efi/urgent with a fixes: tag rather than a cc: > stable, since it only applies clean to v5.4 and later. Why do that? That just makes it harder for me to know to pick it up for 5.4 and newer. > We'll need a > backport to 4.14 and 4.19 as well, which has a trivial conflict > (s/add_bootloader_randomness/add_device_randomness/) but we'll need to > wait for this patch to hit Linus's tree first. Ok, if you are going to send it on to me for stable, that's fine, but usually you can just wait for the rejection notices for older kernels before having to worry about this. In other words, you are doing more work than you have to here :) thanks, greg k-h