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

2020-07-20 Thread Mike Rapoport
From: Mike Rapoport Introduce "secretmemfd" 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 secretme

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

2020-07-20 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 1/6] mm: add definition of PMD_PAGE_ORDER

2020-07-20 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 4/6] arch, mm: wire up secretmemfd system call were relevant

2020-07-20 Thread Mike Rapoport
From: Mike Rapoport Wire up secretmemfd system call on architectures that define ARCH_HAS_SET_DIRECT_MAP, namely arm64, risc-v and x86. Signed-off-by: Mike Rapoport --- arch/arm64/include/asm/unistd32.h | 2 ++ arch/arm64/include/uapi/asm/unistd.h | 1 + arch/riscv/include/asm/unistd.h

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

2020-07-20 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 9886db20d94f..af0a92f8f6bc

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

2020-07-20 Thread Mike Rapoport
From: Mike Rapoport Hi, This is the third version of "secret" mappings implementation backed by a file descriptor. The file descriptor is created using a dedicated secretmemfd system call The desired protection mode for the memory is configured using flags parameter of the s

[PATCH RESEND] docs/core-api: memory-allocation: describe reclaim behaviour

2020-07-19 Thread Mike Rapoport
From: Mike Rapoport Changelog of commit dcda9b04713c ("mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic") has very nice description of GFP flags that affect reclaim behaviour of the page allocator. It would be pity to keep this description buried

Re: [PATCH v4 3/7] vmalloc: Add text_alloc() and text_free()

2020-07-18 Thread Mike Rapoport
_alloc() on x86, as Peter proposed and then add text_alloc_kprobes() that can be overridden by the architectures. x86 could use text_alloc(), arm64 vmalloc() with options of their choice and the fallback would remain module_alloc(). Something like (untested) patch below: >From 928b6903e7

Re: [PATCH v3 1/3] kprobes: Add text_alloc() and text_free()

2020-07-15 Thread Mike Rapoport
On Wed, Jul 15, 2020 at 12:36:02PM -0700, Kees Cook wrote: > On Wed, Jul 15, 2020 at 01:32:27AM +0300, Jarkko Sakkinen wrote: > > Introduce new API for allocating space for code generaed at run-time > > leveraging from module_alloc() and module_memfree() code. Use this to > > perform memory

Re: [PATCH 2/2] doc: filesystems: proc: Fix literal blocks

2020-07-14 Thread Mike Rapoport
y: Chris Packham Acked-by: Mike Rapoport > --- > Documentation/filesystems/proc.rst | 38 +- > 1 file changed, 21 insertions(+), 17 deletions(-) > > diff --git a/Documentation/filesystems/proc.rst > b/Documentation/filesystems/proc.rst

Re: [PATCH 1/2] doc: filesystems: proc: Remove stray '-' preventing table output

2020-07-14 Thread Mike Rapoport
Removing the stray '-' > resolves the error and produces the desired table. > > Signed-off-by: Chris Packham Acked-by: Mike Rapoport > --- > Documentation/filesystems/proc.rst | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/filesyste

Re: Re: [PATCH v18 01/14] mm/page_ext: Export lookup_page_ext() to GPL modules

2020-07-13 Thread Mike Rapoport
On Mon, Jul 13, 2020 at 02:21:43PM +0200, SeongJae Park wrote: > On Mon, 13 Jul 2020 15:08:42 +0300 Mike Rapoport wrote: > > > Hi, > > > > On Mon, Jul 13, 2020 at 10:41:31AM +0200, SeongJae Park wrote: > > > From: SeongJae Park > > > > >

Re: [PATCH] arm: remove it8152 PCI controller driver

2020-07-13 Thread Mike Rapoport
Any comments? Shall I put it into the patch system or will it go via arm-soc tree? On Wed, Jul 08, 2020 at 09:30:59PM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > The it8152 PCI host controller was only used by cm-x2xx platforms. > Since these platforms were removed, there

Re: [RFC PATCH v2 4/5] mm: secretmem: use PMD-size pages to amortize direct map fragmentation

2020-07-13 Thread Mike Rapoport
On Mon, Jul 13, 2020 at 02:05:05PM +0300, Kirill A. Shutemov wrote: > On Mon, Jul 06, 2020 at 08:20:50PM +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: [RFC PATCH v2 3/5] mm: extend memfd with ability to create "secret" memory areas

2020-07-13 Thread Mike Rapoport
On Mon, Jul 13, 2020 at 01:58:12PM +0300, Kirill A. Shutemov wrote: > On Mon, Jul 06, 2020 at 08:20:49PM +0300, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Extend memfd_create() system call with the ability to create memory areas > > visible only in the co

Re: [PATCH v18 01/14] mm/page_ext: Export lookup_page_ext() to GPL modules

2020-07-13 Thread Mike Rapoport
Hi, On Mon, Jul 13, 2020 at 10:41:31AM +0200, SeongJae Park wrote: > From: SeongJae Park > > This commit exports 'lookup_page_ext()' to GPL modules. It will be used > by DAMON in following commit for the implementation of the region based > sampling. Maybe I'm missing something, but why is

Re: [PATCH v2 08/22] memblock: Introduce a generic phys_addr_to_target_node()

