Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4189917rwd; Sat, 17 Jun 2023 08:51:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4WcFUj1P7o66tzMecwNZbXeRLDuBhHltyhgR2CosANI/86bQw4ejd8DW0mQFHLpsrMXEkD X-Received: by 2002:a05:6a00:841:b0:656:699b:200c with SMTP id q1-20020a056a00084100b00656699b200cmr7796487pfk.33.1687017065196; Sat, 17 Jun 2023 08:51:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687017065; cv=none; d=google.com; s=arc-20160816; b=dPoHdSqpv2tGKXPN2mriOYABsZ8WaEFuBSfXIOIDrSK/Xffj+bFKrSly7OE3MnXgyu LyJt+F5KgJhhvJG1dZ+5O9d+/PYLnoDVmMmp94Q8XMxOy98y0Ul7UOxiRN4Q4Ak1un3o 41EoERya2LXG8/poZvDDy8vQHgQVTxDbCDrAOJacbdijSJXwGqHdsXTXd2W6MQzdeAj6 QaOm4CjXR18IOD/JqQkr1lXlf2LZaNMMQIOrbkhEkaZY13jIwCJPUTPbrCzpn3NQf+S1 ar+/Hrf8sK9Q8Yam34oa93Eni80qkdILYWZHCE94s4bwjNrfiaPCiIq/9l0Rer0zuYTf bSFg== 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-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=gkXjdfOcfNeiSkHnMLeI301HhtsXBRoYstWMSEINMeY=; b=m5qLqDU3BT/lgxoelpMqXPEteTn6jNDpJO6CFY0vEDO31uRubrKulfBfms/82tyGBi 341tN7aJmY6vJLA8Ou2wV9saLh6DJhb0fw+BtWdTnsI/ZNvCFuqfDsbIOMi+xsNy96hF Qrl7863ZuTjpIijzciO7q4y8qFq4B3wAVtZ6oHflWAmenbBFZaaL7QtyAhZ0y6xypaU9 r9csgJbWx+nz5uov8H7mMgINbIfFWnXq+EyVQzCzsrXlCGqkPVjcdYLByZE4ckWn8oOH 3xU1rFr9BFIyFs4FbUaEqSDgs3zIwfa81Dgxnhf7OY40RGDpjgKWBGr1XoEpvBMqjUWv MDig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=bYJe9WRi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a21-20020aa79715000000b00662af36de1fsi6771106pfg.167.2023.06.17.08.50.47; Sat, 17 Jun 2023 08:51:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=bYJe9WRi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236139AbjFQPhL (ORCPT + 99 others); Sat, 17 Jun 2023 11:37:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232758AbjFQPhJ (ORCPT ); Sat, 17 Jun 2023 11:37:09 -0400 Received: from out-11.mta0.migadu.com (out-11.mta0.migadu.com [91.218.175.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2001D10FD for ; Sat, 17 Jun 2023 08:37:06 -0700 (PDT) Date: Sat, 17 Jun 2023 11:36:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1687016225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gkXjdfOcfNeiSkHnMLeI301HhtsXBRoYstWMSEINMeY=; b=bYJe9WRiSRM7w/M47iLquWHHUju4li/dPcwoEprDi3YlwcaYBjxpWs1nL0UujvT6xyWL/M S2Ghsqn2fpzAD+9R1F0Wx9PyfySyz0oJLdRx0TD6TfwLRge4cekLdS4qLEUtsEWtm6ack0 XRAL5F0yJ/NulC1WuvN1fyiNm3tO1UM= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Mike Rapoport Cc: Song Liu , linux-kernel@vger.kernel.org, Andrew Morton , Catalin Marinas , Christophe Leroy , "David S. Miller" , Dinh Nguyen , Heiko Carstens , Helge Deller , Huacai Chen , 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 v2 07/12] arm64, execmem: extend execmem_params for generated code definitions Message-ID: References: <20230616085038.4121892-1-rppt@kernel.org> <20230616085038.4121892-8-rppt@kernel.org> <20230617065759.GT52412@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230617065759.GT52412@kernel.org> X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 On Sat, Jun 17, 2023 at 09:57:59AM +0300, Mike Rapoport wrote: > > This is growing fast. :) We have 3 now: text, data, jit. And it will be > > 5 when we split data into rw data, ro data, ro after init data. I wonder > > whether we should still do some type enum here. But we can revisit > > this topic later. > > I don't think we'd need 5. Four at most :) > > I don't know yet what would be the best way to differentiate RW and RO > data, but ro_after_init surely won't need a new type. It either will be > allocated as RW and then the caller will have to set it RO after > initialization is done, or it will be allocated as RO and the caller will > have to do something like text_poke to update it. Perhaps ro_after_init could use the same allocation interface and share pages with ro pages - if we just added a refcount for "this page currently needs to be rw, module is still loading?" text_poke() approach wouldn't be workable, you'd have to audit and fix all module init code in the entire kernel.