Re: [PATCH 0/4] crypto: nx - convert to skcipher API

2019-10-13 Thread Ard Biesheuvel
On Sun, 13 Oct 2019 at 06:40, Eric Biggers wrote: > > This series converts the PowerPC Nest (NX) implementations of AES modes > from the deprecated "blkcipher" API to the "skcipher" API. This is > needed in order for the blkcipher API to be removed. > > This patchset is compile-tested only, as I

[PATCH] xfs: introduce "metasync" api to sync metadata to fsblock

2019-10-13 Thread Pingfan Liu
When using fadump (fireware assist dump) mode on powerpc, a mismatch between grub xfs driver and kernel xfs driver has been obsevered. Note: fadump boots up in the following sequence: fireware -> grub reads kernel and initramfs -> kernel boots. The process to reproduce this mismatch: - On

Re: [PATCH 0/4] crypto: nx - convert to skcipher API

2019-10-13 Thread Ard Biesheuvel
On Sun, 13 Oct 2019 at 20:56, Eric Biggers wrote: > > On Sun, Oct 13, 2019 at 05:31:31PM +0200, Ard Biesheuvel wrote: > > On Sun, 13 Oct 2019 at 08:29, Ard Biesheuvel > > wrote: > > > > > > On Sun, 13 Oct 2019 at 06:40, Eric Biggers wrote: > > > > > > > > This series converts the PowerPC Nest

Re: [PATCH 0/4] crypto: nx - convert to skcipher API

2019-10-13 Thread Ard Biesheuvel
On Sun, 13 Oct 2019 at 08:29, Ard Biesheuvel wrote: > > On Sun, 13 Oct 2019 at 06:40, Eric Biggers wrote: > > > > This series converts the PowerPC Nest (NX) implementations of AES modes > > from the deprecated "blkcipher" API to the "skcipher" API. This is > > needed in order for the blkcipher

Re: [PATCH 0/4] crypto: nx - convert to skcipher API

2019-10-13 Thread Eric Biggers
On Sun, Oct 13, 2019 at 05:31:31PM +0200, Ard Biesheuvel wrote: > On Sun, 13 Oct 2019 at 08:29, Ard Biesheuvel > wrote: > > > > On Sun, 13 Oct 2019 at 06:40, Eric Biggers wrote: > > > > > > This series converts the PowerPC Nest (NX) implementations of AES modes > > > from the deprecated

[Bug 205183] New: PPC64: Signal delivery fails with SIGSEGV if between about 1KB and 4KB bytes of stack remain

2019-10-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205183 Bug ID: 205183 Summary: PPC64: Signal delivery fails with SIGSEGV if between about 1KB and 4KB bytes of stack remain Product: Platform Specific/Hardware Version: 2.5 Kernel

Re: [PATCH] net/ibmvnic: Fix EOI when running in XIVE mode.

2019-10-13 Thread David Miller
From: Cédric Le Goater Date: Fri, 11 Oct 2019 07:52:54 +0200 > pSeries machines on POWER9 processors can run with the XICS (legacy) > interrupt mode or with the XIVE exploitation interrupt mode. These > interrupt contollers have different interfaces for interrupt > management : XICS uses hcalls

[PATCH v4 1/4] powerpc/mm: Implement set_memory() routines

2019-10-13 Thread Russell Currey
The set_memory_{ro/rw/nx/x}() functions are required for STRICT_MODULE_RWX, and are generally useful primitives to have. This implementation is designed to be completely generic across powerpc's many MMUs. It's possible that this could be optimised to be faster for specific MMUs, but the focus

[PATCH v4 0/4] Implement STRICT_MODULE_RWX for powerpc

2019-10-13 Thread Russell Currey
v3 cover letter here: https://lists.ozlabs.org/pipermail/linuxppc-dev/2019-October/198023.html Only minimal changes since then: - patch 2/4 commit message update thanks to Andrew Donnellan - patch 3/4 made neater thanks to Christophe Leroy - patch 3/4 updated Kconfig description thanks to Daniel

[PATCH] selftests/powerpc: Reduce sigfuz runtime to ~60s

2019-10-13 Thread Michael Ellerman
The defaults for the sigfuz test is to run for 4000 iterations, but that can take quite a while and the test harness may kill the test. Reduce the number of iterations to 600, which gives a runtime of roughly 1 minute on a Power8 system. Signed-off-by: Michael Ellerman ---

[PATCH] selftests/powerpc: Don't list r1 in clobbers for TM tests

2019-10-13 Thread Michael Ellerman
Some of our TM (Transactional Memory) tests, list "r1" (the stack pointer) as a clobbered register. GCC >= 9 doesn't accept this, and the build breaks: ptrace-tm-spd-tar.c: In function 'tm_spd_tar': ptrace-tm-spd-tar.c:31:2: error: listing the stack pointer register 'r1' in a clobber list

[PATCH v4 3/3] powerpc/prom_init: Use -ffreestanding to avoid a reference to bcmp