2020-07-13 Thread Mike Rapoport
fallback to reserved ranges is x86 specfic because on x86 most of the reserved areas is not in memblock.memory. AFAIK, no other architecture does this. And x86 anyway has implementation of phys_to_target_node(). > Cc: Mike Rapoport > Cc: Jia He > Cc: Will Deacon > Cc: David Hilden

Re: [PATCH v2 07/22] numa: Introduce a generic memory_add_physaddr_to_nid()

2020-07-13 Thread Mike Rapoport
[1] to have a weak default for memory_add_physaddr_to_nid() and let architectures override it. [1] https://lore.kernel.org/lkml/20200710031619.18762-2-justin...@arm.com > Cc: Mike Rapoport > Cc: Jia He > Cc: Will Deacon > Cc: David Hildenbrand > Cc: Andrew Morton &g

[PATCH] mm/sparse: cleanup the code surrounding memory_present()

2020-07-12 Thread Mike Rapoport
From: Mike Rapoport After removal of CONFIG_HAVE_MEMBLOCK_NODE_MAP we have two equivalent functions that call memory_present() for each region in memblock.memory: sparse_memory_present_with_active_regions() and membocks_present(). Moreover, all architectures have a call to either

Re: [PATCH] docs/core-api: memory-allocation: describe reclaim behaviour

2020-07-12 Thread Mike Rapoport
Another ping :) On Fri, Jul 03, 2020 at 12:55:04AM +0300, Mike Rapoport wrote: > Gentle ping. > > On Fri, Jun 26, 2020 at 05:29:50PM +0300, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Changelog of commit dcda9b04713c ("mm, tree wide: replace __GFP_R

Re: Add and use a generic version of devmem_is_allowed()

2020-07-12 Thread Mike Rapoport
going on, but I'm not putting them in the > RISC-V tree as I don't want to step on anyone's toes. If you want me to take > yours along with the others then please say something, as otherwise I'll > probably forget. For the series Acked-by: Mike Rapoport > I've put the whole thing at

Re: [RFC PATCH v2 1/5] mm: make HPAGE_PxD_{SHIFT,MASK,SIZE} always available

2020-07-10 Thread Mike Rapoport
On Fri, Jul 10, 2020 at 05:57:46PM +0100, Matthew Wilcox wrote: > On Fri, Jul 10, 2020 at 12:40:37PM -0400, Andrea Arcangeli wrote: > > Hello Hugh and Mike, > > > > On Mon, Jul 06, 2020 at 10:07:34PM -0700, Hugh Dickins wrote: > > > Adding Andrea to Cc, he's the one who structured it that way, >

Re: [PATCH 1/5] lib: Add a generic version of devmem_is_allowed()

2020-07-09 Thread Mike Rapoport
Hi Palmer, On Thu, Jul 09, 2020 at 01:05:48PM -0700, Palmer Dabbelt wrote: > From: Palmer Dabbelt > > As part of adding support for STRICT_DEVMEM to the RISC-V port, Zong > provided a devmem_is_allowed() implementation that's exactly the same as > all the others I checked. Instead I'm adding a

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

2020-07-09 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 | 7 ++- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 arch/arc/include/asm

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

2020-07-09 Thread Mike Rapoport
From: Mike Rapoport Hi, It took me a while to get back to it, but better late than never :) This patch adds SPARSEMEM support as an alternative to DISCONTIGMEM in the case when there are two DRAM banks populated. I've verified that it boots on nsim, but I could not find a way to make nsim

Re: [PATCH v3 4/6] mm: don't export memory_add_physaddr_to_nid in arch specific directory

2020-07-09 Thread Mike Rapoport
On Thu, Jul 09, 2020 at 03:11:04AM +0100, Matthew Wilcox wrote: > On Thu, Jul 09, 2020 at 10:06:27AM +0800, Jia He wrote: > > After a general version of __weak memory_add_physaddr_to_nid implemented > > and exported , it is no use exporting twice in arch directory even if > > e,g, ia64/x86 have

[PATCH] arm: remove it8152 PCI controller driver

2020-07-08 Thread Mike Rapoport
From: Mike Rapoport The it8152 PCI host controller was only used by cm-x2xx platforms. Since these platforms were removed, there is no point to keep it8152 driver. Signed-off-by: Mike Rapoport --- arch/arm/Kconfig | 6 - arch/arm/common/Makefile | 1

Re: [PATCH v2 0/2] sparc32: srmmu: improve type safety of __nocache_fix()

2020-07-08 Thread Mike Rapoport
Gentle ping. On Sat, Jun 27, 2020 at 11:16:51AM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > Hi, > > As discussed at [1] the __nocache_fix() macro in sparc's SRMMU can be made > type safe and so the compiler will yell anout misuse of pXd pointers for > wh

Re: [PATCH v2 1/3] arm64/numa: export memory_add_physaddr_to_nid as EXPORT_SYMBOL_GPL

2020-07-08 Thread Mike Rapoport
On Wed, Jul 08, 2020 at 06:10:19PM +0200, David Hildenbrand wrote: > On 08.07.20 17:50, Dan Williams wrote: > > On Wed, Jul 8, 2020 at 3:04 AM David Hildenbrand wrote: > >> > > > > I'm not quite understanding the concern, or requirement about > > "updating memblock" in the hotplug path. The

[PATCH] mailmap: add entry for Mike Rapoport

2020-07-08 Thread Mike Rapoport
From: Mike Rapoport Add an entry to connect my email addresses. Signed-off-by: Mike Rapoport --- Hi Andrew, I hope you don't mind routing this trough mm tree Thanks, Mike. .mailmap | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.mailmap b/.mailmap index c69d9c734fb5..2395c64c594d

Re: [PATCH v2 1/3] arm64/numa: export memory_add_physaddr_to_nid as EXPORT_SYMBOL_GPL

2020-07-08 Thread Mike Rapoport
On Wed, Jul 08, 2020 at 11:25:36AM +0200, David Hildenbrand wrote: > On 08.07.20 11:15, Mike Rapoport wrote: > >>>>>> > >>> But on more theoretical/fundmanetal level, I think we lack a generic > >>> abstraction similar to e.g. x86 'struct numa_memi

Re: [PATCH v2 1/3] arm64/numa: export memory_add_physaddr_to_nid as EXPORT_SYMBOL_GPL

2020-07-08 Thread Mike Rapoport
On Wed, Jul 08, 2020 at 10:45:17AM +0200, David Hildenbrand wrote: > On 08.07.20 10:39, Mike Rapoport wrote: > > On Wed, Jul 08, 2020 at 10:26:41AM +0200, David Hildenbrand wrote: > >> On 08.07.20 09:50, Dan Williams wrote: > >>> On Wed, Jul 8, 2020 at 12:22 AM D

Re: [PATCH v2 1/3] arm64/numa: export memory_add_physaddr_to_nid as EXPORT_SYMBOL_GPL

2020-07-08 Thread Mike Rapoport
On Wed, Jul 08, 2020 at 10:26:41AM +0200, David Hildenbrand wrote: > On 08.07.20 09:50, Dan Williams wrote: > > On Wed, Jul 8, 2020 at 12:22 AM David Hildenbrand wrote: > >> > On Tue 07-07-20 13:59:15, Jia He wrote: > > This exports memory_add_physaddr_to_nid() for module driver

Re: [PATCH v2 1/3] arm64/numa: export memory_add_physaddr_to_nid as EXPORT_SYMBOL_GPL

2020-07-08 Thread Mike Rapoport
On Wed, Jul 08, 2020 at 09:16:01AM +0200, David Hildenbrand wrote: > On 08.07.20 09:04, Dan Williams wrote: > > On Tue, Jul 7, 2020 at 11:59 PM David Hildenbrand wrote: > >> > >> On 08.07.20 08:22, Mike Rapoport wrote: > >>> On Tue, Jul 07, 2020

Re: [PATCH v2 1/3] arm64/numa: export memory_add_physaddr_to_nid as EXPORT_SYMBOL_GPL

2020-07-08 Thread Mike Rapoport
On Wed, Jul 08, 2020 at 09:21:25AM +0200, David Hildenbrand wrote: > On 08.07.20 07:27, Mike Rapoport wrote: > > On Tue, Jul 07, 2020 at 03:05:48PM -0700, Dan Williams wrote: > >> On Tue, Jul 7, 2020 at 11:01 AM Mike Rapoport wrote: > >>> > >>> On Tu

Re: [PATCH -next] Documentation/vm: fix tables in arch_pgtable_helpers

2020-07-08 Thread Mike Rapoport
n Corbet > Cc: linux-...@vger.kernel.org > Cc: Anshuman Khandual > Cc: Mike Rapoport > Cc: linux-a...@vger.kernel.org > Cc: linux...@kvack.org > Cc: Andrew Morton > --- > Documentation/vm/arch_pgtable_helpers.rst | 333 ++-- > 1 file changed, 116 insertions(+), 21

Re: [PATCH v2 1/3] arm64/numa: export memory_add_physaddr_to_nid as EXPORT_SYMBOL_GPL

2020-07-08 Thread Mike Rapoport
On Tue, Jul 07, 2020 at 09:27:43PM -0700, Dan Williams wrote: > On Tue, Jul 7, 2020 at 9:08 PM Justin He wrote: > [..] > > > Especially for architectures that use memblock info for numa info > > > (which seems to be everyone except x86) why not implement a generic > > >

Re: [PATCH v2 1/3] arm64/numa: export memory_add_physaddr_to_nid as EXPORT_SYMBOL_GPL

2020-07-08 Thread Mike Rapoport
On Tue, Jul 07, 2020 at 10:48:19PM -0700, Dan Williams wrote: > On Tue, Jul 7, 2020 at 10:33 PM Mike Rapoport wrote: > > > > On Tue, Jul 07, 2020 at 08:56:36PM -0700, Dan Williams wrote: > > > On Tue, Jul 7, 2020 at 7:20 PM Justin He wrote: > > &

Re: [PATCH v2 1/3] arm64/numa: export memory_add_physaddr_to_nid as EXPORT_SYMBOL_GPL

2020-07-07 Thread Mike Rapoport
M > > > To: Justin He > > > Cc: Catalin Marinas ; Will Deacon > > > ; Dan Williams ; Vishal Verma > > > ; Dave Jiang ; Andrew > > > Morton ; Mike Rapoport ; > > > Baoquan He ; Chuhong Yuan ; linux- > > > arm-ker...@lists.infradead.org; li

Re: [PATCH v2 1/3] arm64/numa: export memory_add_physaddr_to_nid as EXPORT_SYMBOL_GPL

2020-07-07 Thread Mike Rapoport
On Tue, Jul 07, 2020 at 03:05:48PM -0700, Dan Williams wrote: > On Tue, Jul 7, 2020 at 11:01 AM Mike Rapoport wrote: > > > > On Tue, Jul 07, 2020 at 02:26:08PM +0200, David Hildenbrand wrote: > > > On 07.07.20 14:13, Mike Rapoport wrote: > > > > On Tue, Jul

Re: [PATCH v2 1/3] arm64/numa: export memory_add_physaddr_to_nid as EXPORT_SYMBOL_GPL

2020-07-07 Thread Mike Rapoport
On Tue, Jul 07, 2020 at 02:26:08PM +0200, David Hildenbrand wrote: > On 07.07.20 14:13, Mike Rapoport wrote: > > On Tue, Jul 07, 2020 at 01:54:54PM +0200, Michal Hocko wrote: > >> On Tue 07-07-20 13:59:15, Jia He wrote: > >>> This exports memory_add_physaddr_to_

[PATCH] mm: vmalloc: remove redundant asignmnet in unmap_kernel_range_noflush()

2020-07-07 Thread Mike Rapoport
From: Mike Rapoport 'addr' is set to 'start' and then a few lines afterwards 'start' is set to 'addr'. Remove the second asignment. Fixes: 2ba3e6947aed ("mm/vmalloc: track which page-table levels were modified") Signed-off-by: Mike Rapoport --- mm/vmalloc.c | 1 - 1 file changed,

Re: [Ksummit-discuss] [Tech-board-discuss] [PATCH] CodingStyle: Inclusive Terminology

2020-07-07 Thread Mike Rapoport
On Tue, Jul 07, 2020 at 09:41:47AM -0400, Steven Rostedt wrote: > On Tue, 7 Jul 2020 01:54:23 -0700 > Kees Cook wrote: > > > "I will whitelist the syscall" -- sounds correct to me (same for > > "it is whitelisted" or "it is in whitelisting mode"). > > > > "I will allow-list the syscall" --

Re: [PATCH v2 1/3] arm64/numa: export memory_add_physaddr_to_nid as EXPORT_SYMBOL_GPL

2020-07-07 Thread Mike Rapoport
On Tue, Jul 07, 2020 at 01:54:54PM +0200, Michal Hocko wrote: > On Tue 07-07-20 13:59:15, Jia He wrote: > > This exports memory_add_physaddr_to_nid() for module driver to use. > > > > memory_add_physaddr_to_nid() is a fallback option to get the nid in case > > NUMA_NO_NID is detected. > > > >

Re: [PATCH v3] mm/hugetlb: avoid hardcoding while checking if cma is enable

2020-07-07 Thread Mike Rapoport
gt; > Fixes: cf11e85fc08c ("mm: hugetlb: optionally allocate gigantic hugepages > using cma") > Cc: Mike Kravetz > Cc: Jonathan Cameron > Acked-by: Roman Gushchin > Signed-off-by: Barry Song Acked-by: Mike Rapoport > --- > -v3: add acked-by; make code more canonical

Re: [PATCH v17 12/15] Documentation/admin-guide/mm: Add a document for DAMON

2020-07-07 Thread Mike Rapoport
Hello SeongJae, On Mon, Jul 06, 2020 at 01:53:19PM +0200, SeongJae Park wrote: > From: SeongJae Park > > This commit adds a document for DAMON under > `Documentation/admin-guide/mm/damon/`. > > Signed-off-by: SeongJae Park > --- > Documentation/admin-guide/mm/damon/api.rst| 20 ++ >

Re: [PATCH v2] mm/hugetlb: avoid hardcoding while checking if cma is enable

2020-07-07 Thread Mike Rapoport
On Mon, Jul 06, 2020 at 08:36:31PM -0700, Roman Gushchin wrote: > On Tue, Jul 07, 2020 at 03:11:56PM +1200, Barry Song wrote: > > hugetlb_cma[0] can be NULL due to various reasons, for example, node0 has > > no memory. so NULL hugetlb_cma[0] doesn't necessarily mean cma is not > > enabled.

Re: [Ksummit-discuss] [PATCH] CodingStyle: Inclusive Terminology

2020-07-07 Thread Mike Rapoport
On Mon, Jul 06, 2020 at 10:56:17PM -0700, Kees Cook wrote: > On Mon, Jul 06, 2020 at 09:29:46AM -0700, Andy Lutomirski wrote: > > Is most contexts where 'whitelist' or 'blacklist' might be used, a > > descriptive phrase could be used instead. For example, a seccomp > > filter could have a 'list

Re: [RFC PATCH v2 1/5] mm: make HPAGE_PxD_{SHIFT,MASK,SIZE} always available

2020-07-07 Thread Mike Rapoport
Hi Hugh, On Mon, Jul 06, 2020 at 10:07:34PM -0700, Hugh Dickins wrote: > On Mon, 6 Jul 2020, Mike Rapoport wrote: > > From: Mike Rapoport > > > > The definitions of shift, mask and size for the second and the third level > > of the leaf pages are available only when

