[PATCH] powerpc: Remove CONFIG_PPC_MMU_NOHASH_32

2021-06-03 Thread Christophe Leroy
Since commit Fixes: 555904d07eef ("powerpc/8xx: MM_SLICE is not needed anymore"), CONFIG_PPC_MMU_NOHASH_32 has not been used. Remove it. Reported-by: Tom Rix Signed-off-by: Christophe Leroy --- arch/powerpc/platforms/Kconfig.cputype | 4 1 file changed, 4 deletions(-) diff --git a/arch/

[PATCH v2 00/12] powerpc: Optimise KUAP on book3s/32

2021-06-03 Thread Christophe Leroy
This series is a rework of KUAP on book3s/32. On book3s32, KUAP is heavier than on other platform because it can't be opened globaly at once, it must be done for each 256Mb segment. Instead of opening access to all necessary segments via a heavy logic, only open access to the segment matching the

[PATCH v2 01/12] powerpc/32s: Move setup_{kuep/kuap}() into {kuep/kuap}.c

2021-06-03 Thread Christophe Leroy
Avoids the #ifdef in mmu.c Signed-off-by: Christophe Leroy --- arch/powerpc/mm/book3s32/Makefile | 1 + arch/powerpc/mm/book3s32/kuap.c | 11 +++ arch/powerpc/mm/book3s32/kuep.c | 8 arch/powerpc/mm/book3s32/mmu.c| 20 4 files changed, 20 insertion

[PATCH v2 02/12] powerpc/32s: Refactor update of user segment registers

2021-06-03 Thread Christophe Leroy
KUEP implements the update of user segment registers. Move it into mmu-hash.h in order to use it from other places. And inline kuep_lock() and kuep_unlock(). Inlining kuep_lock() is important for system_call_exception(), otherwise system_call_exception() has to save into stack the system call par

[PATCH v2 03/12] powerpc/32s: move CTX_TO_VSID() into mmu-hash.h

2021-06-03 Thread Christophe Leroy
From: Christophe Leroy In order to reuse it in switch_mmu_context(), this patch moves CTX_TO_VSID() macro into asm/book3s/32/mmu-hash.h Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/32/mmu-hash.h | 10 ++ arch/powerpc/kvm/book3s_32_mmu_host.c | 3 --- arc

[PATCH v2 04/12] powerpc/32s: Convert switch_mmu_context() to C

2021-06-03 Thread Christophe Leroy
switch_mmu_context() does things that can easily be done in C. For updating user segments, we have update_user_segments(). As mentionned in commit b5efec00b671 ("powerpc/32s: Move KUEP locking/unlocking in C"), update_user_segments() has the loop unrolled which is a significant performance gain.

[PATCH v2 05/12] powerpc/32s: Simplify calculation of segment register content

2021-06-03 Thread Christophe Leroy
segment register has VSID on bits 8-31. Bits 4-7 are reserved, there is no requirement to set them to 0. VSIDs are calculated from VSID of SR0 by adding 0x111. Even with highest possible VSID which would be 0xF0, adding 16 times 0x111 results in 0x1001100. So, the reserved bits are never ove

[PATCH v2 06/12] powerpc/32s: Initialise KUAP and KUEP in C

2021-06-03 Thread Christophe Leroy
In order to selectively activate KUAP and KUEP in a following patch, perform KUAP and KUEP initialisation in C. Unlike PPC64, PPC32 doesn't have an early_setup_secondary(), so do it in start_secondary(). Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_book3s_32.S | 6 -- arch/p

[PATCH v2 07/12] powerpc/32s: Allow disabling KUEP at boot time

2021-06-03 Thread Christophe Leroy
PPC64 uses MMU features to enable/disable KUEP at boot time. But feature fixups are applied way too early on PPC32. Now that all KUEP related actions are in C following the conversion of KUEP initial setup and context switch in C, static branches can be used to enable/disable KUEP. Signed-off-by:

[PATCH v2 08/12] powerpc/32s: Allow disabling KUAP at boot time

2021-06-03 Thread Christophe Leroy
PPC64 uses MMU features to enable/disable KUAP at boot time. But feature fixups are applied way too early on PPC32. Now that all KUAP related actions are in C following the conversion of KUAP initial setup and context switch in C, static branches can be used to enable/disable KUAP. Signed-off-by:

