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 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4E84DC433F5 for ; Thu, 16 Dec 2021 16:01:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A15E082FE7; Thu, 16 Dec 2021 17:01:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="jwOyb01E"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E0E4D8303C; Thu, 16 Dec 2021 17:01:18 +0100 (CET) Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D7E2D82FD0 for ; Thu, 16 Dec 2021 17:01:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-wr1-x431.google.com with SMTP id q16so4248487wrg.7 for ; Thu, 16 Dec 2021 08:01:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=6bt28Du61a/6nmsTYL8q0YQpX9Tyz13BeeC90HwodxM=; b=jwOyb01E/S4ebHLmv2yYJRMQIJzvJtxlj9tsIQPWE7Jl/nB1JS5eP9D6cuWxDbOI3p IWuO02/MREyzEdktPIWtjMs4K/Kx1Ir8kfLf7xEWeBnRc8gslMBJc65S+f9CejGp+CVh yTXfT4R6NgOLNbd53adnafkYFo1SIUFSLuBMQCb864Qg0R7B+34cokxY5FLocx0vgwxl jLmUocecfFPEEMJc1bZcZ/0oEw2QEjieCIg7uMOg6+yS4rY2l7l85qnkUqvzhrrZbmkD hDK14/Asb9ekDvkDFc2q8nNOmdCaNR5Xo5KvqsiDM17Dxfcj1zfJvUSyI9YZHEqpnQwp zhvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=6bt28Du61a/6nmsTYL8q0YQpX9Tyz13BeeC90HwodxM=; b=5Mi5iHKiglgsylWsyQsAEwo3yp7eZHk2o8E5jIEvZqQOCpqzMkYZAxBe+fccEBdSaE DzpJnRmTn56DerpBCmSJEr5Dp2OkiKfNkX8jvmzLfyCX2TN3J3HmbVrvb0JA6DlU9Dkg Cm4HgNQTXmUSgTC0EsysSsAm23XeRfddMPZKfJzxjKiKDdjwdNCulclZ2SivLTfzLad2 L/qMGqzlee4lEEQpeReboScthrLep+KnlNLrIZzQLtnhWjoc2RheZ5DMqRVi/QnDMFaS cuhGcLdx+LwLGLAQ6jFRr9AP66T/306GqH46/Uoyhjs3IR5NCFzQCImJGVPDf5/80dsx zgWQ== X-Gm-Message-State: AOAM531lKSwODrxqEHB/xrT7EbAxjQ/eW7Sy8Je8kF0C6HjAB2vhLoR2 LoqBZCGXjQyOHSfMxnMc3ApQIg== X-Google-Smtp-Source: ABdhPJwRnhd116p9uSuVtOP7CB56vdJtore3y7JNDrgku5kBgpP7j2fqRycPTTttj7FK5MJrVOyQQA== X-Received: by 2002:a05:6000:52:: with SMTP id k18mr9719333wrx.192.1639670475486; Thu, 16 Dec 2021 08:01:15 -0800 (PST) Received: from hades (athedsl-4461669.home.otenet.gr. [94.71.4.85]) by smtp.gmail.com with ESMTPSA id a1sm6719510wri.89.2021.12.16.08.01.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Dec 2021 08:01:15 -0800 (PST) Date: Thu, 16 Dec 2021 18:01:12 +0200 From: Ilias Apalodimas To: Heinrich Schuchardt Cc: ardb@kernel.org, Alexander Graf , u-boot@lists.denx.de Subject: Re: [PATCH] efi_loader: Get rid of kaslr-seed Message-ID: References: <20211216145209.2426137-1-ilias.apalodimas@linaro.org> <9b4e59b2-5dd0-6c29-b1c7-8f42b64c231c@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9b4e59b2-5dd0-6c29-b1c7-8f42b64c231c@gmx.de> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi Heinrich, > > @@ -40,6 +40,28 @@ static void efi_reserve_memory(u64 addr, u64 size, bool nomap) > > addr, size); > > } > > > > +/** > > + * efi_remove_kaslr_seed() - Removed unused kaslr-seed > > name mismatch > > > + * > > + * Kernel's EFI STUB only relies on EFI_RNG_PROTOCOL for randomization > > + * and completely ignores the kaslr-seed. Weed it out from the DTB we > > + * hand over, which would mess up our DTB TPM measurements as well. > > + * > > + * @fdt: Pointer to device tree > > + */ > > +void efi_purge_kaslr_seed(void *fdt) > > +{ > > + int nodeoff = fdt_path_offset(fdt, "/chosen"); > > + int err = 0; > > + > > + if (nodeoff < 0) > > + return; > > + > > + err = fdt_delprop(fdt, nodeoff, "kaslr-seed"); > > + if (err < 0) > > + log_err("Error deleting kaslr-seed\n"); > > If the node does not present this is not an error! Ah true, I'll fix that Cheers /Ilias