[RFC PATCH v2 5/5] mm: secretmem: add ability to reserve memory at boot

2020-07-06 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

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

2020-07-06 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

[RFC PATCH v2 3/5] mm: extend memfd with ability to create "secret" memory areas

2020-07-06 Thread Mike Rapoport
From: Mike Rapoport Extend memfd_create() 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 memfd_create system

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

2020-07-06 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 9886db20d94f..af0a92f8f6bc

[RFC PATCH v2 1/5] mm: make HPAGE_PxD_{SHIFT,MASK,SIZE} always available

2020-07-06 Thread Mike Rapoport
From: Mike Rapoport The definitions of shift, mask and size for the second and the third level of the leaf pages are available only when CONFIG_TRANSPARENT_HUGEPAGE is set. Otherwise they evaluate to BUILD_BUG(). There is no explanation neither in the code nor in the changelog why the usage

[RFC PATCH v2 0/5] mm: extend memfd with ability to create "secret" memory areas

2020-07-06 Thread Mike Rapoport
From: Mike Rapoport Hi, This is a second version of "secret" mappings implementation backed by a file descriptor. The file descriptor is created using memfd_create() syscall with a new MFD_SECRET flag. The file descriptor should be configured using ioctl() to define the desired

Re: [Ksummit-discuss] [PATCH] CodingStyle: Inclusive Terminology

2020-07-06 Thread Mike Rapoport
Hi Chris, On Mon, Jul 06, 2020 at 12:45:34PM +, Chris Mason via Ksummit-discuss wrote: > On 5 Jul 2020, at 0:55, Willy Tarreau wrote: > > > On Sat, Jul 04, 2020 at 01:02:51PM -0700, Dan Williams wrote: > >> +Non-inclusive terminology has that same distracting effect which is > >> why > >>

Re: [PATCH v3] x86/speculation/l1tf: Add KConfig for setting the L1D cache flush mode

2020-07-05 Thread Mike Rapoport
On Fri, Jul 03, 2020 at 07:00:11AM -0700, Doug Anderson wrote: > Hi, > > On Fri, Jul 3, 2020 at 4:40 AM Mike Rapoport wrote: > > > > On Thu, Jul 02, 2020 at 11:43:47PM -0700, Abhishek Bhardwaj wrote: > > > We have tried to steer away from kernel command line

Re: [PATCH 0/4] Documentation: PCI: eliminate doubled words

2020-07-05 Thread Mike Rapoport
r.kernel.org > Cc: Linas Vepstas Acked-by: Mike Rapoport > Documentation/PCI/endpoint/pci-endpoint-cfs.rst |2 +- > Documentation/PCI/endpoint/pci-endpoint.rst |2 +- > Documentation/PCI/pci-error-recovery.rst|2 +- > Documentation/PCI/pci.rst

Re: [PATCH 0/5] Documenation: hwmon: eliminate doubled words

2020-07-05 Thread Mike Rapoport
On Fri, Jul 03, 2020 at 01:56:44PM -0700, Randy Dunlap wrote: > Eliminate duplicated words in Documentation/hwmon/ files. > > Cc: Jonathan Corbet > Cc: linux-...@vger.kernel.org > Cc: Jean Delvare > Cc: Guenter Roeck > Cc: linux-hw...@vger.kernel.org Ac

Re: [PATCH 0/3] Documentation: arm64: eliminate duplicated words

2020-07-05 Thread Mike Rapoport
nel.org > Cc: linux-arm-ker...@lists.infradead.org > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Dave Martin Acked-by: Mike Rapoport > > Documentation/arm64/acpi_object_usage.rst |2 +- > Documentation/arm64/arm-acpi.rst |2 +- > Documentation/arm64/sve.rst

Re: [PATCH v3] x86/speculation/l1tf: Add KConfig for setting the L1D cache flush mode

2020-07-03 Thread Mike Rapoport
On Thu, Jul 02, 2020 at 11:43:47PM -0700, Abhishek Bhardwaj wrote: > We have tried to steer away from kernel command line args for a few reasons. > > I am paraphrasing my colleague Doug's argument here (CC'ed him as well) - > > - The command line args are getting unwieldy. Kernel command line >

Re: [PATCH] docs/core-api: memory-allocation: describe reclaim behaviour

2020-07-02 Thread Mike Rapoport
Gentle ping. On Fri, Jun 26, 2020 at 05:29:50PM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > Changelog of commit dcda9b04713c ("mm, tree wide: replace __GFP_REPEAT by > __GFP_RETRY_MAYFAIL with more useful semantic") has very nice description > of GFP

Re: [PATCH 0/8] mm: cleanup usage of

2020-07-02 Thread Mike Rapoport
Gentle ping. On Sat, Jun 27, 2020 at 05:34:45PM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > Hi, > > Most architectures have very similar versions of pXd_alloc_one() and > pXd_free_one() for intermediate levels of page table. > These patches add generic versio

Re: [PATCH v2 1/2] mm/memblock: expose only miminal interface to add/walk physmem

2020-07-01 Thread Mike Rapoport
On Wed, Jul 01, 2020 at 05:31:57PM +0200, Heiko Carstens wrote: > On Wed, Jul 01, 2020 at 06:06:43PM +0300, Mike Rapoport wrote: > > Hi David, > > > > On Wed, Jul 01, 2020 at 04:18:29PM +0200, David Hildenbrand wrote: > > > "physmem" in the memblock alloca

