Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FE44C636D4 for ; Wed, 15 Feb 2023 09:18:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229809AbjBOJSI (ORCPT ); Wed, 15 Feb 2023 04:18:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233818AbjBOJSD (ORCPT ); Wed, 15 Feb 2023 04:18:03 -0500 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95D6622DC7 for ; Wed, 15 Feb 2023 01:17:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1676452679; h=message-id:date:from:subject:to:cc:references: in-reply-to:content-transfer-encoding:mime-version; bh=2bGGoQrb0x5GeMxPsm4LpY5uTxiyZujMdoHCtHBJY8k=; b=PsV7xsvCGocbimLIN0gx83Wy1/ucv0O0rRHg5QPDXYo0+sxX565tDaF6 QUMDd0W4hxrhI7Wgd5riBxlDjvySFg31vpS4cT6EPNQRd0AVId48ZXs/1 QEKv2G2pf0phIQTTFCVPavbXO+u2QM5f3jjUR+Y/xiS+RhvF7opqM1n2J o=; X-IronPort-RemoteIP: 104.47.66.44 X-IronPort-MID: 97521476 X-IronPort-Reputation: None X-IronPort-Listener: OutboundMail X-IronPort-SenderGroup: RELAY_O365 X-IronPort-MailFlowPolicy: $RELAYED IronPort-Data: A9a23:aLcdv6/Rfz/+V0trHbsdDrUDtn6TJUtcMsCJ2f8bNWPcYEJGY0x3y TcZXGiPPvfbNGumeo1xPYjn9EsB7cCHnddrQFNuqns8E34S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4mARER0Z+T8yBLSe6SAG03KPPboZFPGDRf8MNJ IronPort-HdrOrdr: A9a23:4b1u/69te/E2n5T7mH5uk+DPI+orL9Y04lQ7vn2ZKCYlEfBw8v rE9sjzuiWE6gr5J0tQ/OxoVJPsfZq+z/5ICOsqU4tKNTOO0FdASrsP0WKI+Vzd8kPFmdK13J 0QF5RDNA== X-IronPort-AV: E=Sophos;i="5.97,299,1669093200"; d="scan'208";a="97521476" Received: from mail-mw2nam12lp2044.outbound.protection.outlook.com (HELO NAM12-MW2-obe.outbound.protection.outlook.com) ([104.47.66.44]) by ob1.hc3370-68.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 15 Feb 2023 04:17:32 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WovwaRwiSK9Ka1vqwmAc7GfluqAZ+b3npA2iwk4d49mUTCCnmzweXFZ0YjVnmPFl2VcMebHNIv7a7ceutUt3ej4eIj+K9Se4Mejd7NUYS5KMK+CntZErjrYvSnCq+1Ay9/mvAHXkwNHppb3sMsMs77C+E6RMzFVCtoUUgBTKsORp3ecshDRYBo6MszPrAM+RsdtGj0gxmgZ1gXqexD5ufJjgqt/4+URe63xnakYT+1vdJIXu2Kza86Tdy9EDfU6lX6xuGQJUOzTTTE2axULfIMwyZ5yTsLLP7kwiMjw2YwANVBB5Sa+9ycX1T7vp/KiBNha8cMdbYAnFTn8opn+UdA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oE/iF6z2lWamzO64tGiIpHCSv2Ve21dh4s2Ah0vRLxo=; b=LOnLtqb/LyUWfXgS70Fw47tkqqy6OqfuGK/c4yAzKgTTqoUVdN8By+k4WIY81iEx8sJz1vCBqAh7ndzS5+YPPcURZ/n9IRahFDn4g5nLaE6WfPch0323IofET9VsSOEOKhNqwsnignqt/9NiRb8olfUcVtlsyi77mxzXZjCGAj9Fq+h3XG/82gL4XjSSaeZvYD37HsJzBLP7/US0/ZV3Zc/vGoKlYjDEFCb7nmPjeO4c/r4DCQwV/4XXRh/+c/gbpnZOosG60Z9NhgEdPWcJp2d1StLFJMwT8qoI6SkjugGwoAoDxNDn56jarodtOS7p5EBtnGtJ2exD9Ii8hclGLQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oE/iF6z2lWamzO64tGiIpHCSv2Ve21dh4s2Ah0vRLxo=; b=f6qmDRn+wIpkETvcGqHeURhjALB5W8KTGjoWozi1nZF/4w6OVWwZ7RUE8po4FrE/xdX0rDt4sApA/HpM4zaBTxGrzje1Wv0wzoZcVya+AsNekBBZ5kVhCHwVUc61VAXeE9WDDPbFw/Ta0M0CTV5uBGvKdsuuamfkd/+0wrjK5J8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com; Received: from BYAPR03MB3623.namprd03.prod.outlook.com (2603:10b6:a02:aa::12) by MW4PR03MB6617.namprd03.prod.outlook.com (2603:10b6:303:128::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.32; Wed, 15 Feb 2023 09:17:30 +0000 Received: from BYAPR03MB3623.namprd03.prod.outlook.com ([fe80::8299:f95f:934b:29e8]) by BYAPR03MB3623.namprd03.prod.outlook.com ([fe80::8299:f95f:934b:29e8%7]) with mapi id 15.20.6086.024; Wed, 15 Feb 2023 09:17:30 +0000 Message-ID: <0b57d2ab-14e0-14a0-adf3-3186fd2f5282@citrix.com> Date: Wed, 15 Feb 2023 09:17:23 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 From: Andrew Cooper Subject: Re: [RFC PATCH v1 1/2] selftests/x86: sysret_rip: Handle syscall in a FRED system Content-Language: en-GB To: Ammar Faizi , "H. Peter Anvin" Cc: Dave Hansen , Dave Hansen , "Kirill A. Shutemov" , Thomas Gleixner , Peter Zijlstra , Brian Gerst , Borislav Petkov , Shuah Khan , Ingo Molnar , Andy Lutomirski , x86 Mailing List , Linux Kselftest Mailing List , Linux Kernel Mailing List References: <25b96960-a07e-a952-5c23-786b55054126@zytor.com> <509443c8-e0fd-935f-63d8-7264f5dd3c05@zytor.com> <20230124002625.581323-1-ammarfaizi2@gnuweeb.org> <20230124002625.581323-2-ammarfaizi2@gnuweeb.org> <8f5c24df-514d-5d89-f58f-ec8c3eb1e049@zytor.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0186.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a4::11) To BYAPR03MB3623.namprd03.prod.outlook.com (2603:10b6:a02:aa::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR03MB3623:EE_|MW4PR03MB6617:EE_ X-MS-Office365-Filtering-Correlation-Id: 413232fd-ca71-4aca-303a-08db0f357693 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LNrdwwsdCy4JJVIggTxqjapZwkyr9BOTh2toi/H4LdVjZyEPIWg9oPoXmHwy0Sj9koakgdF6RAhMzgKSHD0m+dRlE2Y5iCe/lh6nBm2WuwNItDn5eWDTZQl7d5amYu3ZuG8wyXc9szgJXZ+Ik4/TYGvYnCLsaqfMVL12yF1wW2CD53MBuGqWFR+xTbNX1mX+2c9HmeigPKfrseusVCiCPnph63zWJVxc6cJzc7hfRfD5GgzfMCZyLmCx73kJI6r+seX2Tsz75SarzwtobeZdhGCUVfVmlv2/zW2VVK67yLhyS3Rg0Ppp9wNCieFNwr239+jYVd/Ph3LAgaUf51GDJawpITRSMBhTce8PKefXJ+lHgPs7jk086LeEhP5wAuFRO+slMsw0Z2GnKM6ThCeGm3XPKq94gOc6MPesC7hLlFrSj4+iAPSl5AEd1StPE4QRSOYZ/oKk/rsFCLPvBLP9jpYZ8LJm8ehZD2+fRu44suEvwFrVXAirHsJDZkQbWaH2h8jKJBgIkEx+N5UKuDbZ7PfdFZiMGR2uUHZAuBPNzj5qpNBAaYJSNQ0WY6ny5I2x3n7xJQJ7aCwGcYBwdAwy2vJQxX47QAimoog7q1uEJZMNbbZeiNVhBuLnTpwb4YYhfV8zaaP/lf89kdn/+j9IwAjqTsJn64gKUelZZa4zijKQ/Q+MPpuH6w0r3yy5e0+9A3STHlWjj9uLqYf9awV5PuMTj3uA1i10rFsvOz9Y6Vs= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR03MB3623.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(136003)(39860400002)(396003)(346002)(376002)(366004)(451199018)(7416002)(186003)(4744005)(31686004)(6512007)(6506007)(5660300002)(53546011)(26005)(2906002)(6666004)(8936002)(36756003)(2616005)(82960400001)(38100700002)(316002)(8676002)(31696002)(66476007)(4326008)(6486002)(66556008)(478600001)(41300700001)(110136005)(83380400001)(966005)(66946007)(54906003)(86362001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Wjk0M2QrQWFDczAzYXZXQm1TUmZTRmY5cjFVczZmUlNFUmU5SGJ3bkxP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S2haVlNaYVBZdVNJOU9TY01w?= =?utf-8?Q?ywUVzyoTcaYXOVD8ToSaspVdH9sDaFhc=3D?= X-OriginatorOrg: citrix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 413232fd-ca71-4aca-303a-08db0f357693 X-MS-Exchange-CrossTenant-AuthSource: BYAPR03MB3623.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2023 09:17:30.2754 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8rpIXhUWpDuHEFRAt2TO3zDg7M2doRlDOGtBIJzOt5ENCbGhVAyE52MJGwykKkiivxOaq2VOFjsmy7xJUt/saYiDk3CDhsIZEpkxKBghzFk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR03MB6617 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26/01/2023 8:08 pm, Ammar Faizi wrote: > On Mon, Jan 23, 2023 at 05:40:23PM -0800, H. Peter Anvin wrote: >> So as per Andrew's comment, add: >> >> register void * rsp asm("%rsp"); >> >> ... >> >> "+r" (rsp) /* clobber the redzone */ >> >> ... as the right way to avoid redzone problems. > I played with this more. I found something wrong with this. This doesn't > work for me. The compiler still uses red zone despite I use "+r" (rsp). > > What did I do wrong? Well this is a fine mess... https://godbolt.org/z/MaPM7s8qr does the right thing, but is now contrary to the prior discussion regarding calls in asm, which concluded that the "+r"(rsp) was the way to go. Furthermore GCC regressed in 9.0 and emits:   warning: listing the stack pointer register 'rsp' in a clobber list is deprecated [-Wdeprecated] which might be the intention of the developers, but is wrong seeing as this is the only way to say "I modify the redzone" to the compiler... ~Andrew