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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3F340C433EF for ; Tue, 14 Jun 2022 12:29:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BkroF12tQp8BQPoPEnqA97pVZrZCNz+limdsyZO3o+8=; b=JQ9kQRmQWxc4pI q0GtYg8StVXQ3OowC7sRTh7Q3iTFFqtCv0mP5N3JOSY5+qpKuHKG2vi90AiRjfTsNo63h2yBXCjhk IbAh665NPoWkFxiCOuazPNozWlvpTcmx9iv9WLhovFa9YlZv1xBLfhtWuw0MBbsASgK0OqCiN6W76 15lXVfcIpk0Jf0UDTbcbZjjuldaV2qx2CwI3qLt5AVqNLrWPyAo5BajO+ZoFjo8vS8j2bZ0xW+pB5 URiVdvVtilHqBkbwsVckpMG4prcVYOyiE+htN3UsDDuPv/02I2elQRLeWAZSxdqjKBj3EDL/tmjh4 7xQQrRr/sj5j8YB0P2GA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o15fW-009WrN-TM; Tue, 14 Jun 2022 12:29:15 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o15fP-009Wmy-7t; Tue, 14 Jun 2022 12:29:09 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 89823614F3; Tue, 14 Jun 2022 12:29:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD278C3411B; Tue, 14 Jun 2022 12:29:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655209746; bh=WwkV+wdhEGuk3aWMSKuKEvN2vXm13Pz6A3nxRaMWcYw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GmZZTh5AcjCClrHWs3VzPNS3NDB/fZYoF2wqNVQLdlvmWn9h0BDbVxVX3F04Uo3T8 eZyS1EnQ3QoAm3dhVIyUgjxTAre/c/32LTAFZXWs3tsKqr+GwjbmeRA9amxGaF8ufK 6OSafRU0IFiFK/L7SRc97y7385zCc3ibb6HHdRQipLSGFivEgrJ4udUTBdFWQ3oQLH 9AEopySQG40sZQUbz4wkez2DOEuhgPETohgRdoIUOq/KteuhQgDpSBf2ZK4CQUpA2z 3jydwp78L52Rsmb7dhGJLTuOBiU1Ge15Q/P7JnSLdFb3CUPVyd/Jwyi38eAm6G9BT/ bAYTFHxUI9fMQ== Date: Tue, 14 Jun 2022 15:26:59 +0300 From: Jarkko Sakkinen To: Luis Chamberlain Cc: "Russell King (Oracle)" , "Edgecombe, Rick P" , Christoph Hellwig , Jarkko Sakkinen , linux-kernel@vger.kernel.org, Nathaniel McCallum , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , "Naveen N. Rao" , Anil S Keshavamurthy , Masami Hiramatsu , Steven Rostedt , Kees Cook , "Peter Zijlstra (Intel)" , Nathan Chancellor , Josh Poimboeuf , Mark Rutland , "Eric W. Biederman" , Marco Elver , Dan Li , Sami Tolvanen , Song Liu , Ard Biesheuvel , Nick Desaulniers , Linus Walleij , Chen Zhongjin , Nicolas Pitre , Mark Brown , Luis Machado , Geert Uytterhoeven , Joey Gouly , Masahiro Yamada , Andrew Morton , Andrey Konovalov , Kefeng Wang , Atsushi Nemoto , Guenter Roeck , Dave Anglin , Christophe Leroy , Alexei Starovoitov , Nicholas Piggin , Daniel Axtens , "Aneesh Kumar K.V" , Jordan Niethe , Guo Ren , Anup Patel , Atish Patra , Changbin Du , Heiko Stuebner , Liao Chang , Philipp Tomsich , Wu Caize , Emil Renner Berthing , Alexander Egorenkov , Thomas Richter , Tobias Huschle , Ilya Leoshkevich , Tom Lendacky , Daniel Bristot de Oliveira , Michael Roth , "Kirill A. Shutemov" , Javier Martinez Canillas , Miroslav Benes , =?iso-8859-1?Q?Andr=E9?= Almeida , Tiezhu Yang , Dmitry Torokhov , Aaron Tomlin , linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-modules@vger.kernel.org Subject: Re: [PATCH] kprobes: Enable tracing for mololithic kernel images Message-ID: References: <20220608000014.3054333-1-jarkko@profian.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220614_052907_412667_E69B5F05 X-CRM114-Status: GOOD ( 22.71 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Thu, Jun 09, 2022 at 06:44:45AM -0700, Luis Chamberlain wrote: > On Thu, Jun 09, 2022 at 08:47:38AM +0100, Russell King (Oracle) wrote: > > On Wed, Jun 08, 2022 at 02:59:27AM +0300, Jarkko Sakkinen wrote: > > > diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile > > > index 553866751e1a..d2bb954cd54f 100644 > > > --- a/arch/arm/kernel/Makefile > > > +++ b/arch/arm/kernel/Makefile > > > @@ -44,6 +44,11 @@ obj-$(CONFIG_CPU_IDLE) += cpuidle.o > > > obj-$(CONFIG_ISA_DMA_API) += dma.o > > > obj-$(CONFIG_FIQ) += fiq.o fiqasm.o > > > obj-$(CONFIG_MODULES) += armksyms.o module.o > > > +ifeq ($(CONFIG_MODULES),y) > > > +obj-y += module_alloc.o > > > +else > > > +obj-$(CONFIG_KPROBES) += module_alloc.o > > > +endif > > > > Doesn't: > > > > obj-$(CONFIG_MODULES) += module_alloc.o > > obj-$(CONFIG_KPROBES) += module_alloc.o > > That just begs for a new kconfig symbol for the object, and for > the object then to be built with it. > > The archs which override the default can use ARCH_HAS_VM_ALLOC_EXEC. > Please note that the respective free is important as well and its > not clear if we need an another define for the free. Someone has > to do that work. We want to ensure to noexec the code on free and > this can vary on each arch. Let me check if I understand this (not 100% sure). So if arch define ARCH_HAS_VMALLOC_EXEC, then this would set config flag CONFIG_VMALLOC_EXEC, which would be used to include the compilation unit? BR, Jarkko _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4AF5CCA488 for ; Tue, 14 Jun 2022 12:32:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243635AbiFNMbU (ORCPT ); Tue, 14 Jun 2022 08:31:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356489AbiFNM3L (ORCPT ); Tue, 14 Jun 2022 08:29:11 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC85937A1E; Tue, 14 Jun 2022 05:29:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AB27FB8186F; Tue, 14 Jun 2022 12:29:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD278C3411B; Tue, 14 Jun 2022 12:29:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655209746; bh=WwkV+wdhEGuk3aWMSKuKEvN2vXm13Pz6A3nxRaMWcYw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GmZZTh5AcjCClrHWs3VzPNS3NDB/fZYoF2wqNVQLdlvmWn9h0BDbVxVX3F04Uo3T8 eZyS1EnQ3QoAm3dhVIyUgjxTAre/c/32LTAFZXWs3tsKqr+GwjbmeRA9amxGaF8ufK 6OSafRU0IFiFK/L7SRc97y7385zCc3ibb6HHdRQipLSGFivEgrJ4udUTBdFWQ3oQLH 9AEopySQG40sZQUbz4wkez2DOEuhgPETohgRdoIUOq/KteuhQgDpSBf2ZK4CQUpA2z 3jydwp78L52Rsmb7dhGJLTuOBiU1Ge15Q/P7JnSLdFb3CUPVyd/Jwyi38eAm6G9BT/ bAYTFHxUI9fMQ== Date: Tue, 14 Jun 2022 15:26:59 +0300 From: Jarkko Sakkinen To: Luis Chamberlain Cc: "Russell King (Oracle)" , "Edgecombe, Rick P" , Christoph Hellwig , Jarkko Sakkinen , linux-kernel@vger.kernel.org, Nathaniel McCallum , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , "Naveen N. Rao" , Anil S Keshavamurthy , Masami Hiramatsu , Steven Rostedt , Kees Cook , "Peter Zijlstra (Intel)" , Nathan Chancellor , Josh Poimboeuf , Mark Rutland , "Eric W. Biederman" , Marco Elver , Dan Li , Sami Tolvanen , Song Liu , Ard Biesheuvel , Nick Desaulniers , Linus Walleij , Chen Zhongjin , Nicolas Pitre , Mark Brown , Luis Machado , Geert Uytterhoeven , Joey Gouly , Masahiro Yamada , Andrew Morton , Andrey Konovalov , Kefeng Wang , Atsushi Nemoto , Guenter Roeck , Dave Anglin , Christophe Leroy , Alexei Starovoitov , Nicholas Piggin , Daniel Axtens , "Aneesh Kumar K.V" , Jordan Niethe , Guo Ren , Anup Patel , Atish Patra , Changbin Du , Heiko Stuebner , Liao Chang , Philipp Tomsich , Wu Caize , Emil Renner Berthing , Alexander Egorenkov , Thomas Richter , Tobias Huschle , Ilya Leoshkevich , Tom Lendacky , Daniel Bristot de Oliveira , Michael Roth , "Kirill A. Shutemov" , Javier Martinez Canillas , Miroslav Benes , =?iso-8859-1?Q?Andr=E9?= Almeida , Tiezhu Yang , Dmitry Torokhov , Aaron Tomlin , linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-modules@vger.kernel.org Subject: Re: [PATCH] kprobes: Enable tracing for mololithic kernel images Message-ID: References: <20220608000014.3054333-1-jarkko@profian.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: On Thu, Jun 09, 2022 at 06:44:45AM -0700, Luis Chamberlain wrote: > On Thu, Jun 09, 2022 at 08:47:38AM +0100, Russell King (Oracle) wrote: > > On Wed, Jun 08, 2022 at 02:59:27AM +0300, Jarkko Sakkinen wrote: > > > diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile > > > index 553866751e1a..d2bb954cd54f 100644 > > > --- a/arch/arm/kernel/Makefile > > > +++ b/arch/arm/kernel/Makefile > > > @@ -44,6 +44,11 @@ obj-$(CONFIG_CPU_IDLE) += cpuidle.o > > > obj-$(CONFIG_ISA_DMA_API) += dma.o > > > obj-$(CONFIG_FIQ) += fiq.o fiqasm.o > > > obj-$(CONFIG_MODULES) += armksyms.o module.o > > > +ifeq ($(CONFIG_MODULES),y) > > > +obj-y += module_alloc.o > > > +else > > > +obj-$(CONFIG_KPROBES) += module_alloc.o > > > +endif > > > > Doesn't: > > > > obj-$(CONFIG_MODULES) += module_alloc.o > > obj-$(CONFIG_KPROBES) += module_alloc.o > > That just begs for a new kconfig symbol for the object, and for > the object then to be built with it. > > The archs which override the default can use ARCH_HAS_VM_ALLOC_EXEC. > Please note that the respective free is important as well and its > not clear if we need an another define for the free. Someone has > to do that work. We want to ensure to noexec the code on free and > this can vary on each arch. Let me check if I understand this (not 100% sure). So if arch define ARCH_HAS_VMALLOC_EXEC, then this would set config flag CONFIG_VMALLOC_EXEC, which would be used to include the compilation unit? BR, Jarkko 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 Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8E3E3C433EF for ; Tue, 14 Jun 2022 22:08:53 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4LN2dc0j3Fz3fY9 for ; Wed, 15 Jun 2022 08:08:52 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=GmZZTh5A; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2604:1380:4641:c500::1; helo=dfw.source.kernel.org; envelope-from=jarkko@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=GmZZTh5A; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (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 4LMnmj5hCwz307C for ; Tue, 14 Jun 2022 22:29:09 +1000 (AEST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 89823614F3; Tue, 14 Jun 2022 12:29:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD278C3411B; Tue, 14 Jun 2022 12:29:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655209746; bh=WwkV+wdhEGuk3aWMSKuKEvN2vXm13Pz6A3nxRaMWcYw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GmZZTh5AcjCClrHWs3VzPNS3NDB/fZYoF2wqNVQLdlvmWn9h0BDbVxVX3F04Uo3T8 eZyS1EnQ3QoAm3dhVIyUgjxTAre/c/32LTAFZXWs3tsKqr+GwjbmeRA9amxGaF8ufK 6OSafRU0IFiFK/L7SRc97y7385zCc3ibb6HHdRQipLSGFivEgrJ4udUTBdFWQ3oQLH 9AEopySQG40sZQUbz4wkez2DOEuhgPETohgRdoIUOq/KteuhQgDpSBf2ZK4CQUpA2z 3jydwp78L52Rsmb7dhGJLTuOBiU1Ge15Q/P7JnSLdFb3CUPVyd/Jwyi38eAm6G9BT/ bAYTFHxUI9fMQ== Date: Tue, 14 Jun 2022 15:26:59 +0300 From: Jarkko Sakkinen To: Luis Chamberlain Subject: Re: [PATCH] kprobes: Enable tracing for mololithic kernel images Message-ID: References: <20220608000014.3054333-1-jarkko@profian.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailman-Approved-At: Wed, 15 Jun 2022 08:01:46 +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: Dan Li , Heiko Stuebner , Linus Walleij , Paul Mackerras , Alexander Gordeev , Javier Martinez Canillas , Christoph Hellwig , Geert Uytterhoeven , Catalin Marinas , Christian Borntraeger , Guenter Roeck , =?iso-8859-1?Q?Andr=E9?= Almeida , Michael Roth , Nicholas Piggin , Thomas Gleixner , Andrey Konovalov , Nick Desaulniers , linux-kernel@vger.kernel.org, Masami Hiramatsu , Wu Caize , Guo Ren , Andrew Morton , Mark Rutland , Luis Machado , Atsushi Nemoto , D ave Hansen , Joey Gouly , "James E.J. Bottomley" , Song Liu , linux-s390@vger.kernel.org, Ilya Leoshkevich , Anup Patel , Helge Deller , Anil S Keshavamurthy , Sven Schnelle , Tom Lendacky , Vasily Gorbik , Philipp Tomsich , Dave Anglin , linux-arm-kernel@lists.infradead.org, Daniel Axtens , Nicolas Pitre , "Eric W. Biederman" , "Aneesh Kumar K.V" , "Edgecombe, Rick P" , Daniel Bristot de Oliveira , Kefeng Wang , Emil Renner Berthing , Jordan Niethe , Atish Patra , A lexei Starovoitov , Will Deacon , Masahiro Yamada , Jarkko Sakkinen , Sami Tolvanen , "Naveen N. Rao" , Marco Elver , Kees Cook , Steven Rostedt , Nathan Chancellor , Mark Brown , Borislav Petkov , Alexander Egorenkov , Thomas Bogendoerfer , linux-parisc@vger.kernel.org, Nathaniel McCallum , Dmitry Torokhov , "David S. Miller" , "Kirill A. Shutemov" , Tobias Huschle , "Peter Zijlstra \(Intel\)" , "H. Peter Anvin" , sparclinux@vger.kernel.org, Tiezhu Yang , Miroslav Benes , Chen Zhongjin , Ard Biesheuvel , x86@kernel.org, "Russell King \(Oracle\)" , linux-riscv@lists.infradead.org, Ingo Molnar , Aaron Tomlin , Albert Ou , Heiko Carstens , Liao Chang , Paul Walmsley , Josh Poimboeuf , Thomas Richter , linux-mips@vger.kernel.org, Changbin Du , Palmer Dabbelt , linuxppc-dev@lists.ozlabs.org, linux-modules@vger.kernel.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Thu, Jun 09, 2022 at 06:44:45AM -0700, Luis Chamberlain wrote: > On Thu, Jun 09, 2022 at 08:47:38AM +0100, Russell King (Oracle) wrote: > > On Wed, Jun 08, 2022 at 02:59:27AM +0300, Jarkko Sakkinen wrote: > > > diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile > > > index 553866751e1a..d2bb954cd54f 100644 > > > --- a/arch/arm/kernel/Makefile > > > +++ b/arch/arm/kernel/Makefile > > > @@ -44,6 +44,11 @@ obj-$(CONFIG_CPU_IDLE) += cpuidle.o > > > obj-$(CONFIG_ISA_DMA_API) += dma.o > > > obj-$(CONFIG_FIQ) += fiq.o fiqasm.o > > > obj-$(CONFIG_MODULES) += armksyms.o module.o > > > +ifeq ($(CONFIG_MODULES),y) > > > +obj-y += module_alloc.o > > > +else > > > +obj-$(CONFIG_KPROBES) += module_alloc.o > > > +endif > > > > Doesn't: > > > > obj-$(CONFIG_MODULES) += module_alloc.o > > obj-$(CONFIG_KPROBES) += module_alloc.o > > That just begs for a new kconfig symbol for the object, and for > the object then to be built with it. > > The archs which override the default can use ARCH_HAS_VM_ALLOC_EXEC. > Please note that the respective free is important as well and its > not clear if we need an another define for the free. Someone has > to do that work. We want to ensure to noexec the code on free and > this can vary on each arch. Let me check if I understand this (not 100% sure). So if arch define ARCH_HAS_VMALLOC_EXEC, then this would set config flag CONFIG_VMALLOC_EXEC, which would be used to include the compilation unit? BR, Jarkko