From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [PATCH v1 7/7] tools: add userspace linker table sandbox Date: Mon, 22 Aug 2016 17:28:42 -0700 Message-ID: <201608230028.u7N0SneR020502__18693.3797937401$1471912501$gmane$org@mail.zytor.com> References: <1471642454-5679-1-git-send-email-mcgrof@kernel.org> <1471642875-5957-1-git-send-email-mcgrof@kernel.org> <1471642875-5957-8-git-send-email-mcgrof@kernel.org> <20160823000739.GX3296@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from terminus.zytor.com ([198.137.202.10]:38616 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752089AbcHWAer (ORCPT ); Mon, 22 Aug 2016 20:34:47 -0400 In-Reply-To: <20160823000739.GX3296@wotan.suse.de> Sender: platform-driver-x86-owner@vger.kernel.org List-ID: To: "Luis R. Rodriguez" , Kees Cook , Josh Poimboeuf , Arnaldo Carvalho de Melo Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Russell King - ARM Linux , mhiramat@kernel.org, Masami Hiramatsu , jbaron@akamai.com, Heiko Carstens , ananth@linux.vnet.ibm.com, anil.s.keshavamurthy@intel.com, "David S. Miller" , Miao Steven , "x86@kernel.org" , Andy Lutomirski , Linus Torvalds , Greg KH , Rusty Russell , "gnomes@lxorguk.ukuu.org.uk" , Alan Cox , David Woodhouse , Arnd Vrabel ,Konrad Rzeszutek Wilk ,Michael Brown ,Juergen Gross ,Andrew Cooper ,Andy Shevchenko ,Paul Gortmaker ,"xen-devel@lists.xensource.com" ,Andi Kleen ,pali.rohar@gmail.com,dvhart@infradead.org,platform-driver-x86@vger.kernel.org,Michal Marek ,Rasmus Villemoes ,Jiri Kosina ,=?UTF-8?B?7KGw6rK966+8?= ,linux-kbuild ,Tony Luck ,Andrew Morton ,linux-ia64@vger.kernel.org,"linux-arm-kernel@lists.infradead.org" ,linux-sh ,sparclinux ,Catalin Marinas ,Will Deacon ,Ste! ven Rostedt ,Jani Nikula ,Mauro Carvalho Chehab ,markus.heiser@darmarit.de,jolsa@kernel.org,Mark Salter ,Chris Zankel ,Max Filippov ,linux-xtensa@linux-xtensa.org,Paul Mackerras ,Michael Ellerman ,James Bottomley Message-ID: <58F06CEA-AEB3-4ED7-8211-95F402C9D3D3@zytor.com> On August 22, 2016 5:07:39 PM PDT, "Luis R. Rodriguez" wrote: >On Fri, Aug 19, 2016 at 03:31:47PM -0700, Kees Cook wrote: >> On Fri, Aug 19, 2016 at 2:41 PM, wrote: >> > From: "Luis R. Rodriguez" >> > >> > Add a userspace sandbox to allow easy experimentation and >> > test extensions with linker tables, section ranges and the >> > new section core definitions. >> > >> > The userspace sandbox tries to mimic the Linux kernel development >> > flow as much as possible, it however relies on and uses libc. >Support >> > is currently only provided to x86_64. >> > >> > v4: this patch is new in this series -- added to the kenrel as >> > suggested by Boris, as otherwise it'd be really hard to keep >> > an external userspace repository in sync. >> > >> > Signed-off-by: Luis R. Rodriguez >> > --- >> > Documentation/sections/linker-tables.rst | 4 +- >> > MAINTAINERS | 1 + >> > include/linux/tables.h | 5 +- >> > tools/Makefile | 3 +- >> > .../arch/x86/include/generated/asm/section-core.h | 1 + >> > tools/arch/x86/include/generated/ranges.h | 1 + >> > tools/arch/x86/include/generated/tables.h | 1 + >> > tools/include/asm-generic/ranges.h | 103 ++++ >> > tools/include/asm-generic/section-core.h | 341 >+++++++++++ >> > tools/include/asm-generic/tables.h | 50 ++ >> >> Aren't a bunch of these files exact duplicates of the headers in >include/linux? > >Indeed... This a userspace tools/ architecture decision that was made >long ago, >so its not up to me, I am just following the strategy devised and >picked up. >Refer to 7d7d1bf1d1dabe435ef50efb051724b8664749cb ("perf bench: Copy >kernel >files needed to build mem{cpy,set} x86_64 benchmarks") for an example >of >previous similar work. By sharing header files this enable more tools/ >to be hacked on. > > Luis I think this is a legacy from before the uapi change that should really be fixed. If we need to export additional kernel structures for the tools, we could define a third level of we really need it. -- Sent from my Android device with K-9 Mail. Please excuse brevity and formatting.