Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1104378rwb; Fri, 7 Oct 2022 08:10:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7xKfoowsoGuU0iXfjS/0plCWfUb/T6zeuHq9Pl+7MxbAXonjNJx5gGkMRY+6M1R0nQKdP+ X-Received: by 2002:a17:907:1b1f:b0:72f:56db:cce9 with SMTP id mp31-20020a1709071b1f00b0072f56dbcce9mr4283455ejc.605.1665155423451; Fri, 07 Oct 2022 08:10:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665155423; cv=none; d=google.com; s=arc-20160816; b=HmnL4PFJ0rUQdvM4Z/8wXO9HYuqHi8svUNk8w5UBa7jgX4eeM/0kz1I0W4uyH8F37m jKgvDCSeDU8DyLgGOvjiR5HrA+uPAklcT8Bx7qNMelNowLklCQ7Zg7LnCYF0DFb6+tXM JlcS7M6T6eq3+uQDk06lHE3Ss7E42jltizen2ryGA2F11clm1HOJIFewOqpnlBPOmwPB Y/hSHXRLw3HypXxt72PG5qwEBlGoMk9Ru6dp38JLhUOP2bGyamtAzAGw3ukfP4+Q2C4z UA5Ky9BeOtdAKDvAe/vAUv41QgiaAZteTrbqq1TImLPSqMeAR8ktcjHvwQf8+GqDEdKf xsNw== 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=gpT1oxwG8qhrngUF1HPWXyFjMkw7GgvkYhgMWixLe0g=; b=jPlNut537+mbZL7pE/R8ixAD+bHNHYFMTnt9oKmm9Ga9tasZWPwDNkNMNSLgDBAO2r E/q9XzZXD82Zp43ibwcqU7YdmKxVk0/tD65rqRmF6gWOoPIFPsWAVsIkuRwsBTpzijcM JBLLvhgoMeiexGa7v4qnBHecrmBQFQHt5x0dnZ+VFyiNQt+jqdLe8twxvMiQD2Uev+hb MKF/y0lMB0VDx5T0tTcz4ni8nwSHhotERQFloRifxrC3d6sVz7f29ONdNFyUJPT2BAOJ pcE0EarZfFu+IIp3dfGWqXoSN1vTWpwQUU7JyBEllDTKoIEuqrPAxTlbABhlQZQGW/JW SeRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pC4QCIoQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b10-20020a056402084a00b004585c0fe21csi2827641edz.536.2022.10.07.08.09.50; Fri, 07 Oct 2022 08:10:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@kernel.org header.s=k20201202 header.b=pC4QCIoQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229921AbiJGPHC (ORCPT + 99 others); Fri, 7 Oct 2022 11:07:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229799AbiJGPG7 (ORCPT ); Fri, 7 Oct 2022 11:06:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14AF1102500; Fri, 7 Oct 2022 08:06:58 -0700 (PDT) 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 75B8561CEB; Fri, 7 Oct 2022 15:06:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDDA1C433D7; Fri, 7 Oct 2022 15:06:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665155217; bh=IN+0DhFSUK/4ORNgGRuJj2lCVEnl1xihbqgCujXi5G4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=pC4QCIoQ+N6IKtk4PcB3/Kk7lzz/cRkmUPon0xWkVlXw17+EowJJtuXUUYQTk+aDC fC+WqtLKd/bG9Cy+UUJSEyKisKFQtPSD0NTEDBYYVHqujccGYLHtVZHTM+LF4ZN7Cs XnLu0czD8+Y/XnippbHhr5u8b80eTYkCElbUGWGM09hwlg0c97VAlZxHv5QKh17c9O 1H5aIJ7G+TgL+5aFYrjY7vBetQeM+0iQ/1+HxIq0mKCSGIvoGCtZDuJZCAw5CgZoYI HQwJNJpbD0l0f+/UAo7LTAZV1KS7qljNb+AaFNHpDhvhYATW0YUnHI/W9+AHYpL1T1 jWoAKsOc4Z2XQ== Received: by mail-lf1-f48.google.com with SMTP id r14so7733856lfm.2; Fri, 07 Oct 2022 08:06:57 -0700 (PDT) X-Gm-Message-State: ACrzQf1cyT7I4gzqP0U2Ky4GMyqoZGp6ykiyAmRcKQ6Z1chjXD2MjCe+ bnV3slCWPpBndHhIeTfbVqpamta7uRgO6gOwPso= X-Received: by 2002:a19:c20b:0:b0:4a2:40e5:78b1 with SMTP id l11-20020a19c20b000000b004a240e578b1mr2034056lfc.228.1665155215821; Fri, 07 Oct 2022 08:06:55 -0700 (PDT) MIME-Version: 1.0 References: <20221006224212.569555-1-gpiccoli@igalia.com> <20221006224212.569555-9-gpiccoli@igalia.com> <202210061614.8AA746094A@keescook> <2a341c4d-763e-cfa4-0537-93451d8614fa@igalia.com> In-Reply-To: <2a341c4d-763e-cfa4-0537-93451d8614fa@igalia.com> From: Ard Biesheuvel Date: Fri, 7 Oct 2022 17:06:44 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 8/8] efi: pstore: Add module parameter for setting the record size To: "Guilherme G. Piccoli" Cc: Kees Cook , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, kernel-dev@igalia.com, kernel@gpiccoli.net, anton@enomsg.org, ccross@android.com, tony.luck@intel.com, linux-efi@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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-kernel@vger.kernel.org On Fri, 7 Oct 2022 at 15:46, Guilherme G. Piccoli wrote: > > On 07/10/2022 10:19, Ard Biesheuvel wrote: > > [...] > > > > OVMF has > > > > OvmfPkg/OvmfPkgX64.dsc: > > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000 > > OvmfPkg/OvmfPkgX64.dsc: > > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x8400 > > > > where the first one is without secure boot and the second with secure boot. > > > > Interestingly, the default is > > > > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x400 > > > > so this is probably where this 1k number comes from. So perhaps it is > > better to leave it at 1k after all :-( > > > > Oh darn... > > So, let's stick with 1024 then? If so, no need for re-submitting right? Well, I did spot this oddity efi_pstore_info.buf = kmalloc(4096, GFP_KERNEL); if (!efi_pstore_info.buf) return -ENOMEM; efi_pstore_info.bufsize = 1024; So that hardcoded 4096 looks odd, but at least it is larger than the default 1024. So what happens if you increase the record size to > 4096?