From patchwork Wed Sep 4 11:45:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Masami Hiramatsu (Google)" X-Patchwork-Id: 11129921 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 103D514DE for ; Wed, 4 Sep 2019 11:48:13 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E08CA20820 for ; Wed, 4 Sep 2019 11:48:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="RFtNBZbR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E08CA20820 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i5TjX-0007xv-Fh; Wed, 04 Sep 2019 11:45:55 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i5TjX-0007xq-1q for xen-devel@lists.xenproject.org; Wed, 04 Sep 2019 11:45:55 +0000 X-Inumbo-ID: 8d13ec40-cf09-11e9-b299-bc764e2007e4 Received: from mail.kernel.org (unknown [198.145.29.99]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 8d13ec40-cf09-11e9-b299-bc764e2007e4; Wed, 04 Sep 2019 11:45:54 +0000 (UTC) Received: from localhost.localdomain (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1263F20820; Wed, 4 Sep 2019 11:45:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567597553; bh=l8d1aa7jQJ/+VWO5N87LIpHbBJvkf1x8vkxmsAaaPmw=; h=From:To:Cc:Subject:Date:From; b=RFtNBZbRmcEoaVoPNrGJW0/6TiJdHVXY7qaUXkrvTVCtEuxjgH9/5O28TJaV4fSxT laVSLarKnl7bRJ+WnLYsvIC/yZHTXmb54ccLzTD6jwTLq0beVHLnaNN7M+rMh2z0os eryfvmNkA9h5RntyMUq3ogjeQQEn98EF+J/K7iWg= From: Masami Hiramatsu To: Ingo Molnar Date: Wed, 4 Sep 2019 20:45:47 +0900 Message-Id: <156759754770.24473.11832897710080799131.stgit@devnote2> X-Mailer: git-send-email 2.20.1 User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [Xen-devel] [PATCH -tip 0/2] x86: Prohibit kprobes on XEN_EMULATE_PREFIX X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Stefano Stabellini , Peter Zijlstra , Randy Dunlap , x86@kernel.org, linux-kernel@vger.kernel.org, Borislav Petkov , Josh Poimboeuf , xen-devel@lists.xenproject.org, Boris Ostrovsky Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Hi, These patches allow x86 instruction decoder to decode xen-cpuid which has XEN_EMULATE_PREFIX, and prohibit kprobes to probe on it. Josh reported that the objtool can not decode such special prefixed instructions, and I found that we also have to prohibit kprobes to probe on such instruction. This series can be applied on -tip master branch which has merged Josh's objtool/perf sharing common x86 insn decoder series. Thank you, Acked-by: Peter Zijlstra (Intel) --- Masami Hiramatsu (2): x86: xen: insn: Decode XEN_EMULATE_PREFIX correctly x86: kprobes: Prohibit probing on instruction which has Xen prefix arch/x86/include/asm/insn.h | 2 + arch/x86/include/asm/xen/interface.h | 7 ++++- arch/x86/include/asm/xen/prefix.h | 10 +++++++ arch/x86/kernel/kprobes/core.c | 4 +++ arch/x86/lib/insn.c | 43 +++++++++++++++++++++++++++++++ tools/arch/x86/include/asm/insn.h | 2 + tools/arch/x86/include/asm/xen/prefix.h | 10 +++++++ tools/arch/x86/lib/insn.c | 43 +++++++++++++++++++++++++++++++ tools/objtool/sync-check.sh | 3 +- 9 files changed, 121 insertions(+), 3 deletions(-) create mode 100644 arch/x86/include/asm/xen/prefix.h create mode 100644 tools/arch/x86/include/asm/xen/prefix.h -- Masami Hiramatsu (Linaro)