Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1614191rdb; Thu, 25 Jan 2024 00:23:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IGLrgxhbK6ClUPHwODOSxm/roFGj9xpWJ9t72A27KbOo7xoZ6XO8DVpU+r9ToRcuflpQEqZ X-Received: by 2002:a05:6808:ec9:b0:3bd:949b:38ea with SMTP id q9-20020a0568080ec900b003bd949b38eamr589189oiv.45.1706171035932; Thu, 25 Jan 2024 00:23:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706171035; cv=pass; d=google.com; s=arc-20160816; b=Vf4vpcJ5rTr9O+u96BMGugUQGuBOwiIdCBv0HtmFcSzJy6EY3/SfwgyhoMjiAuRfQJ gS7LHLkUNxjuzULFLq02Ua6i2NMKZ7sWYz6kbgIM4XZp4vhvBXWi/VnguopT5yJl9zdx XPz0s10EeR5GKYT7lfPrlTX5qNG14EoufD6AxCDrtBfT8FnYMsmjr4rDKn/Ez1xp9XD9 IRZKg08KghjA+h7VUwos3C6/NMgyIq06mXpC8Qe0+h0sye/mQUtV6l0+7dxHptcwc7qu RsBI74PX31sjzKuQh+tQC6Iwnz+06UopyfVZNEswgNtl/pMYbQi3i+cUd5KvKC6pytgR ecsw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=RokfdDOmKauP0LTH0A6sW5fXZvhsiFxjAqxk+jGnNGw=; fh=GulFIG8Uq2IYCJ7MNrb90A2F8jlUDnfzAJs2aZnhLIo=; b=kmiUwEQWhGA0LK7vgNiHiCAWETqex/JnZ3UvgEAyx0IgDuJY6KGDXsOvBJmT8t2iF4 qssUBqu08rRi9Q/LM0mKYISNyUU24iHmlheL5Qe8V+fT1wG5ofgOEshl3xLUz88Pn7Xy n1c3Mt/RZ99r97BHBHAopJKqx+STvZyV38MR7S9dAtnbX7IzhNGcSaiaOz2MslnMhegG h6h4TUx0iXPLn+dUvmhu+C083OLuLATKcEX+iAYcWtKvNIb/NYSeaGNj9/FHhibi+vgz cE6gmIVENJRbAU/h7gQAg4bh1jWuOuHcd0ryQmTKtkF+nysojiSiwdmaDGrT8SlnT39/ IBqQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="OKzD/Zxy"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-38140-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38140-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id z9-20020a056a00240900b006d98a6168c5si15708419pfh.344.2024.01.25.00.23.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 00:23:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-38140-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="OKzD/Zxy"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-38140-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38140-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id ADC9628D3E8 for ; Thu, 25 Jan 2024 08:12:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C864517BAE; Thu, 25 Jan 2024 08:12:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OKzD/Zxy" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8A81179A7; Thu, 25 Jan 2024 08:12:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706170367; cv=none; b=q/Kpaqtfoq6a5HSKc8UjfQtfZxDuUxhzy8O3gcOXw3jrork32COA6dV34giGdYMni4j/gfjocw6Zmw1eMerCll6Ru7GoKZR5TZs9pvjcgS2204BpRS7JH5fLgX1pB3Fs/hg8CnAhKt2vL563EKSvfHRKcn78f5hhSvXDG4aXTaU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706170367; c=relaxed/simple; bh=KYhAA6lbh1xlFPF4g0tLNLt2+ZEzx+nnfioRTgNZ+Pk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=QqdzgWrpspDeZ3q2cZSWssn/CmsHND7J2P0Z8gipHeh/htTPNg+kdPPA7LoE93Lbp76Ll54XRHkg6z/cPEdl+hRHKcZUobN5PlbBZTPFQ2fhQSmHH0pSVpnSLc+z2ubllmq2M5Jk8siP9+lr/uN4tBntJYwS64yoQ54KuB9saJQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OKzD/Zxy; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 633CCC43399; Thu, 25 Jan 2024 08:12:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706170366; bh=KYhAA6lbh1xlFPF4g0tLNLt2+ZEzx+nnfioRTgNZ+Pk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=OKzD/ZxyGHc+z0bHJb1IHx9Uz9aB3Hs8MyqrZOkb2rxEMoe04osHQidq0G79q99j9 nfE5+zzGjsy5p6r/g706f594qOn7Xjw5dV3M2DSScJzJDXSniIPYATEYX/nKVMvoLW H+gnXV3I9TwrPs3IJX3ABmkh3Lcx1IY1paBXbZrD8dqUZjZGpb6HOwLvjNBvSY1PoO IGMjV7UTaE8EwE/Yhh39ShGUhMowxmydfhA+QHiuDOMi0TBQAMuYe9Ti8wUT5k+bX1 ErEfXC7wYUGIblhdTB8eUeiaA2Ncm2WkNgejUPR0pWz5qb39wAbOnyyyOEOsX3yNXW sAoKw/w7tAgIg== Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-50e7d6565b5so8045982e87.0; Thu, 25 Jan 2024 00:12:46 -0800 (PST) X-Gm-Message-State: AOJu0Yyp9SV7F2qay2ZA246uUO6aw2Vc5pz2LNKqj4i8bdpTY3ZE3WWY /dkX0kMociEXCr/XxEJ+O1hY6l+vPHOSXyh+M+izIyeucFjfijU/yQqm0vVhR175fm40M6CUbuU 5Icxi6XQFCr4M4VCaXH2CGJelYBA= X-Received: by 2002:a05:6512:2388:b0:510:cfb:5817 with SMTP id c8-20020a056512238800b005100cfb5817mr408947lfv.53.1706170364598; Thu, 25 Jan 2024 00:12:44 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240122231507.1307793-1-timschumi@gmx.de> <223a4e75-2e06-4bc6-a70c-823f0eb308d7@gmx.de> In-Reply-To: From: Ard Biesheuvel Date: Thu, 25 Jan 2024 09:12:33 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] efivarfs: Iterate variables with increasing name buffer sizes To: Peter Jones Cc: Tim Schumacher , Matthew Garrett , linux-efi@vger.kernel.org, Jeremy Kerr , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 24 Jan 2024 at 22:25, Peter Jones wrote: > > On Tue, Jan 23, 2024 at 12:33=E2=80=AFPM Tim Schumacher wrote: > > > > On 23.01.24 15:09, Ard Biesheuvel wrote: > > > On Tue, 23 Jan 2024 at 14:55, Tim Schumacher wrote= : > > >> > > >> I'd rather avoid introducing deviations from the specifications on t= he > > >> kernel side as well. > > > > > > Which specification would this deviate from? > > > > The preexisting comment claims "Per EFI spec", and it appears that I go= t > > mislead by that. Neither the UEFI specification, nor the newest revisio= n > > of the EFI specification (which I guess is what would have been current > > back in 2004, when this comment was introduced) seem to make any mentio= n > > of a maximum length for the variable name. > > Curiously, I can't find it in the 1.02 spec (the oldest I can find) > either. When I inherited efibootmgr around 2013, this was a > limitation there, but I don't see anything in that tree that claims > it's a spec limitation either. My suspicion is this is a former > Itanium firmware limit that got promoted to "the spec says" by word of > mouth, or was in some very early ia64 implementation spec. > Also, the comment (and similar ones I've seen in the past) seem to refer to the entire variable (name + payload) rather than just the name. So I am still leaning towards simply reducing this to 512 bytes.