From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754272AbbH0NMJ (ORCPT ); Thu, 27 Aug 2015 09:12:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36673 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753422AbbH0NMG (ORCPT ); Thu, 27 Aug 2015 09:12:06 -0400 Date: Thu, 27 Aug 2015 08:11:54 -0500 From: Josh Poimboeuf To: Ingo Molnar Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Michal Marek , Peter Zijlstra , Andy Lutomirski , Borislav Petkov , Linus Torvalds , Andi Kleen , Pedro Alves , Namhyung Kim , Bernd Petrovitsch , Chris J Arges , Andrew Morton , Konrad Rzeszutek Wilk , Boris Ostrovsky , David Vrabel , Jeremy Fitzhardinge , Chris Wright , Alok Kataria , Rusty Russell , Herbert Xu , "David S. Miller" , Pavel Machek , "Rafael J. Wysocki" , Len Brown , Matt Fleming Subject: Re: [PATCH v11 00/20] Compile-time stack validation Message-ID: <20150827131154.GB26200@treble.redhat.com> References: <20150825080500.GA17977@gmail.com> <20150825152554.GA3724@treble.redhat.com> <20150826070723.GA18944@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150826070723.GA18944@gmail.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 26, 2015 at 09:07:23AM +0200, Ingo Molnar wrote: > > * Josh Poimboeuf wrote: > > > BTW, since I'm planning on adding a CFI generation option to this tool, I wonder > > if "stackvalidate" is a misnomer. I can't think of anything better. Any naming > > ideas are welcome :-) > > I'd suggest 'debuginfo' and a Git-alike set of subcommands: > > debuginfo help > debuginfo check > debuginfo check framepointers > debuginfo check cfi > > Such a command scheme keeps open various future commands, such as: > > debuginfo show > debuginfo size > debuginfo compress > debuginfo strip > > etc. > > I also checked that there does not appear to be such a Linux tool with such a name > at the moment. My feeling is that the subcommand model wouldn't fit this tool very well. Its core functionality is to analyze code paths -- which it does in a single pass, regardless of whether it's checking frame pointers, checking CFI, generating CFI, or some combination. Splitting it up into subcommands would mean having to repeat the same code analysis pass multiple times unnecessarily. Also, since it's really focused on stack-related code path analysis, I wouldn't expect it to be branching out into other debuginfo-related tasks. As far as naming goes, "debuginfo" usually refers to DWARF metadata. But this tool isn't DWARF-specific, so that would be confusing IMO. I also agree with Jiri that re-using a generic name which already has another meaning would add to the confusion. The goal of this tool is to fix stack traces, so how about "stackfix"? usage: stackfix [options] -f, --frame-pointers Validate frame pointer usage -c, --cfi Validate CFI if it exists -g, --cfi-gen Generate CFI if it doesn't already exist The options could all be combinable. -- Josh