From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756009AbcCaGtq (ORCPT ); Thu, 31 Mar 2016 02:49:46 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35056 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752910AbcCaGto (ORCPT ); Thu, 31 Mar 2016 02:49:44 -0400 Date: Thu, 31 Mar 2016 08:49:40 +0200 From: Ingo Molnar To: Andi Kleen Cc: Arnaldo Carvalho de Melo , Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, Stephane Eranian , Peter Zijlstra , Thomas Gleixner , Andy Lutomirski , Masami Hiramatsu , Denys Vlasenko , Zi Shen Lim Subject: Re: [PATCH 10/11] perf tools: Add probing for udev86 library Message-ID: <20160331064939.GA13328@gmail.com> References: <1459294889-12148-1-git-send-email-acme@kernel.org> <1459294889-12148-11-git-send-email-acme@kernel.org> <20160330104326.GB4681@gmail.com> <20160330133625.GB2793@redhat.com> <20160330135246.GA29990@gmail.com> <20160330150844.GD9083@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160330150844.GD9083@tassilo.jf.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Andi Kleen wrote: > > > > Yeah, so udis86 also seems to be a pretty old, relatively stale library with no > > support for new instructions AFAICS. > > There are lots of new instructions in pull requests on github. > > But yes the author seems to be a bit slow in pulling. > > > > > So I'd rather encourage librarizing one of the x86 instruction decoders in > > arch/x86/, and adding pretty-printing functionality to it. The code can already > > see instruction boundaries, which is the hardest part. > > > > That would also be better supported on non-x86 architectures in the long run: > > > > triton:~/tip> find arch/ -name insn.c | xargs ls -l > > -rw-rw-r-- 1 mingo mingo 30244 Mar 29 11:24 arch/arm64/kernel/insn.c > > -rw-rw-r-- 1 mingo mingo 1347 Dec 8 06:27 arch/arm/kernel/insn.c > > -rw-rw-r-- 1 mingo mingo 15123 Mar 30 12:31 arch/x86/lib/insn.c > > > > Such an in-kernel-repo library could also be used by live kernel debuggers such as > > kgdb/kdb, oops/crash-time disassembly printout, etc. > > > > ... so how about that direction instead? > > It's a major project. Who is gonna work on it? Are you volunteering? As a maintainer I don't have much free time and me writing code for every technical disagreement doesn't scale in any case, but I'm responsible for creating the environment and incentives for people to eventually work on such enhancements. My main tool to create such an environment is to convince people, if that tool doesn't work then my secondary tool is to say 'no'. If we merge udis86 support we remove one big incentive for people to factor out and enhance the already existing in-kernel disassemblers - not good. Also, you are exaggerating the technical difficulties a lot (which is sadly a well known modus operandi of yours when you don't get your way in technical discussions, and which conflicts with the Linux project's 'can do' attitude frequently), I've seen in-kernel disassembler pretty-printing patches on lkml as well, so clearly it's possible and desirable. Thanks, Ingo