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 138F91F163; Sat, 23 Sep 2023 16:26:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE71FC433C7; Sat, 23 Sep 2023 16:26:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695486404; bh=2piJOAc4UtCWCg8jsg4cD2ZIAtKbobPaZdza3lM1trU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=q1TXhCaOUKwD4i9ywBsaA7fqhllTiUUEop2bqUBzfEeLiBK0GMJal6TZCH02gcByL 753jvJ06wYTsHa9bNjwSyI/D53kLiYdlB1AiITQEZl13j1+ufZspu8eHeVKiSfnDPa Xnzc94p2Es7bJABHatU5GnvCNtXzBwLW/ClIG+R90OCKZCTnz4sBwhPKehiv0ITJJM +UjHKGlf0w5d8TT9nGbQtF1BeBR/tDz6eSth+IHkKyRVTlF1gKubvNuOjqYZN8sC6v yInZcSWBoyftCQIH5y4EX0l+ogMUchapNByEIoCoBWaItl9SpqS6bxW8Fm8jrgT5Hv hjgDbZyqE8rAA== Date: Sat, 23 Sep 2023 19:25:47 +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 09/13] powerpc: extend execmem_params for kprobes allocations Message-ID: <20230923162547.GN3303@kernel.org> References: <20230918072955.2507221-1-rppt@kernel.org> <20230918072955.2507221-10-rppt@kernel.org> Precedence: bulk X-Mailing-List: netdev@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 Thu, Sep 21, 2023 at 03:30:46PM -0700, Song Liu wrote: > On Mon, Sep 18, 2023 at 12:31 AM Mike Rapoport wrote: > > > [...] > > @@ -135,5 +138,13 @@ struct execmem_params __init *execmem_arch_params(void) > > > > range->pgprot = prot; > > > > + execmem_params.ranges[EXECMEM_KPROBES].start = VMALLOC_START; > > + execmem_params.ranges[EXECMEM_KPROBES].start = VMALLOC_END; > > .end = VMALLOC_END. Thanks, this should have been execmem_params.ranges[EXECMEM_KPROBES].start = range->start; execmem_params.ranges[EXECMEM_KPROBES].end = range->end; where range points to the same range as EXECMEM_MODULE_TEXT. > Thanks, > Song > > > + > > + if (strict_module_rwx_enabled()) > > + execmem_params.ranges[EXECMEM_KPROBES].pgprot = PAGE_KERNEL_ROX; > > + else > > + execmem_params.ranges[EXECMEM_KPROBES].pgprot = PAGE_KERNEL_EXEC; > > + > > return &execmem_params; > > } > > -- > > 2.39.2 > > > > -- Sincerely yours, Mike.