[PATCH v15 7/9] powerpc: Set ARCH_HAS_STRICT_MODULE_RWX

2021-06-08 Thread Jordan Niethe
From: Russell Currey To enable strict module RWX on powerpc, set: CONFIG_STRICT_MODULE_RWX=y You should also have CONFIG_STRICT_KERNEL_RWX=y set to have any real security benefit. ARCH_HAS_STRICT_MODULE_RWX is set to require ARCH_HAS_STRICT_KERNEL_RWX. This is due to a quirk in arch/Kconfi

[PATCH v15 8/9] powerpc/mm: implement set_memory_attr()

2021-06-08 Thread Jordan Niethe
From: Christophe Leroy In addition to the set_memory_xx() functions which allows to change the memory attributes of not (yet) used memory regions, implement a set_memory_attr() function to: - set the final memory protection after init on currently used kernel regions. - enable/disable kernel memo

[PATCH v15 9/9] powerpc/32: use set_memory_attr()

2021-06-08 Thread Jordan Niethe
From: Christophe Leroy Use set_memory_attr() instead of the PPC32 specific change_page_attr() change_page_attr() was checking that the address was not mapped by blocks and was handling highmem, but that's unneeded because the affected pages can't be in highmem and block mapping verification is a

Re: [PATCH 09/16] ps3disk: use memcpy_{from,to}_bvec