Re: [PATCH v2 1/2] mm/memblock: expose only miminal interface to add/walk physmem

2020-07-01 Thread Mike Rapoport
gt; stop setting CONFIG_HAVE_MEMBLOCK_PHYS_MAP for s390x next. As you noted in the previous version it should have been CONFIG_ARCH_KEEP_MEMBLOCK ;-) > Cc: Heiko Carstens > Cc: Vasily Gorbik > Cc: Christian Borntraeger > Cc: Mike Rapoport > Cc: Andrew Morton > Signed-off-by:

Re: [PATCH 6/6] mm: Add memalloc_nowait

2020-07-01 Thread Mike Rapoport
On Wed, Jul 01, 2020 at 07:53:46AM +0200, Michal Hocko wrote: > On Wed 01-07-20 05:12:03, Matthew Wilcox wrote: > > On Tue, Jun 30, 2020 at 08:34:36AM +0200, Michal Hocko wrote: > > > On Mon 29-06-20 22:28:30, Matthew Wilcox wrote: > > > [...] > > > > The documentation is hard to add a new case

Re: [PATCH v1 1/2] mm/memblock: expose only miminal interface to add/walk physmem

2020-06-30 Thread Mike Rapoport
ing CONFIG_HAVE_MEMBLOCK_PHYS_MAP for s390x next. > > Cc: Heiko Carstens > Cc: Vasily Gorbik > Cc: Christian Borntraeger > Cc: Mike Rapoport > Cc: Andrew Morton > Signed-off-by: David Hildenbrand > --- > arch/s390/kernel/crash_dump.c | 6

Re: [RFC PATCH 1/7] x86/cpufeatures: add X86_FEATURE_SCI

2020-06-30 Thread Mike Rapoport
On Tue, Jun 30, 2020 at 08:08:59AM +0800, hackapple wrote: > What’s the version of kernel? It was around 5.2 time frame, I think. -- Sincerely yours, Mike.

Re: ERROR: "min_low_pfn" undefined!

