Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1lOYTJ-0003xI-Ds for mharc-grub-devel@gnu.org; Tue, 23 Mar 2021 00:16:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOYTF-0003w3-81 for grub-devel@gnu.org; Tue, 23 Mar 2021 00:16:46 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:48292) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOYTA-0008U4-Pj for grub-devel@gnu.org; Tue, 23 Mar 2021 00:16:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1616472996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=STgF8OYyW0XTwbmyLcerd/VnUIW7PTCSNfxrjlbay3Y=; b=FBD57ZN25YA8XMa+fUnctlmaXPokgZXgeRCtYkey4f0Sy5NZ/CT3AS5DvCy9B/is4xG6xH 1xcgMRINO/hmb3OX6uNBsIV7QAkpYbxX1Dq5yAVdsDBfj5DagPpWLXohJtRFl8ob7hTQic Smk/ZcegH6O3/TqortwZA8iIEug/LDc= Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04lp2058.outbound.protection.outlook.com [104.47.12.58]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-25-ScvMZF-LM5WHRZSnbORDzw-1; Tue, 23 Mar 2021 05:16:34 +0100 X-MC-Unique: ScvMZF-LM5WHRZSnbORDzw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PJz+x13ttdBmS5Ewt7alljQ52D/wK6+VA1TGW8v5FEHKG4SFonUYD7pZBu93TDQLyBPzmk+0JbCxTjho+Oi0ZRCVsrBchKb7HWbPmR4IN1t5NYFuTL8t8R9DxcmxsLlqmj5tD/tKbCaJJQckmaAawjvFA+mFfAvc8FHptBR+ZkwtmDFEViYb7RePPyMK3GA1Ezt2qbuZVZgVPNd38r3ST8pjNM6sQD1gEb3DmLuUrkde5FZbijRpcwhSzW5InelJjBsWYQcl2+jU9B2rKWxCZkhyyvevmTnFKlpjDAWy8NMatBf2nCZAbwmerNMmurz3o2DZu1CEb2zsJpyiJamX0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=STgF8OYyW0XTwbmyLcerd/VnUIW7PTCSNfxrjlbay3Y=; b=CSkKLRucbFfOZs3wjC7UYxLFM08G9PXedaLZbCrDw9RLHNx/MGZWjDsvW9/IpfxI6Ynw0BE014Qd5cSa9JGHacEOiT0tW8Hi9v48TLmoMHxOAxF/tIDKZpRgQyVNkX8o8ceqNHIdDvQOmM5yIo82WQYj+/Pc0bwBQFN4MLw81IjsjpD31zuRTdu7eBBxcZbrpuZFSVLknomaPnmERfxNpTd4+7dD+Ri63flfhGJFZqxdG42HEYs+CNBWy2eLG8Ow7OR2k2ybLoP1Tx9FLhVvdFChSDkWIOam9GC9Ts9w7xSOixOJ2VQcBHfSSi+fdFcuxMt2Bj5uRZKpmVuOrBN9dA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: gnu.org; dkim=none (message not signed) header.d=none;gnu.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR04MB4991.eurprd04.prod.outlook.com (2603:10a6:803:57::28) by VI1PR04MB6957.eurprd04.prod.outlook.com (2603:10a6:803:135::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Tue, 23 Mar 2021 04:16:33 +0000 Received: from VI1PR04MB4991.eurprd04.prod.outlook.com ([fe80::28b7:e423:c3d7:7ccf]) by VI1PR04MB4991.eurprd04.prod.outlook.com ([fe80::28b7:e423:c3d7:7ccf%6]) with mapi id 15.20.3955.027; Tue, 23 Mar 2021 04:16:33 +0000 Date: Tue, 23 Mar 2021 12:16:21 +0800 From: Michael Chang To: The development of GNU GRUB Cc: Colin Watson , Marco A Benatto , Javier Martinez Canillas Subject: Re: [PATCH v2] i386-pc: build verifiers API as module Message-ID: <20210323041621.GA4480@mercury> References: <20210318113026.24963-1-mchang@suse.com> <20210322152000.ebheegnkkhpqa4d3@tomti.i.net-space.pl> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210322152000.ebheegnkkhpqa4d3@tomti.i.net-space.pl> User-Agent: Mutt/1.10.1 (2018-07-13) X-Originating-IP: [36.226.43.123] X-ClientProxiedBy: HK2PR03CA0051.apcprd03.prod.outlook.com (2603:1096:202:17::21) To VI1PR04MB4991.eurprd04.prod.outlook.com (2603:10a6:803:57::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from mercury (36.226.43.123) by HK2PR03CA0051.apcprd03.prod.outlook.com (2603:1096:202:17::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.9 via Frontend Transport; Tue, 23 Mar 2021 04:16:31 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4eb16559-f8c1-4a83-b461-08d8edb270d9 X-MS-TrafficTypeDiagnostic: VI1PR04MB6957: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Y08sGMAfDpuwKqejQb5PMKs8v9jherzA5A6VR88MiHI+dPeUVfGV9NAyWcH3aAmq5uCzUUT404M1fpP6NCNONQSZQP1mqg+P6JEbJTQEPiqXut13EtDOcyI4NK6X0P5f1NGobkgP7Vt+45rSmtiq03WwFY8Q249N6e6TiUQHRIBEnLvC9aVsWwse4R1e9iwDJdN1aIvsQwsq5E6QcFOMJCAZEa4SdrtC6N27KL4cizPKvUK57WOaWuEjRYcwQ2P63JBc3dHlV2DoIo1Cl2NzTSXtdBjRNx00TifsqJE+gR+xQxH3S+yXBhta3/kEniiGyQ5/DlEH2/ZpLcjbi0z4jc7haPSo8LtUPZrj9GCTxSQci/zHNH3ycj28IAnrlyBTXhxwLgw1Jsb/OpCXlqKoBYy4IZiCfQW9jRjniGnmRkBFM5kGZOXVvn1r7Ren4ZCi3Gp2U47PhJaK2+eP5Dw/F6PIhsg/M8BCfQlIT7DaQvqYBS0q6aWACHlB2tdpu9RRxNMBVxIaxsnOBMnJ6t0ogPoDsnJOSMQ0JgAx5Df1zM+cPI6HBWdoc6gM90ts376EMQEeyp0Y6+Jr/NUIvJYCF7KHXmPHj+o3rjxzN8m0gs+0xcQoJGFulP3ewrf91nMvlikQq3V1ETfcn23Dke1szE3CrRZbAaQlv81INo72zzREUqVxZDcU8RKGwTq0YVvtjdbvz/zWUlgm5+L0DWXeCLY4uaGXqxFOrqTk+cvUXM4= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB4991.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(346002)(396003)(366004)(39860400002)(376002)(2906002)(186003)(38100700001)(4326008)(66556008)(9576002)(55016002)(478600001)(966005)(1076003)(66476007)(6916009)(26005)(956004)(16526019)(33716001)(83380400001)(8676002)(86362001)(54906003)(6496006)(6666004)(33656002)(9686003)(66946007)(52116002)(5660300002)(316002)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?Ar3DDS2SQ0AQqbAja++Tbs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u8DcmAWY6Vw1/BPRdiuj+R08OBtVnrEqZNsC89HXIZqooc9ePWKr5?= =?us-ascii?Q?Tw02pjLvq0G0SO6D0QbHGLv/salBaohclTXrXkfzc+pqh0sHWGk0aRvUkg0F?= =?us-ascii?Q?EC8Iv3/EH/gFYKADH1dxszdhQva2M7G1aKXL0fWPhbJxv/V9nPBqyDkPQgea?= =?us-ascii?Q?L4sTr4YnEsS5HLVNPas5z+/YbOT0sXL88FKHtymNnRWQmXSuzWUIepso2Zhh?= =?us-ascii?Q?XT1Opw+s1wy4VszOOs4HDgRQteY3sku5tFOtUSOBRey7o+hUwmwFdpnX+OyG?= =?us-ascii?Q?FkR798utUDBiIm2MRFfoyCWthK6sN9E6GRTGbIiK5v3m2eqmTSp+cP/EQIfw?= =?us-ascii?Q?ygfM2+zLLodmULust8+82hqMFjRiGbfeYDP464+5/24d1dpG2ImNdrankuFN?= =?us-ascii?Q?qz+mKjMKR96IQDd40kisjhTF?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4eb16559-f8c1-4a83-b461-08d8edb270d9 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB4991.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Mar 2021 04:16:33.0410 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gsycV8KieTlLFO5rACADuziQyZgFn6tqu4NDlBRxYY/9a6V9f9DzTtmLngUU5PKY X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6957 Received-SPF: pass client-ip=194.104.109.102; envelope-from=mchang@suse.com; helo=de-smtp-delivery-102.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Mar 2021 04:16:47 -0000 On Mon, Mar 22, 2021 at 04:20:00PM +0100, Daniel Kiper wrote: > On Thu, Mar 18, 2021 at 07:30:26PM +0800, Michael Chang via Grub-devel wrote: [snip] > NAK for this patch and others "fixing" small MBR gaps. I am not going to > deal with this kind of issues any longer because a few folks in the > world cannot/do not want/... reinstall their systems. Sorry guys. > > Additionally, the commit 5fd18f77e (mbr: Warn if MBR gap is small and > user uses advanced modules) and 505d92f5e (mbr: Document new limitations > on MBR gap support) are pretty clear we do not support advanced configs > with small MBR gaps any longer. If I remember correctly, the short mbr gap warning is only visible to the user who really runs into the problem at the moment that is too late for them to take any prevention measure. In other words, this is not useful as a reminder to the user that they have to start to change their setup for good. I raised the concern but it seemed nobody cared [1] .. [1] https://lists.gnu.org/archive/html/grub-devel/2020-11/msg00077.html The "too late" literally means the system is unbootable afterwards, becase incompleted installs would end up with inconsistent state between image and module, resulting in symbol looking up failure. Therefore it is also something we have to look after although it is also rather complicated [2] ... [2] https://www.mail-archive.com/grub-devel@gnu.org/msg30663.html Afterall, keeping existing running system to survive update (NOT new install) is really an important thing as many can't afford that to happen. If we can make it any better to reduce the cost please consider to do it. It doesn't conflict with the purpose to stop the short mbr gap support, given we all know the broken system can be avoided in the first place ... > PS FYI, I am not sure anybody cares but I think patch is not fully correct > because lockdown part of kernel calls into verifiers module on i386-pc. It is covered by this [3] hunk ... As long as the mandatory "efi" verifiers lockdown is not used by platform other than efi, we could defer it's initialization to module loading in pc platform which is auto-loaded by dependent verifier modules as to what is used to be ... [3] --- a/grub-core/kern/main.c +++ b/grub-core/kern/main.c @@ -29,7 +29,9 @@ #include #include #include +#ifndef GRUB_MACHINE_PCBIOS #include +#endif #ifdef GRUB_MACHINE_PCBIOS #include @@ -275,8 +277,10 @@ grub_main (void) grub_printf ("Welcome to GRUB!\n\n"); grub_setcolorstate (GRUB_TERM_COLOR_STANDARD); +#ifndef GRUB_MACHINE_PCBIOS /* Init verifiers API. */ grub_verifiers_init (); +#endif grub_load_config (); Thanks, Michael > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel