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 F20B5C433F5 for ; Wed, 25 May 2022 06:02:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244081AbiEYGCE (ORCPT ); Wed, 25 May 2022 02:02:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231764AbiEYGB6 (ORCPT ); Wed, 25 May 2022 02:01:58 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6943F2C674; Tue, 24 May 2022 23:01:54 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 70C24227EE6; Wed, 25 May 2022 08:01:43 +0200 (CEST) Date: Wed, 25 May 2022 08:01:42 +0200 From: "hch@lst.de" To: Luis Chamberlain Cc: "Edgecombe, Rick P" , Christophe Leroy , "hch@lst.de" , "dave@stgolabs.net" , "linux-kernel@vger.kernel.org" , "daniel@iogearbox.net" , "peterz@infradead.org" , "ast@kernel.org" , "bpf@vger.kernel.org" , "kernel-team@fb.com" , "linux-mm@kvack.org" , "song@kernel.org" , "Torvalds, Linus" , "arnd@arndb.de" , Adam Manzanares Subject: Re: [PATCH v3 bpf-next 5/8] bpf: use module_alloc_huge for bpf_prog_pack Message-ID: <20220525060142.GB10762@lst.de> References: <20220520031548.338934-1-song@kernel.org> <20220520031548.338934-6-song@kernel.org> <17c6110273d59e3fdeea3338abefac03951ff404.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 24, 2022 at 03:08:12PM -0700, Luis Chamberlain wrote: > > A rename seems good to me. Module space is really just dynamically > > allocated text space now. There used to be a vmalloc_exec() that > > allocated text in vmalloc space, > > Yes I saw that but it was generic and it did not do the arch-specific > override, and so that is why Christoph ripped it out and open coded > it on the only user, on module_alloc(). It it also because random code does not have any business allocating executable memory. Executable memory in kernel is basically for modules and module-like code like eBPF, and no one else has any business allocating pages with the execute bit set (or the NX bit not set).