Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3101420rwe; Mon, 29 Aug 2022 06:00:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR4kpcTP7ONLjCbX3XLJ9FUR6LINiYjW/+S/MsG2v//sWkhuvUv334jVGId5r5X/vo8YoHfR X-Received: by 2002:a05:6402:4449:b0:445:cdb6:2de9 with SMTP id o9-20020a056402444900b00445cdb62de9mr16549261edb.59.1661778019880; Mon, 29 Aug 2022 06:00:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661778019; cv=none; d=google.com; s=arc-20160816; b=mNmChIVzgjvqDnPNoreWUMpEPYeUtNLzDl3rxItKv2tGj6OObKBO8nz5B+wIBDT0cy uzyvrtV5wrpwRqcGp2uAyDr4y11re0MZxSFJCskGqHk99sp8CKsAd+4iT2PlGSbmhxjO GR5RRwkbNX64L/jPVVglYsvpZt0X+EmMjkKjCgbu8c+3KImcKdySkcTnsT3AibxvWHpQ wvZAUfYZ0rdzwdVpg0oIrp4+R0f4fjoFwpft1a3xPR8lMPAAo5qo4Kra/vmThsJlHg4t W0paWJX6V9jw4oDVAIqFPPOVIGor+e7j1hS6yxW3o8p3aHSPfNaG21ge76qwxMNHVhoB 4VWg== 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=xRY83DXj2x6ztNKAWgoBo8fkXYMb/oD3h1dlbkmfhpk=; b=BTBW+bPALqeJVcFNZ4Py4/EGcyyArNOmLlMTT8f+vu+P8Z4BImDICHaU9/iuMWiEgn aN6toVmqPOg6tEktmkOICdtwodZJ8SqMu35xZVJr9WUjoE2RvpATPodYXQ6jofbwZHkZ 42TuB8HRPam8aGSxXhTPhx7HN+k+nnIHXZrT2MlQTJb6rXyYXsgpNPU4n5ym+pyZnYDV USEBH76MXvGkNpPgKU5xFiz/xjVYDV2YuKxRCSeQ44FkCpHT1PWYf67HO1mM+AkHV0i+ JMBjnTRCTy16INX0qiMrIUTEodfLxd8L3JOYqI9OOJl2hrEqleRiP316jnvLEt32RtyR 0xwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1SWhOM+Z; 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 dz14-20020a0564021d4e00b0043df391fc6asi7792316edb.578.2022.08.29.05.59.53; Mon, 29 Aug 2022 06:00:19 -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=1SWhOM+Z; 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 S229868AbiH2MVz (ORCPT + 99 others); Mon, 29 Aug 2022 08:21:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230451AbiH2MVd (ORCPT ); Mon, 29 Aug 2022 08:21:33 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F35CF58517; Mon, 29 Aug 2022 05:05:36 -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 ams.source.kernel.org (Postfix) with ESMTPS id EF4FEB80F9A; Mon, 29 Aug 2022 11:16:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55675C433D6; Mon, 29 Aug 2022 11:16:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661771807; bh=CAB0dM4DuuIsf2a3QiclMqfYJ2KO8N7/9vCXIMquUdg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1SWhOM+Z6QPM49+4o5BEUdcZ6EyRXjCozIuRAWy7XjaesWMfOwYcC9gLJ/BQ2oGuE 0ptSDpXjMtIPaazVAjmwl0VrUkIO/5Pp4aEu56NXE6XddneJ8Z8IP5HsDwqQFSGH4O 5HyPLcT0mKHAiTAvah6rFC+TI3x7MP0Po5wVahe4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Juergen Gross , Borislav Petkov , Jan Beulich Subject: [PATCH 5.19 104/158] x86/entry: Fix entry_INT80_compat for Xen PV guests Date: Mon, 29 Aug 2022 12:59:14 +0200 Message-Id: <20220829105813.460494448@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220829105808.828227973@linuxfoundation.org> References: <20220829105808.828227973@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 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,T_SCC_BODY_TEXT_LINE 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: Juergen Gross commit 5b9f0c4df1c1152403c738373fb063e9ffdac0a1 upstream. Commit c89191ce67ef ("x86/entry: Convert SWAPGS to swapgs and remove the definition of SWAPGS") missed one use case of SWAPGS in entry_INT80_compat(). Removing of the SWAPGS macro led to asm just using "swapgs", as it is accepting instructions in capital letters, too. This in turn leads to splats in Xen PV guests like: [ 36.145223] general protection fault, maybe for address 0x2d: 0000 [#1] PREEMPT SMP NOPTI [ 36.145794] CPU: 2 PID: 1847 Comm: ld-linux.so.2 Not tainted 5.19.1-1-default #1 \ openSUSE Tumbleweed f3b44bfb672cdb9f235aff53b57724eba8b9411b [ 36.146608] Hardware name: HP ProLiant ML350p Gen8, BIOS P72 11/14/2013 [ 36.148126] RIP: e030:entry_INT80_compat+0x3/0xa3 Fix that by open coding this single instance of the SWAPGS macro. Fixes: c89191ce67ef ("x86/entry: Convert SWAPGS to swapgs and remove the definition of SWAPGS") Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Reviewed-by: Jan Beulich Cc: # 5.19 Link: https://lore.kernel.org/r/20220816071137.4893-1-jgross@suse.com Signed-off-by: Greg Kroah-Hartman --- arch/x86/entry/entry_64_compat.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/x86/entry/entry_64_compat.S +++ b/arch/x86/entry/entry_64_compat.S @@ -311,7 +311,7 @@ SYM_CODE_START(entry_INT80_compat) * Interrupts are off on entry. */ ASM_CLAC /* Do this early to minimize exposure */ - SWAPGS + ALTERNATIVE "swapgs", "", X86_FEATURE_XENPV /* * User tracing code (ptrace or signal handlers) might assume that