Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp1365443imi; Sat, 23 Jul 2022 03:46:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vUGftqrmEqCxkiEPpPKqYx/iDYsvIUMWcs3xTmbkhhxQFf1JP27WqW5qbuuX3BeKXAaBLI X-Received: by 2002:a17:906:2245:b0:715:7c81:e39d with SMTP id 5-20020a170906224500b007157c81e39dmr3184339ejr.262.1658573192126; Sat, 23 Jul 2022 03:46:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658573192; cv=none; d=google.com; s=arc-20160816; b=ABOsiVaL1zTMuR6VeKQyvXqgfRX3NCV8/37ltZ35wrKe2FjOqPozqS+BLrI/pSSpkF vm1p/yFdnlBdqFqUrqZE0G78L8rJVgBpEoGyBHOMRA7ehOpHh/aRgptbzZZluy4RFhHS dieCOF68ChMBpSh64Hqp7vUOaiADDRUFIPOrKXbR6kiOMk5Eof133yrpQg6rAMnsGP1y 9MQtzY4ClHfWUZAczDhOlsBJCnSiUrqnddb50IbzfJcChqP0U7M/pkS8FxyzWnSuLThD 4dwCMJXmGn0ShlFwIm2rZOAo/3vu44m51fXj0vawEVd6jhSghNH8iCr2oGMAjZ/heL7k Swqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+xPb9y3Y4hXLyvvWEHMKO2piTHI6C3xM7m9eHnPCj+w=; b=GAlNJLT+wPFAGMLnF6N3eYVf6AYq+YcUKtPDtGhBeag7mF039TcJ5keAQWFV8gmALZ 2bx21ssDNGTy3WfsrHcE9nwD9mAtcaeGZH/Q5tB1E9pDFI8kcsIyRmV9hZ2IywI7o311 Hq6jDjQ//49lPoZY9e4Qmu7X+ilrsrL1VOpOi2Sz0oN3BWQWIF/5Ey4aNnssvAr5cBkB RPyNRc3e19YLopZqzd+AkK/6lhs6QeTrtY7hd2tC7LSiDEaSvWVyjYcBHiKFt42MxN4F ZZfu92QaR0+hE25f/9zX/3CEPQpn3z1CUQzYDNlTazfT6WRLiojVeEkluPpR6bQ94V2z MPHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PzdVgff7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ji17-20020a170907981100b007269e67e7ffsi9730301ejc.544.2022.07.23.03.46.06; Sat, 23 Jul 2022 03:46:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PzdVgff7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238617AbiGWKHg (ORCPT + 99 others); Sat, 23 Jul 2022 06:07:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238529AbiGWKG6 (ORCPT ); Sat, 23 Jul 2022 06:06:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 820DFC3825; Sat, 23 Jul 2022 03:01:12 -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 2440F611D4; Sat, 23 Jul 2022 10:00:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05896C341C0; Sat, 23 Jul 2022 10:00:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658570450; bh=I1nVtJhBaBbQvFmmxP+Ixri0tvBlRaN4Uz+xRtIocyY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PzdVgff7I6wmrXz3Yk18MY2u32PPwfr6fboP2pV78y0CtBLBxzZAhCWmHV8g0cH/p db9h8Bh2gayPkjBICoz6XxkvEiZp8eGi1ecT/K37kW28zDA+sWr8we8gdawqLTkjS+ RfIW4vA6rUZXTmhM/SH295ZMJlis6sm7FGkxPFjo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Peter Zijlstra (Intel)" , Borislav Petkov , Josh Poimboeuf , Thadeu Lima de Souza Cascardo , Ben Hutchings Subject: [PATCH 5.10 091/148] x86/vsyscall_emu/64: Dont use RET in vsyscall emulation Date: Sat, 23 Jul 2022 11:55:03 +0200 Message-Id: <20220723095249.907083729@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220723095224.302504400@linuxfoundation.org> References: <20220723095224.302504400@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 From: Peter Zijlstra commit 15583e514eb16744b80be85dea0774ece153177d upstream. 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: Thadeu Lima de Souza Cascardo Signed-off-by: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- arch/x86/entry/vsyscall/vsyscall_emu_64.S | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) --- 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