Re: [PATCH v6 5/6] mm: secretmem: use PMD-size pages to amortize direct map fragmentation

2020-09-29 Thread Mike Rapoport
On Tue, Sep 29, 2020 at 04:12:16PM +0200, Peter Zijlstra wrote: > On Tue, Sep 29, 2020 at 04:05:29PM +0300, Mike Rapoport wrote: > > On Fri, Sep 25, 2020 at 09:41:25AM +0200, Peter Zijlstra wrote: > > > On Thu, Sep 24, 2020 at 04:29:03PM +0300, Mike Rapoport wrote: > >

Re: [PATCH v6 5/6] mm: secretmem: use PMD-size pages to amortize direct map fragmentation

2020-09-29 Thread Mike Rapoport
On Fri, Sep 25, 2020 at 11:31:14AM +0100, Mark Rutland wrote: > Hi, > > Agreed. I think if we really need something like this, something between > XPFO and DEBUG_PAGEALLOC would be generally better, since: > > * Secretmem puts userspace in charge of kernel internals (AFAICT without > any

Re: [PATCH v6 5/6] mm: secretmem: use PMD-size pages to amortize direct map fragmentation

2020-09-29 Thread Mike Rapoport
On Fri, Sep 25, 2020 at 11:50:29AM +0200, Peter Zijlstra wrote: > On Fri, Sep 25, 2020 at 11:00:30AM +0200, David Hildenbrand wrote: > > On 25.09.20 09:41, Peter Zijlstra wrote: > > > On Thu, Sep 24, 2020 at 04:29:03PM +0300, Mike Rapoport wrote: > > >> From: Mike Ra

Re: [PATCH v6 5/6] mm: secretmem: use PMD-size pages to amortize direct map fragmentation

2020-09-29 Thread Mike Rapoport
On Fri, Sep 25, 2020 at 11:00:30AM +0200, David Hildenbrand wrote: > On 25.09.20 09:41, Peter Zijlstra wrote: > > On Thu, Sep 24, 2020 at 04:29:03PM +0300, Mike Rapoport wrote: > >> From: Mike Rapoport > >> > >> Removing a PAGE_SIZE page from the direct map ev

Re: [PATCH v6 5/6] mm: secretmem: use PMD-size pages to amortize direct map fragmentation

2020-09-29 Thread Mike Rapoport
On Fri, Sep 25, 2020 at 09:41:25AM +0200, Peter Zijlstra wrote: > On Thu, Sep 24, 2020 at 04:29:03PM +0300, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Removing a PAGE_SIZE page from the direct map every time such page is > > allocated for a secret memor

Re: [PATCH v6 3/6] mm: introduce memfd_secret system call to create "secret" memory areas

2020-09-29 Thread Mike Rapoport
On Tue, Sep 29, 2020 at 04:58:44AM +, Edgecombe, Rick P wrote: > On Thu, 2020-09-24 at 16:29 +0300, Mike Rapoport wrote: > > Introduce "memfd_secret" system call with the ability to create > > memory > > areas visible only in the context of the owning process

Re: [PATCH v2] page_alloc: Fix freeing non-compound pages

2020-09-29 Thread Mike Rapoport
On Tue, Sep 29, 2020 at 04:40:26AM +0100, Matthew Wilcox wrote: > On Mon, Sep 28, 2020 at 06:03:07PM -0700, Andrew Morton wrote: > > Well that's weird and scary looking. `page' has non-zero refcount yet > > we go and free random followon pages. Methinks it merits an > > explanatory comment? > >

Re: [PATCH] mm: remove unused early_pfn_valid()

2020-09-28 Thread Mike Rapoport
ping? On Wed, Sep 23, 2020 at 07:29:15PM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > The early_pfn_valid() macro is defined by it is never used. > Remove it. > > Signed-off-by: Mike Rapoport > --- > include/linux/mmzone.h | 5 - > 1 file changed, 5 d

Re: [PATCH] mm: __do_fault: fix pte_alloc_one spelling

2020-09-28 Thread Mike Rapoport
ping? >On Mon, Sep 14, 2020 at 02:58:33PM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > Fix spelling of pte_alloc_one() in a comment in __do_fault(). > > Signed-off-by: Mike Rapoport > --- > mm/memory.c | 2 +- > 1 file changed, 1 insertion(+), 1 delet

Re: [PATCH v6 0/6] mm: introduce memfd_secret system call to create "secret" memory areas

2020-09-25 Thread Mike Rapoport
On Thu, Sep 24, 2020 at 07:34:28PM -0700, Andrew Morton wrote: > On Thu, 24 Sep 2020 16:28:58 +0300 Mike Rapoport wrote: > > > From: Mike Rapoport > > > > Hi, > > > > This is an implementation of "secret" mappings backed by a file descriptor. &g

[PATCH] man2: new page describing memfd_secret() system call

2020-09-24 Thread Mike Rapoport
From: Mike Rapoport Signed-off-by: Mike Rapoport --- man2/memfd_secret.2 | 176 1 file changed, 176 insertions(+) create mode 100644 man2/memfd_secret.2 diff --git a/man2/memfd_secret.2 b/man2/memfd_secret.2 new file mode 100644 index 0

[PATCH v6 6/6] secretmem: test: add basic selftest for memfd_secret(2)

2020-09-24 Thread Mike Rapoport
From: Mike Rapoport The test verifies that file descriptor created with memfd_secret does not allow read/write operations, that secret memory mappings respect RLIMIT_MEMLOCK and that remote accesses with process_vm_read() and ptrace() to the secret memory fail. Signed-off-by: Mike Rapoport

[PATCH v6 5/6] mm: secretmem: use PMD-size pages to amortize direct map fragmentation

2020-09-24 Thread Mike Rapoport
From: Mike Rapoport Removing a PAGE_SIZE page from the direct map every time such page is allocated for a secret memory mapping will cause severe fragmentation of the direct map. This fragmentation can be reduced by using PMD-size pages as a pool for small pages for secret memory mappings. Add

[PATCH v6 3/6] mm: introduce memfd_secret system call to create "secret" memory areas

2020-09-24 Thread Mike Rapoport
From: Mike Rapoport Introduce "memfd_secret" system call with the ability to create memory areas visible only in the context of the owning process and not mapped not only to other processes but in the kernel page tables as well. The user will create a file descriptor using the me

[PATCH v6 4/6] arch, mm: wire up memfd_secret system call were relevant

2020-09-24 Thread Mike Rapoport
From: Mike Rapoport Wire up memfd_secret system call on architectures that define ARCH_HAS_SET_DIRECT_MAP, namely arm64, risc-v and x86. Signed-off-by: Mike Rapoport Acked-by: Palmer Dabbelt Acked-by: Arnd Bergmann --- arch/arm64/include/asm/unistd.h| 2 +- arch/arm64/include/asm

[PATCH v6 2/6] mmap: make mlock_future_check() global

2020-09-24 Thread Mike Rapoport
From: Mike Rapoport It will be used by the upcoming secret memory implementation. Signed-off-by: Mike Rapoport --- mm/internal.h | 3 +++ mm/mmap.c | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mm/internal.h b/mm/internal.h index 10c677655912..40544fbf49c9

[PATCH v6 1/6] mm: add definition of PMD_PAGE_ORDER

2020-09-24 Thread Mike Rapoport
From: Mike Rapoport The definition of PMD_PAGE_ORDER denoting the number of base pages in the second-level leaf page is already used by DAX and maybe handy in other cases as well. Several architectures already have definition of PMD_ORDER as the size of second level page table, so to avoid

[PATCH v6 0/6] mm: introduce memfd_secret system call to create "secret" memory areas

2020-09-24 Thread Mike Rapoport
From: Mike Rapoport Hi, This is an implementation of "secret" mappings backed by a file descriptor. I've dropped the boot time reservation patch for now as it is not strictly required for the basic usage and can be easily added later either with or without CMA. v6 changes:

[PATCH] mm: remove unused early_pfn_valid()

2020-09-23 Thread Mike Rapoport
From: Mike Rapoport The early_pfn_valid() macro is defined by it is never used. Remove it. Signed-off-by: Mike Rapoport --- include/linux/mmzone.h | 5 - 1 file changed, 5 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 8379432f4f2f..38264363b0d4 100644

Re: [RFC PATCH] mm/page_alloc.c: clean code by merging two functions

2020-09-21 Thread Mike Rapoport
Hi, (added Mel) On Wed, Sep 16, 2020 at 01:01:18PM +0200, mateusznos...@gmail.com wrote: > From: Mateusz Nosek > > The 'finalise_ac' function is just 'epilogue' for 'prepare_alloc_pages'. > Therefore there is no need to keep them both so 'finalise_ac' content can > be merged into

Re: [PATCH] mm: fix some comments formatting

2020-09-21 Thread Mike Rapoport
On Tue, Sep 15, 2020 at 09:39:56AM -0700, Chen Tao wrote: > Correct one function name "get_partials" with "get_partial". > Update the old struct name of list3 with kmem_cache_node. > > Signed-off-by: Chen Tao Reviewed-by: Mike Rapoport > --- > mm/slab.c

Re: [PATCH -next] mm/madvise: remove duplicate include

2020-09-21 Thread Mike Rapoport
On Tue, Sep 15, 2020 at 08:15:50PM +0800, YueHaibing wrote: > Remove duplicate header which is included twice. > > Signed-off-by: YueHaibing > --- > mm/madvise.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/mm/madvise.c b/mm/madvise.c index > 460e19d60ba3..9bd21f9019d9 100644 ---

Re: [PATCH v2] RISC-V: Remove any memblock representing unusable memory area

2020-09-19 Thread Mike Rapoport
imum size. > > Signed-off-by: Atish Patra With one nit below Reviewed-by: Mike Rapoport > --- > Changes from v1->v2: > Used memblock_enforce_memory_limit instead of memblock_remove without > computing the maximum memory size. > --- > arch/riscv/mm/init.c | 15 +-- &g

Re: [PATCH v5 0/5] mm: introduce memfd_secret system call to create "secret" memory areas

2020-09-17 Thread Mike Rapoport
On Wed, Sep 16, 2020 at 04:20:20PM -0700, Andrew Morton wrote: > On Wed, 16 Sep 2020 10:35:34 +0300 Mike Rapoport wrote: > > > This is an implementation of "secret" mappings backed by a file descriptor. > > I've dropped the boot time reservation patch for now as it

Re: [PATCH v5 0/5] mm: introduce memfd_secret system call to create "secret" memory areas

2020-09-17 Thread Mike Rapoport
On Thu, Sep 17, 2020 at 07:46:12AM +0200, Michael Kerrisk (man-pages) wrote: > On Thu, 17 Sep 2020 at 01:20, Andrew Morton wrote: > > > > On Wed, 16 Sep 2020 10:35:34 +0300 Mike Rapoport wrote: > > > > > This is an implementation of "secret" map

Re: [Firmware Bug]: Kernel image misaligned at boot, please fix your bootloader

2020-09-16 Thread Mike Rapoport
On Wed, Sep 16, 2020 at 05:50:34PM +0530, Naresh Kamboju wrote: > arm64 boot failed on linux next 20200916. There is a fix at https://lore.kernel.org/linux-mm/20200916085933.25220-1-song.bao@hisilicon.com/ > [0.00] Linux version 5.9.0-rc5-next-20200916 > (TuxBuild@3aa8232c0e38)

[PATCH v5 5/5] mm: secretmem: use PMD-size pages to amortize direct map fragmentation

2020-09-16 Thread Mike Rapoport
From: Mike Rapoport Removing a PAGE_SIZE page from the direct map every time such page is allocated for a secret memory mapping will cause severe fragmentation of the direct map. This fragmentation can be reduced by using PMD-size pages as a pool for small pages for secret memory mappings. Add

[PATCH v5 3/5] mm: introduce memfd_secret system call to create "secret" memory areas

2020-09-16 Thread Mike Rapoport
From: Mike Rapoport Introduce "memfd_secret" system call with the ability to create memory areas visible only in the context of the owning process and not mapped not only to other processes but in the kernel page tables as well. The user will create a file descriptor using the me

[PATCH v5 4/5] arch, mm: wire up memfd_secret system call were relevant

2020-09-16 Thread Mike Rapoport
From: Mike Rapoport Wire up memfd_secret system call on architectures that define ARCH_HAS_SET_DIRECT_MAP, namely arm64, risc-v and x86. Signed-off-by: Mike Rapoport Acked-by: Palmer Dabbelt Acked-by: Arnd Bergmann --- arch/arm64/include/asm/unistd.h| 2 +- arch/arm64/include/asm

[PATCH v5 2/5] mmap: make mlock_future_check() global

2020-09-16 Thread Mike Rapoport
From: Mike Rapoport It will be used by the upcoming secret memory implementation. Signed-off-by: Mike Rapoport --- mm/internal.h | 3 +++ mm/mmap.c | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mm/internal.h b/mm/internal.h index 10c677655912..40544fbf49c9

[PATCH v5 1/5] mm: add definition of PMD_PAGE_ORDER

2020-09-16 Thread Mike Rapoport
From: Mike Rapoport The definition of PMD_PAGE_ORDER denoting the number of base pages in the second-level leaf page is already used by DAX and maybe handy in other cases as well. Several architectures already have definition of PMD_ORDER as the size of second level page table, so to avoid

[PATCH v5 0/5] mm: introduce memfd_secret system call to create "secret" memory areas

2020-09-16 Thread Mike Rapoport
From: Mike Rapoport Hi, This is an implementation of "secret" mappings backed by a file descriptor. I've dropped the boot time reservation patch for now as it is not strictly required for the basic usage and can be easily added later either with or without CMA. v5 changes: * reba

[PATCH v5 0/5] mm: introduce memfd_secret system call to create "secret" memory areas

2020-09-16 Thread Mike Rapoport
From: Mike Rapoport Hi, This is an implementation of "secret" mappings backed by a file descriptor. I've dropped the boot time reservation patch for now as it is not strictly required for the basic usage and can be easily added later either with or without CMA. v5 changes: * reba

Re: [PATCH] [PATCH] ARM64: Setup DMA32 zone size by bootargs

2020-09-15 Thread Mike Rapoport
On Tue, Sep 15, 2020 at 11:08:55PM +0800, Phil Chang wrote: > Allowing the DMA32 zone be configurable in ARM64 but at most 4Gb. Please add more details why would you like to limit the DMA32 zone. > Signed-off-by: Alix Wu > Signed-off-by: YJ Chiang > Signed-off-by: Phil Chang > --- > >

Re: [PATCH v2] mm/gup: fix gup_fast with dynamic page table folding

2020-09-15 Thread Mike Rapoport
ion to pXd values pass original > pXdp pointers down to gup_pXd_range functions. And introduce > pXd_offset_lockless helpers, which take an additional pXd > entry value parameter. This has already been discussed in > https://lkml.kernel.org/r/20190418100218.0a4afd51@mschwideX1 >

[PATCH] mm: __do_fault: fix pte_alloc_one spelling

2020-09-14 Thread Mike Rapoport
From: Mike Rapoport Fix spelling of pte_alloc_one() in a comment in __do_fault(). Signed-off-by: Mike Rapoport --- mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory.c b/mm/memory.c index 469af373ae76..d582ac79cb7d 100644 --- a/mm/memory.c +++ b/mm

Re: [PATCH] RISC-V: Consider sparse memory while removing unusable memory

2020-09-12 Thread Mike Rapoport
Hello Atish, On Fri, Sep 11, 2020 at 05:23:41PM -0700, Atish Patra wrote: > Currently, any usable memory area beyond page_offset is removed by adding the > memory sizes from each memblock. That may not work for sparse memory > as memory regions can be very far apart resulting incorrect removal of

Re: [PATCH] Remove duplicate include file

2020-09-09 Thread Mike Rapoport
On Wed, Sep 09, 2020 at 05:36:32PM +0800, Yi Li wrote: > Remove duplicate include file > > Signed-off-by: Yi Li Reviewed-by: Mike Rapoport > --- > arch/arm/mm/mmu.c | 1 - > mm/slab.h | 1 - > 2 files changed, 2 deletions(-) > > diff --git a/arch/arm/m

Re: [PATCH v4 6/6] mm: secretmem: add ability to reserve memory at boot

2020-09-08 Thread Mike Rapoport
Hi David, On Tue, Sep 08, 2020 at 11:09:19AM +0200, David Hildenbrand wrote: > On 20.08.20 17:52, Mike Rapoport wrote: > > On Wed, Aug 19, 2020 at 07:45:29PM +0200, David Hildenbrand wrote: > >> On 19.08.20 19:33, Mike Rapoport wrote: > >>> On Wed, Aug 19, 2

Re: [PATCH] mm/mmu_notifier.c: micro-optimization substitute kzalloc with kmalloc

2020-09-08 Thread Mike Rapoport
ying to the community and maintainers. > > Best regards, > Mateusz Nosek > > On 9/6/2020 4:26 PM, Mike Rapoport wrote: > > Hi, > > > > On Sun, Sep 06, 2020 at 01:43:21PM +0200, mateusznos...@gmail.com wrote: > > > From: Mateusz Nosek > > > &

Re: [RFC PATCH v2 3/3] mm: make generic pXd_addr_end() macros inline functions

2020-09-07 Thread Mike Rapoport
Hi, Some style comments below. On Mon, Sep 07, 2020 at 08:00:58PM +0200, Gerald Schaefer wrote: > From: Alexander Gordeev > > Since pXd_addr_end() macros take pXd page-table entry as a > parameter it makes sense to check the entry type on compile. > Even though most archs do not make use of

Re: [RFC PATCH v2 0/3] mm/gup: fix gup_fast with dynamic page table folding

2020-09-07 Thread Mike Rapoport
On Mon, Sep 07, 2020 at 08:00:55PM +0200, Gerald Schaefer wrote: > This is v2 of an RFC previously discussed here: > https://lore.kernel.org/lkml/20200828140314.8556-1-gerald.schae...@linux.ibm.com/ > > Patch 1 is a fix for a regression in gup_fast on s390, after our conversion > to common

Re: [PATCH] : provide stubs for MEMORY_ISOLATION not set (for Microblaze)

2020-09-07 Thread Mike Rapoport
p HWPoisoned page when offlining > pages") # v3.10 > Reported-by: kernel test robot > Signed-off-by: Randy Dunlap > Cc: Michal Nazarewicz > Cc: Wen Congyang > Cc: Michal Simek > Cc: Christoph Hellwig > Cc: Andrew Morton > Cc: Mike Rapoport >

Re: [PATCH] mm/mmu_notifier.c: micro-optimization substitute kzalloc with kmalloc

2020-09-06 Thread Mike Rapoport
Hi, On Sun, Sep 06, 2020 at 01:43:21PM +0200, mateusznos...@gmail.com wrote: > From: Mateusz Nosek > > Most fields in struct pointed by 'subscriptions' are initialized explicitly > after the allocation. By changing kzalloc to kmalloc the call to memset > is avoided. As the only new code

Re: [PATCH v2 1/3] openrisc: Reserve memblock for initrd

2020-09-06 Thread Mike Rapoport
> This patch fixes the instability issue by reserving memblock space. > > Fixes: ff6c923dbec3 ("openrisc: Add support for external initrd images") > Signed-off-by: Stafford Horne Reviewed-by: Mike Rapoport > --- > arch/openrisc/kernel/setup.c | 10 ++ >

[GIT PULL] Fix min_low_pfn/max_low_pfn build errors on ia64 and microblaze

2020-09-03 Thread Mike Rapoport
Hi Linus, The following changes since commit f75aef392f869018f78cfedf3c320a6b3fcfda6b: Linux 5.9-rc3 (2020-08-30 16:01:54 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock.git tags/fixes-2020-09-03 for you to fetch changes up to

Re: [PATCH v2] arm64: mm: free unused memmap for sparse memory model that define VMEMMAP

2020-09-03 Thread Mike Rapoport
On Thu, Sep 03, 2020 at 01:05:58PM +0100, Catalin Marinas wrote: > On Mon, Aug 17, 2020 at 11:04:05AM +0300, Mike Rapoport wrote: > > On Wed, Aug 12, 2020 at 09:06:55AM +0800, Wei Li wrote: > > > For the memory hole, sparse memory model that define SPARSEMEM_VMEMMAP > > &g

Re: [PATCH v4 0/6] mm: introduce memfd_secret system call to create "secret" memory areas

2020-09-03 Thread Mike Rapoport
Any updates on this? On Tue, Aug 18, 2020 at 05:15:48PM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > Hi, > > This is an implementation of "secret" mappings backed by a file descriptor. > > v4 changes: > * rebase on v5.9-rc1 > * Do not redefi

Re: [PATCH] openrisc: Reserve memblock for initrd

2020-09-01 Thread Mike Rapoport
On Tue, Sep 01, 2020 at 07:20:44PM +0900, Stafford Horne wrote: > On Tue, Sep 01, 2020 at 08:59:24AM +0300, Mike Rapoport wrote: > > On Tue, Sep 01, 2020 at 06:21:01AM +0900, Stafford Horne wrote: > > > Recently OpenRISC added support for external initrd images, but I found >

Re: linux-next: Fixes tag needs some work in the arc-current tree

2020-09-01 Thread Mike Rapoport
On Tue, Sep 01, 2020 at 06:49:28PM +1000, Stephen Rothwell wrote: > Hi all, > > In commit > > 7000c9462d1b ("arc: fix memory initialization for systems with two memory > banks") > > Fixes tag > > Fixes: 51930df5801e ("mm: free_area_init: allow defining max_zone_pfn in > descend ing

Re: [PATCH v2 00/23] Use asm-generic for mmu_context no-op functions

2020-09-01 Thread Mike Rapoport
nge. > > > > I really like this series, I just have some small comments in reply to > > patch 1, otherwise feel free to add > > > > Acked-by: Mike Rapoport > > I can't see your comments in reply to patch 1. Hmm, apparently I forgot to hit "Send"... > Thanks, > Nick > -- Sincerely yours, Mike.

Re: [PATCH v2 01/23] asm-generic: add generic MMU versions of mmu context functions

2020-09-01 Thread Mike Rapoport
On Thu, Aug 27, 2020 at 12:52:27AM +1000, Nicholas Piggin wrote: > Many of these are no-ops on many architectures, so extend mmu_context.h > to cover MMU and NOMMU, and split the NOMMU bits out to nommu_context.h > > Cc: Arnd Bergmann > Cc: linux-a...@vger.kernel.org > Signed-off-by: Nicholas

Re: [PATCH] openrisc: Reserve memblock for initrd

2020-08-31 Thread Mike Rapoport
On Tue, Sep 01, 2020 at 06:21:01AM +0900, Stafford Horne wrote: > Recently OpenRISC added support for external initrd images, but I found > some instability when using larger buildroot initrd images. It turned > out that I forgot to reserve the memblock space for the initrd image. > > This patch

Re: [PATCH] ia64: fix min_low_pfn/max_low_pfn build errors

2020-08-31 Thread Mike Rapoport
https://lore.kernel.org/lkml/alpine.deb.2.22.394.2006291911220.1118...@chino.kir.corp.google.com/ > > Reported-by: kernel test robot > Signed-off-by: Randy Dunlap > Cc: linux...@kvack.org > Cc: Andrew Morton > Cc: David Rientjes > Cc: Mike Rapoport > Cc: Tony Luck >

[RFC/RFT PATCH v3 0/1] arc: add sparsemem support

2020-08-31 Thread Mike Rapoport
From: Mike Rapoport Hi, This is yet another attempt to enable SPARSEMEM on ARC. I've boot tested it on nSIM with haps_hs_defconfig with highmem and sparsemem enabled. With sparsemem the kernel text becomes a bit smaller, but bss and data are slightly increased: $ size discontig/vmlinux

[RFC/RFT PATCH v3 1/1] arc: add sparsemem support

2020-08-31 Thread Mike Rapoport
From: Mike Rapoport Signed-off-by: Mike Rapoport --- arch/arc/Kconfig | 10 ++ arch/arc/include/asm/sparsemem.h | 13 + arch/arc/mm/init.c | 6 +- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 arch/arc/include/asm

Re: [PATCH v2] Documentation: submit-checklist: add clean builds for new Documentation

2020-08-30 Thread Mike Rapoport
/errors). > > Signed-off-by: Randy Dunlap > Cc: Mike Rapoport Reviewed-by: Mike Rapoport > --- > v2: insert "new" inside "without warnings/errors" (Mike) > > Documentation/process/submit-checklist.rst |4 > 1 file changed, 4 inserti

[PATCH] fbdev: remove mbx framebuffer driver

2020-08-30 Thread Mike Rapoport
From: Mike Rapoport The only in-tree user for mbx driver for Intel 2700G graphics chip was cm-x270 platform. Since this platform was removed by the commit 9d3239147d6d ("ARM: pxa: remove Compulab pxa2xx boards") there is no point to keep the obsolete framebuffer driver. Signed-of

Re: [PATCH] Documentation: submit-checklist: add Documentation clean builds

2020-08-30 Thread Mike Rapoport
On Sun, Aug 23, 2020 at 05:38:12PM -0700, Randy Dunlap wrote: > From: Randy Dunlap > > Add to Documentation/process/submit-checklist.rst that patch > submitters should run "make htmldocs" and verify that any > Documentation/ changes (patches) are clean (no new warnings/errors). > >

Re: [PATCH v2 00/23] Use asm-generic for mmu_context no-op functions

2020-08-30 Thread Mike Rapoport
gt; this series stands on its own as a good cleanup whether or not we end > up making that change. I really like this series, I just have some small comments in reply to patch 1, otherwise feel free to add Acked-by: Mike Rapoport > Arnd, is this something you could take through your asm-gene

Re: [ALTERNATE PATCH] memblock: fix min_low_pfn/max_low_pfn build errors

2020-08-30 Thread Mike Rapoport
Hi Randy, On Sat, Aug 29, 2020 at 08:40:51AM -0700, Randy Dunlap wrote: > On 8/29/20 6:04 AM, Mike Rapoport wrote: > > On Fri, Aug 28, 2020 at 05:01:39PM -0700, Randy Dunlap wrote: > >> Export min_low_pfn & max_low_pfn in mm/memblock.c to fix build errors > >> on

Re: [ALTERNATE PATCH] memblock: fix min_low_pfn/max_low_pfn build errors

2020-08-29 Thread Mike Rapoport
k.c: > https://lore.kernel.org/lkml/alpine.deb.2.22.394.2006291911220.1118...@chino.kir.corp.google.com/ > > Reported-by: kernel test robot > Suggested-by: David Rientjes > Signed-off-by: Randy Dunlap > Cc: linux...@kvack.org > Cc: Andrew Morton > Cc: David Rientjes

Re: [PATCH] arc: fix memory initialization for systems with two memory banks

2020-08-29 Thread Mike Rapoport
On Fri, Aug 28, 2020 at 10:17:28PM +, Vineet Gupta wrote: > Hi Mike, > > On 8/28/20 9:39 AM, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Rework if memory map initialization broke initialization of ARC systems > > with two memory banks. Before thes

[PATCH] arc: fix memory initialization for systems with two memory banks

2020-08-28 Thread Mike Rapoport
From: Mike Rapoport Rework if memory map initialization broke initialization of ARC systems with two memory banks. Before these changes, memblock was not aware of nodes configuration and the memory map was always allocated from the "lowmem" bank. After the addition of node i

Re: linux-next: build failure after merge of the akpm-current tree

2020-08-27 Thread Mike Rapoport
use in this function); did you mean ‘sem’? > > Caused by commit > > 52e1a745395d ("arch, drivers: replace for_each_membock() with > for_each_mem_range()") > > Reported by "kernelci.org bot" . Here's the fix: >From 9e46da6793528e35883ff81835d65a8

Re: [PATCH] m68k: mm: Remove superfluous memblock_alloc*() casts

2020-08-26 Thread Mike Rapoport
t Uytterhoeven Reviewed-by: Mike Rapoport > --- > arch/m68k/mm/mcfmmu.c | 2 +- > arch/m68k/mm/motorola.c | 5 ++--- > 2 files changed, 3 insertions(+), 4 deletions(-) > > diff --git a/arch/m68k/mm/mcfmmu.c b/arch/m68k/mm/mcfmmu.c > index 2b9cb4a622811390..eac9dde65193443

Re: [PATCH v4 0/6] mm: introduce memfd_secret system call to create "secret" memory areas

2020-08-26 Thread Mike Rapoport
Any comments on this? On Tue, Aug 18, 2020 at 05:15:48PM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > Hi, > > This is an implementation of "secret" mappings backed by a file descriptor. > > v4 changes: > * rebase on v5.9-rc1 > * Do not redefi

[PATCH] arm: __pmd_free_tlb(): call page table desctructor (Was: BUG: Bad page state in process true pfn:a8fed on arm)

2020-08-25 Thread Mike Rapoport
On Tue, Aug 25, 2020 at 10:53:22AM +0200, Anders Roxell wrote: > On Tue, 25 Aug 2020 at 10:32, Mike Rapoport wrote: > > > > On Tue, Aug 25, 2020 at 01:03:53PM +0530, Naresh Kamboju wrote: > > > On Mon, 24 Aug 2020 at 16:36, Matthew Wilcox wrote: > > > > > &

Re: BUG: Bad page state in process true pfn:a8fed on arm

2020-08-25 Thread Mike Rapoport
cy is starting to matter. > > Link: http://lkml.kernel.org/r/20200627184642.gf25...@casper.infradead.org > Signed-off-by: Matthew Wilcox (Oracle) > Reviewed-by: Mike Rapoport > Cc: Abdul Haleem > Cc: Andy Lutomirski > Cc: Arnd Bergmann >

Re: [PATCH v7 1/3] dma-contiguous: provide the ability to reserve per-numa CMA

2020-08-21 Thread Mike Rapoport
c: Nicolas Saenz Julienne > Cc: Steve Capper > Cc: Andrew Morton > Cc: Mike Rapoport > Signed-off-by: Barry Song > --- > -v7: with respect to Will's comments > * move to use for_each_online_node > * add description if users don't specify pernuma_cma > * provide

Re: [PATCH 3/7] mm: Add an 'end' parameter to find_get_entries

2020-08-20 Thread Mike Rapoport
On Wed, Aug 19, 2020 at 04:05:51PM +0100, Matthew Wilcox (Oracle) wrote: > This simplifies the callers and leads to a more efficient implementation > since the XArray has this functionality already. > > Signed-off-by: Matthew Wilcox (Oracle) > --- > include/linux/pagemap.h | 4 ++-- >

Re: [PATCH 2/7] mm: Rewrite shmem_seek_hole_data

2020-08-20 Thread Mike Rapoport
On Wed, Aug 19, 2020 at 04:05:50PM +0100, Matthew Wilcox (Oracle) wrote: > use the XArray directly instead of using the pagevec abstraction. > The code is simpler and more efficient. > > Signed-off-by: Matthew Wilcox (Oracle) > --- > mm/shmem.c | 61

Re: [PATCH] mm/highmem: Clean up endif comments

2020-08-20 Thread Mike Rapoport
#endif's to indicate the correct end of > blocks for each. > > Signed-off-by: Ira Weiny Reviewed-by: Mike Rapoport > --- > mm/highmem.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/mm/highmem.c b/mm/highmem.c > index 64d8dea47dd1..135

Re: [PATCH v4 6/6] mm: secretmem: add ability to reserve memory at boot

2020-08-20 Thread Mike Rapoport
On Wed, Aug 19, 2020 at 07:45:29PM +0200, David Hildenbrand wrote: > On 19.08.20 19:33, Mike Rapoport wrote: > > On Wed, Aug 19, 2020 at 02:10:43PM +0200, David Hildenbrand wrote: > >> On 19.08.20 13:53, Mike Rapoport wrote: > >>> On Wed, Aug 19, 2020 at 12:49:05PM

Re: [PATCH v3 09/17] memblock: make memblock_debug and related functionality private

2020-08-19 Thread Mike Rapoport
On Wed, Aug 19, 2020 at 12:24:05PM -0700, Andrew Morton wrote: > On Tue, 18 Aug 2020 18:16:26 +0300 Mike Rapoport wrote: > > > From: Mike Rapoport > > > > The only user of memblock_dbg() outside memblock was s390 setup code and it > > is converted to use pr_de

Re: [PATCH v4 6/6] mm: secretmem: add ability to reserve memory at boot

2020-08-19 Thread Mike Rapoport
On Wed, Aug 19, 2020 at 02:10:43PM +0200, David Hildenbrand wrote: > On 19.08.20 13:53, Mike Rapoport wrote: > > On Wed, Aug 19, 2020 at 12:49:05PM +0200, David Hildenbrand wrote: > >> On 18.08.20 16:15, Mike Rapoport wrote: > >>> From: Mike Rapoport > >>&

Re: [PATCH v4 6/6] mm: secretmem: add ability to reserve memory at boot

2020-08-19 Thread Mike Rapoport
On Wed, Aug 19, 2020 at 12:49:05PM +0200, David Hildenbrand wrote: > On 18.08.20 16:15, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Taking pages out from the direct map and bringing them back may create > > undesired fragmentation and usage of the smaller page

Re: [PATCH v4 0/6] mm: introduce memfd_secret system call to create "secret" memory areas

2020-08-19 Thread Mike Rapoport
On Wed, Aug 19, 2020 at 12:47:54PM +0200, David Hildenbrand wrote: > On 18.08.20 16:15, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Hi, > > > > This is an implementation of "secret" mappings backed by a file descriptor. > >

Re: [PATCH v5 5/6] kprobes: Use text_alloc() and text_free()

2020-08-19 Thread Mike Rapoport
On Tue, Aug 18, 2020 at 07:30:33PM +0300, Jarkko Sakkinen wrote: > On Tue, Aug 18, 2020 at 02:51:41PM +0300, Mike Rapoport wrote: > > On Tue, Aug 18, 2020 at 08:30:29AM +0300, Jarkko Sakkinen wrote: > > > On Sun, Jul 26, 2020 at 11:14:08AM +0300, Mike Rapoport wrote: > &

[PATCH v3 02/17] dma-contiguous: simplify cma_early_percent_memory()

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport The memory size calculation in cma_early_percent_memory() traverses memblock.memory rather than simply call memblock_phys_mem_size(). The comment in that function suggests that at some point there should have been call to memblock_analyze() before memblock_phys_mem_size

[PATCH v3 15/17] memblock: remove unused memblock_mem_size()

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport The only user of memblock_mem_size() was x86 setup code, it is gone now and memblock_mem_size() funciton can be removed. Signed-off-by: Mike Rapoport Reviewed-by: Baoquan He --- include/linux/memblock.h | 1 - mm/memblock.c| 15 --- 2 files

[PATCH v3 14/17] x86/setup: simplify reserve_crashkernel()

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport * Replace magic numbers with defines * Replace memblock_find_in_range() + memblock_reserve() with memblock_phys_alloc_range() * Stop checking for low memory size in reserve_crashkernel_low(). The allocation from limited range will anyway fail if there is no enough

[PATCH v3 00/17] memblock: seasonal cleaning^w cleanup

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport Hi, These patches simplify several uses of memblock iterators and hide some of the memblock implementation details from the rest of the system. The patches are on top of v5.9-rc1 v3 changes: * rebase on v5.9-rc1, as the result this required some non-trivial changes

[PATCH v3 13/17] x86/setup: simplify initrd relocation and reservation

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport Currently, initrd image is reserved very early during setup and then it might be relocated and re-reserved after the initial physical memory mapping is created. The "late" reservation of memblock verifies that mapped memory size exceeds the size of initrd, then chec

[PATCH v3 16/17] memblock: implement for_each_reserved_mem_region() using __next_mem_region()

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport Iteration over memblock.reserved with for_each_reserved_mem_region() used __next_reserved_mem_region() that implemented a subset of __next_mem_region(). Use __for_each_mem_range() and, essentially, __next_mem_region() with appropriate parameters to reduce code duplication

[PATCH v3 17/17] memblock: use separate iterators for memory and reserved regions

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport for_each_memblock() is used to iterate over memblock.memory in a few places that use data from memblock_region rather than the memory ranges. Introduce separate for_each_mem_region() and for_each_reserved_mem_region() to improve encapsulation of memblock internals from its

[PATCH v3 12/17] arch, drivers: replace for_each_membock() with for_each_mem_range()

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport There are several occurrences of the following pattern: for_each_memblock(memory, reg) { start = __pfn_to_phys(memblock_region_memory_base_pfn(reg); end = __pfn_to_phys(memblock_region_memory_end_pfn(reg)); /* do

[PATCH v3 10/17] memblock: reduce number of parameters in for_each_mem_range()

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport Currently for_each_mem_range() and for_each_mem_range_rev() iterators are the most generic way to traverse memblock regions. As such, they have 8 parameters and they are hardly convenient to users. Most users choose to utilize one of their wrappers and the only user

[PATCH v3 11/17] arch, mm: replace for_each_memblock() with for_each_mem_pfn_range()

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport There are several occurrences of the following pattern: for_each_memblock(memory, reg) { start_pfn = memblock_region_memory_base_pfn(reg); end_pfn = memblock_region_memory_end_pfn(reg); /* do something with start_pfn

[PATCH v3 09/17] memblock: make memblock_debug and related functionality private

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport The only user of memblock_dbg() outside memblock was s390 setup code and it is converted to use pr_debug() instead. This allows to stop exposing memblock_debug and memblock_dbg() to the rest of the kernel. Signed-off-by: Mike Rapoport Reviewed-by: Baoquan He --- arch/s390

[PATCH v3 08/17] memblock: make for_each_memblock_type() iterator private

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport for_each_memblock_type() is not used outside mm/memblock.c, move it there from include/linux/memblock.h Signed-off-by: Mike Rapoport Reviewed-by: Baoquan He --- include/linux/memblock.h | 5 - mm/memblock.c| 5 + 2 files changed, 5 insertions(+), 5

[PATCH v3 06/17] riscv: drop unneeded node initialization

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport RISC-V does not (yet) support NUMA and for UMA architectures node 0 is used implicitly during early memory initialization. There is no need to call memblock_set_node(), remove this call and the surrounding code. Signed-off-by: Mike Rapoport --- arch/riscv/mm/init.c | 9

[PATCH v3 05/17] h8300, nds32, openrisc: simplify detection of memory extents

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport Instead of traversing memblock.memory regions to find memory_start and memory_end, simply query memblock_{start,end}_of_DRAM(). Signed-off-by: Mike Rapoport Acked-by: Stafford Horne --- arch/h8300/kernel/setup.c| 8 +++- arch/nds32/kernel/setup.c| 8

[PATCH v3 04/17] arm64: numa: simplify dummy_numa_init()

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport dummy_numa_init() loops over memblock.memory and passes nid=0 to numa_add_memblk() which essentially wraps memblock_set_node(). However, memblock_set_node() can cope with entire memory span itself, so the loop over memblock.memory regions is redundant. Using a single call

[PATCH v3 07/17] mircoblaze: drop unneeded NUMA and sparsemem initializations

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport microblaze does not support neither NUMA not SPARSMEM, so there is no point to call memblock_set_node() and sparse_memory_present_with_active_regions() functions during microblaze memory initialization. Remove these calls and the surrounding code. Signed-off-by: Mike

[PATCH v3 03/17] arm, xtensa: simplify initialization of high memory pages

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport The function free_highpages() in both arm and xtensa essentially open-code for_each_free_mem_range() loop to detect high memory pages that were not reserved and that should be initialized and passed to the buddy allocator. Replace open-coded implementation

[PATCH v3 01/17] KVM: PPC: Book3S HV: simplify kvm_cma_reserve()

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport The memory size calculation in kvm_cma_reserve() traverses memblock.memory rather than simply call memblock_phys_mem_size(). The comment in that function suggests that at some point there should have been call to memblock_analyze() before memblock_phys_mem_size() could

[PATCH v4 6/6] mm: secretmem: add ability to reserve memory at boot

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport Taking pages out from the direct map and bringing them back may create undesired fragmentation and usage of the smaller pages in the direct mapping of the physical memory. This can be avoided if a significantly large area of the physical memory would be reserved

[PATCH v4 5/6] mm: secretmem: use PMD-size pages to amortize direct map fragmentation

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport Removing a PAGE_SIZE page from the direct map every time such page is allocated for a secret memory mapping will cause severe fragmentation of the direct map. This fragmentation can be reduced by using PMD-size pages as a pool for small pages for secret memory mappings. Add

[PATCH v4 4/6] arch, mm: wire up memfd_secret system call were relevant

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport Wire up memfd_secret system call on architectures that define ARCH_HAS_SET_DIRECT_MAP, namely arm64, risc-v and x86. Signed-off-by: Mike Rapoport Acked-by: Palmer Dabbelt Acked-by: Arnd Bergmann --- arch/arm64/include/asm/unistd.h| 2 +- arch/arm64/include/asm

<    4   5   6   7   8   9   10   11   12   13   >