Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp249955rdh; Sat, 23 Sep 2023 08:47:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFXHVo/qAvzCnSoHKFax01hZXM2COBvtLZfLSRYQp30MXS64+X/FM9haOR1PsylEnqu4bGN X-Received: by 2002:a05:6a21:99a5:b0:153:8983:d87c with SMTP id ve37-20020a056a2199a500b001538983d87cmr9638223pzb.22.1695484068815; Sat, 23 Sep 2023 08:47:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695484068; cv=none; d=google.com; s=arc-20160816; b=Xw80tOsfpA+XFj4DLdQ8Es7AXFLK9pEtng5xNBky9X04lmTY9yYtDAuZN6Ihss1CH0 4rczKDaYddSkRC+9J86Wf923t13tpmB8qmSpI5a5jP4vj1ctAZ1zoAd9P2EfRN9M502+ +vjgPWMeTgXYTj+zdR7kSaz72KkDbOlasGCPOPdNST5VUx3Z0Ua3+QbBMB8XoJJFBXrp VJYXbG9fTxCj0KWSr4k0BZUv3dhiiO5o9NrKACO0cZTKbxvJcuYzv70v2yJgFaqbIF7S ufPU1Qv33j7bHupXBUTVLYgsoOnWSoiPOY4J0OfAqtTQn0PTTl46MSyjXK0a/vOsZsYy v7uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=QvCbhRPZ/l0zi2A2tbQGAtOh73iXOwvjqhx56r8fjaI=; fh=LLxVw4x/YA0p2nrisYkbRBF7OIGhT8MrMihKmdCsSWw=; b=vJ5o2nUixsUIu6t04qKBLKb0HALfueBeKMs1jUc/9X+Q5xHIg+3o1dAwCWfTFtEvX4 RNRKyiQb0W25H3bAGu22QFYRx1/jMou46ANw0Z76u/vBObdIkcPyI6HA+ZprrCcwDQD+ IhvtiwotWANcLisufCixQzhBQlYT+3M9tVPHqcvZ3FWesblsyHOt9MWPquouhL2hJKAy 0CW2fONKu0aadVI4L42oo92GA2eUpNZwb2HqzfG9dQcFmvJuU9KWIz8Uj9b5swj7yGeO hqbELaJ/ZL2kS3Gqhag8jSQ+SfO7NuzsS1iAXvxPH/5XrXs7UlnVJMEcPzQJr7xH6NAu shsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bKxK0sfn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id y24-20020a63ce18000000b00578a5f62edcsi6125751pgf.625.2023.09.23.08.47.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 08:47:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bKxK0sfn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8E20B808E66A; Sat, 23 Sep 2023 08:42:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231910AbjIWPmE (ORCPT + 99 others); Sat, 23 Sep 2023 11:42:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229946AbjIWPmC (ORCPT ); Sat, 23 Sep 2023 11:42:02 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1560D100; Sat, 23 Sep 2023 08:41:57 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78B41C433C7; Sat, 23 Sep 2023 15:41:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695483716; bh=vXbqktT7b0Qri8xOnKmQsZG7jQ4zimMSvWYPtuArZ7U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bKxK0sfnvR6Mn54iFskJjz+iqQzT7d+5NzV6O/KDvtN3lXtUe/L3iPwKCcy9RJgP3 mbD8bMb58MYWC7Tl7U7Pm9c2CxFIZly2LFF5bwScXgaoAZuVMJ1eJZhU6ecWVwTfEE r2oNyeJK2AahVHVr99AtDOSv5pGe23KHFoafNeDpxxm0mmvwtmbI1d6kPT0nWu68z/ VE6hznLFs1/tWZv4nZKOvDCd21ai8PHSne6FmcZ1g1J53YE3NQHUgtGoEfJtdU67X3 wLZ8mTH2uPqXeKbDrNozy3tf88DdS8OExFmk2KljS0ivcPxrGjBb2Vj5e645SQEJ/u hwwLepGJAxXyg== Date: Sat, 23 Sep 2023 18:40:59 +0300 From: Mike Rapoport To: Song Liu Cc: linux-kernel@vger.kernel.org, Andrew Morton , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Catalin Marinas , Christophe Leroy , "David S. Miller" , Dinh Nguyen , Heiko Carstens , Helge Deller , Huacai Chen , Kent Overstreet , Luis Chamberlain , Mark Rutland , Michael Ellerman , Nadav Amit , "Naveen N. Rao" , Palmer Dabbelt , Puranjay Mohan , Rick Edgecombe , Russell King , Steven Rostedt , Thomas Bogendoerfer , Thomas Gleixner , Will Deacon , bpf@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, linux-parisc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, netdev@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v3 02/13] mm: introduce execmem_text_alloc() and execmem_free() Message-ID: <20230923154059.GJ3303@kernel.org> References: <20230918072955.2507221-1-rppt@kernel.org> <20230918072955.2507221-3-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 23 Sep 2023 08:42:02 -0700 (PDT) On Thu, Sep 21, 2023 at 03:14:54PM -0700, Song Liu wrote: > On Mon, Sep 18, 2023 at 12:30 AM Mike Rapoport wrote: > > > [...] > > + > > +/** > > + * enum execmem_type - types of executable memory ranges > > + * > > + * There are several subsystems that allocate executable memory. > > + * Architectures define different restrictions on placement, > > + * permissions, alignment and other parameters for memory that can be used > > + * by these subsystems. > > + * Types in this enum identify subsystems that allocate executable memory > > + * and let architectures define parameters for ranges suitable for > > + * allocations by each subsystem. > > + * > > + * @EXECMEM_DEFAULT: default parameters that would be used for types that > > + * are not explcitly defined. > > + * @EXECMEM_MODULE_TEXT: parameters for module text sections > > + * @EXECMEM_KPROBES: parameters for kprobes > > + * @EXECMEM_FTRACE: parameters for ftrace > > + * @EXECMEM_BPF: parameters for BPF > > + * @EXECMEM_TYPE_MAX: > > + */ > > +enum execmem_type { > > + EXECMEM_DEFAULT, > > I found EXECMEM_DEFAULT more confusing than helpful. I hesitated a lot about that, but in the end decided to have EXECMEM_DEFAULT and alias EXECMEM_MODULE_TEXT to it because this is what we essentially have now for the most architectures. If you'll take a look at arch-specific patches, in many cases there is only EXECMEM_DEFAULT that an architecture defines and that default is used by all the subsystems. > Song > > > + EXECMEM_MODULE_TEXT = EXECMEM_DEFAULT, > > + EXECMEM_KPROBES, > > + EXECMEM_FTRACE, > > + EXECMEM_BPF, > > + EXECMEM_TYPE_MAX, > > +}; > > + > [...] -- Sincerely yours, Mike.