2019-10-13 Thread Nathan Chancellor
r374662 gives LLVM the ability to convert certain loops into a reference to bcmp as an optimization; this breaks prom_init_check.sh: CALLarch/powerpc/kernel/prom_init_check.sh Error: External symbol 'bcmp' referenced from prom_init.c make[2]: *** [arch/powerpc/kernel/Makefile:196:

Re: [PATCH v4 0/5] Powerpc/Watchpoint: Few important fixes

2019-10-13 Thread Ravi Bangoria
On 10/12/19 1:01 PM, Christophe Leroy wrote: Le 10/10/2019 à 08:25, Ravi Bangoria a écrit : On 10/10/19 10:14 AM, Ravi Bangoria wrote: @Christophe, Is patch5 works for you on 8xx? Getting the following : root@vgoip:~# ./ptrace-hwbreak test: ptrace-hwbreak tags:

Re: [PATCH v4 0/5] Powerpc/Watchpoint: Few important fixes

2019-10-13 Thread Ravi Bangoria
On 10/12/19 2:21 PM, Christophe Leroy wrote: Le 10/10/2019 à 06:44, Ravi Bangoria a écrit : @Christophe, Is patch5 works for you on 8xx? Getting the following : root@vgoip:~# ./ptrace-hwbreak test: ptrace-hwbreak tags: git_version:v5.4-rc2-710-gf0082e173fe4-dirty PTRACE_SET_DEBUGREG,

[PATCH v4 4/4] powerpc: Enable STRICT_MODULE_RWX

2019-10-13 Thread Russell Currey
Whether STRICT_MODULE_RWX is enabled by default depends on powerpc platform - in arch/Kconfig, STRICT_MODULE_RWX depends on ARCH_OPTIONAL_KERNEL_RWX, which in arch/powerpc/Kconfig is selected if ARCH_HAS_STRICT_KERNEL_RWX is selected, which is only true with CONFIG_RELOCATABLE *disabled*.

Re: [PATCH v3 3/4] powerpc/mm/ptdump: debugfs handler for W+X checks at runtime

2019-10-13 Thread Russell Currey
On Tue, 2019-10-08 at 08:21 +0200, Christophe Leroy wrote: > > Le 04/10/2019 à 09:50, Russell Currey a écrit : > > Very rudimentary, just > > > > echo 1 > [debugfs]/check_wx_pages > > > > and check the kernel log. Useful for testing strict module RWX. > > > > Also fixed a typo. > > > >

[PATCH v4 2/3] powerpc: Avoid clang warnings around setjmp and longjmp

2019-10-13 Thread Nathan Chancellor
Commit aea447141c7e ("powerpc: Disable -Wbuiltin-requires-header when setjmp is used") disabled -Wbuiltin-requires-header because of a warning about the setjmp and longjmp declarations. r367387 in clang added another diagnostic around this, complaining that there is no jmp_buf declaration. In

[PATCH v4 0/3] LLVM/Clang fixes for pseries_defconfig

2019-10-13 Thread Nathan Chancellor
Hi all, This series includes a set of fixes for LLVM/Clang when building pseries_defconfig. These have been floating around as standalone patches so I decided to gather them up as a series so it was easier to review/apply them. This has been broken for a bit now, it would be nice to get these

[PATCH v4 3/4] powerpc/mm/ptdump: debugfs handler for W+X checks at runtime

2019-10-13 Thread Russell Currey
Very rudimentary, just echo 1 > [debugfs]/check_wx_pages and check the kernel log. Useful for testing strict module RWX. Updated the Kconfig entry to reflect this. Also fixed a typo. Signed-off-by: Russell Currey --- arch/powerpc/Kconfig.debug | 6 --

Re: [PATCH] xfs: introduce "metasync" api to sync metadata to fsblock

2019-10-13 Thread Darrick J. Wong
On Sun, Oct 13, 2019 at 10:37:00PM +0800, Pingfan Liu wrote: > When using fadump (fireware assist dump) mode on powerpc, a mismatch > between grub xfs driver and kernel xfs driver has been obsevered. Note: > fadump boots up in the following sequence: fireware -> grub reads kernel > and initramfs

Re: [PATCH v3 2/4] powerpc/kprobes: Mark newly allocated probes as RO

2019-10-13 Thread Andrew Donnellan
On 4/10/19 5:50 pm, Russell Currey wrote: With CONFIG_STRICT_KERNEL_RWX=y and CONFIG_KPROBES=y, there will be one W+X page at boot by default. This can be tested with CONFIG_PPC_PTDUMP=y and CONFIG_PPC_DEBUG_WX=y set, and checking the kernel log during boot. powerpc doesn't implement its own

[PATCH v4 2/4] powerpc/kprobes: Mark newly allocated probes as RO

2019-10-13 Thread Russell Currey
With CONFIG_STRICT_KERNEL_RWX=y and CONFIG_KPROBES=y, there will be one W+X page at boot by default. This can be tested with CONFIG_PPC_PTDUMP=y and CONFIG_PPC_DEBUG_WX=y set, and checking the kernel log during boot. powerpc doesn't implement its own alloc() for kprobes like other architectures

[PATCH v4 1/3] powerpc: Don't add -mabi= flags when building with Clang

2019-10-13 Thread Nathan Chancellor
When building pseries_defconfig, building vdso32 errors out: error: unknown target ABI 'elfv1' This happens because -m32 in clang changes the target to 32-bit, which does not allow the ABI to be changed, as the setABI virtual function is not overridden:

Re: [PATCH 1/2] dma-mapping: Add dma_addr_is_phys_addr()

2019-10-13 Thread David Gibson
On Fri, Oct 11, 2019 at 06:25:18PM -0700, Ram Pai wrote: > From: Thiago Jung Bauermann > > In order to safely use the DMA API, virtio needs to know whether DMA > addresses are in fact physical addresses and for that purpose, > dma_addr_is_phys_addr() is introduced. > > cc: Benjamin

Re: [PATCH 2/2] virtio_ring: Use DMA API if memory is encrypted

2019-10-13 Thread David Gibson
On Fri, Oct 11, 2019 at 06:25:19PM -0700, Ram Pai wrote: > From: Thiago Jung Bauermann > > Normally, virtio enables DMA API with VIRTIO_F_IOMMU_PLATFORM, which must > be set by both device and guest driver. However, as a hack, when DMA API > returns physical addresses, guest driver can use the