[PATCH v2 09/12] powerpc/32s: Rework Kernel Userspace Access Protection

2021-06-03 Thread Christophe Leroy
On book3s/32, KUAP is provided by toggling Ks bit in segment registers. One segment register addresses 256M of virtual memory. At the time being, KUAP implements a complex logic to apply the unlock/lock on the exact number of segments covering the user range to access, with saving the boundaries o

[PATCH v2 10/12] powerpc/32s: Activate KUAP and KUEP by default

2021-06-03 Thread Christophe Leroy
Now that KUAP and KUEP have been significantly optimised and can be disabled at boot time using 'nosmap' and 'nosmep' kernel parameters, them can be active by default like in other powerpc platforms. It is still possible to disable them completely in the configuration. Signed-off-by: Christophe L

[PATCH v2 11/12] powerpc/kuap: Remove KUAP_CURRENT_XXX

2021-06-03 Thread Christophe Leroy
book3s/32 was the only user of KUAP_CURRENT_XXX. After rework of book3s/32 KUAP, it is not used anymore. Remove them. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/32/kup.h | 1 - arch/powerpc/include/asm/kup.h | 14 +++--- 2 files changed, 3 insertions

[PATCH v2 12/12] powerpc/kuap: Remove to/from/size parameters of prevent_user_access()

2021-06-03 Thread Christophe Leroy
prevent_user_access() doesn't use anymore to/from/size parameters. Remove them. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/32/kup.h | 3 +-- arch/powerpc/include/asm/book3s/64/kup.h | 3 +-- arch/powerpc/include/asm/kup.h | 15 +++ ar

[PATCH] powerpc/8xx: Allow disabling KUAP at boot time

2021-06-03 Thread Christophe Leroy
PPC64 uses MMU features to enable/disable KUAP at boot time. But feature fixups are applied way too early on PPC32. But since commit c16728835eec ("powerpc/32: Manage KUAP in C"), all KUAP is in C so it is now possible to use static branches. Signed-off-by: Christophe Leroy --- arch/powerpc/inc

[PATCH] powerpc/kuap: Force inlining of all first level KUAP helpers.

2021-06-03 Thread Christophe Leroy
All KUAP helpers defined in asm/kup.h are single line functions that should be inlined. But on book3s/32 build, we get many instances of . Force inlining of those helpers. Signed-off-by: Christophe Leroy --- Was previously part of a series, resending standalone as it really is independant. ---

[PATCH v3 1/6] powerpc/nohash: Refactor update of BDI2000 pointers in switch_mmu_context()

2021-06-03 Thread Christophe Leroy
Instead of duplicating the update of BDI2000 pointers in set_context(), do it directly from switch_mmu_context(). Signed-off-by: Christophe Leroy --- v3: Do it only for nohash platforms, book3s/32 will have its own as part of converting switch_mmu_context() to C. --- arch/powerpc/kernel/head_40

[PATCH v3 2/6] powerpc/nohash: Convert set_context() to C

2021-06-03 Thread Christophe Leroy
ppc8xx already has set_context() in C. Other ones have it in assembly. The only thing it does is to write the context id into SPRN_PID. Do it in C. Signed-off-by: Christophe Leroy --- v3: Fixed whitespace before tab --- arch/powerpc/include/asm/mmu_context.h | 1 - arch/powerpc/kernel/head_40

[PATCH v3 3/6] powerpc/nohash: Remove CONFIG_SMP #ifdefery in mmu_context.h

2021-06-03 Thread Christophe Leroy
Everything can be done even when CONFIG_SMP is not selected. Just use IS_ENABLED() where relevant and rely on GCC to opt out unneeded code and variables when CONFIG_SMP is not set. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/nohash/mmu_context.c | 66 ++-- 1 file

[PATCH v3 4/6] powerpc/nohash: Remove DEBUG_MAP_CONSISTENCY

2021-06-03 Thread Christophe Leroy
mmu_context handling has been there for years, so we would know if there was problems with maps. DEBUG_MAP_CONSISTENCY is not user selectable, remove it. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/nohash/mmu_context.c | 47 +--- 1 file changed, 1 insertion(+), 4

[PATCH v3 5/6] powerpc/nohash: Remove DEBUG_CLAMP_LAST_CONTEXT

