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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 DE704C433DF for ; Fri, 10 Jul 2020 11:33:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B84B42077D for ; Fri, 10 Jul 2020 11:33:17 +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="1j/lpT5l" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728090AbgGJLdP (ORCPT ); Fri, 10 Jul 2020 07:33:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726725AbgGJLdM (ORCPT ); Fri, 10 Jul 2020 07:33:12 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EA94C08C5CE for ; Fri, 10 Jul 2020 04:33:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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; bh=IzwSRyxYCdIkkpT3xXSV+0IhLvbrebrmGw4yzmirZDw=; b=1j/lpT5lTX5RmhOWQcLYvw7mib 0nojEMxmrZrmhzS8OzsSyPnTF4zAiq40F83mmMBV1P9/+EZtJ4SSGkShTeiFOeOPk5UaV9vWuHb1t wdyOvMqPLSPHkncVLAjD76aBqclCGDCT+hIp/QM1k6syv2r2VwcmIAa0XURo248U35LM/u0oHiGVp gb/9j18Aavpy+RzeGLphPIAE/TfixbuTBsdWBhjn+JIkBiHsQW6R8OOzRz0yWDcgiggrZZJokY25S av+Gs42++a0i8d1ua+fkbHKPeSUZfG2jq6LnhC57g46Xo8CiduLjr19kOAyVMvq61TTpZYgexVXsk EJlPb36w==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtrGl-0004n3-3l; Fri, 10 Jul 2020 11:32:43 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id EB7FF3013E5; Fri, 10 Jul 2020 13:32:38 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id E0A71203EE1D1; Fri, 10 Jul 2020 13:32:38 +0200 (CEST) Date: Fri, 10 Jul 2020 13:32:38 +0200 From: Peter Zijlstra To: Masami Hiramatsu Cc: 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" , Steven Rostedt , 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: <20200710113238.GH4800@hirez.programming.kicks-ass.net> References: <20200709234521.194005-1-jarkko.sakkinen@linux.intel.com> <20200710193257.4eeb19e9cd042d99cbca7f9a@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200710193257.4eeb19e9cd042d99cbca7f9a@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 10, 2020 at 07:32:57PM +0900, Masami Hiramatsu wrote: > > - page = module_alloc(PAGE_SIZE); > > + page = vmalloc(PAGE_SIZE); > > No, you can not use vmalloc here. The reason why we use module_alloc() > is to allocate the executable memory for trampoline code. > So, you need to use vmalloc_exec() instead. vmalloc_exec() would be broken too, also hch recently got rid of that thing. module_alloc() really is the only sane choice here. We should make module_alloc() unconditionally available, and maybe even rename it to text_alloc().