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.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 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 8198FC433DF for ; Fri, 10 Jul 2020 13:22:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5B3B820772 for ; Fri, 10 Jul 2020 13:22:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727942AbgGJNWs (ORCPT ); Fri, 10 Jul 2020 09:22:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:55932 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726774AbgGJNWs (ORCPT ); Fri, 10 Jul 2020 09:22:48 -0400 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 42E9E20748; Fri, 10 Jul 2020 13:22:45 +0000 (UTC) Date: Fri, 10 Jul 2020 09:22:43 -0400 From: Steven Rostedt To: Masami Hiramatsu Cc: Peter Zijlstra , Jarkko Sakkinen , linux-kernel@vger.kernel.org, Andi Kleen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , "Naveen N. Rao" , Anil S Keshavamurthy , "David S. Miller" , Andrew Morton , "Aneesh Kumar K.V" , Will Deacon , Kees Cook , Arnd Bergmann , Alexandre Ghiti , Masahiro Yamada , Sami Tolvanen , Peter Collingbourne , Krzysztof Kozlowski , Frederic Weisbecker , Stephen Boyd , Alexei Starovoitov , Mike Rapoport , Sean Christopherson , Jiri Olsa , hch@lst.de Subject: Re: [PATCH RFC] kprobes: Remove MODULES dependency Message-ID: <20200710092243.076e9b44@oasis.local.home> In-Reply-To: <20200710221802.da2f4cf077ce1bb51c7e11ca@kernel.org> References: <20200709234521.194005-1-jarkko.sakkinen@linux.intel.com> <20200710193257.4eeb19e9cd042d99cbca7f9a@kernel.org> <20200710113238.GH4800@hirez.programming.kicks-ass.net> <20200710221802.da2f4cf077ce1bb51c7e11ca@kernel.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 10 Jul 2020 22:18:02 +0900 Masami Hiramatsu wrote: > > Agreed. As far as I know, ftrace and bpf also depends on module_alloc(), > so text_alloc() will help them too. > Yes please. arch/x86/kernel/ftrace.c: #ifdef CONFIG_MODULES #include /* Module allocation simplifies allocating memory for code */ static inline void *alloc_tramp(unsigned long size) { return module_alloc(size); } static inline void tramp_free(void *tramp) { module_memfree(tramp); } #else /* Trampolines can only be created if modules are supported */ static inline void *alloc_tramp(unsigned long size) { return NULL; } static inline void tramp_free(void *tramp) { } #endif -- Steve