From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1FC5405F7; Thu, 10 Oct 2024 05:47:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728539265; cv=none; b=cv/oGvcrxMWln7mGF8UalM8qPtwK3dNjVe+BaNdW+oBG3OEOCun6HieFydJqRfRQHR3nFHZr5N8WSeTeOXq9/TuRQ8kPr2DcYodCVcbXmDo5MQoamxdrlmZZVx4BWrueHRNDc8CTw7G5IHSg69PHJtIWzElXS7WayY03DKlkPjs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728539265; c=relaxed/simple; bh=OTuy4VqE5rZSLBEA0/Pnb2zLZJiAXIMvgimloV5JAr4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=R4lGI7A3Fh4yMonxTaOkY1I+UG0qK0Inn/WfbbKuXJxfgokCN0fXsi6eRtVgTzuDJFKdl/TTg4q6COKtaRRCBAaICOZeZoimi1OFGtXCtcWJnp47vTYpIjGAscCBRaC5p/S65QXM+gwT+2lyRpwZN0WT68t3V5/euD5T7Fy25vY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=e1wK0sqC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="e1wK0sqC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 941A0C4CECC; Thu, 10 Oct 2024 05:47:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728539264; bh=OTuy4VqE5rZSLBEA0/Pnb2zLZJiAXIMvgimloV5JAr4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=e1wK0sqCj1hFSMccCG8VnSk9aTxpzFJTrYzsRT9VXVEEoRS3hraEZu619qHthJzSx DynBiJLcPJQRbA9J0lLh6ATNk3FB4/xFOM4dXnLEGXWPkSrxd0XcoTxriiWODdioLD 1sWIJTn6uT4ZOaW12OrRLOdpildKc5e58UW0/bc2P0yDusD5bq7Iwbf8r4b7hIX5Iy XccbgL+BkzqR13hBcI+eIsGnGBFTEruC5c+E0zapz7RRHpVu6gMKoZHI6cwfi2IRZM bP+nlVliXD/Sq3TcOU7AO/E8ZEwKb501SlYT1dTNQaVEK/mrQ9FtlySueDuymdFkFN xybmhUi0XMlmg== Date: Thu, 10 Oct 2024 08:43:56 +0300 From: Mike Rapoport To: Song Liu Cc: Andrew Morton , Andreas Larsson , Andy Lutomirski , Ard Biesheuvel , Arnd Bergmann , Borislav Petkov , Brian Cain , Catalin Marinas , Christoph Hellwig , Christophe Leroy , Dave Hansen , Dinh Nguyen , Geert Uytterhoeven , Guo Ren , Helge Deller , Huacai Chen , Ingo Molnar , Johannes Berg , John Paul Adrian Glaubitz , Kent Overstreet , "Liam R. Howlett" , Luis Chamberlain , Mark Rutland , Masami Hiramatsu , Matt Turner , Max Filippov , Michael Ellerman , Michal Simek , Oleg Nesterov , Palmer Dabbelt , Peter Zijlstra , Richard Weinberger , Russell King , Stafford Horne , Steven Rostedt , Thomas Bogendoerfer , Thomas Gleixner , Uladzislau Rezki , Vineet Gupta , Will Deacon , bpf@vger.kernel.org, linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, linux-openrisc@vger.kernel.org, linux-parisc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-trace-kernel@vger.kernel.org, linux-um@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, sparclinux@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v5 4/8] module: prepare to handle ROX allocations for text Message-ID: References: <20241009180816.83591-1-rppt@kernel.org> <20241009180816.83591-5-rppt@kernel.org> Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Oct 09, 2024 at 03:23:40PM -0700, Song Liu wrote: > On Wed, Oct 9, 2024 at 11:10 AM Mike Rapoport wrote: > [...] > > diff --git a/include/linux/module.h b/include/linux/module.h > > index 88ecc5e9f523..7039f609c6ef 100644 > > --- a/include/linux/module.h > > +++ b/include/linux/module.h > > @@ -367,6 +367,8 @@ enum mod_mem_type { > > > > struct module_memory { > > void *base; > > + void *rw_copy; > > + bool is_rox; > > unsigned int size; > > Do we really need to hold the rw_copy all the time? We hold it only during module initialization, it's freed in post_relocation. > Thanks, > Song > > [...] -- Sincerely yours, Mike.