Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages

2024-10-14 Thread Mike Rapoport
On Mon, Oct 14, 2024 at 09:09:49PM -0700, Luis Chamberlain wrote: > Mike, please run this with kmemleak enabled and running, and also try to get > tools/testing/selftests/kmod/kmod.sh to pass. There was an issue with kmemleak, I fixed it here: https://lore.kernel.org/linux-mm/20241009180816.83591

Re: [PATCH 2/2] asm-generic: add an optional pfn_valid check to pfn_valid

2024-10-14 Thread Thomas Huth
On 14/10/2024 16.44, Christoph Hellwig wrote: page_to_pfn is usually implemented by pointer arithmetics on the memory map, which means that bogus input can lead to even more bogus output. Powerpc had a pfn_valid check on the regult to it's page_to_phys s/regult/result/ implementation when CO

Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages

2024-10-14 Thread Luis Chamberlain
Mike, please run this with kmemleak enabled and running, and also try to get tools/testing/selftests/kmod/kmod.sh to pass. I run into silly boot issues with just a guest. Luis ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://l

Re: [RFC PATCH v1 01/57] mm: Add macros ahead of supporting boot-time page size selection

2024-10-14 Thread Pingfan Liu
On Mon, Oct 14, 2024 at 10:07 PM Ryan Roberts wrote: > > On 14/10/2024 14:54, Pingfan Liu wrote: > > Hello Ryan, > > > > On Mon, Oct 14, 2024 at 11:58:08AM +0100, Ryan Roberts wrote: > >> arm64 can support multiple base page sizes. Instead of selecting a page > >> size at compile time, as is done

Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages

2024-10-14 Thread Luis Chamberlain
On Sun, Oct 13, 2024 at 08:26:26PM -0700, Andrew Morton wrote: > 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 f

[PATCH 2/2] asm-generic: add an optional pfn_valid check to pfn_valid

2024-10-14 Thread Christoph Hellwig
page_to_pfn is usually implemented by pointer arithmetics on the memory map, which means that bogus input can lead to even more bogus output. Powerpc had a pfn_valid check on the regult to it's page_to_phys implementation when CONFIG_DEBUG_VIRTUAL is defined, which seems generally useful, so add t

[PATCH 1/2] asm-generic: provide generic page_to_phys and phys_to_page implementations

2024-10-14 Thread Christoph Hellwig
page_to_phys is duplicated by all architectures, and from some strange reason placed in where it doesn't fit at all. phys_to_page is only provided by a few architectures despite having a lot of open coded users. Provide generic versions in to make these helpers more easily usable. Note with th

provide generic page_to_phys and phys_to_page implementations v2

2024-10-14 Thread Christoph Hellwig
page_to_phys is duplicated by all architectures, and from some strange reason placed in where it doesn't fit at all. phys_to_page is only provided by a few architectures despite having a lot of open coded users. Provide generic versions in to make these helpers more easily usable. Changes s

Re: [PATCH v5 7/8] execmem: add support for cache of large ROX pages

2024-10-14 Thread Mike Rapoport
On Sun, Oct 13, 2024 at 10:55:25PM -0700, Christoph Hellwig wrote: > 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 t

Re: [RFC PATCH v1 01/57] mm: Add macros ahead of supporting boot-time page size selection

2024-10-14 Thread Ryan Roberts
On 14/10/2024 14:54, Pingfan Liu wrote: > Hello Ryan, > > On Mon, Oct 14, 2024 at 11:58:08AM +0100, Ryan Roberts wrote: >> arm64 can support multiple base page sizes. Instead of selecting a page >> size at compile time, as is done today, we will make it possible to >> select the desired page size

Re: [RFC PATCH v1 01/57] mm: Add macros ahead of supporting boot-time page size selection

2024-10-14 Thread Pingfan Liu
Hello Ryan, On Mon, Oct 14, 2024 at 11:58:08AM +0100, Ryan Roberts wrote: > arm64 can support multiple base page sizes. Instead of selecting a page > size at compile time, as is done today, we will make it possible to > select the desired page size on the command line. > > In this case PAGE_SHIFT

[RFC PATCH v1 01/57] mm: Add macros ahead of supporting boot-time page size selection

2024-10-14 Thread Ryan Roberts
arm64 can support multiple base page sizes. Instead of selecting a page size at compile time, as is done today, we will make it possible to select the desired page size on the command line. In this case PAGE_SHIFT and it's derivatives, PAGE_SIZE and PAGE_MASK (as well as a number of other macros r