From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=J8bBDqDj; spf=pass (domain: virtuozzo.com, ip: 52.101.139.39, mailfrom: rkagan@virtuozzo.com) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [52.101.139.39]) by groups.io with SMTP; Fri, 09 Aug 2019 09:07:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y8/4kB3KDbrP4aemspLS4kllUSi9xcx5vG0s3S33VuMxpj7wYIyUlHPho4OWZw2eCmCHssCmVXvW8nBLQMQV3LKqBaMTBme3YkLC7qdxOpFkHzoL4CqWBq8OTzSB/Aj6uvG+74ayqtf1EYrKqTOWbG054qQ7oPwkWAyBKuWfR5YV7Og+3E6prG4DCew9szN19KU8dDTei4/nfazAuSEi9o8X4NemcTeS8PK/jzTDbHLyK2Db2a0MgevgwtrOf2g/S7I3RIkSPv1IpIuEDUBXrOCjero/P+KCOYSpUre/I7cOI/YOd8mi1bGULyRUxcTYnLMWlow6F6VjXezSPmS7og== 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=r2OXTMcKB/Sw/W6bsN/421JTQ56X7Du2Ni1WoyqjPR0=; b=LYy6YdhIzK5LI/jHXPm3MZMMLy7dJPUQok2SdycJd5wK2i9uu5lZdVVcE2f1QwxkJgQxn8fNF3KXaJRkQttXa1U5KLTYneEXy63FAiML/Jomqz2hlfx5KmroOdHjFn0UTGbg0FESc62nClnIr/lc1xViBrCYjEZKbBRCMcJ+52/ZL5oTKgBS14OWHSIEyttReQTqATyk2T0Kbb0yn74L/rn7dwax/PyWpJhWPdytQqKLUsBSL03M0CC3Vn5GE9SVtV5lUIBgUlwIKEnxKuIrh9yE9wH0df3o+OFhkiNa8RsVqxML9M5qV/+h2NIY/SSGV30+2sGTDyfKmQ01auRZ3w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r2OXTMcKB/Sw/W6bsN/421JTQ56X7Du2Ni1WoyqjPR0=; b=J8bBDqDjowWa9k+HCUvT8GZ0Bj0xKMjn723faWUVOXyobsPwqnBJPG/Tii1IylCZ6pF76gYsGR0D5fIqrtzxNb3CvRTowFBARJwV1dCnMfk4WSJGDqxrxUjwWz9XNJIDIY4Dzeqt75wn1vAlbBQhpXGVWgj0VeDc8+2Q7l6PJHQ= Received: from AM6PR08MB3160.eurprd08.prod.outlook.com (52.135.163.161) by AM6PR08MB3287.eurprd08.prod.outlook.com (52.135.161.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2157.18; Fri, 9 Aug 2019 16:07:00 +0000 Received: from AM6PR08MB3160.eurprd08.prod.outlook.com ([fe80::2c2c:c46e:bdfd:b872]) by AM6PR08MB3160.eurprd08.prod.outlook.com ([fe80::2c2c:c46e:bdfd:b872%6]) with mapi id 15.20.2157.020; Fri, 9 Aug 2019 16:07:00 +0000 From: "Roman Kagan" To: Laszlo Ersek CC: Andrew Fish , "devel@edk2.groups.io" , David Woodhouse Subject: Re: [edk2-devel] static data in dxe_runtime modules Thread-Topic: [edk2-devel] static data in dxe_runtime modules Thread-Index: AQHVSJ2bQrdLTZ7e0UaPDsZ6ZQsRb6borfAAgAOvAoCAA50IAIAAA28AgAGRvwCAAXiMgA== Date: Fri, 9 Aug 2019 16:07:00 +0000 Message-ID: <20190809160657.GA5508@rkaganb.sw.ru> References: <20190801191621.GB14235@rkaganb.sw.ru> <8d18d4f6-5f33-44e9-2758-46350b43c5ec@redhat.com> <20190805101813.GA27171@rkaganb.sw.ru> <406f2250-41e2-9925-b570-38b99a5f6e41@redhat.com> <0A900AFC-C9A0-4A4C-8EBA-9A6F75B3EE25@apple.com> <5d03c05d-24c2-f825-c42e-4371a87d76a1@redhat.com> In-Reply-To: <5d03c05d-24c2-f825-c42e-4371a87d76a1@redhat.com> Accept-Language: en-US, ru-RU X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mutt/1.12.1 (2019-06-15) mail-followup-to: Roman Kagan , Laszlo Ersek , Andrew Fish , devel@edk2.groups.io, David Woodhouse x-originating-ip: [185.231.240.5] x-clientproxiedby: HE1P18901CA0006.EURP189.PROD.OUTLOOK.COM (2603:10a6:3:8b::16) To AM6PR08MB3160.eurprd08.prod.outlook.com (2603:10a6:209:45::33) authentication-results: spf=none (sender IP is ) smtp.mailfrom=rkagan@virtuozzo.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: efa770c2-992d-46d9-3617-08d71ce39c38 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020);SRVR:AM6PR08MB3287; x-ms-traffictypediagnostic: AM6PR08MB3287:|AM6PR08MB3287: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 01244308DF x-forefront-antispam-report: SFV:SPM;SFS:(10019020)(396003)(39850400004)(346002)(376002)(366004)(136003)(199004)(189003)(25786009)(86362001)(186003)(6916009)(66066001)(26005)(4326008)(36756003)(229853002)(8936002)(6436002)(6486002)(446003)(316002)(478600001)(305945005)(7736002)(54906003)(66556008)(66476007)(14454004)(58126008)(64756008)(11346002)(476003)(66446008)(2906002)(66946007)(6506007)(486006)(6246003)(256004)(52116002)(53546011)(386003)(8676002)(102836004)(99286004)(1076003)(33656002)(71200400001)(71190400001)(5660300002)(81166006)(81156014)(6512007)(9686003)(53936002)(6116002)(76176011)(3846002)(30126002);DIR:OUT;SFP:1501;SCL:5;SRVR:AM6PR08MB3287;H:AM6PR08MB3160.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) x-ms-exchange-transport-forked: True x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: cCPU6a/jJ0Oyf+5cwAV46SEBAgKZGjMeb2vjPCpGKalkykIMXo0N9kI3BqiQOw5BDg01gvkji4jneXT3R5/Nth5koXwHgzk32ddZ64EnWqhTficuMyQqXgHY+61yCAxALnZ+AkjtnNFvyJVJaLyCOKsPwYYKdtpT6nRJiVAc/2NsHZTJd0qjJwQtUjb3ENOxxKgziO9uccltW2/K/YB84c25kZanOCy0mxbNxG5PLVbpLIH8FWH6yx4b1HKCf7hABhsky35GGDQ6Lh1je/7e2ZKY46ryuAMuCe+5RbZq6zY5bPJmjn6FR6tQcQuCcPbCC13YVnf+wRgKrLRlFs/A6DqABEbvB0q4oh2cHB0LzgQP2HMO0VUEcqqT7bQZxpAPXh5u/L12iPtA9+mZYJEoVvqZLC7AC8QzPUItZue2rbsRRA1zmtjb50ssoNMWNeKiPQuiLWUyILvL71K2jFFVl8WqsiOWQRa1oLMJuALroZ2IWEwNFQNsmHNh7WRkDuIP MIME-Version: 1.0 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: efa770c2-992d-46d9-3617-08d71ce39c38 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Aug 2019 16:07:00.2096 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: AWZkgvR7O/O01vBns73aaiC/fXY1OY/wnMW2pxyLQTfbz4XtWrpf5q1B+ZT3GGIH1ha0oVcWL/hibx/vELK3nQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3287 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-ID: On Thu, Aug 08, 2019 at 07:39:14PM +0200, Laszlo Ersek wrote: > On 08/07/19 19:41, Andrew Fish wrote: > >> On Aug 7, 2019, at 10:29 AM, Laszlo Ersek wrote: > >> ummm... not sure why, but I never got this email in my inbox. I only see > >> it in my list folder. I see myself addressed on it as: > >> > >> Laszlo Ersek via Groups.Io > I've adjusted my mail config to honor the 'reply-to:' header, should be ok now. > >> On 08/05/19 12:18, Roman Kagan wrote: > >>> On Sat, Aug 03, 2019 at 04:03:04AM +0200, Laszlo Ersek via Groups.Io wrote: > >>>> On 08/01/19 21:16, Roman Kagan wrote: > >> I'm convinced that OpenSSL needs to expose a new API for this particular > >> problem. Since, as you point out below, the problem only affects the essentially broken configuration (SECURE_BOOT_ENABLE && !SMM_REQUIRE), I'm fine with saving time and effort and sticking to the hack-ish approach proposed in the bugzilla issue, which is to iterate over "thread-local" pointers and EfiConvertPointer() on each. (As long as it fixes the problem of course; I'll test and report back.) So we should be good without a new API from OpenSSL. > In other words, the problem doesn't exist when OpenSSL (with the rest of > the variable driver stack) is protected with SMM, as pointers into SMRAM > remain valid "forever", after the initial SMM driver dispatch. Makes perfect sense. We happen to build this broken configuration for some historical reasons, I'm failing to recall exactly which. Will try to get rid of it. Thanks, Roman.