2020-06-30 Thread Mike Rapoport
duce the error with nommu_defconfig. > I wonder why we don't simply do EXPORT_SYMBOL() in mm/memblock.c, > non-microblaze architectures do this themselves because it doesn't get > generically exported: > arch/ia64/kernel/ia64_ksyms.c:EXPORT_SYMBOL(min_low_pfn); /* defined by &g

Re: [PATCH 6/6] mm: Add memalloc_nowait

2020-06-29 Thread Mike Rapoport
On June 29, 2020 3:52:31 PM GMT+03:00, Michal Hocko wrote: >On Mon 29-06-20 13:18:16, Matthew Wilcox wrote: >> On Mon, Jun 29, 2020 at 08:08:51AM +0300, Mike Rapoport wrote: >> > > @@ -886,8 +868,12 @@ static struct dm_buffer >*__alloc_buffer_wait_no_callbac

Re: [PATCH 1/2] m68k: nommu: register start of the memory with memblock

2020-06-29 Thread Mike Rapoport
Hi Greg, On Mon, Jun 29, 2020 at 11:10:16AM +1000, Greg Ungerer wrote: > Hi Mike, > > On 17/6/20 10:33 pm, Greg Ungerer wrote: > > Hi Mike, > > > > On 17/6/20 4:53 pm, Mike Rapoport wrote: > > > From: Mike Rapoport > > > > > > T

Re: [PATCH] doc: add link to sparse's home page/internal docs

2020-06-29 Thread Mike Rapoport
On Sun, Jun 28, 2020 at 11:50:34AM +0200, Luc Van Oostenryck wrote: > Sparse's home page used to be a wiki (sparse.wiki.kernel.org) > but this wiki only contained a short intro and the release notes. > But nowadays, sparse's main page is sparse.docs.kernel.org, > which contains all what was in the

Re: [PATCH 6/6] mm: Add memalloc_nowait

2020-06-29 Thread Mike Rapoport
On Thu, Jun 25, 2020 at 12:31:22PM +0100, Matthew Wilcox (Oracle) wrote: > Similar to memalloc_noio() and memalloc_nofs(), memalloc_nowait() > guarantees we will not sleep to reclaim memory. Use it to simplify > dm-bufio's allocations. > > Signed-off-by: Matthew Wilcox (Oracle) > --- >

Re: [PATCH] mm: remove the redundancy code

2020-06-29 Thread Mike Rapoport
On Mon, Jun 29, 2020 at 11:50:15AM -0700, David Rientjes wrote: > On Tue, 30 Jun 2020, Su Hui wrote: > > > remove the redundancy code, the zone_start_pfn > > is assigned from zone->zone_start_pfn > > Signed-off-by: Su Hui > > I don't think this is redundant, it's used by memory hotplug when

Re: [PATCH v2] doc: add link to sparse's home page/internal docs

2020-06-29 Thread Mike Rapoport
ins all what was in the wiki but also other documentation, > mainly oriented about sparse's internals. > > So, add a link to this in the kernel documentation. > > Signed-off-by: Luc Van Oostenryck Acked-by: Mike Rapoport > --- > > Changes since v1: > * fix a typo (s

Re: [PATCH 4/8] asm-generic: pgalloc: provide generic pmd_alloc_one() and pmd_free_one()

2020-06-29 Thread Mike Rapoport
On Sat, Jun 27, 2020 at 08:03:04PM +0100, Matthew Wilcox wrote: > On Sat, Jun 27, 2020 at 05:34:49PM +0300, Mike Rapoport wrote: > > More elaborate versions on arm64 and x86 account memory for the user page > > tables and call to pgtable_pmd_page_ctor() as the part of PMD page >

[PATCH v2] sched: fix build with GCC_PLUGIN_RANDSTRUCT

2020-06-28 Thread Mike Rapoport
From: Mike Rapoport Since the commit a148866489fb ("sched: Replace rq::wake_list") task_struct and CSD_TYPE_TTWU objects can be on the same queue and this requires that have layout similar enough. This assumption is broken when CONFIG_GCC_PLUGIN_RANDSTRUCT is enabled: CHK

Re: [PATCH 4/8] asm-generic: pgalloc: provide generic pmd_alloc_one() and pmd_free_one()

2020-06-28 Thread Mike Rapoport
On Sat, Jun 27, 2020 at 08:03:04PM +0100, Matthew Wilcox wrote: > On Sat, Jun 27, 2020 at 05:34:49PM +0300, Mike Rapoport wrote: > > More elaborate versions on arm64 and x86 account memory for the user page > > tables and call to pgtable_pmd_page_ctor() as the part of PMD page >

Re: [PATCH 9/8] mm: Account PMD tables like PTE tables

2020-06-28 Thread Mike Rapoport
With larger process address spaces and ASLR, the number of PMDs in use > is higher than it used to be so the inaccuracy is starting to matter. > > Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Mike Rapoport > --- > include/linux/mm.h | 24 > 1 fil

Re: [PATCH] sched: fix build with GCC_PLUGIN_RANDSTRUCT

2020-06-28 Thread Mike Rapoport
On Sat, Jun 27, 2020 at 06:12:14PM -0400, Steven Rostedt wrote: > On Sat, 20 Jun 2020 13:41:36 +0300 > Mike Rapoport wrote: > > > From: Mike Rapoport > > > > Since the commit a148866489fb ("sched: Replace rq::wake_list") > > task_struct and CSD

[PATCH 6/8] asm-generic: pgalloc: provide generic pgd_free()

2020-06-27 Thread Mike Rapoport
From: Mike Rapoport Most architectures define pgd_free() as a wrapper for free_page(). Provide a generic version in asm-generic/pgalloc.h and enable its use for most architectures. Signed-off-by: Mike Rapoport --- arch/alpha/include/asm/pgalloc.h | 6 -- arch/arm/include/asm

[PATCH 4/8] asm-generic: pgalloc: provide generic pmd_alloc_one() and pmd_free_one()

2020-06-27 Thread Mike Rapoport
From: Mike Rapoport For most architectures that support >2 levels of page tables, pmd_alloc_one() is a wrapper for __get_free_pages(), sometimes with __GFP_ZERO and sometimes followed by memset(0) instead. More elaborate versions on arm64 and x86 account memory for the user page tables and c

[PATCH 7/8] mm: move lib/ioremap.c to mm/

2020-06-27 Thread Mike Rapoport
From: Mike Rapoport The functionality in lib/ioremap.c deals with pagetables, vmalloc and caches, so it naturally belongs to mm/ Moving it there will also allow declaring p?d_alloc_track functions in an header file inside mm/ rather than having those declarations in include/linux/mm.h Suggested

[PATCH 5/8] asm-generic: pgalloc: provide generic pud_alloc_one() and pud_free_one()

2020-06-27 Thread Mike Rapoport
From: Mike Rapoport Several architectures define pud_alloc_one() as a wrapper for __get_free_page() and pud_free() as a wrapper for free_page(). Provide a generic implementation in asm-generic/pgalloc.h and use it where appropriate. Signed-off-by: Mike Rapoport --- arch/arm64/include/asm

[PATCH 8/8] mm: move p?d_alloc_track to separate header file

2020-06-27 Thread Mike Rapoport
: http://lkml.kernel.org/r/20200609120533.25867-1-j...@8bytes.org Signed-off-by: Joerg Roedel Cc: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Abdul Haleem Cc: Satheesh Rajendran Cc: Stephen Rothwell Cc: Steven Rostedt (VMware) Cc: Mike Rapoport Cc: Christophe Leroy Signed-off-by: Mike

[PATCH 3/8] xtensa: switch to generic version of pte allocation

2020-06-27 Thread Mike Rapoport
From: Mike Rapoport xtensa clears PTEs during allocation of the page tables and pte_clear() sets the PTE to a non-zero value. Splitting ptes_clear() helper out of pte_alloc_one() and pte_alloc_one_kernel() allows reuse of base generic allocation methods (__pte_alloc_one

[PATCH 0/8] mm: cleanup usage of

2020-06-27 Thread Mike Rapoport
From: Mike Rapoport Hi, Most architectures have very similar versions of pXd_alloc_one() and pXd_free_one() for intermediate levels of page table. These patches add generic versions of these functions in and enable use of the generic functions where appropriate. In addition, functions

[PATCH 2/8] opeinrisc: switch to generic version of pte allocation

2020-06-27 Thread Mike Rapoport
From: Mike Rapoport Replace pte_alloc_one(), pte_free() and pte_free_kernel() with the generic implementation. The only actual functional change is the addition of __GFP_ACCOUT for the allocation of the user page tables. The pte_alloc_one_kernel() is kept back because its implementation

[PATCH 1/8] mm: remove unneeded includes of

2020-06-27 Thread Mike Rapoport
From: Mike Rapoport In the most cases header is required only for allocations of page table memory. Most of the .c files that include that header do not use symbols declared in and do not require that header. As for the other header files that used to include , it is possible to move

[RESEND PATCH] sched: fix build with GCC_PLUGIN_RANDSTRUCT

2020-06-27 Thread Mike Rapoport
From: Mike Rapoport Since the commit a148866489fb ("sched: Replace rq::wake_list") task_struct and CSD_TYPE_TTWU objects can be on the same queue and this requires that have "layout similar enough". This assumption is broken when CONFIG_GCC_PLUGIN_RANDSTRUCT is enabled

[PATCH v2 1/2] sparc32: use PUD rather than PGD to get PMD in srmmu_inherit_prom_mappings()

2020-06-27 Thread Mike Rapoport
From: Mike Rapoport This is a misprint in the page table traversal in srmmu_inherit_prom_mappings`() function which accessed a PMD entry using PGD rather than PUD. Since sparc32 has only 3 page table levels, the PGD and PUD are essentially the same and usage of __nocache_fix() removed the type

[PATCH v2 0/2] sparc32: srmmu: improve type safety of __nocache_fix()

2020-06-27 Thread Mike Rapoport
From: Mike Rapoport Hi, As discussed at [1] the __nocache_fix() macro in sparc's SRMMU can be made type safe and so the compiler will yell anout misuse of pXd pointers for which the __nocache_fix() is primarily used. The first patch is an fix of such misuse that I've discovered after adding

[PATCH v2 2/2] sparc32: srmmu: improve type safety of __nocache_fix()

2020-06-27 Thread Mike Rapoport
From: Mike Rapoport The __nocache_fix(VADDR) macro is used to add an offset for pointers and its "return type" is 'void *'. We can do better and keep the type information with simply by casting the return value to (__typeof__(VADDR)). This will ".. show when those pgd/p4d/pud p

Re: [PATCH 0/2] sparc32: srmmu: improve type safety of __nocache_fix()

2020-06-26 Thread Mike Rapoport
Any comments on this? On Sun, May 24, 2020 at 07:21:49PM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > Hi, > > As discussed at [1] the __nocache_fix() macro in sparc's SRMMU can be made > type safe and so the compiler will yell anout misuse of pXd pointers for > wh

[PATCH] docs/core-api: memory-allocation: describe reclaim behaviour

2020-06-26 Thread Mike Rapoport
From: Mike Rapoport Changelog of commit dcda9b04713c ("mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic") has very nice description of GFP flags that affect reclaim behaviour of the page allocator. It would be pity to keep this description buried

Re: [PATCH] sched: fix build with GCC_PLUGIN_RANDSTRUCT

2020-06-24 Thread Mike Rapoport
ping? On Sat, Jun 20, 2020 at 01:41:36PM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > Since the commit a148866489fb ("sched: Replace rq::wake_list") > task_struct and CSD_TYPE_TTWU objects can be on the same queue and this > requires that ha

Re: [PATCH v2 5/9] docs: move nommu-mmap.txt to admin-guide and rename to ReST

2020-06-23 Thread Mike Rapoport
On Tue, Jun 23, 2020 at 11:52:58AM +0200, Mauro Carvalho Chehab wrote: > The nommu-mmap.txt file provides description of user visible > behaviuour. So, move it to the admin-guide. > > As it is already at the ReST, also rename it. > > Suggested-by: Mike Rapoport > Suggeste

[PATCH 8/8] MAINTAINERS: remove "PKUNITY SOC DRIVERS" entry

2020-06-23 Thread Mike Rapoport
From: Mike Rapoport There no PkUnity drivers left, so remove the MAINTAINERS entry. Signed-off-by: Mike Rapoport --- MAINTAINERS | 6 -- 1 file changed, 6 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index f347469e4891..d30a417ad90a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

[PATCH 3/8] i2c/buses: remove i2c-puv3 driver

2020-06-23 Thread Mike Rapoport
From: Mike Rapoport The unicore32 port is removed from the kernel. There is no point to keep stale i2c bus driver for this architecture. Signed-off-by: Mike Rapoport --- MAINTAINERS | 1 - drivers/i2c/busses/Kconfig| 11 -- drivers/i2c/busses/Makefile | 1

[PATCH 7/8] rtc: remove fb-puv3 driver

2020-06-23 Thread Mike Rapoport
From: Mike Rapoport The unicore32 port is removed from the kernel. There is no point to keep stale RTC driver for this architecture. Signed-off-by: Mike Rapoport --- MAINTAINERS| 1 - drivers/rtc/Kconfig| 9 -- drivers/rtc/Makefile | 1 - drivers/rtc/rtc-puv3.c | 286

<    6   7   8   9   10   11   12   13   14   15   >