From patchwork Wed Mar 31 12:51:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raoul Strackx X-Patchwork-Id: 12175429 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 999CFC433ED for ; Wed, 31 Mar 2021 12:52:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4520961964 for ; Wed, 31 Mar 2021 12:52:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235677AbhCaMwB (ORCPT ); Wed, 31 Mar 2021 08:52:01 -0400 Received: from mail-dm6nam10on2107.outbound.protection.outlook.com ([40.107.93.107]:56800 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235641AbhCaMv0 (ORCPT ); Wed, 31 Mar 2021 08:51:26 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gKJXUz2G45/IexApU+uQCxOpZEEfmwE6F7Kz2PHo3FU8YBoe7HEBWG57PgAXJTWSZpGrvuWayo4rW8qLKKPz4yM1+T5ICNgcs/cb3lxFeO8RDExsNaoQ/58orbgo2defcotlkYmxIYQY5ifcXy6Dc2arUI8Vgfow0K8biJ2B3W/A8cY8GhI2c8ZfUXBB5FPn5ynm7S/r2vJycKoyUfaGoj5bbLrvGQ8YL4sdkq4uJnxC7/xQQuc6mNSYYmevn+9JzRKvIPcTOqD+O0UFnJ5OCYJxggxgAlbZ11QJRo5oWrVWO9fAB+WZanodG0oO6oWW0hnZ+RGJtqRSIiYOkFLIng== 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=dV0ZY0FenLXeEWER/+oEQgXObGUTdxJ8AzO6ezD5LKE=; b=oQr62BAIY4fCi+5zrK9mgz6DvEWtXYWHXcbiCalOFziyPyZl62gfQWPmWSF//vOPGu4AZ0gEjev6QGzvDnVFSGGa08MYYzNLsBdt+DVSDbxwHluul64YGpKX8LV9NLUxGiRq0enQN5+1bHXax28Ay03aSGV9y8rOahR50KqtpYmmF0+2S0NtOzu7QbjHSvVOZw9JLgzAeQLO+I+LjbmCTl07lOv70fZp1IdI1binuS92+xyopGliWoyfM2MNWmFzcBYIC0FkkL5xQHsWmV82nuQrtqIZo4UwBZlZKyXVWf/XBXrrn0mqpfYd+IZjNCFqtLPvEnpoakyr2xwXcMIt7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fortanix.com; dmarc=pass action=none header.from=fortanix.com; dkim=pass header.d=fortanix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fortanix.onmicrosoft.com; s=selector2-fortanix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dV0ZY0FenLXeEWER/+oEQgXObGUTdxJ8AzO6ezD5LKE=; b=Mr2jKztanb61rsn/MCmWIXV5LHX5XlCP5JRSxSFvZMvngMD2iyfML5p0kJ2Kfh90ToL4vM+yn6a8IjeUOSZUwQPdDHE2Ly68/66cg4yGZP5+HHf7VouXYms4Ua43ekgKgNz/xN6FQ6au1Rwa4AmfoCwB1zxI7AJs3+5UIeJ9X9s= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=fortanix.com; Received: from CY4PR11MB1783.namprd11.prod.outlook.com (2603:10b6:903:11d::20) by CY4PR11MB0037.namprd11.prod.outlook.com (2603:10b6:910:77::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Wed, 31 Mar 2021 12:51:25 +0000 Received: from CY4PR11MB1783.namprd11.prod.outlook.com ([fe80::6dcc:f099:6ba8:6ebe]) by CY4PR11MB1783.namprd11.prod.outlook.com ([fe80::6dcc:f099:6ba8:6ebe%10]) with mapi id 15.20.3977.035; Wed, 31 Mar 2021 12:51:25 +0000 From: Raoul Strackx Subject: [PATCH RESEND 2/3] x86/sgx: Fix compatibility issue with OPENSSL < 1.1.0 To: Jarkko Sakkinen , Dave Hansen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , linux-sgx@vger.kernel.org, linux-kernel@vger.kernel.org References: Autocrypt: addr=raoul.strackx@fortanix.com; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkYyb2lmOEJFQURN UkFMT1ZjRkYyTlQva1FsWTBtVnN3YlMrYi9WNzR1azZFcDdxenpoNHpHbEtSS1pzClplS0I4 WmpFT2h5Q2pZaExwdnJHTVh2cTV1bm5pWENIbG9BR1hZRm9rN0Q0SGd2Q0djYnlTYVRMQjds NHc4MFIKOStYUkp2SnJpMEdPSmVubjRnNUpIQU5RN2h5YWl5RlRIYTVERU5CMjc2VG9kZUFQ bnVidGl1VmRDT0lnQVJVbAp1dzJHemFsbmY0WmZ1TGdEaHg5YzIza2pjZTFBQkFWbWdxUEtN TkVUSnhyZFdLQUt5QkVIWGJ0Snh6YnR4bFI1CnFUZU8yTExCU2V4TFBDbTRZOTZzRHlGK3JJ a2Fp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EWFNBOTh0SWNBY3lod05uY2lqYnNIUkFTQlJidkg5RFhJ c2wKaEwxMDArdzZNTWNMeFpNVmJ4UHBTWWVHaGp4SjdNUysyeGp3eDB4MWlMNmszZk5UNHNT Q3dZa0xRZjJlKzhxYwpFYjNTa0Q0VFR3RDQxUW85SFNuUlkwdnRqblNyZkwyQ3JhVmptOXhh MXhmNlJDQ3kvaXpKNU5TQTZZMXduT0U3Ck1IOHorcVFUM1NxMld0a0NzU1M5K1U2VU9OWmFK dFN5MWNvZ1ZhMDV1QWdRY0tHT3FvcHg3QWlmZUhIUFpqZnIKakVNaHJZQ3Q5WXgzR1VET0hs MnRObDJIOStqZC9BVjByMDRKUTNxSHRWM1Z5UTNxN0N1UTlCTTdnQzVpK1JleQpHSU14Zm0v a09GWTRLRUxOeVYrV01PK2lXRHpZS21tTUxnUkVXNitqZk5jMzhrYWhaQjI2RmJOZTh6QmxU cVpPCmhxYmNZR1ZZNW9Ec004YSthbkwyZDhmaStnPT0KPW9ZT0QKLS0tLS1FTkQgUEdQIFBV QkxJQyBLRVkgQkxPQ0stLS0tLQo= Message-ID: <1b0e22f0-1639-40d7-e860-0d6f2c97d341@fortanix.com> Date: Wed, 31 Mar 2021 14:51:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 In-Reply-To: Content-Language: en-US X-Originating-IP: [81.164.43.210] X-ClientProxiedBy: PR3P189CA0052.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:53::27) To CY4PR11MB1783.namprd11.prod.outlook.com (2603:10b6:903:11d::20) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.101] (81.164.43.210) by PR3P189CA0052.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:53::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25 via Frontend Transport; Wed, 31 Mar 2021 12:51:23 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1755689b-b22b-4ed7-fe0a-08d8f443b174 X-MS-TrafficTypeDiagnostic: CY4PR11MB0037: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1360; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VwRusuJN54tdl0/R7cQF8Co7Vs1bBC7XZWRioqaoQNb1GkpV8vBvPXIdr2qQ+FaT3tcyAG7dmXAnrKxNZ8EPWij3YkXogqhpWaQptiP1HBecpqPycMQ7XKfaR/IO2rvsw7s+3sImPbvVVsDln/SH2gRappTvksoKYEjKN1nHTHP/YbQgmBltx+vALzGuzxIhGWcGDYQF8U6ks5PyusgnIGSoHSwhKy518PVzhFEzHX83/YHjVgkAwPMSxtXLo5ZqDkGBKOfwgKwdyI9pNk7S20nA/cIMgv6Xbs6qOX4R4KCuqc8IoUN10e0zOtwmqA+2xWxuFkHiEmu/JmKIMeOBrbrxrC6hN5axiYLGK9qpv7tFiHjLPaDt5zsxYJSNHeZ6VvVVacauWvGC6vjNcDAK6+64ria0KikYEkILpQS3YXl8427cwO4oEXGQRunnp6CxMBeL0I8I4DGCzLuXDJSL49BVbuq0WCSgw9x2fPcd43wZxuoOa4X5v3RVZ219q5gBZzZ82qMwv6XkLISxKD7j/gC66tUJxBISohhUf1Pxo2WbyzWFtXveppFpU/6C8Ggok1Wh/5gMSIMkfrAVorDrfru9ZOr4ZjSDgJFG8sx7eb+/Y+tIgRhK7g0i2p0PC4b+vmTG1jDUHAoC/01ZOkOOQPd1B9mbTezCETKyH47p9EEZ7BUOhd4iVyCmUgdtKpJGSyyazBg6JlI0ASbp6yzNtAvbhMKHhv/GwFlO/esVDzg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR11MB1783.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(396003)(366004)(376002)(136003)(346002)(39840400004)(8936002)(110136005)(2616005)(44832011)(6666004)(8676002)(16526019)(26005)(52116002)(83380400001)(36756003)(956004)(16576012)(31686004)(38100700001)(31696002)(186003)(2906002)(478600001)(66946007)(5660300002)(66556008)(66476007)(4744005)(86362001)(6486002)(316002)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?GvUeZywchaIBy5mRIxFwovKa0s9hX0?= =?utf-8?q?hs4z6557shJjUPPsi2uNu/kLLggC++lUcqG952WLXllU2H81tp/Jn2t6rh++0/fEN?= =?utf-8?q?9YQkZj9mZQVP5nwsE8LQafBhjGa93sozGYZwSvwwDqKKs83usmnH+yen2rDwRI88m?= =?utf-8?q?7HzKLe31wA/ssPNyAf1ZFB4/jDNJ/y6YumWIHioquxJ6WPJmrEFtDdEEZLWLdVexY?= =?utf-8?q?/bqOax3njjY4OzjCTZrtQg9cVs91RVS2HuoNc+QegCvCka2qUfgy8oLFVRCfhW0sY?= =?utf-8?q?O9KzoJeeskC8IzK/b3E5uSV6IKT3ukbMtNI1/95N21E97AnIU6/4s7e8XXTvMfhe9?= =?utf-8?q?NQwNzG0kJJA1EI/zGBFoMoxXYA/2yT0afoNQeKuWBk2bpAeAPbJYKVED3Ycj5gB1j?= =?utf-8?q?UgH6JJTENHvKQgJpQlVsygOJxHtkiuNigkFvfo8NpA28PKAL3bATZfbAURKlwuCdF?= =?utf-8?q?TYplxpp7mZCKTkRs+2J2llV+zBHQpxaRZTK9eflRM7/V9ain0MQU57xxltBHARsBX?= =?utf-8?q?121fomJwR7cKNsxbH1+yI9BOw5lZkB9C3Ceb8mUIFf12MBk2uSyDccMlXr67QhiEk?= =?utf-8?q?0bWMyu6am93AkyYm0BupEXSId9V/vBs1VyTD/OYT75r54SjUJqchCJikQg3ttLNlF?= =?utf-8?q?C355FTn2mo/mOCA9C/cMjLrpEliEs1xuJfw7+2W3hKXHxjUBiY/1M0mRSgXfqkVBC?= =?utf-8?q?6equJ30Niv31w9tGrImVaDxRLYBdHFRGK+e+xg7tHY5ZhiHC6sZFG0UPrfNrDfU/I?= =?utf-8?q?XvJAaK0HXAhm/EKP2okeuV+GmJuimoANwoquBse9+2wdMQcHE4HXk3kiiAn49p6aQ?= =?utf-8?q?GnW/lNemKNPYbhsotNKZfoRzCeS8GU6RNamhrtJlxQmdrzvqZwo7ti6fWcweQOFpW?= =?utf-8?q?OLt4UWyF20a5xfmdA+ZvTWR79ekM4YpQum943xenhG8os0JFtGqhRL/Izh9WXlRFG?= =?utf-8?q?yJaCZN/yXlhsaAhoEaipcUKkTUUZB/pCZi++/Hz73Ai/VG5dAu+D/lVOtZAB66x07?= =?utf-8?q?E4tfeGZmdL8BNy90p3OKF1sed3zKr95A9ZhptXeMOmeXuAr8IBMyC63nALYB2c+7D?= =?utf-8?q?fSlUKSx4incQvMYaVHsbBi9gmZCkWWkTMHpWhwoWS17DZ+Lku+XtzMNGM9de9CtpH?= =?utf-8?q?BqH2oRXQcpxyBMVpbMbuBUDqAaC733XjbNmM3KFj286nNgWOYlYta1TsWupPiclAN?= =?utf-8?q?cbnsuAsMeH7WYp1bvJyuktQPpGqxgigoJaW1Wy+cT+gUcFAGKrYHk65OLcVv5MJxX?= =?utf-8?q?H3Vrw9FZy5CUX/?= X-OriginatorOrg: fortanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1755689b-b22b-4ed7-fe0a-08d8f443b174 X-MS-Exchange-CrossTenant-AuthSource: CY4PR11MB1783.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2021 12:51:25.1395 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: de7becae-4883-43e8-82c7-7dbdbb988ae6 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cp1jQIXHAPo2epWXhvKgRkaqXa5OjtZ+ia4dhrWLGRA/gis28jUQm5N0geOOE5hVkk/vBZ3uCIBH3iprqSowE2pME+iRmsMIZ55FmZ9iSaY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB0037 Precedence: bulk List-ID: X-Mailing-List: linux-sgx@vger.kernel.org The `RSA_get0_key` function only got introduced in OpenSSL 1.1.0. This makes compilation fail with older versions. Signed-off-by: Raoul Strackx --- tools/testing/selftests/sgx/sigstruct.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/sgx/sigstruct.c b/tools/testing/selftests/sgx/sigstruct.c index dee7a3d..aac9cbc 100644 --- a/tools/testing/selftests/sgx/sigstruct.c +++ b/tools/testing/selftests/sgx/sigstruct.c @@ -128,8 +128,11 @@ static bool check_crypto_errors(void) static inline const BIGNUM *get_modulus(RSA *key) { const BIGNUM *n; - +#if OPENSSL_VERSION_NUMBER >= 0x10100000L RSA_get0_key(key, &n, NULL, NULL); +#else + n = key->n; +#endif return n; }