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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99C0BC25B50 for ; Mon, 23 Jan 2023 11:32:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231673AbjAWLcV (ORCPT ); Mon, 23 Jan 2023 06:32:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230081AbjAWLcS (ORCPT ); Mon, 23 Jan 2023 06:32:18 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B77A81117B; Mon, 23 Jan 2023 03:32:17 -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 ams.source.kernel.org (Postfix) with ESMTPS id 5F529B80D3C; Mon, 23 Jan 2023 11:32:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15312C4339E; Mon, 23 Jan 2023 11:32:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674473535; bh=A/UyFADav4a2/VogKdjeDJqleagup09QvBbH3Ovi6zg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=EuLibXdYI6vvoPtSd6SCGvsenAjT4SGb32/miFGZ0+apsX96HupHtXTvGYIEQnuZs 6TaZbfHCbHKPncnl+qSYXKIuT/tSd1q2xh0XTElsNeke+E7w10MBNh5KdTsm2BFew5 Ik64w4ONbBKz6KIkJ4U15+dDLzVwpOseN9hMBDN6lZ/nEFBLOwlHXLg3mQO3O+8ND0 fBIb3BFWKIln8HUlx5RGd18TyTPU7+WmpTgR8xZ05GhBzE0zQf3uSutWnDnWqi4xaO GnvqoC2Z5BVyllD9EDKWLUh6dlBl1NzGpG/83tjPUebPsNalEL3kQ3iRuPTu79Rxxh fKWHQpHaKLOKw== Received: by mail-lf1-f48.google.com with SMTP id x40so17657971lfu.12; Mon, 23 Jan 2023 03:32:14 -0800 (PST) X-Gm-Message-State: AFqh2kp8h9/PPgs+wZ2ukQbBufrGGKXsRE4KEiB0AWV6xho6EcsNK0Y6 yJj3da6tssZvR7zlOLl2u8e45DAD2azjbJpUSd8= X-Google-Smtp-Source: AMrXdXsi1IGGW9PSJJNYUVEjRMZ41+dSuiIUe/mOtFY/tKzXm2MPg/Uw+INMIUISejdpNoNRbKrqdInfH3TRto92uOw= X-Received: by 2002:ac2:4bd5:0:b0:4d5:76af:f890 with SMTP id o21-20020ac24bd5000000b004d576aff890mr1243569lfq.228.1674473533013; Mon, 23 Jan 2023 03:32:13 -0800 (PST) MIME-Version: 1.0 References: <20230119164255.28091-1-johan+linaro@kernel.org> <20230119164255.28091-3-johan+linaro@kernel.org> In-Reply-To: From: Ard Biesheuvel Date: Mon, 23 Jan 2023 12:32:01 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/4] efivarfs: always register filesystem To: Johan Hovold Cc: Johan Hovold , Peter Jones , Heinrich Schuchardt , Matthew Garrett , Jeremy Kerr , Maximilian Luz , linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 20 Jan 2023 at 17:04, Johan Hovold wrote: > > On Fri, Jan 20, 2023 at 10:23:18AM +0100, Ard Biesheuvel wrote: > > (cc Peter, Heinrich) > > > > On Thu, 19 Jan 2023 at 17:45, Johan Hovold wrote: > > > > > > The efivar ops are typically registered at subsys init time so that > > > they are available when efivarfs is registered at module init time. > > > > > > Other efivars implementations, such as Google SMI, exists and can > > > currently be build as modules which means that efivar may not be > > > available when efivarfs is initialised. > > > > > > Move the efivar availability check from module init to when the > > > filesystem is mounted to allow late registration of efivars. > > > > > > Signed-off-by: Johan Hovold > > > > I think this change is fine in principle, but I 'm not sure if there > > is user space code that the distros are carrying that might get > > confused by this: beforehand, efivarfs would not exist in > > /proc/filesystems and now, it will but trying to mount it might fail. > > User space must already handle mount failing since commit 483028edacab > ("efivars: respect EFI_UNSUPPORTED return from firmware") so that should > not be an issue. > Fair enough