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 75426C433EF for ; Thu, 12 May 2022 16:21:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356412AbiELQVj (ORCPT ); Thu, 12 May 2022 12:21:39 -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> 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