Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages
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_rangeranges[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. ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages
On Sun, Oct 13, 2024 at 11:43:41AM +0300, Mike Rapoport wrote: > > 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. Isn't the callback required when using the large ROX page? I.e. shouldn't it be an unconditional callback and not a weak override? ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages
On Sun, 13 Oct 2024 11:43:41 +0300 Mike Rapoport wrote: > > > 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. > Thanks, I'll drop the v1 series; The todos which I collected are: https://lkml.kernel.org/r/caphsuw66etfdu3fvk0kselxcgwd6_tkbfjj-bthqu5oejds...@mail.gmail.com https://lkml.kernel.org/r/zwd6vh0rz0pve...@infradead.org https://lkml.kernel.org/r/zwjxz0dz-rldv...@infradead.org https://lkml.kernel.org/r/202410111408.8fe6f604-...@intel.com ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc