Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2481591ybb; Mon, 30 Mar 2020 07:03:24 -0700 (PDT) X-Google-Smtp-Source: ADFU+vujTqSJhilKHJ4HpEWkLmiAU3go8ywh0mgUHQG42Dy/P+rfNYRdjzfqMCWJJlhQs7GHJN3K X-Received: by 2002:a9d:69d5:: with SMTP id v21mr9595980oto.197.1585577003554; Mon, 30 Mar 2020 07:03:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585577003; cv=none; d=google.com; s=arc-20160816; b=wCFL5U8frqhY2SrYWT3/8k2GrcmZIDbgj4RfWgbgBGY9rrzu+y6efaQEtQh5GrzdRC GXfhvvRe2ssLpxiDegdgELRvcVlixWLEQO8IRcDt1VUMGjLnjqN8InjEDmm50dMurbvz tNSYxLLD1j4K+2cBXHHTIbwHtPh5EhaJv3dwXAoH7oB6knEUM8pZHbSndErQlqOEH6ro /mBpxt206Jqxiy/ROGw5Z3D3uK7/MIC2/1A1hnGd1P+az0W1/l20BgxM6cAwR3FgUxUB zkfbn8Mrvwg+WwIqnY9qgcl0s8GhSTxmvC0IjqUkm0aO11Widtba++HvXhdgwlwrXbz7 +waA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=7R/ME9xyhHl98zJhyqsZae8PalrfpLhtg9kGcx3lneg=; b=QctW4m8DkorMwzJ4lCSs6C0RlLKWx7KRmwFWHeLFMD3lpAX18Ewx3izkEuWVJebHiF s/cR492U0dyUuKkhxKTsFhj7y9mODTTAOeXLKdn64DEmAh2wxkkFDjUY+Goez1Onjx1J GSpapCsQRLDj3LC6b1XbqOSkV9/5uW4e2Xn0Lam1ybFK+2GCRvBmQ98GvV8pLCJwpB7c u6b4gcqyTEktaYWSBAXxNxGEhvybWxj/PvzmnyklMIRlOcttNrcIgwWEiN1OHJR2EccB aRGHpaPvb76hwSNLyjZIG9b3sCSgVzIx8R+m69lN64HmtvY482ms+ti+5L0jxwPzaaz0 SZCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KGHMfbZX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f12si6683227otc.147.2020.03.30.07.02.49; Mon, 30 Mar 2020 07:03:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KGHMfbZX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728034AbgC3NhH (ORCPT + 99 others); Mon, 30 Mar 2020 09:37:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:35156 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726497AbgC3NhH (ORCPT ); Mon, 30 Mar 2020 09:37:07 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9F31920757; Mon, 30 Mar 2020 13:37:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585575426; bh=ayBEhF0emKa95SIxiPEA4fE7OhgG5vRQ/2ittLcRunY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KGHMfbZXHzvQVU69kiYX6HgE+R/J/bX7CBzjc+p92oGXZg5m5xjUo7qDrj8UgO9w4 E5sKbb1Ufj3uzcosCtLnlRmKX6Tl8cnJ02XOLM+ITto9bZlaGQdCCM1yR2QlDzWJZt Vzo3XO29jIjmVwuCUQZ82WbNrp2nqBK6YOKU3og4= Date: Mon, 30 Mar 2020 14:37:02 +0100 From: Will Deacon To: George Spelvin Cc: linux-kernel@vger.kernel.org, Hsin-Yi Wang , Catalin Marinas , linux-arm-kernel@lists.infradead.org Subject: Re: [RFC PATCH v1 39/50] arm: kexec_file: Avoid temp buffer for RNG seed Message-ID: <20200330133701.GA10633@willie-the-truck> References: <202003281643.02SGhMtr029198@sdf.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202003281643.02SGhMtr029198@sdf.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 10, 2019 at 10:45:27AM -0500, George Spelvin wrote: > After using get_random_bytes(), you want to wipe the buffer > afterward so the seed remains secret. > > In this case, we can eliminate the temporary buffer entirely. > fdt_setprop_placeholder returns a pointer to the property value > buffer, allowing us to put the random data directy in there without s/directy/directly/ > using a temporary buffer at all. Faster and less stack all in one. > > Signed-off-by: George Spelvin > Cc: Hsin-Yi Wang > Cc: Catalin Marinas > Cc: Will Deacon > Cc: linux-arm-kernel@lists.infradead.org > --- > arch/arm64/kernel/machine_kexec_file.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) Acked-by: Will Deacon Please let me know if you'd like this queued via the arm64 tree, as it appears to be independent of the rest of this series. Will