Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1041211rwb; Wed, 16 Nov 2022 11:05:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf76Z5qhvDAyAy/5OcOcT8S7GUxU8acCDlZut5K5J2IxgK7s/PvJM9+i/mlgS27Btvk9Vqje X-Received: by 2002:a05:6402:1f0f:b0:45c:6467:94e2 with SMTP id b15-20020a0564021f0f00b0045c646794e2mr19780333edb.295.1668625529418; Wed, 16 Nov 2022 11:05:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668625529; cv=none; d=google.com; s=arc-20160816; b=Ss7dElgMreFAtW15SUCz6wDS92hlkjxYR8c8uAf1p5yiq73KuPgGVV5S3sn/8lWlnh 9ZKTQdpy11iuO5D18nbts30T/UJAo4HABbSoQmLP3R5n0QU7LeU76+eS5oe2t1m6k4Ei YLJejtoH/GbJqYnIPCH5sDsA6S7EPPgLV8mJMia4b9C9xS6oQDmFhoSck8FKyLJqxYpt C/rimYTqsLWaxuj+HBXXiR0vK7NYomQUfaV4HxtZXmvUncxbhGM6QVGRfe445BDo+Kok Nw9KqfsT5eXPIFx/EwhQt9BOGOnrDBhs0A+Qrh3tO7ZmC722rZSaBWDd70E2NgQdgKqt h8Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=lNhNsj8YSgAzmrsU1zFNoUxV5SV96Yhp8Bnx2TEsK2Q=; b=pKsONO6NNUCoGl6pmsFCKI9p4CwVz3pEw6gS9V0dZIIGDOT+j/ftqzDCaQGbaO7UfO vDK/1Q11VB+HJ/dp7Gnk/2E7mFrZnJzDx0Pg6TaE7oKn54hVsZPjCQQ1vgXLSTfvxe4t cd8HPhmzPqWz/W3rnJc2BGOqF4eB+xbZruq3VQiJx+oODV7Cqfv7ne/bYDb3akiOI4fA DhERUvA008SSsik+jtrgd8Rprz0kEwpNqK/pktKbzHgKNlvxTzcuCUAwAe7CJ4FAGa0u N1c16OdZCkSto6nv+EY7Bia5vlByVx5s3VLMzZzVUvKhl45YXcN7AIj/MmitJbT3L3Qe oKkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=WMsGR+12; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eb6-20020a0564020d0600b0046453c39abdsi15194958edb.104.2022.11.16.11.05.02; Wed, 16 Nov 2022 11:05:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=WMsGR+12; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234098AbiKPS6U (ORCPT + 99 others); Wed, 16 Nov 2022 13:58:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239254AbiKPS5x (ORCPT ); Wed, 16 Nov 2022 13:57:53 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B80B63CE6; Wed, 16 Nov 2022 10:57:44 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 215E461E61; Wed, 16 Nov 2022 18:57:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3846EC433C1; Wed, 16 Nov 2022 18:57:43 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="WMsGR+12" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1668625060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lNhNsj8YSgAzmrsU1zFNoUxV5SV96Yhp8Bnx2TEsK2Q=; b=WMsGR+12nhysRCYaqwow5tzQBtQnTkF/QyD/ljIOs8i2gk1eg64ovVhnSUXky9Kg+ZftM+ qh9/cHJYRR+awwWlae0VWz+41Fc+lrgXwJJK2WVDxQTgoG4hR5P+DYR/x9hPGJqPRef14r DjllsjAOs+WbENhJsH0Rq0hzgQpvr+A= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 80cee11a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 16 Nov 2022 18:57:40 +0000 (UTC) Received: by mail-ua1-f41.google.com with SMTP id a36so5285612uax.9; Wed, 16 Nov 2022 10:57:40 -0800 (PST) X-Gm-Message-State: ANoB5pn4OS2xjj5IP6CvYifCqBe1WFnqjsos//HTa1Td8Lv07hjRRCiu OzJqj9z2cnYDH9nMbK9yhZ4Inlap6H4oXKpCjio= X-Received: by 2002:ab0:2c05:0:b0:40c:caeb:5130 with SMTP id l5-20020ab02c05000000b0040ccaeb5130mr13374644uar.24.1668625059928; Wed, 16 Nov 2022 10:57:39 -0800 (PST) MIME-Version: 1.0 References: <20221116161642.1670235-1-Jason@zx2c4.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Wed, 16 Nov 2022 19:57:28 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH RFC v1 0/6] Use EFI variables for random seed To: lennart@poettering.net Cc: linux-efi@vger.kernel.org, linux-crypto@vger.kernel.org, Ard Biesheuvel Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Nov 16, 2022 at 6:59 PM Lennart Poettering wrote: > > On Mi, 16.11.22 17:16, Jason A. Donenfeld (Jason@zx2c4.com) wrote: > > > Commit messages are rather sparse at the moment. I'll fill those out for > > the next non-RFC patchset if this idea isn't immediately demolished. > > > > The biggest consideration is wear leveling on the EFI variable flash > > chips. However, EFI *already* winds up writing to non-volatile memory on > > every single boot anyway, so maybe it's not actually a big deal? > > So as mentioned elsewhere: This might (probably more than) double the > wear on the flash chips, since firmware is unlikely to batch these > writes with the monotonic counter write. > > I have no idea how realistic these issues are, there's a lot of > handwaving involved, but to sidestep the issue I put sd-boot's seed in > a file on disk (which should not have issues that much with wear) > instead of efi vars. Therein lies the rub indeed. Does anybody who knows something about the hardware and historical hardware know for certain that this would be a bad idea, or does it really not matter at all? Would be useful to have some definitive advice here. Jason