From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 6F68ED80047 for ; Tue, 18 Jul 2023 20:17:52 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=jD/hDUssmNvWSdc+uq4PunlEiKH1wKk9q3thyGtaIZo=; c=relaxed/simple; d=groups.io; h=X-Received:X-Received:X-Received:X-Received:X-Received:X-Gm-Message-State:X-Google-Smtp-Source:X-Received:MIME-Version:References:In-Reply-To:From:Date:X-Gmail-Original-Message-ID:Message-ID:Subject:To:Cc:Precedence:List-Unsubscribe:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:Content-Type; s=20140610; t=1689711471; v=1; b=eeV+qwPo7XAwwbWc0XbIE80L6K134OxAZ8p0avrBLYjmUotJxDqtyqDCblQXIzFX7hjmIvFL s45boyyv5mrfdf22BpZQSMW2/pC/auQJ9zDNgTRURt/w4PROv/jB3hUxZNU9yaqAl8do/lACUKp GAK6iHWQoacDDatEvFoXmEkE= X-Received: by 127.0.0.2 with SMTP id xg4tYY7687511xEjMw982O9D; Tue, 18 Jul 2023 13:17:51 -0700 X-Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web10.6153.1689711470374233327 for ; Tue, 18 Jul 2023 13:17:50 -0700 X-Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AA85260B37 for ; Tue, 18 Jul 2023 20:17:49 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C0F5C433C8 for ; Tue, 18 Jul 2023 20:17:49 +0000 (UTC) X-Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-4fb863edcb6so10291768e87.0 for ; Tue, 18 Jul 2023 13:17:48 -0700 (PDT) X-Gm-Message-State: X6Zjez33E3nvHGTswJki2s76x7686176AA= X-Google-Smtp-Source: APBJJlHyC7kNiHuhcncOCwcaUKkngOXvl4f2BvlRSDmcVXwanvUELQ1Pax+xehLrEZOwQKsTc5SAqMMpgKahdosgyPg= X-Received: by 2002:a05:6512:3195:b0:4fb:77d6:89c3 with SMTP id i21-20020a056512319500b004fb77d689c3mr2405577lfe.12.1689711467089; Tue, 18 Jul 2023 13:17:47 -0700 (PDT) MIME-Version: 1.0 References: <20230718184006.534-1-t@taylorbeebe.com> In-Reply-To: <20230718184006.534-1-t@taylorbeebe.com> From: "Ard Biesheuvel" Date: Tue, 18 Jul 2023 22:17:35 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH v1 0/9] Add ImagePropertiesRecordLib and Fix MAT Bugs To: Taylor Beebe Cc: devel@edk2.groups.io, Andrew Fish , Dandan Bi , Eric Dong , Gerd Hoffmann , Guo Dong , Gua Guo , James Lu , Jian J Wang , Jiewen Yao , Jordan Justen , Leif Lindholm , Liming Gao , Rahul Kumar , Ray Ni , Sami Mujawar , Sean Rhodes Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ardb@kernel.org Content-Type: text/plain; charset="UTF-8" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=eeV+qwPo; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none) On Tue, 18 Jul 2023 at 20:40, Taylor Beebe wrote: > > Reference: https://github.com/tianocore/edk2/pull/4590 > Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=4492 > > The UEFI and SMM MAT logic contains duplicate logic for manipulating image > properties records which is used to track runtime images. > This patch series adds a new library, ImagePropertiesRecordLib, > which consolidates this logic and fixes the bugs which currently exist in > the MAT logic. > > The first patch adds the ImagePropertiesRecordLib implementation which > is a copy of the UEFI MAT logic with minor modifications to remove the > reliance on globabl variables and make the code unit testable. > > The second patch adds a unit test for the ImagePropertiesRecordLib. The > logic tests various potential layouts of the EFI memory map and runtime > images. 3/4 of these tests will fail which demonstrates the MAT logic > bugs. > > The third patch fixes the logic in the ImagePropertiesRecordLib so > that all of the unit tests pass and the MAT logic can be fixed by > using the library. > > The remaining patches add library instances to DSC files and remove > the image properties record logic from the SMM and UEFI MAT logic. > This all looks fine to me, but this is another series of the pattern - break out some functionality into a new lib class - provide a single implementation of that lib class - track down every DSC in existence and add the same library class resolution to each. Could we *please* have a way for library classes to be declared with a default resolution? That way, series such as this one will be a lot leaner, and as a bonus, I am sure that there is a lot of boilerplate that can be removed from existing DSCs for library classes that only have a single implementation. For this series, Acked-by: Ard Biesheuvel -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107031): https://edk2.groups.io/g/devel/message/107031 Mute This Topic: https://groups.io/mt/100221556/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-