Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp556706iob; Fri, 13 May 2022 07:34:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjwuWNQ4n06evVUTIYMFCKlrWHfMD/oJ1MhhtD7WJ6c+9TUa/QHfaqDCx4DKJoP7A93io1 X-Received: by 2002:aa7:d310:0:b0:425:f22f:763f with SMTP id p16-20020aa7d310000000b00425f22f763fmr40916604edq.163.1652452454558; Fri, 13 May 2022 07:34:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652452454; cv=none; d=google.com; s=arc-20160816; b=XHEZWqKCEPQ2OSYOKZNVYamOViy8hjwfT6+AIKuURI35FkNOf9glSkn8mpXkVSLBSI iwir2EXOdx7nWn4FNx9qE2F8V7WRkMbbNXVZmPfAN8GAsIJk81nBmkE/sPvdIL9i9xnx K0Nc/DFaNyVBc+2A9MBDVM0kFKSmZEIHubrc4jnnqV99EaieYDezR7P5uINFhfUWMF3j 1Kg/AvYtVZcbnUMn1bFX9yAJf72UWI3AIcMT2gjEYSrh6A5NtTZRK0VFrny4eo2iRDuf aHXaQ86EjH+G/DTIZu4Rpf6QmtfBxCVfFbtMNot3lNpMaJxZTRJseLXwMHKMBbLavqLR L6Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Zns3lDnfZjG3HEbNk64v7Ya6RvjZlGYK7W5LWqtB6Z0=; b=ni2GGnOHv45x8UYw7TFuVAs7CmpfIGq9J5FUQiKW3yuSQQe8JXKiuXzsLclmxmbwAx 1t+AYKbrvK1kxDT2WYRsKwC0BDaSNvQM0uDDPr5K++d8ObuJu6vC7xs2gTjdQQHenoy+ 0J4cH477sd9dL9UNGVD+q6/DAwbr5tmaS9q4lO4FDWEHDeIUE5Wi5IifTLh2sCXB4IBP fmSsfsLQaJbnN4MQcY7gGXTfxqZapmujhkE81WadzDXQLaY2UbR4iMh3RvDl6ZYdZeUb GlHwML7gqH2mn7qNFrdrdQxOe3JfL7kiMRPkpAIY5MahHQqdarcXfmNZ0dLsRgsjD1BC Qm9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GEZzmykw; 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 dd10-20020a1709069b8a00b006e8310f72e9si2240236ejc.653.2022.05.13.07.33.45; Fri, 13 May 2022 07:34:14 -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=GEZzmykw; 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 S1356409AbiELQVi (ORCPT + 99 others); Thu, 12 May 2022 12:21:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356510AbiELQVc (ORCPT ); Thu, 12 May 2022 12:21:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77C9251331; Thu, 12 May 2022 09:21:30 -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 9862B61F9C; Thu, 12 May 2022 16:21:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73140C385B8; Thu, 12 May 2022 16:21:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652372489; bh=NDeYtJoOTyZCZ7rH4NHOQS1V70YxoweEBSxhUWIM/zE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GEZzmykw70nosMdq2UT7qg8LKHXmRTyvKi2MNKMtZZ2CwyO6035MToY/A+CtoWVMY oeSXpYZuUcqissIoGJ61njBawHIw+QDkKvnMrIZZylSUEPuDQKvY08371yKuyZbajk RIXLkYKVZRAfckK8MXp2I3O8tCFEYOIRx+Ti6yrs= Date: Thu, 12 May 2022 18:21:26 +0200 From: Greg KH To: Maximilian Heyne Cc: stable@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Boris Ostrovsky , Juergen Gross , Stefano Stabellini , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Josh Poimboeuf , Peter Zijlstra , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Masami Hiramatsu , Sasha Levin , linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, kvm@vger.kernel.org Subject: Re: [PATCH 0/4] x86: decode Xen/KVM emulate prefixes Message-ID: References: <20220512135654.119791-1-mheyne@amazon.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220512135654.119791-1-mheyne@amazon.de> X-Spam-Status: No, score=-7.7 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 On Thu, May 12, 2022 at 01:56:47PM +0000, Maximilian Heyne wrote: > This is a backport of a patch series for 5.4.x. > > The patch series allows the x86 decoder to decode the Xen and KVM emulate > prefixes. > > In particular this solves the following issue that appeared when commit > db6c6a0df840 ("objtool: Fix noreturn detection for ignored functions") was > backported to 5.4.69: > > arch/x86/xen/enlighten_pv.o: warning: objtool: xen_cpuid()+0x25: can't find jump dest instruction at .text+0x9c > > Also now that this decoding is possible, also backport the commit which prevents > kprobes on probing such prefixed instructions. This was also part of the > original series. > > The series applied mostly cleanly on 5.4.192 except for a contextual problem in > the 3rd patch ("x86: xen: insn: Decode Xen and KVM emulate-prefix signature"). > > Masami Hiramatsu (4): > x86/asm: Allow to pass macros to __ASM_FORM() > x86: xen: kvm: Gather the definition of emulate prefixes > x86: xen: insn: Decode Xen and KVM emulate-prefix signature > x86: kprobes: Prohibit probing on instruction which has emulate prefix > > arch/x86/include/asm/asm.h | 8 +++-- > arch/x86/include/asm/emulate_prefix.h | 14 +++++++++ > arch/x86/include/asm/insn.h | 6 ++++ > arch/x86/include/asm/xen/interface.h | 11 +++---- > arch/x86/kernel/kprobes/core.c | 4 +++ > arch/x86/kvm/x86.c | 4 ++- > arch/x86/lib/insn.c | 34 +++++++++++++++++++++ > tools/arch/x86/include/asm/emulate_prefix.h | 14 +++++++++ > tools/arch/x86/include/asm/insn.h | 6 ++++ > tools/arch/x86/lib/insn.c | 34 +++++++++++++++++++++ > tools/objtool/sync-check.sh | 3 +- > tools/perf/check-headers.sh | 3 +- > 12 files changed, 128 insertions(+), 13 deletions(-) > create mode 100644 arch/x86/include/asm/emulate_prefix.h > create mode 100644 tools/arch/x86/include/asm/emulate_prefix.h > > > base-commit: 1d72b776f6dc973211f5d153453cf8955fb3d70a > -- > 2.32.0 > > > > > Amazon Development Center Germany GmbH > Krausenstr. 38 > 10117 Berlin > Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss > Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B > Sitz: Berlin > Ust-ID: DE 289 237 879 > > > All now queued up, thanks. greg k-h