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=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 14E52C433E4 for ; Fri, 24 Jul 2020 08:29:18 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BFFE3206EB for ; Fri, 24 Jul 2020 08:29:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BFFE3206EB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4BCj6M3KPDzDrRR for ; Fri, 24 Jul 2020 18:29:15 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.intel.com (client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=jarkko.sakkinen@linux.intel.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4BCgyD6sJ5zDsNT for ; Fri, 24 Jul 2020 17:37:07 +1000 (AEST) IronPort-SDR: hgLNAhTz9fIB412AVlL3MacOmdQ0ouMvFs/BEHgYGt0AmuGVnD2LiLiheetx42T3Q6JMvgxTEY yJ4rQ1FdKZKA== X-IronPort-AV: E=McAfee;i="6000,8403,9691"; a="235550133" X-IronPort-AV: E=Sophos;i="5.75,389,1589266800"; d="scan'208";a="235550133" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2020 00:37:02 -0700 IronPort-SDR: TAB03xecSlI4basjrQIy2hbhaeXXyXKAkMJFtaNhpLJDNY3l0q2EBJc0tt5g94JWjrS8//u4J3 0Kk+Cc01yUeA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,389,1589266800"; d="scan'208";a="288909362" Received: from cbuerkle-mobl1.ger.corp.intel.com (HELO localhost) ([10.249.36.184]) by orsmga006.jf.intel.com with ESMTP; 24 Jul 2020 00:36:23 -0700 Date: Fri, 24 Jul 2020 10:36:21 +0300 From: Jarkko Sakkinen To: Ard Biesheuvel Subject: Re: [PATCH v2 1/3] module: Rename module_alloc() to text_alloc() and move to kernel proper Message-ID: <20200724073621.GC1872662@linux.intel.com> References: <20200714094625.1443261-1-jarkko.sakkinen@linux.intel.com> <20200714094625.1443261-2-jarkko.sakkinen@linux.intel.com> <20200716184909.Horde.JVRLLcKix_jhrJfiQYRbbQ1@messagerie.si.c-s.fr> <20200723015127.GE45081@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Mailman-Approved-At: Fri, 24 Jul 2020 18:27:16 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Catalin Marinas , Kefeng Wang , Paul Mackerras , Zong Li , Andi Kleen , Paul Burton , Vincent Whitchurch , Petr Mladek , Brian Gerst , Andy Lutomirski , Thomas Gleixner , Jiri Kosina , Anup Patel , Linux Kernel Mailing List , Philipp Rudo , Torsten Duwe , Masami Hiramatsu , Andrew Morton , Mark Rutland , "James E.J. Bottomley" , Vincent Chen , Omar Sandoval , "open list:S390" , Joe Lawrence , Helge Deller , John Fastabend , Anil S Keshavamurthy , Yonghong Song , Iurii Zaikin , Andrii Nakryiko , Thomas Huth , Vasily Gorbik , "moderated list:ARM PORT" , Daniel Axtens , Damien Le Moal , Martin KaFai Lau , Song Liu , Josh Poimboeuf , Heiko Carstens , Alexei Starovoitov , Atish Patra , Will Deacon , Daniel Borkmann , Masahiro Yamada , Nayna Jain , Ley Foon Tan , Christian Borntraeger , Sami Tolvanen , "Naveen N. Rao" , Mao Han , Marco Elver , Steven Rostedt , Babu Moger , Borislav Petkov , Greentime Hu , Ben Dooks , Guan Xuetao , Thomas Bogendoerfer , "open list:PARISC ARCHITECTURE" , Jessica Yu , "open list:BPF JIT for MIPS 32-BIT AND 64-BIT" , "David S. Miller" , Thiago Jung Bauermann , Peter Zijlstra , David Howells , Amit Daniel Kachhap , Sandipan Das , "H. Peter Anvin" , "open list:SPARC + UltraSPARC sparc/sparc64" , "open list:RISC-V ARCHITECTURE" , Miroslav Benes , Jiri Olsa , Tiezhu Yang , Vincenzo Frascino , Anders Roxell , Sven Schnelle , "maintainer:X86 ARCHITECTURE 32-BIT AND 64-BIT" , Russell King , Mike Rapoport , Ingo Molnar , Albert Ou , "Paul E. McKenney" , Paul Walmsley , KP Singh , Dmitry Vyukov , Nick Hu , "open list:BPF JIT for MIPS 32-BIT AND 64-BIT" , "open list:MIPS" , Palmer Dabbelt , "open list:LINUX FOR POWERPC 32-BIT AND 64-BIT" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Thu, Jul 23, 2020 at 03:42:09PM +0300, Ard Biesheuvel wrote: > On Thu, 23 Jul 2020 at 04:52, Jarkko Sakkinen > wrote: > > > > On Thu, Jul 16, 2020 at 06:49:09PM +0200, Christophe Leroy wrote: > > > Jarkko Sakkinen a écrit : > > > > > > > Rename module_alloc() to text_alloc() and module_memfree() to > > > > text_memfree(), and move them to kernel/text.c, which is unconditionally > > > > compiled to the kernel proper. This allows kprobes, ftrace and bpf to > > > > allocate space for executable code without requiring to compile the modules > > > > support (CONFIG_MODULES=y) in. > > > > > > You are not changing enough in powerpc to have this work. > > > On powerpc 32 bits (6xx), when STRICT_KERNEL_RWX is selected, the vmalloc > > > space is set to NX (no exec) at segment level (ie by 256Mbytes zone) unless > > > CONFIG_MODULES is selected. > > > > > > Christophe > > > > This has been deduced down to: > > > > https://lore.kernel.org/lkml/20200717030422.679972-1-jarkko.sakkinen@linux.intel.com/ > > > > I.e. not intruding PPC anymore :-) > > > > Ok, so after the elaborate discussion we had between Jessica, Russell, > Peter, Will, Mark, you and myself, where we pointed out that > a) a single text_alloc() abstraction for bpf, kprobes and ftrace does > not fit other architectures very well, and > b) that module_alloc() is not suitable as a default to base text_alloc() on, In the latest iteration (v5) it is conditionally available only if arch defines and fallback has been removed. > you went ahead and implemented that anyway, but only cc'ing Peter, > akpm, Masami and the mm list this time? No problems with that. Actually each patch gets everything that get_maintainer.pl gives with a cc cmd script, not just the ones explicitly listed in the patch. Should I explicitly CC you to the next version? I'm happy to grow the list when requested. > Sorry, but that is not how it works. Once people get pulled into a > discussion, you cannot dismiss them or their feedback like that and go > off and do your own thing anyway. Generic features like this are > tricky to get right, and it will likely take many iterations and input > from many different people. Sure. I'm not expecting this move quickly. I don't think I've at least purposely done that. As you said it's tricky to get this right. /Jarkko