2021-06-03 Thread Christophe Leroy
DEBUG_CLAMP_LAST_CONTEXT was there in the old days to reduce number of contexts in order to ease debugging implementation of context switching, but that's been quite stable during years now. As it is not user selectable, remove it. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/nohash/mmu_

[PATCH v3 6/6] powerpc/nohash: Remove DEBUG_HARDER

2021-06-03 Thread Christophe Leroy
DEBUG_HARDER is not user selectable. Remove it together with related messages. Also remove two pr_devel() messages that should likely have been pr_hard(). Signed-off-by: Christophe Leroy --- arch/powerpc/mm/nohash/mmu_context.c | 32 1 file changed, 32 deletions(-)

Re: [PATCH] powerpc: Remove CONFIG_PPC_MMU_NOHASH_32

2021-06-03 Thread Tom Rix
On 6/3/21 12:53 AM, Christophe Leroy wrote: Since commit Fixes: 555904d07eef ("powerpc/8xx: MM_SLICE is not needed anymore"), CONFIG_PPC_MMU_NOHASH_32 has not been used. Remove it. Reported-by: Tom Rix Signed-off-by: Christophe Leroy Thanks, one less for me to do. There are about ~100 s

Re: [PATCH 07/30] ms_block: use blk_mq_alloc_disk

2021-06-03 Thread Ulf Hansson
On Wed, 2 Jun 2021 at 08:54, Christoph Hellwig wrote: > > Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue > allocation. > > Signed-off-by: Christoph Hellwig Acked-by: Ulf Hansson Kind regards Uffe > --- > drivers/memstick/core/ms_block.c | 25 ++--

Re: [PATCH 08/30] mspro: use blk_mq_alloc_disk

2021-06-03 Thread Ulf Hansson
On Wed, 2 Jun 2021 at 08:54, Christoph Hellwig wrote: > > Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue > allocation. > > Signed-off-by: Christoph Hellwig Acked-by: Ulf Hansson Kind regards Uffe > --- > drivers/memstick/core/mspro_block.c | 26 +++--

[PATCH AUTOSEL 5.12 42/43] powerpc/fsl: set fsl, i2c-erratum-a004447 flag for P2041 i2c controllers

