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 X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C38EC41514 for ; Wed, 28 Aug 2019 16:34:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E311E20679 for ; Wed, 28 Aug 2019 16:34:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726561AbfH1Qei (ORCPT ); Wed, 28 Aug 2019 12:34:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57772 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726395AbfH1Qeh (ORCPT ); Wed, 28 Aug 2019 12:34:37 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 600B65859E; Wed, 28 Aug 2019 16:34:37 +0000 (UTC) Received: from treble (ovpn-121-55.rdu2.redhat.com [10.10.121.55]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 04FF3194BE; Wed, 28 Aug 2019 16:34:35 +0000 (UTC) Date: Wed, 28 Aug 2019 11:34:33 -0500 From: Josh Poimboeuf To: Masami Hiramatsu Cc: Stephen Rothwell , Linux Next Mailing List , Linux Kernel Mailing List , Peter Zijlstra , Randy Dunlap Subject: Re: linux-next: Tree for Aug 27 (objtool) Message-ID: <20190828163433.4ltoxmtuujkqspar@treble> References: <20190827190526.6f27e763@canb.auug.org.au> <6c42e32f-901d-be78-e69b-cb9ff8703932@infradead.org> <20190827155911.ct2zzo2zhcrauf3z@treble> <2e8b18a0-a09c-b67e-c99f-45066ab9d511@infradead.org> <20190828155147.v6eowc7rr7upr7dr@treble> <20190828161331.kvikro257blxtzu5@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190828161331.kvikro257blxtzu5@treble> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 28 Aug 2019 16:34:37 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 28, 2019 at 11:13:31AM -0500, Josh Poimboeuf wrote: > Turns out this patch does break something: > > arch/x86/xen/enlighten_pv.o: warning: objtool: xen_cpuid()+0x25: can't find jump dest instruction at .text+0x9c > > I'll need to figure out a better way to whitelist that > XEN_EMULATE_PREFIX fake instruction thing. I'll probably just teach > the objtool decoder about it. Hi Masami, Is it possible for the kernel x86 decoder to recognize the XEN_EMULATE_PREFIX prefix? asm(XEN_EMULATE_PREFIX "cpuid" : "=a" (*ax), "=b" (*bx), "=c" (*cx), "=d" (*dx) : "0" (*ax), "2" (*cx)); is disassembled to: 33: 0f 0b ud2 35: 78 65 js 9c 37: 6e outsb %ds:(%rsi),(%dx) 38: 0f a2 cpuid which confuses objtool. Presumably that would confuse other users of the decoder as well. That's a highly unlikely sequence of instructions, maybe the kernel decoder should recognize it as a single instruction. -- Josh