From mboxrd@z Thu Jan 1 00:00:00 1970 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 950C7C43334 for ; Wed, 20 Jul 2022 01:11:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239923AbiGTBLj (ORCPT ); Tue, 19 Jul 2022 21:11:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239881AbiGTBLV (ORCPT ); Tue, 19 Jul 2022 21:11:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4AE062490; Tue, 19 Jul 2022 18:11:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 404406173B; Wed, 20 Jul 2022 01:11:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E889C36AE2; Wed, 20 Jul 2022 01:11:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658279469; bh=hkb1+h6mYCHA06BuFWT4pmqFqndTQpvrGQ6vTfHFoZ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RW5t9R9sPd+IZg7AtuhO49fUMeYL9S4NMWSrt8kkF/UdoKgk+T2dSL3+xzfMBE2Xe f9aiHmR7Vn4TPj577gP8Bi04eQlCjPyHBLCeLE3Ij55UFZmK2bHt+LgvtpImsGh3F3 cyfe+GCHEYEtjBSEpcei4rabHsw9LheMQtgCqeGZUvEhoW8XiFi6vpirtl3TYRfOuj adRuWSpnqyJYGovuB/XcamvGCSQpe3JuiKnU5QU0U3A5VT/LeLRny7fnqrvcrQAoT5 wyJHVFcUmjNRbg+yPneizeqerHoD6vfXayCINrNXROASViHcxuoxhEvx7r8XMIn4oY 6p4FLDKxxxkaA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Peter Zijlstra , Borislav Petkov , Josh Poimboeuf , Sasha Levin , luto@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org Subject: [PATCH AUTOSEL 5.18 10/54] x86/vsyscall_emu/64: Don't use RET in vsyscall emulation Date: Tue, 19 Jul 2022 21:09:47 -0400 Message-Id: <20220720011031.1023305-10-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220720011031.1023305-1-sashal@kernel.org> References: <20220720011031.1023305-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peter Zijlstra [ Upstream commit 15583e514eb16744b80be85dea0774ece153177d ] This is userspace code and doesn't play by the normal kernel rules. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Reviewed-by: Josh Poimboeuf Signed-off-by: Borislav Petkov Signed-off-by: Sasha Levin --- arch/x86/entry/vsyscall/vsyscall_emu_64.S | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/x86/entry/vsyscall/vsyscall_emu_64.S b/arch/x86/entry/vsyscall/vsyscall_emu_64.S index 15e35159ebb6..ef2dd1827243 100644 --- a/arch/x86/entry/vsyscall/vsyscall_emu_64.S +++ b/arch/x86/entry/vsyscall/vsyscall_emu_64.S @@ -19,17 +19,20 @@ __vsyscall_page: mov $__NR_gettimeofday, %rax syscall - RET + ret + int3 .balign 1024, 0xcc mov $__NR_time, %rax syscall - RET + ret + int3 .balign 1024, 0xcc mov $__NR_getcpu, %rax syscall - RET + ret + int3 .balign 4096, 0xcc -- 2.35.1