2021-06-08 Thread Ira Weiny
On Tue, Jun 08, 2021 at 06:05:56PM +0200, Christoph Hellwig wrote: > > rq_for_each_segment(bvec, req, iter) { > - unsigned long flags; > - dev_dbg(&dev->sbd.core, "%s:%u: bio %u: %u sectors from %llu\n", > - __func__, __LINE__, i, bio_sectors(iter

Re: [PATCH 14/16] block: use memcpy_from_bvec in __blk_queue_bounce

2021-06-08 Thread Ira Weiny
On Tue, Jun 08, 2021 at 06:06:01PM +0200, Christoph Hellwig wrote: > Rewrite the actual bounce buffering loop in __blk_queue_bounce to that > the memcpy_to_bvec helper can be used to perform the data copies. > > Signed-off-by: Christoph Hellwig > --- > block/bounce.c | 21 +++-- >

Re: switch the block layer to use kmap_local_page

2021-06-08 Thread Ira Weiny
On Tue, Jun 08, 2021 at 06:05:47PM +0200, Christoph Hellwig wrote: > Hi all, > > this series switches the core block layer code and all users of the > existing bvec kmap helpers to use kmap_local_page. Drivers that > currently use open coded kmap_atomic calls will converted in a follow > on serie

Re: [PATCH v2] lockdown,selinux: avoid bogus SELinux lockdown permission checks

2021-06-08 Thread Paul Moore
On Tue, Jun 8, 2021 at 7:02 AM Ondrej Mosnacek wrote: > On Thu, Jun 3, 2021 at 7:46 PM Paul Moore wrote: ... > > It sounds an awful lot like the lockdown hook is in the wrong spot. > > It sounds like it would be a lot better to relocate the hook than > > remove it. > > I don't see how you would

Re: [PATCH] crash_core, vmcoreinfo: Append 'SECTION_SIZE_BITS' to vmcoreinfo

2021-06-08 Thread Baoquan He
On 06/08/21 at 02:14pm, Andrew Morton wrote: > On Tue, 8 Jun 2021 22:24:32 +0800 Baoquan He wrote: > > > On 06/08/21 at 06:33am, Pingfan Liu wrote: > > > As mentioned in kernel commit 1d50e5d0c505 ("crash_core, vmcoreinfo: > > > Append 'MAX_PHYSMEM_BITS' to vmcoreinfo"), SECTION_SIZE_BITS in the

Re: [PATCH v2 2/3] powerpc/mm/hash: Avoid multiple HPT resize-ups on memory hotplug

2021-06-08 Thread Leonardo Brás
On Mon, 2021-06-07 at 15:10 +1000, David Gibson wrote: > On Fri, Apr 30, 2021 at 11:36:08AM -0300, Leonardo Bras wrote: > > Every time a memory hotplug happens, and the memory limit crosses a > > 2^n > > value, it may be necessary to perform HPT resizing-up, which can > > take > > some time (over 1

Re: [PATCH 03/11] Documentation: ocxl.rst: change FPGA indirect article to an

2021-06-08 Thread Andrew Donnellan
On 9/6/21 7:23 am, t...@redhat.com wrote: From: Tom Rix Change use of 'a fpga' to 'an fpga' Signed-off-by: Tom Rix Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v2 1/3] powerpc/mm/hash: Avoid resizing-down HPT on first memory hotplug

2021-06-08 Thread David Gibson
On Tue, Jun 08, 2021 at 09:52:10PM -0300, Leonardo Brás wrote: > On Mon, 2021-06-07 at 15:02 +1000, David Gibson wrote: > > On Fri, Apr 30, 2021 at 11:36:06AM -0300, Leonardo Bras wrote: > > > Because hypervisors may need to create HPTs without knowing the > > > guest > > > page size, the smallest

Re: [PATCH v2 3/3] powerpc/mm/hash: Avoid multiple HPT resize-downs on memory hotunplug

2021-06-08 Thread Leonardo Brás
On Mon, 2021-06-07 at 15:20 +1000, David Gibson wrote: > On Fri, Apr 30, 2021 at 11:36:10AM -0300, Leonardo Bras wrote: > > During memory hotunplug, after each LMB is removed, the HPT may be > > resized-down if it would map a max of 4 times the current amount of > > memory. > > (2 shifts, due to in

Re: [PATCH v2 1/3] powerpc/mm/hash: Avoid resizing-down HPT on first memory hotplug

2021-06-08 Thread Leonardo Brás
On Wed, 2021-06-09 at 14:40 +1000, David Gibson wrote: > On Tue, Jun 08, 2021 at 09:52:10PM -0300, Leonardo Brás wrote: > > On Mon, 2021-06-07 at 15:02 +1000, David Gibson wrote: > > > On Fri, Apr 30, 2021 at 11:36:06AM -0300, Leonardo Bras wrote: > > > > Because hypervisors may need to create HPTs

Re: [PATCH v1 04/12] mm/memory_hotplug: remove nid parameter from arch_remove_memory()

2021-06-08 Thread Heiko Carstens
On Mon, Jun 07, 2021 at 09:54:22PM +0200, David Hildenbrand wrote: > The parameter is unused, let's remove it. > > Signed-off-by: David Hildenbrand > --- > arch/arm64/mm/mmu.c| 3 +-- > arch/ia64/mm/init.c| 3 +-- > arch/powerpc/mm/mem.c | 3 +-- > arch/s390/mm/i

[PATCH] powerpc: Remove proc_trap()

2021-06-08 Thread Christophe Leroy
proc_trap() has never been used, remove it. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/reg.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index 7c81d3e563b2..3bb01a8779c9 100644 --- a/arch/powerpc/include/a

Re: [PATCH v2 3/3] powerpc/mm/hash: Avoid multiple HPT resize-downs on memory hotunplug

2021-06-08 Thread David Gibson
On Wed, Jun 09, 2021 at 02:30:36AM -0300, Leonardo Brás wrote: > On Mon, 2021-06-07 at 15:20 +1000, David Gibson wrote: > > On Fri, Apr 30, 2021 at 11:36:10AM -0300, Leonardo Bras wrote: > > > During memory hotunplug, after each LMB is removed, the HPT may be > > > resized-down if it would map a ma

[PATCH] powerpc: Move update_power8_hid0() into its only user

2021-06-08 Thread Christophe Leroy
update_power8_hid0() is used only by powernv platform subcore.c Move it there. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/reg.h | 10 -- arch/powerpc/platforms/powernv/subcore.c | 10 ++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a

Re: [PATCH v3 8/9] mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA

2021-06-08 Thread Mike Rapoport
On Tue, Jun 08, 2021 at 05:25:44PM -0700, Andrew Morton wrote: > On Tue, 8 Jun 2021 12:13:15 +0300 Mike Rapoport wrote: > > > From: Mike Rapoport > > > > After removal of DISCINTIGMEM the NEED_MULTIPLE_NODES and NUMA > > configuration options are equivalent. > > > > Drop CONFIG_NEED_MULTIPLE_

<    1   2