2021-06-03 Thread Sasha Levin
From: Chris Packham [ Upstream commit 7adc7b225cddcfd0f346d10144fd7a3d3d9f9ea7 ] The i2c controllers on the P2040/P2041 have an erratum where the documented scheme for i2c bus recovery will not work (A-004447). A different mechanism is needed which is documented in the P2040 Chip Errata Rev Q (l

[PATCH AUTOSEL 5.12 43/43] powerpc/fsl: set fsl, i2c-erratum-a004447 flag for P1010 i2c controllers

2021-06-03 Thread Sasha Levin
From: Chris Packham [ Upstream commit 19ae697a1e4edf1d755b413e3aa38da65e2db23b ] The i2c controllers on the P1010 have an erratum where the documented scheme for i2c bus recovery will not work (A-004447). A different mechanism is needed which is documented in the P1010 Chip Errata Rev L. Signed

[PATCH AUTOSEL 5.10 38/39] powerpc/fsl: set fsl, i2c-erratum-a004447 flag for P2041 i2c controllers

2021-06-03 Thread Sasha Levin
From: Chris Packham [ Upstream commit 7adc7b225cddcfd0f346d10144fd7a3d3d9f9ea7 ] The i2c controllers on the P2040/P2041 have an erratum where the documented scheme for i2c bus recovery will not work (A-004447). A different mechanism is needed which is documented in the P2040 Chip Errata Rev Q (l

[PATCH AUTOSEL 5.10 39/39] powerpc/fsl: set fsl, i2c-erratum-a004447 flag for P1010 i2c controllers

2021-06-03 Thread Sasha Levin
From: Chris Packham [ Upstream commit 19ae697a1e4edf1d755b413e3aa38da65e2db23b ] The i2c controllers on the P1010 have an erratum where the documented scheme for i2c bus recovery will not work (A-004447). A different mechanism is needed which is documented in the P1010 Chip Errata Rev L. Signed

[PATCH AUTOSEL 5.4 30/31] powerpc/fsl: set fsl, i2c-erratum-a004447 flag for P2041 i2c controllers

2021-06-03 Thread Sasha Levin
From: Chris Packham [ Upstream commit 7adc7b225cddcfd0f346d10144fd7a3d3d9f9ea7 ] The i2c controllers on the P2040/P2041 have an erratum where the documented scheme for i2c bus recovery will not work (A-004447). A different mechanism is needed which is documented in the P2040 Chip Errata Rev Q (l

[PATCH AUTOSEL 5.4 31/31] powerpc/fsl: set fsl, i2c-erratum-a004447 flag for P1010 i2c controllers

2021-06-03 Thread Sasha Levin
From: Chris Packham [ Upstream commit 19ae697a1e4edf1d755b413e3aa38da65e2db23b ] The i2c controllers on the P1010 have an erratum where the documented scheme for i2c bus recovery will not work (A-004447). A different mechanism is needed which is documented in the P1010 Chip Errata Rev L. Signed

[PATCH AUTOSEL 4.19 22/23] powerpc/fsl: set fsl, i2c-erratum-a004447 flag for P2041 i2c controllers

2021-06-03 Thread Sasha Levin
From: Chris Packham [ Upstream commit 7adc7b225cddcfd0f346d10144fd7a3d3d9f9ea7 ] The i2c controllers on the P2040/P2041 have an erratum where the documented scheme for i2c bus recovery will not work (A-004447). A different mechanism is needed which is documented in the P2040 Chip Errata Rev Q (l

[PATCH AUTOSEL 4.19 23/23] powerpc/fsl: set fsl, i2c-erratum-a004447 flag for P1010 i2c controllers

2021-06-03 Thread Sasha Levin
From: Chris Packham [ Upstream commit 19ae697a1e4edf1d755b413e3aa38da65e2db23b ] The i2c controllers on the P1010 have an erratum where the documented scheme for i2c bus recovery will not work (A-004447). A different mechanism is needed which is documented in the P1010 Chip Errata Rev L. Signed

[PATCH AUTOSEL 4.14 17/18] powerpc/fsl: set fsl, i2c-erratum-a004447 flag for P2041 i2c controllers

2021-06-03 Thread Sasha Levin
From: Chris Packham [ Upstream commit 7adc7b225cddcfd0f346d10144fd7a3d3d9f9ea7 ] The i2c controllers on the P2040/P2041 have an erratum where the documented scheme for i2c bus recovery will not work (A-004447). A different mechanism is needed which is documented in the P2040 Chip Errata Rev Q (l

[PATCH AUTOSEL 4.14 18/18] powerpc/fsl: set fsl, i2c-erratum-a004447 flag for P1010 i2c controllers

2021-06-03 Thread Sasha Levin
From: Chris Packham [ Upstream commit 19ae697a1e4edf1d755b413e3aa38da65e2db23b ] The i2c controllers on the P1010 have an erratum where the documented scheme for i2c bus recovery will not work (A-004447). A different mechanism is needed which is documented in the P1010 Chip Errata Rev L. Signed

[PATCH AUTOSEL 4.9 16/17] powerpc/fsl: set fsl, i2c-erratum-a004447 flag for P2041 i2c controllers

2021-06-03 Thread Sasha Levin
From: Chris Packham [ Upstream commit 7adc7b225cddcfd0f346d10144fd7a3d3d9f9ea7 ] The i2c controllers on the P2040/P2041 have an erratum where the documented scheme for i2c bus recovery will not work (A-004447). A different mechanism is needed which is documented in the P2040 Chip Errata Rev Q (l

[PATCH AUTOSEL 4.9 17/17] powerpc/fsl: set fsl, i2c-erratum-a004447 flag for P1010 i2c controllers

2021-06-03 Thread Sasha Levin
From: Chris Packham [ Upstream commit 19ae697a1e4edf1d755b413e3aa38da65e2db23b ] The i2c controllers on the P1010 have an erratum where the documented scheme for i2c bus recovery will not work (A-004447). A different mechanism is needed which is documented in the P1010 Chip Errata Rev L. Signed

[PATCH AUTOSEL 4.4 14/15] powerpc/fsl: set fsl, i2c-erratum-a004447 flag for P2041 i2c controllers

2021-06-03 Thread Sasha Levin
From: Chris Packham [ Upstream commit 7adc7b225cddcfd0f346d10144fd7a3d3d9f9ea7 ] The i2c controllers on the P2040/P2041 have an erratum where the documented scheme for i2c bus recovery will not work (A-004447). A different mechanism is needed which is documented in the P2040 Chip Errata Rev Q (l

[PATCH AUTOSEL 4.4 15/15] powerpc/fsl: set fsl, i2c-erratum-a004447 flag for P1010 i2c controllers

2021-06-03 Thread Sasha Levin
From: Chris Packham [ Upstream commit 19ae697a1e4edf1d755b413e3aa38da65e2db23b ] The i2c controllers on the P1010 have an erratum where the documented scheme for i2c bus recovery will not work (A-004447). A different mechanism is needed which is documented in the P1010 Chip Errata Rev L. Signed

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

2021-06-03 Thread Paul Moore
On Wed, Jun 2, 2021 at 9:40 AM Ondrej Mosnacek wrote: > On Fri, May 28, 2021 at 3:37 AM Paul Moore wrote: > > On Mon, May 17, 2021 at 5:22 AM Ondrej Mosnacek wrote: > > > > > > Commit 59438b46471a ("security,lockdown,selinux: implement SELinux > > > lockdown") added an implementation of the lock

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

2021-06-03 Thread Daniel Borkmann
On 6/2/21 5:13 PM, Paul Moore wrote: [...] Help me out here, is your answer that the access check can only be done at BPF program load time? That isn't really a solution from a SELinux perspective as far as I'm concerned. That is the current answer. The unfortunate irony is that 59438b46471a (

[PATCH v2 2/2] net/ps3_gelic: Cleanups, improve logging

2021-06-03 Thread Geoff Levand
General source cleanups and improved logging messages. Signed-off-by: Geoff Levand --- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 395 ++- 1 file changed, 216 insertions(+), 179 deletions(-) diff --git a/drivers/net/ethernet/toshiba/ps3_gelic_net.c b/drivers/net/ethernet/to

[PATCH v2 1/2] net/ps3_gelic: Add gelic_descr structures

2021-06-03 Thread Geoff Levand
Create two new structures, struct gelic_hw_regs and struct gelic_chain_link, and replace the corresponding members of struct gelic_descr with the new structures. struct gelic_hw_regs holds the register variables used by the gelic hardware device. struct gelic_chain_link holds variables used to ma

[PATCH v2 0/2] DMA fixes for PS3 gelic network driver

2021-06-03 Thread Geoff Levand
Hi Dave, Jakub, This is a set of patches that fix various DMA related problems in the PS3 gelic network driver, and also adds better error checking and improved message logging. Please consider. Changes from V1: Split the V1 series into two, one series with powerpc changes, and one series wi

[PATCH v2 0/3] DMA fixes for PS3 device drivers

2021-06-03 Thread Geoff Levand
Hi Michael, This is a set of patches that fix various DMA related problems in the PS3 device drivers, and add better error checking and improved message logging. Changes from V1: Split the V1 series into two, one series with powerpc changes, and one series with gelic network driver changes.

[PATCH v2 1/3] powerpc/ps3: Add CONFIG_PS3_VERBOSE_RESULT option

2021-06-03 Thread Geoff Levand
To aid debugging, add a new PS3 kernel config option PS3_VERBOSE_RESULT that, when enabled, will print more verbose messages for the result of LV1 hypercalls. Signed-off-by: Geoff Levand --- arch/powerpc/include/asm/ps3.h | 2 +- arch/powerpc/platforms/ps3/Kconfig | 9 + 2 files chan

[PATCH v2 2/3] powerpc/ps3: Warn on PS3 device errors

2021-06-03 Thread Geoff Levand
To aid debugging PS3 boot problems change the log level of several PS3 device errors from pr_debug to pr_warn. Signed-off-by: Geoff Levand --- arch/powerpc/platforms/ps3/system-bus.c | 9 + drivers/ps3/ps3-vuart.c | 2 +- drivers/ps3/ps3av.c | 22 +++

[PATCH v2 3/3] powerpc/ps3: Add dma_mask to ps3_dma_region

2021-06-03 Thread Geoff Levand
Commit f959dcd6ddfd29235030e8026471ac1b022ad2b0 (dma-direct: Fix potential NULL pointer dereference) added a null check on the dma_mask pointer of the kernel's device structure. Add a dma_mask variable to the ps3_dma_region structure and set the device structure's dma_mask pointer to point to this

Re: [PATCH 0/5] DMA fixes for PS3 device drivers

2021-06-03 Thread Geoff Levand
Hi Michael, On 6/2/21 10:38 PM, Michael Ellerman wrote: > Geoff Levand writes: >> Hi, >> >> This is a set of patches that fix various DMA related problems in the PS3 >> device drivers, and add better error checking and improved message logging. >> >> The gelic network driver had a number of probl

Re: [PATCH v4 01/16] powerpc/vas: Move VAS API to book3s common platform

2021-06-03 Thread Haren Myneni
On Thu, 2021-06-03 at 13:32 +1000, Nicholas Piggin wrote: > Excerpts from Haren Myneni's message of May 21, 2021 7:28 pm: > > Using the same /dev/crypto/nx-gzip interface for both powerNV and > > pseries. So this patch creates platforms/book3s/ and moves VAS API > > to that directory. The actual fu

Re: [PATCH v4 03/16] powerpc/vas: Add platform specific user window operations

2021-06-03 Thread Haren Myneni
On Thu, 2021-06-03 at 14:05 +1000, Nicholas Piggin wrote: > Excerpts from Haren Myneni's message of May 21, 2021 7:30 pm: > > PowerNV uses registers to open/close VAS windows, and getting the > > paste address. Whereas the hypervisor calls are used on PowerVM. > > > > This patch adds the platform

Re: [PATCH 0/5] DMA fixes for PS3 device drivers

2021-06-03 Thread Michael Ellerman
Geoff Levand writes: > Hi Michael, > > On 6/2/21 10:38 PM, Michael Ellerman wrote: >> Geoff Levand writes: >>> Hi, >>> >>> This is a set of patches that fix various DMA related problems in the PS3 >>> device drivers, and add better error checking and improved message logging. >>> >>> The gelic ne

[Bug 213069] kernel BUG at arch/powerpc/include/asm/book3s/64/hash-4k.h:147! Oops: Exception in kernel mode, sig: 5 [#1]

2021-06-03 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=213069 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Status|RESOLVED|REOPENED Resol

Re: [PATCH AUTOSEL 5.12 42/43] powerpc/fsl: set fsl,i2c-erratum-a004447 flag for P2041 i2c controllers

2021-06-03 Thread Michael Ellerman
Sasha Levin writes: > From: Chris Packham > > [ Upstream commit 7adc7b225cddcfd0f346d10144fd7a3d3d9f9ea7 ] > > The i2c controllers on the P2040/P2041 have an erratum where the > documented scheme for i2c bus recovery will not work (A-004447). A > different mechanism is needed which is documented

Re: [PATCH AUTOSEL 5.12 42/43] powerpc/fsl: set fsl,i2c-erratum-a004447 flag for P2041 i2c controllers

2021-06-03 Thread Chris Packham
On 4/06/21 12:42 pm, Michael Ellerman wrote: > Sasha Levin writes: >> From: Chris Packham >> >> [ Upstream commit 7adc7b225cddcfd0f346d10144fd7a3d3d9f9ea7 ] >> >> The i2c controllers on the P2040/P2041 have an erratum where the >> documented scheme for i2c bus recovery will not work (A-004447).

Re: [PATCH v4 16/16] crypto/nx: Add sysfs interface to export NX capabilities

2021-06-03 Thread Haren Myneni
On Thu, 2021-06-03 at 14:57 +1000, Nicholas Piggin wrote: > Excerpts from Haren Myneni's message of May 21, 2021 7:42 pm: > > Changes to export the following NXGZIP capabilities through sysfs: > > > > /sys/devices/vio/ibm,compression-v1/NxGzCaps: > > Where's the horrible camel case name coming fr

Re: [PATCH] powerpc/8xx: Allow disabling KUAP at boot time

2021-06-03 Thread kernel test robot
Hi Christophe, I love your patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v5.13-rc4 next-20210603] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as doc

Re: [PATCH v4 12/16] powerpc/pseries/vas: Setup IRQ and fault handling

2021-06-03 Thread Haren Myneni
On Thu, 2021-06-03 at 15:48 +1000, Nicholas Piggin wrote: > Excerpts from Haren Myneni's message of May 21, 2021 7:39 pm: > > NX generates an interrupt when sees a fault on the user space > > buffer and the hypervisor forwards that interrupt to OS. Then > > the kernel handles the interrupt by issui

Re: [PATCH v4 07/16] powerpc/pseries/vas: Define VAS/NXGZIP HCALLs and structs

2021-06-03 Thread Haren Myneni
On Thu, 2021-06-03 at 14:47 +1000, Nicholas Piggin wrote: > Excerpts from Haren Myneni's message of May 21, 2021 7:34 pm: > > This patch adds HCALLs and other definitions. Also define structs > > that are used in VAS implementation on powerVM. > > > > Signed-off-by: Haren Myneni > > --- > > arch

[powerpc:fixes] BUILD SUCCESS 59cc84c802eb923805e7bba425976a3df5ce35d8

2021-06-03 Thread kernel test robot
602 x86_64 randconfig-a005-20210602 x86_64 randconfig-a001-20210602 i386 randconfig-a003-20210603 i386 randconfig-a006-20210603 i386 randconfig-a004-20210603 i386 randconfig-a001-20210603 i386

Re: [PATCH v4 04/16] powerpc/vas: Create take/drop pid and mm references

2021-06-03 Thread Haren Myneni
On Thu, 2021-06-03 at 14:21 +1000, Nicholas Piggin wrote: > Excerpts from Haren Myneni's message of May 21, 2021 7:31 pm: > > Take pid and mm references when each window opens and drops during > > close. This functionality is needed for powerNV and pseries. So > > this patch defines the existing co

Re: [PATCH v4 06/16] powerpc/vas: Define and use common vas_window struct

2021-06-03 Thread Haren Myneni
On Thu, 2021-06-03 at 14:38 +1000, Nicholas Piggin wrote: > Excerpts from Haren Myneni's message of May 21, 2021 7:33 pm: > > Same vas_window struct is used on powerNV and pseries. So this > > patch > > changes in struct vas_window to support both platforms and also the > > corresponding modificati

[PATCH v2] powerpc/8xx: Allow disabling KUAP at boot time

2021-06-03 Thread Christophe Leroy
PPC64 uses MMU features to enable/disable KUAP at boot time. But feature fixups are applied way too early on PPC32. But since commit c16728835eec ("powerpc/32: Manage KUAP in C"), all KUAP is in C so it is now possible to use static branches. Signed-off-by: Christophe Leroy --- v2: Added missing

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

2021-06-03 Thread Paul Moore
On Thu, Jun 3, 2021 at 2:53 PM Daniel Borkmann wrote: > On 6/2/21 5:13 PM, Paul Moore wrote: > [...] > > Help me out here, is your answer that the access check can only be > > done at BPF program load time? That isn't really a solution from a > > SELinux perspective as far as I'm concerned. > > T

[PATCH v2 0/9] Remove DISCINTIGMEM memory model

2021-06-03 Thread Mike Rapoport
From: Mike Rapoport Hi, SPARSEMEM memory model was supposed to entirely replace DISCONTIGMEM a (long) while ago. The last architectures that used DISCONTIGMEM were updated to use other memory models in v5.11 and it is about the time to entirely remove DISCONTIGMEM from the kernel. This set remo

[PATCH v2 1/9] alpha: remove DISCONTIGMEM and NUMA

2021-06-03 Thread Mike Rapoport
From: Mike Rapoport NUMA is marked broken on alpha for more than 15 years and DISCONTIGMEM was replaced with SPARSEMEM in v5.11. Remove both NUMA and DISCONTIGMEM support from alpha. Signed-off-by: Mike Rapoport --- arch/alpha/Kconfig| 22 --- arch/alpha/include/asm/machvec.h

[PATCH v2 2/9] arc: update comment about HIGHMEM implementation

2021-06-03 Thread Mike Rapoport
From: Mike Rapoport Arc does not use DISCONTIGMEM to implement high memory, update the comment describing how high memory works to reflect this. Signed-off-by: Mike Rapoport --- arch/arc/mm/init.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/arch/arc/mm/ini

[PATCH v2 3/9] arc: remove support for DISCONTIGMEM

2021-06-03 Thread Mike Rapoport
From: Mike Rapoport DISCONTIGMEM was replaced by FLATMEM with freeing of the unused memory map in v5.11. Remove the support for DISCONTIGMEM entirely. Signed-off-by: Mike Rapoport --- arch/arc/Kconfig | 13 arch/arc/include/asm/mmzone.h | 40 -

[PATCH v2 4/9] m68k: remove support for DISCONTIGMEM

2021-06-03 Thread Mike Rapoport
From: Mike Rapoport DISCONTIGMEM was replaced by FLATMEM with freeing of the unused memory map in v5.11. Remove the support for DISCONTIGMEM entirely. Signed-off-by: Mike Rapoport Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven --- arch/m68k/Kconfig.cpu | 10 -

[PATCH v2 5/9] mm: remove CONFIG_DISCONTIGMEM

2021-06-03 Thread Mike Rapoport
From: Mike Rapoport There are no architectures that support DISCONTIGMEM left. Remove the configuration option and the dead code it was guarding in the generic memory management code. Signed-off-by: Mike Rapoport --- include/asm-generic/memory_model.h | 37 -- incl

[PATCH v2 6/9] arch, mm: remove stale mentions of DISCONIGMEM

2021-06-03 Thread Mike Rapoport
From: Mike Rapoport There are several places that mention DISCONIGMEM in comments or have stale code guarded by CONFIG_DISCONTIGMEM. Remove the dead code and update the comments. Signed-off-by: Mike Rapoport --- arch/ia64/kernel/topology.c | 5 ++--- arch/ia64/mm/numa.c | 5 ++

[PATCH v2 7/9] docs: remove description of DISCONTIGMEM

2021-06-03 Thread Mike Rapoport
From: Mike Rapoport Remove description of DISCONTIGMEM from the "Memory Models" document and update VM sysctl description so that it won't mention DISCONIGMEM. Signed-off-by: Mike Rapoport --- Documentation/admin-guide/sysctl/vm.rst | 12 +++ Documentation/vm/memory-model.rst | 45 ++

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

2021-06-03 Thread Mike Rapoport
From: Mike Rapoport After removal of DISCINTIGMEM the NEED_MULTIPLE_NODES and NUMA configuration options are equivalent. Drop CONFIG_NEED_MULTIPLE_NODES and use CONFIG_NUMA instead. Done with $ sed -i 's/CONFIG_NEED_MULTIPLE_NODES/CONFIG_NUMA/' \ $(git grep -wl CONFIG_N

[PATCH v2 9/9] mm: replace CONFIG_FLAT_NODE_MEM_MAP with CONFIG_FLATMEM

2021-06-03 Thread Mike Rapoport
From: Mike Rapoport After removal of the DISCONTIGMEM memory model the FLAT_NODE_MEM_MAP configuration option is equivalent to FLATMEM. Drop CONFIG_FLAT_NODE_MEM_MAP and use CONFIG_FLATMEM instead. Signed-off-by: Mike Rapoport --- include/linux/mmzone.h | 4 ++-- kernel/crash_core.c| 2 +-

[PATCH v2 01/15] mm: add setup_initial_init_mm() helper

2021-06-03 Thread Kefeng Wang
Add setup_initial_init_mm() helper to setup kernel text, data and brk. Cc: linux-snps-...@lists.infradead.org Cc: linux-arm-ker...@lists.infradead.org Cc: linux-c...@vger.kernel.org Cc: uclinux-h8-de...@lists.sourceforge.jp Cc: linux-m...@lists.linux-m68k.org Cc: openr...@lists.librecores.org Cc:

[PATCH v2 00/15] init_mm: cleanup ARCH's text/data/brk setup code

2021-06-03 Thread Kefeng Wang
Add setup_initial_init_mm() helper, then use it to cleanup the text, data and brk setup code. v2: - change argument from "char *" to "void *" setup_initial_init_mm() suggested by Geert Uytterhoeven - use NULL instead of (void *)0 on h8300 and m68k - collect ACKs Cc: linux-snps-...@lists.infrade

[PATCH v2 11/15] powerpc: convert to setup_initial_init_mm()

2021-06-03 Thread Kefeng Wang
Use setup_initial_init_mm() helper to simplify code. Note klimit is (unsigned long) _end, with new helper, will use _end directly. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Kefeng Wang --- arch/powerpc/kernel/setup-common.c | 5 + 1 f