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.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 D101BC0650F for ; Thu, 8 Aug 2019 07:45:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A72FA2171F for ; Thu, 8 Aug 2019 07:45:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ha5wQch0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731337AbfHHHpJ (ORCPT ); Thu, 8 Aug 2019 03:45:09 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:37744 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726721AbfHHHpJ (ORCPT ); Thu, 8 Aug 2019 03:45:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=33Ef3Sm7bpdfJwlyTclvqrfYhhmgGkQP65uyo6ml4Es=; b=ha5wQch0HRlEFijHatH94E6n+ M6IfVEh8p0GGxYincxjuS/UxV5rB1M3RR49E+HU/qbJsrW4PlEyeLjAKK6mP3Id6uAFlIqqOspQOu RlqYAZpw8+GPi0BlsToQxbEm7nUF1waXZ2irBUVTUl0urWZkaSXoC+R3vcRS/h54ldRYTwhy3SRwm CD0UmiJaGme30DAtNmj3uNTVWIEqLhAFQkpoTHTandVGpwK/cwWJhPaOZQXfKNGye2X9Wucbj4cQc FboTbJrZJVVrsu9VVV4oA+S9Z7745mbFXF9T02fpDUDc/Vl3a7NgWGCVgNRKEp0WYJAFapaZriWlE xtTqKlV+g==; Received: from hch by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1hvd6h-0000CR-CS; Thu, 08 Aug 2019 07:45:07 +0000 Date: Thu, 8 Aug 2019 00:45:07 -0700 From: Christoph Hellwig To: Arnd Bergmann Cc: Masahiro Yamada , Linux Kbuild mailing list , Sam Ravnborg , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , bpf@vger.kernel.org, Linux Kernel Mailing List , Networking , Amit Pundir , David Howells Subject: Re: [RFC PATCH] kbuild: re-implement detection of CONFIG options leaked to user-space Message-ID: <20190808074507.GA22720@infradead.org> References: <20190806043729.5562-1-yamada.masahiro@socionext.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Aug 06, 2019 at 11:00:19AM +0200, Arnd Bergmann wrote: > > I was playing with sed yesterday, but the resulted code might be unreadable. > > > > Sed scripts tend to be somewhat unreadable. > > I just wondered which language is appropriate for this? > > Maybe perl, or what else? I am not good at perl, though. > > I like the sed version, in particular as it seems to do the job and > I'm not volunteering to write it in anything else. Did anyone not like sed? I have to say I do like scripts using sed and awk because they are fairly readable and avoid dependencies on "big" scripting language and their optional modules that sooner or later get pulled in. > This one is nontrivial, since it defines two incompatible layouts for > this structure, > and the fdpic version is currently not usable at all from user space. Also, > the definition breaks configurations that have both CONFIG_BINFMT_ELF > and CONFIG_BINFMT_ELF_FDPIC enabled, which has become possible > with commit 382e67aec6a7 ("ARM: enable elf_fdpic on systems with an MMU"). > > The best way forward I see is to duplicate the structure definition, adding > a new 'struct elf_fdpic_prstatus', and using that in fs/binfmt_elf_fdpic.c. > The same change is required in include/linux/elfcore-compat.h. Yeah, this is a mess. David Howells suggested something similar when I brought the issue to his attention last time.