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 C40DAC433F5 for ; Thu, 16 Dec 2021 16:04:36 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5549D82A65; Thu, 16 Dec 2021 17:04:34 +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="SsUggY+G"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 90D3081423; Thu, 16 Dec 2021 17:04:32 +0100 (CET) Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (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 6B44782F5A for ; Thu, 16 Dec 2021 17:04:28 +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-wm1-x32c.google.com with SMTP id i12so19239683wmq.4 for ; Thu, 16 Dec 2021 08:04:28 -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=9M8lgRM6FnqSUAIy6g3VRybfQD2EY+XXsOens70wxo4=; b=SsUggY+Gl05Tsp5T8jL29+4xkFoYXXvp9VYAi3YVz70fOeFvoRVNoj4eW7ZZhHqrFy JVlHGOsuxTLJjW49V7RXiEuGPBtYlyoJxNwxeq+fWvVL9cAS2VNQgCOoc8lD9lmDWijz RkSJqHGwHmUx1l+QGwkEGToLudQplNi9v+0+M8MwdD2wTcBL1Bo+NAF+IKeWIJjO7W8h /LN/2RJ7NLcWVUVRq9lRC2tdTeeZ8G4du5XzrClHsKRfwbE/TBOOh2VUX0CfqF5Q5Ayd SF4gQSb6Mw+70JJUYXWgpw1XKmnR0y8JYmm+RKcBkSgOa3bVQZeczNE0P4rdOrktN+QJ Gajw== 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=9M8lgRM6FnqSUAIy6g3VRybfQD2EY+XXsOens70wxo4=; b=0PpC7g80tk+3iZ5S9Vb82Cm1eiKNDfzeF9z/2ki0Ji6HkNgNsLgij00yxG9V4JdOkU RjQKsmXtcvYnTqX9tL5VevfjPVG03jQ3gssQyHd4YUHYP7lCRGgkdwDQnsFeyddxWzhJ aZN63SUrw/ANqN2o2S/M6GV35QgDhp9uverUPuJ8YqQ4GELe/ktIL70sj+QmWDIQ7K7v 1vM7ldgey3A2SYxXy7uLu8Pnq2rKoqHTSHg7U1A/2a92h1tA5WjP+ongYdSyEpCWRXQE kJxo4LpVpkK4Qftf7swnFzPktI5xgKR8IOU5904gg9snQkm44u1PPb/y3/+oyOxQL0Uv H9fg== X-Gm-Message-State: AOAM533ZGhHrZGkOhxZksvw0eeadaTZ3JGP1SiN/dt4bN5fr52878qRT NaufbJ6JHcFixuwHVpiB5Fg++g== X-Google-Smtp-Source: ABdhPJz1LuoaWjd6tH+Uiin+ynEM8IJ4I0aPv6x1W/spGQbP5+l9n+/SKYqricP6RralbZQUx61knQ== X-Received: by 2002:a1c:9856:: with SMTP id a83mr5554303wme.157.1639670668050; Thu, 16 Dec 2021 08:04:28 -0800 (PST) Received: from hades (athedsl-4461669.home.otenet.gr. [94.71.4.85]) by smtp.gmail.com with ESMTPSA id bg12sm6293000wmb.5.2021.12.16.08.04.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Dec 2021 08:04:27 -0800 (PST) Date: Thu, 16 Dec 2021 18:04:25 +0200 From: Ilias Apalodimas To: Heinrich Schuchardt Cc: Mark Kettenis , agraf@csgraf.de, u-boot@lists.denx.de, Ard Biesheuvel Subject: Re: [PATCH] efi_loader: Get rid of kaslr-seed Message-ID: References: <20211216145209.2426137-1-ilias.apalodimas@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, On Thu, Dec 16, 2021 at 04:59:02PM +0100, Heinrich Schuchardt wrote: > On 12/16/21 16:48, Mark Kettenis wrote: > > > From: Ard Biesheuvel > > > Date: Thu, 16 Dec 2021 16:28:06 +0100 > > > > > > On Thu, 16 Dec 2021 at 16:25, Mark Kettenis wrote: > > > > > > > > > From: Ilias Apalodimas > > > > > Date: Thu, 16 Dec 2021 16:52:08 +0200 > > > > > > > > > > Right now we unconditionally pass a 'kaslr-seed' property to the kernel > > > > > if the DTB we ended up in EFI includes the entry. However the kernel > > > > > EFI stub completely ignores it and only relies on EFI_RNG_PROTOCOL. > > > > > So let's get rid of it unconditionally since it would mess up the > > > > > (upcoming) DTB TPM measuring as well. > > > > > > > > NAK > > > > > > > > OpenBSD uses the kaslr-seed property in the bootloader to mix in some > > > > additional entropy. (It will also use EFI_RNG_PROTOCOL if it is > > > > avilable, but most U-Boot boards don't provide that, or at least not > > > > yet). > > > > > > > > > > What is the point of using both the DT property and the protocol if > > > both are available? > > > > Unless kaslr-seed is coming from a different entropy source, there > > probably isn't a point. But it doesn't hurt and it made the > > bootloader code simpler. > > > > It does mean there is some room for compromise though. If U-Boot > > would only remove kaslr-seed if it implements EFI_RNG_PROTOCOL it > > wouldn't be a problem. > I can limit the stripping if EFI_RNG_PROTOCOL is installed or a specific Kconfig option is selected and hopefully we can get rid of the Kconfig in the future. > Only QEMU's ARM virt machine fills kaslr-seed in the device-tree. > U-Boot injects it as well in some cases e,g sec_firmware_get_random() [...] Regards /Ilias