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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 57B92CF258E for ; Sun, 13 Oct 2024 08:47:40 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4XRDWt28RBz2yDY; Sun, 13 Oct 2024 19:47:38 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=139.178.84.217 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1728809258; cv=none; b=L/7usxvhS+3mQyvOqENyid1+HFKeYR7659Caqf1tQM5Na713DqHZNoo9vfSb8mrLYnFNaiQmYcSq9tI6ugr5CkBfMxNSIK6yBSF7Q7qgMNmFjV6iwVZbGZbc4is7XvrWgmLT472k0lOu1WC8iIS48sQiWkFBIvM6wuw2A05YoPtOE41EyAZfx/fKsN2lXhwndPc6jFijr1L4zcTyM6mlwSPmo7GhE8fq1BIWnNt86/y8Nd0NkXlx48zn1p+BAQpsjVGRNRop6Dr8bWnq9TOy9Jcf/EsnshwuTx6/x19RakrGC2ux+1peyCAFwx/pbFe7czNlMdNJqgzeUHs9DwD8Tw== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1728809258; c=relaxed/relaxed; bh=IdHkHhUjAfxO8/rqMjtBzvsaF8+JprszM0WexjyZHos=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FCkwOeTpAP38oqIi9TOHctqw07XeU8gvf5grud9lODtNw7HKfVvRqutAx7DXUYDwcR407PgFCbYQWUVKwdxBooq6Vh3/oaMA3HcoyCMx8/cA8VUyW4I3PX7mmWR0IIXn6Tv0nFe1xqh/jtPZi3yfAW4JCGyE2dCh84SOcaBe68XjGsST4Kw0W5okSw4HMkRcCzsogZQSQjOqzaznSL/brK3h4mPxpsEe1w4baR4VqVEQP1LoxCx/LlKT1zwHX4QiDiE2stGrHwK7C9cVRTRIaQmkaV/S9+WnxrfaO3R3h7sWSLFAhwnuke6VohO0QGB4g7SCoZnhQ2dKS/qTBoSEog== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=E8OMxiME; dkim-atps=neutral; spf=pass (client-ip=139.178.84.217; helo=dfw.source.kernel.org; envelope-from=rppt@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=E8OMxiME; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=139.178.84.217; helo=dfw.source.kernel.org; envelope-from=rppt@kernel.org; receiver=lists.ozlabs.org) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4XRDWs0HDmz2y8F for ; Sun, 13 Oct 2024 19:47:36 +1100 (AEDT) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id DDA245C4CBB; Sun, 13 Oct 2024 08:47:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00D61C4CECD; Sun, 13 Oct 2024 08:47:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728809253; bh=oCkJ2115ozRiZPDG4YoFw9nArbpLGJybX01Iv//69uE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=E8OMxiMEktF+GQmyT4EDIYDJPag5y6VDyo/Ga7wsRXJJ99cwzji7jLF1sUHlppQrC kfjLbesywWMnxfXjdxF/ttfJW0S6OCnAeNyYzQJk2u4D3I/IHI9w4eKpfc6/PVtfuE WndRqsL5ofKVGyFE9G/gSdQ0nGfWKHlQ3BhJP58mfPjvLaZMFmHfTrH7D6YY90Mj1Y Bf6s6/XciGtUwI6Emh7Lkdsn+ce052geMCuH5U+Tb+yPiRy+C2Qz+9+N2Qx0N42A/1 /daXS+24OOYM/5Gk5f/vkwwYyUK7ykCQAd22G6E+/Xf2yKVuhiVY41QpTSBy6H62Ks p+MyUT+rRu6SQ== Date: Sun, 13 Oct 2024 11:43:41 +0300 From: Mike Rapoport To: Christoph Hellwig Cc: Andrew Morton , Andreas Larsson , Andy Lutomirski , Ard Biesheuvel , Arnd Bergmann , Borislav Petkov , Brian Cain , Catalin Marinas , 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 , Song Liu , 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 7/8] execmem: add support for cache of large ROX pages Message-ID: References: <20241009180816.83591-1-rppt@kernel.org> <20241009180816.83591-8-rppt@kernel.org> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Post: List-Subscribe: , , List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Oct 11, 2024 at 12:46:23AM -0700, Christoph Hellwig wrote: > On Thu, Oct 10, 2024 at 03:57:33PM +0300, Mike Rapoport wrote: > > On Wed, Oct 09, 2024 at 11:58:33PM -0700, Christoph Hellwig wrote: > > > On Wed, Oct 09, 2024 at 09:08:15PM +0300, Mike Rapoport wrote: > > > > /** > > > > * struct execmem_info - architecture parameters for code allocations > > > > + * @fill_trapping_insns: set memory to contain instructions that will trap > > > > * @ranges: array of parameter sets defining architecture specific > > > > * parameters for executable memory allocations. The ranges that are not > > > > * explicitly initialized by an architecture use parameters defined for > > > > * @EXECMEM_DEFAULT. > > > > */ > > > > struct execmem_info { > > > > + void (*fill_trapping_insns)(void *ptr, size_t size, bool writable); > > > > struct execmem_range ranges[EXECMEM_TYPE_MAX]; > > > > > > Why is the filler an indirect function call and not an architecture > > > hook? > > > > The idea is to keep everything together and have execmem_info describe all > > that architecture needs. > > But why? That's pretty different from our normal style of arch hooks, > and introduces an indirect call in a security sensitive area. Will change to __weak hook. -- Sincerely yours, Mike.