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=-5.3 required=3.0 tests=BAYES_00,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 72932C433E1 for ; Mon, 13 Jul 2020 22:41:45 +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 082EB20DD4 for ; Mon, 13 Jul 2020 22:41:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="MGB0O4we" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 082EB20DD4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk 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 4B5JY30R45zDqZp for ; Tue, 14 Jul 2020 08:41:43 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=armlinux.org.uk (client-ip=2001:4d48:ad52:32c8:5054:ff:fe00:142; helo=pandora.armlinux.org.uk; envelope-from=linux+linuxppc-dev=lists.ozlabs.org@armlinux.org.uk; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.a=rsa-sha256 header.s=pandora-2019 header.b=MGB0O4we; dkim-atps=neutral X-Greylist: delayed 336 seconds by postgrey-1.36 at bilbo; Tue, 14 Jul 2020 04:43:41 AEST Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4B5CGP4LrhzDqXd for ; Tue, 14 Jul 2020 04:43:41 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: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=izT7D4BZHyXeVi8XHo87poYQahK8brlBAQtUr8PXfzU=; b=MGB0O4weQY9OR5THZG+vZcYfR 0DP7t4zRcjnC9YpMOqp7WrTn33DRFGILHP9Dj7O344nXy/8OBUe+7VOomwOANYfrAfxMpi6EFfHz6 zFfHAmxtmn+vk+iPhBiHePVl4uYzhHupe35XoIC6u11nfRsIsnTP5Eds31WjTQFq9/Z+qponijvXX N5LHPreRQgq9hqBTpMpk7oFLvIVE/lWHg4dFbxJ2XSCVPvwilE4e+8kZkXbMtu0FNJhg5ZAT8fhdH BeUuupifhfuhwu2/725PLq4W3mT49KGHj4MB9XlUUnvJbFn+7Zb2im4nZ3TsNt7ysMg7H2r0SRKD3 tEiluC6Mw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:39086) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jv3Hf-0004F2-T8; Mon, 13 Jul 2020 19:34:35 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1jv3HG-0006VW-SX; Mon, 13 Jul 2020 19:34:10 +0100 Date: Mon, 13 Jul 2020 19:34:10 +0100 From: Russell King - ARM Linux admin To: Jarkko Sakkinen Subject: Re: [PATCH 1/3] module: Rename module_alloc() to text_alloc() and move to kernel proper Message-ID: <20200713183410.GY1551@shell.armlinux.org.uk> References: <20200713182030.1418041-1-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200713182030.1418041-1-jarkko.sakkinen@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Mailman-Approved-At: Tue, 14 Jul 2020 08:35:04 +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 , Yonghong Song , Thomas Gleixner , Jiri Kosina , Anup Patel , linux-kernel@vger.kernel.org, Philipp Rudo , Torsten Duwe , Masami Hiramatsu , Andrew Morton , Mark Rutland , "James E.J. Bottomley" , Vincent Chen , "open list:S390" , Joe Lawrence , Helge Deller , John Fastabend , Anil S Keshavamurthy , Andrey Ryabinin , Iurii Zaikin , Andrii Nakryiko , Vasily Gorbik , "moderated list:ARM PORT" , Daniel Axtens , Damien Le Moal , Peter Oberparleiter , Sean Christopherson , Martin KaFai Lau , Song Liu , Paul Walmsley , Heiko Carstens , Alexei Starovoitov , Atish Patra , Will Deacon , Daniel Borkmann , Masahiro Yamada , Nayna Jain , Ley Foon Tan , Christian Borntraeger , Dmitry Vyukov , 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 , "open list:SPARC + UltraSPARC \(sparc/sparc64\)" , Sandipan Das , "H. Peter Anvin" , Amit Daniel Kachhap , Tiezhu Yang , Miroslav Benes , Jiri Olsa , Ard Biesheuvel , Vincenzo Frascino , Anders Roxell , Sven Schnelle , "maintainer:X86 ARCHITECTURE \(32-BIT AND 64-BIT\)" , "open list:RISC-V ARCHITECTURE" , Mike Rapoport , Ingo Molnar , Albert Ou , "Paul E. McKenney" , Josh Poimboeuf , KP Singh , Gerald Schaefer , Nick Hu , "open list:BPF JIT for MIPS \(32-BIT AND 64-BIT\)" , "open list:MIPS" , Sergey Senozhatsky , 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 Mon, Jul 13, 2020 at 09:19:37PM +0300, Jarkko Sakkinen wrote: > 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. I'm not sure this is a good idea for 32-bit ARM. The code you are moving for 32-bit ARM is quite specific to module use in that it also supports allocating from the vmalloc area, where the module code knows to add PLT entries. If the other proposed users of this text_alloc() do not have the logic to add PLT entries when branches between kernel code and this allocation are not reachable by, e.g. a 26-bit signed offset for 32-bit ARM code, then this code is not suitable for that use. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!