Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp410160rdb; Thu, 5 Oct 2023 09:17:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFrHg+5SYmB2iThbcP3+LhpwiE1FZb8GAbodtHP8mB0MMRdXg4oSMbvf27SGfQ91PBJ+QoJ X-Received: by 2002:a05:6a00:1996:b0:68a:3b25:50cc with SMTP id d22-20020a056a00199600b0068a3b2550ccmr5994476pfl.30.1696522648202; Thu, 05 Oct 2023 09:17:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696522648; cv=none; d=google.com; s=arc-20160816; b=XS49YMnhoRZ7XKIDJ0m8S8ojHhrxGGHRaRrTz7F89MRsvxoMxNu4tKw2/xAqGDAYS8 VeZPQrOoO2637zvjOr5eLno9zBz8w4etMw72Z0fjH5vgtzOe9BjhTH7Olv2OiQdONRAe AWzbzi70VJeAU9ahXhVrAKZgTO7l5R23DKbHhovfJKMDN5Mn1QuhEdDr+XqoJTEUYfbW WJ3ynox8Psb+AupHyhgO81XB21dK5/xMdXwMXVjEnUyTKx1GPfShtuTT1vq3PayRLV15 klECPpMZxqSqiFsdBMeV1JuHIDvbtKTb0fp9u/MEnET4c/I5jqYxkpiYJCil0au7PyA9 9CnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=kQYKZeQP8pm0NjRWo5780Kw8NMCt/BBjxkH5yR+PxPw=; fh=Z1VpwkS8445X0w0bYeMALnHU25itmjxH7ofqPWG1qI8=; b=n3kJE7m6XlUKjlPMpRMOh2aD9DTBTFYmOySOFCaA5z8qyfluhyd9W3YeC/dS/s2h9K /voTh07HOegBbil6tGcZ8iB2xFs6udPhPGex2vG7w86GcifF5liC5ytiMcVl8WASep60 VO05Lnk4fc3Z3LdB26YHiPHWsIM5Dg2qC+BEXjucClYpWdkGkYaQwJHDy4f9jw6zBbZ/ AFPeuwI4n9zw5a3qf17SgknBrUJAeS8UolDNdyWGBxcztRyN1Iw0cUWaY88NXC+YbCGM wJwVYRHjnKxpk3U0LLrKQR9ZhikGAM4YuLhwPs1WroiVUJAGEHn2/k48co+buGPRo3Q5 lLaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=kbiPrJx1; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=LrXa3UOu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id f29-20020a63381d000000b0056476f15584si1815149pga.541.2023.10.05.09.17.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 09:17:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=kbiPrJx1; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=LrXa3UOu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id D617F80AF80F; Thu, 5 Oct 2023 09:15:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241332AbjJEQOP (ORCPT + 99 others); Thu, 5 Oct 2023 12:14:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238453AbjJEQMW (ORCPT ); Thu, 5 Oct 2023 12:12:22 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7215E8A6B; Thu, 5 Oct 2023 01:28:38 -0700 (PDT) Date: Thu, 05 Oct 2023 08:28:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1696494516; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kQYKZeQP8pm0NjRWo5780Kw8NMCt/BBjxkH5yR+PxPw=; b=kbiPrJx1bvBuyseYnFTGoQF+55CE9AnAKQB+xVEo1EYYhegUW8amTYnZlKbtzhpGRfszSX fJhdsdyElQX8umq5olyDov7OyILJN6eqxX+3JdpVq9uSfM5RniKcNzVQRwz5sFPpXRwGRK Ubh5MiXs5tlO16hfCoTi0IsGgt8jejoTLbyu5EZBN2xssSoj0aXDBWEf5tZ1NxIXZ1FJAr ricHYpoYKiad6N6CjreWVhTqyHVnIF1HeW8X1Wc5Z27uIQnuyit8Qy6FhEkCQjl11ZWHTc LWx6k9JV0VAdfjmMZbraD9rg4d3luieqeCZ9c9tdubx5lUsYX+bv8TFjNyOTVw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1696494516; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kQYKZeQP8pm0NjRWo5780Kw8NMCt/BBjxkH5yR+PxPw=; b=LrXa3UOustYww++UDMFKZ7OOPP9T2KHeEkE8fDsMWEskHaKxs4s2b80JSp56A56MJIboA+ V6m+6P0Pv3Po8ECg== From: "tip-bot2 for Brian Gerst" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/entry] x86/entry/compat: Combine return value test from syscall handler Cc: Brian Gerst , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230721161018.50214-4-brgerst@gmail.com> References: <20230721161018.50214-4-brgerst@gmail.com> MIME-Version: 1.0 Message-ID: <169649451603.3135.3339730852325076665.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 05 Oct 2023 09:15:37 -0700 (PDT) The following commit has been merged into the x86/entry branch of tip: Commit-ID: eec62f61e134d6711f98d4005c6439f24d03d54f Gitweb: https://git.kernel.org/tip/eec62f61e134d6711f98d4005c6439f24d03d54f Author: Brian Gerst AuthorDate: Fri, 21 Jul 2023 12:10:14 -04:00 Committer: Ingo Molnar CommitterDate: Thu, 05 Oct 2023 10:06:42 +02:00 x86/entry/compat: Combine return value test from syscall handler Move the sysret32_from_system_call label to remove a duplicate test of the return value from the syscall handler. Signed-off-by: Brian Gerst Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230721161018.50214-4-brgerst@gmail.com --- arch/x86/entry/entry_64_compat.S | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/x86/entry/entry_64_compat.S b/arch/x86/entry/entry_64_compat.S index 7015029..b162723 100644 --- a/arch/x86/entry/entry_64_compat.S +++ b/arch/x86/entry/entry_64_compat.S @@ -118,9 +118,6 @@ SYM_INNER_LABEL(entry_SYSENTER_compat_after_hwframe, SYM_L_GLOBAL) movq %rsp, %rdi call do_SYSENTER_32 - /* XEN PV guests always use IRET path */ - ALTERNATIVE "testl %eax, %eax; jz swapgs_restore_regs_and_return_to_usermode", \ - "jmp swapgs_restore_regs_and_return_to_usermode", X86_FEATURE_XENPV jmp sysret32_from_system_call .Lsysenter_fix_flags: @@ -212,13 +209,15 @@ SYM_INNER_LABEL(entry_SYSCALL_compat_after_hwframe, SYM_L_GLOBAL) movq %rsp, %rdi call do_fast_syscall_32 + +sysret32_from_system_call: /* XEN PV guests always use IRET path */ ALTERNATIVE "testl %eax, %eax; jz swapgs_restore_regs_and_return_to_usermode", \ "jmp swapgs_restore_regs_and_return_to_usermode", X86_FEATURE_XENPV - /* Opportunistic SYSRET */ -sysret32_from_system_call: /* + * Opportunistic SYSRET + * * We are not going to return to userspace from the trampoline * stack. So let's erase the thread stack right now. */