From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 2557DD8023C for ; Tue, 28 Jan 2025 22:07:29 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Jw/lvX6Lu9CW8hiFchfkpxMJVZF+wK6b69zW7QnRDmc=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240830; t=1738102048; v=1; x=1738361247; b=ZFxSYwfiFc27eJrhtC/xun17DjPInf95/QuM9DmzbCflU6fj8OQjKkY4A+j+WFw7QhVXlMyS R4Z3O3ejiF7OBBnkyz3kE7pFe4Jz6zbiar8gN9Q4AvJ+CtsvHLc/oWKtIWq2r0cwO9R4YSUTSpi soGu60lfp0OIR1ugZqbO1yygEDUvLqCVsoBaDH21RL0NS5xO0yQLQFMrYNXtXCkCQrlAyBe4vnx IPTi90gMlpM+syvIxI9dcyyRvYLEnyyKSRuHP4z1gZIJj0qytBLfYCXdtzD+9GQhTortT8cx4RG uGn5LsSpuW0pZgml3sRJusQbyadH80ake+kphjUIg7qgw== X-Received: by 127.0.0.2 with SMTP id RoeSYY7687511xZ26CQKL1NA; Tue, 28 Jan 2025 14:07:27 -0800 X-Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by mx.groups.io with SMTP id smtpd.web11.41674.1737546627605977601 for ; Wed, 22 Jan 2025 03:50:27 -0800 X-Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-aab6fa3e20eso1214515866b.2 for ; Wed, 22 Jan 2025 03:50:27 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUIbNpTcDO4w0/4zFplqfSH7HNuhawKlR0gy3rb95HNZ/kFXWXG6jtz2Xo02+iIYIRK2T9QZw==@edk2.groups.io X-Gm-Message-State: HLlyN46kcFx9bBmTrwpWKseux7686176AA= X-Gm-Gg: ASbGncsBjwtz37GqV1kq2qVuaBHF2BTVYmvTHLt2uf4B+FasEiJLhCXxsf2r2/lZCgr IayxIWaLT91+FLZn+RJYNHrfhVdZyz0AMPXTWtRHtnCcR6TgSm6dVXdKGOS4vHpWYwZEWteAijX dAtGFSHwrxjR3ib68Z9Kn5earohf8DsOKb3ajksCjM7ijXAwNmLeXlMAgf4pvhEmb1GnkuOGDMJ S2uYxZxqaZnrwyn6grHyPk+3BXDqQ+c/T6S6zh7zH6WfCX9aT472bHuUb6EY+HzVmdK8oJLOccz IJPS8XXFSbAp7AAzq2Xn4fUNB9YHylzyTgkirvGUNA== X-Google-Smtp-Source: AGHT+IF+incGb/IZc3tkpwYf1H3kUvKL8NDvsH89F25knBJMw3Vy2+yLj3qjgDdMHXGS49J7p9SFOw== X-Received: by 2002:a17:907:7f89:b0:aa6:29dc:11b with SMTP id a640c23a62f3a-ab38b1ff059mr1576763966b.16.1737546625488; Wed, 22 Jan 2025 03:50:25 -0800 (PST) X-Received: from ?IPV6:2a03:83e0:1126:4:829:739b:3caa:6500? ([2620:10d:c092:500::4:1c5b]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384d2cfc2sm887377566b.82.2025.01.22.03.50.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Jan 2025 03:50:25 -0800 (PST) Message-ID: <1a4223a2-77ae-4f15-a40b-dc33de9e6c2d@gmail.com> Date: Wed, 22 Jan 2025 11:50:24 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [RFC 1/2] efi/memattr: Use desc_size instead of total size to check for corruption To: Dave Young Cc: Ard Biesheuvel , linux-efi@vger.kernel.org, devel@edk2.groups.io, kexec@lists.infradead.org, hannes@cmpxchg.org, x86@kernel.org, linux-kernel@vger.kernel.org, leitao@debian.org, gourry@gourry.net, kernel-team@meta.com References: <20250108215957.3437660-1-usamaarif642@gmail.com> <20250108215957.3437660-2-usamaarif642@gmail.com> <8613563a-ee7c-4271-b1f0-4d1ac365ad3a@gmail.com> <138f28ec-341e-4c48-a14b-4371a8198de8@gmail.com> <029cff22-f2e0-4796-9c27-1df056e08f8f@gmail.com> From: "Usama Arif via groups.io" In-Reply-To: Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Tue, 28 Jan 2025 14:07:27 -0800 Resent-From: usamaarif642@gmail.com Reply-To: devel@edk2.groups.io,usamaarif642@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240830 header.b=ZFxSYwfi; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=pass (policy=none) header.from=groups.io On 22/01/2025 05:36, Dave Young wrote: > Hi, > On Mon, 20 Jan 2025 at 19:48, Usama Arif wrote: >> >> >> >> On 20/01/2025 11:29, Ard Biesheuvel wrote: >>> On Mon, 20 Jan 2025 at 11:50, Usama Arif wrote= : >>>> >>>> >>>> >>>> On 20/01/2025 10:32, Ard Biesheuvel wrote: >>>>> On Mon, 20 Jan 2025 at 11:27, Usama Arif wro= te: >>>>>> >>>>>> >>>>> ... >>>>>> Hi Ard, >>>>>> >>>>>> Just wanted to check how should we proceed forward? Should we try an= d fix the warning >>>>>> and corruption during kexec as done in this series or not initialize= memory attributes >>>>>> table at all in kexec boot? I would prefer fixing the issues as in t= his series. >>>>>> >>>>> >>>>> I would prefer kexec boot on x86 to disregard the memory attributes >>>>> table entirely. >>>> >>>> Would you like Dave to send something like >>>> https://lore.kernel.org/all/CALu+AoS8tb=3DHgaybDw5OG4A1QbOXHvuidpu0ynm= z-nE1nBqzTA@mail.gmail.com/ >>>> on the mailing list (wrapped in ifdef CONFIG_X86_64) >>>> >>> >>> I prefer this approach. and no need for the ifdef, this is x86 >>> specific code, and the memory attributes table is already ignored >>> entirely on 32-bit x86 iirc >> >> ah yes, I ignored the file name when reviewing it and just focused on th= e function :) >> >> Will wait for Dave to send it. >=20 > Ok, I will add reported-by from you and suggested-by from Ard. But I > can not test the efi mem attr, I'd prefer to have your test results > first. Could you confirm that? >=20 Please also add Reported-by: Breno Leitao who originally discovered and reported the issue. I have tested it and it works, efi_memattr_init will just return 0 as efi_mem_attr_table =3D EFI_INVALID_TABLE_ADDR, so it won't be initialized. Feel free to add Tested-by tag from me. Thanks, Usama -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#121057): https://edk2.groups.io/g/devel/message/121057 Mute This Topic: https://groups.io/mt/110517813/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-