Re: [powerpc/merge] PMU: Kernel warning while running pmu/ebb selftests

2022-01-11 Thread Sachin Sant
> The warning indicates that MSR_EE being set(interrupt enabled) when > there was an overflown PMC detected. This could happen in > power_pmu_disable since it runs under interrupt soft disable > condition ( local_irq_save ) and not with interrupts hard disabled. > commit 2c9ac51b850d ("powerpc/pe

Re: [powerpc/merge] PMU: Kernel warning while running pmu/ebb selftests

2022-01-11 Thread Athira Rajeev
> On 11-Jan-2022, at 2:25 PM, Sachin Sant wrote: > > > >> On 18-Dec-2021, at 3:38 PM, Sachin Sant wrote: >> >> While running kernel selftests (lost_exception_test) against latest >> powerpc merge/next branch code (5.16.0-rc5-03218-g798527287598) >> following warning is seen: >> > Ping. I

Re: [PATCH 4/5] uapi: always define F_GETLK64/F_SETLK64/F_SETLKW64 in fcntl.h

2022-01-11 Thread Guo Ren
On Tue, Jan 11, 2022 at 11:33 PM Arnd Bergmann wrote: > > On Tue, Jan 11, 2022 at 9:35 AM Christoph Hellwig wrote: > > > > The fcntl F_GETLK64/F_SETLK64/F_SETLKW64 are only implemented for the > > 32-bit syscall APIs, but we also need them for compat handling on 64-bit > > builds. Redefining the

Re: [PATCH v5] powerpc/pseries: read the lpar name from the firmware

2022-01-11 Thread Michael Ellerman
Tyrel Datwyler writes: > On 1/6/22 8:13 AM, Laurent Dufour wrote: >> The LPAR name may be changed after the LPAR has been started in the HMC. >> In that case lparstat command is not reporting the updated value because it >> reads it from the device tree which is read at boot time. >> >> However t

Re: [PATCH v5 04/21] kernel: Add combined power-off+restart handler call chain API

2022-01-11 Thread Dmitry Osipenko
09.01.2022 02:35, Michał Mirosław пишет: > On Mon, Dec 13, 2021 at 12:02:52AM +0300, Dmitry Osipenko wrote: > [...] >> +/** >> + * struct power_off_data - Power-off callback argument >> + * >> + * @cb_data: Callback data. >> + */ >> +struct power_off_data { >> +void *cb_data; >> +}; >> + >> +/*

[PATCH v2] powerpc: dts: t1040rdb: fix ports names for Seville Ethernet switch

2022-01-11 Thread Maxim
From: Maxim Kiselev On board rev A, the network interface labels for the switch ports written on the front panel are different than on rev B and later. This patch fixes network interface names for the switch ports according to labels that are written on the front panel of the board rev B. They s

Re: consolidate the compat fcntl definitions

2022-01-11 Thread Arnd Bergmann
On Tue, Jan 11, 2022 at 9:35 AM Christoph Hellwig wrote: > > Hi all, > > currenty the compat fcnt definitions are duplicate for all compat > architectures, and the native fcntl64 definitions aren't even usable > from userspace due to a bogus CONFIG_64BIT ifdef. This series tries > to sort out all

Re: [PATCH 4/5] uapi: always define F_GETLK64/F_SETLK64/F_SETLKW64 in fcntl.h

2022-01-11 Thread Arnd Bergmann
On Tue, Jan 11, 2022 at 9:35 AM Christoph Hellwig wrote: > > The fcntl F_GETLK64/F_SETLK64/F_SETLKW64 are only implemented for the > 32-bit syscall APIs, but we also need them for compat handling on 64-bit > builds. Redefining them is error prone (as shown by the example that > parisc gets it wro

Re: [PATCH] powerpc: dts: add device tree for T1040RDB-REV-A

2022-01-11 Thread Vladimir Oltean
Hi Maxim, On Tue, Jan 11, 2022 at 06:22:04PM +0300, Maxim Kiselev wrote: > On board rev A, the network interface labels for the switch ports > written on the front panel are different than on rev B and later. > > This patch introduces a separate device tree for rev A. > The main device tree is su

[PATCH] powerpc: dts: add device tree for T1040RDB-REV-A

2022-01-11 Thread Maxim Kiselev
On board rev A, the network interface labels for the switch ports written on the front panel are different than on rev B and later. This patch introduces a separate device tree for rev A. The main device tree is supposed to cover rev B and later. Signed-off-by: Maxim Kiselev --- arch/powerpc/bo

Re: [PATCH 11/13] powerpc64/bpf elfv2: Setup kernel TOC in r2 on entry

2022-01-11 Thread Christophe Leroy
Le 11/01/2022 à 15:35, Christophe Leroy a écrit : Le 11/01/2022 à 11:31, Naveen N. Rao a écrit : Christophe Leroy wrote: Le 06/01/2022 à 12:45, Naveen N. Rao a écrit : In preparation for using kernel TOC, load the same in r2 on entry. With elfv1, the kernel TOC is already setup by our c

Re: [PATCH 2/3] KVM: PPC: Book3S HV: Delay setting of kvm ops

2022-01-11 Thread Fabiano Rosas
Nicholas Piggin writes: > Excerpts from Fabiano Rosas's message of December 24, 2021 7:19 am: >> Delay the setting of kvm_hv_ops until after all init code has >> completed. This avoids leaving the ops still accessible if the init >> fails. >> >> Signed-off-by: Fabiano Rosas >> --- >> arch/powe

Re: [PATCH v3 5/6] KVM: PPC: mmio: Return to guest after emulation failure

2022-01-11 Thread Fabiano Rosas
Nicholas Piggin writes: > Excerpts from Alexey Kardashevskiy's message of January 11, 2022 9:51 am: >> >> >> On 1/10/22 18:36, Nicholas Piggin wrote: >>> Excerpts from Fabiano Rosas's message of January 8, 2022 7:00 am: If MMIO emulation fails we don't want to crash the whole guest by

Re: [PATCH v3 3/6] KVM: PPC: Don't use pr_emerg when mmio emulation fails

2022-01-11 Thread Fabiano Rosas
Nicholas Piggin writes: > Excerpts from Fabiano Rosas's message of January 8, 2022 7:00 am: >> If MMIO emulation fails we deliver a Program interrupt to the >> guest. This is a normal event for the host, so use pr_info. >> >> Signed-off-by: Fabiano Rosas >> --- > > Should it be rate limited to

Re: [PATCH 1/2] mm/cma: provide option to opt out from exposing pages on activation failure

2022-01-11 Thread David Hildenbrand
On 06.01.22 13:01, Hari Bathini wrote: > > > On 22/12/21 12:18 am, David Hildenbrand wrote: >> On 20.12.21 20:34, Hari Bathini wrote: >>> Commit 072355c1cf2d ("mm/cma: expose all pages to the buddy if >>> activation of an area fails") started exposing all pages to buddy >>> allocator on CMA activ

Re: [PATCH 11/13] powerpc64/bpf elfv2: Setup kernel TOC in r2 on entry

2022-01-11 Thread Christophe Leroy
Le 11/01/2022 à 11:31, Naveen N. Rao a écrit : > Christophe Leroy wrote: >> >> >> Le 06/01/2022 à 12:45, Naveen N. Rao a écrit : >>> In preparation for using kernel TOC, load the same in r2 on entry. With >>> elfv1, the kernel TOC is already setup by our caller so we just emit a >>> nop. We adjus

Re: [PATCH v3 6/6] KVM: PPC: mmio: Reject instructions that access more than mmio.data size

2022-01-11 Thread Fabiano Rosas
Nicholas Piggin writes: > Excerpts from Fabiano Rosas's message of January 8, 2022 7:00 am: >> The MMIO interface between the kernel and userspace uses a structure >> that supports a maximum of 8-bytes of data. Instructions that access >> more than that need to be emulated in parts. >> >> We cur

Re: [PATCH] powerpc: dts: t1040rdb: fix ports names for Seville Ethernet switch

2022-01-11 Thread Vladimir Oltean
Hi Maxim, On Mon, Jan 10, 2022 at 07:40:38AM +, Maxim Kiselev wrote: > Here are photos of my boards. Your patch is OK to change t1040rdb.dts, but please preserve the existing port mappings in a new arch/powerpc/boot/dts/fsl/t1040rdb-rev-a.dts file. You will also need to modify the /model and

[PATCH v5 0/6] KEXEC_SIG with appended signature

2022-01-11 Thread Michal Suchanek
Hello, This is a refresh of the KEXEC_SIG series. This adds KEXEC_SIG support on powerpc and deduplicates the code dealing with appended signatures in the kernel. powerpc supports IMA_KEXEC but that's an exception rather than the norm. On the other hand, KEXEC_SIG is portable across platforms.

[PATCH v5 6/6] module: Move duplicate mod_check_sig users code to mod_parse_sig

2022-01-11 Thread Michal Suchanek
Multiple users of mod_check_sig check for the marker, then call mod_check_sig, extract signature length, and remove the signature. Put this code in one place together with mod_check_sig. This changes the error from ENOENT to ENODATA for ima_read_modsig in the case the signature marker is missing.

[PATCH v5 1/6] s390/kexec_file: Don't opencode appended signature check.

2022-01-11 Thread Michal Suchanek
Module verification already implements appeded signature check. Reuse it for kexec_file. The kexec_file implementation uses EKEYREJECTED error in some cases when there is no key and the common implementation uses ENOPKG or EBADMSG instead. Signed-off-by: Michal Suchanek Acked-by: Heiko Carstens

[PATCH v5 2/6] powerpc/kexec_file: Add KEXEC_SIG support.

2022-01-11 Thread Michal Suchanek
Copy the code from s390x Both powerpc and s390x use appended signature format (as opposed to EFI based patforms using PE format). Signed-off-by: Michal Suchanek --- v3: - Philipp Rudo : Update the comit message with explanation why the s390 code is usable on powerpc. - Include correct

[PATCH v5 3/6] kexec_file: Don't opencode appended signature verification.

2022-01-11 Thread Michal Suchanek
Module verification already implements appeded signature verification. Reuse it for kexec_file. Signed-off-by: Michal Suchanek --- v3: - Philipp Rudo : Update the dependency on MODULE_SIG_FORMAT to MODULE_SIG - Include linux/verification.h - previously added in earlier patch v4: - kern

[PATCH v5 5/6] module: Use key_being_used_for for log messages in verify_appended_signature

2022-01-11 Thread Michal Suchanek
Add value for kexec appended signature and pass in key_being_used_for enum rather than a string to verify_appended_signature to produce log messages about the signature. Signed-off-by: Michal Suchanek --- arch/powerpc/kexec/elf_64.c | 2 +- arch/s390/kernel/machine_kexec_file.c

[PATCH v5 4/6] module: strip the signature marker in the verification function.

2022-01-11 Thread Michal Suchanek
It is stripped by each caller separately. Note: this changes the error for kexec_file from EKEYREJECTED to ENODATA when the signature marker is missing. Signed-off-by: Michal Suchanek --- v3: - Philipp Rudo : Update the commit with note about change of raturn value - the module_signatu

Re: [PATCH 11/13] powerpc64/bpf elfv2: Setup kernel TOC in r2 on entry

2022-01-11 Thread Naveen N. Rao
Christophe Leroy wrote: Le 06/01/2022 à 12:45, Naveen N. Rao a écrit : In preparation for using kernel TOC, load the same in r2 on entry. With elfv1, the kernel TOC is already setup by our caller so we just emit a nop. We adjust the number of instructions to skip on a tail call accordingly. S

RE: [PATCH 5/5] compat: consolidate the compat_flock{,64} definition

2022-01-11 Thread David Laight
From: Christoph Hellwig > Sent: 11 January 2022 08:35 > > Provide a single common definition for the compat_flock and > compat_flock64 structures using the same tricks as for the native > variants. Another extra define is added for the packing required on > x86. > ... > /* > - * IA32 uses 4 byt

Re: [5.16.0] build error on unrecognized opcode: ptesync

2022-01-11 Thread Christophe Leroy
Le 11/01/2022 à 10:32, Mike a écrit : > I managed to fix it in the end, patch attached, though i should have > done a $(call cc-option-, -maltivec, -mabi=altivec) in the > arch/powerpc/mm/Makefile > I wrongly assumed that the manual i had downloaded at 4.44am was for > 32bit ppc only and found

Re: [powerpc/merge] PMU: Kernel warning while running pmu/ebb selftests

2022-01-11 Thread Sachin Sant
> On 18-Dec-2021, at 3:38 PM, Sachin Sant wrote: > > While running kernel selftests (lost_exception_test) against latest > powerpc merge/next branch code (5.16.0-rc5-03218-g798527287598) > following warning is seen: > Ping. I continue to see this problem. > [ 172.851380] [ cut h

[PATCH 5/5] compat: consolidate the compat_flock{,64} definition

2022-01-11 Thread Christoph Hellwig
Provide a single common definition for the compat_flock and compat_flock64 structures using the same tricks as for the native variants. Another extra define is added for the packing required on x86. Signed-off-by: Christoph Hellwig --- arch/arm64/include/asm/compat.h | 16 ar

[PATCH 4/5] uapi: always define F_GETLK64/F_SETLK64/F_SETLKW64 in fcntl.h

2022-01-11 Thread Christoph Hellwig
The fcntl F_GETLK64/F_SETLK64/F_SETLKW64 are only implemented for the 32-bit syscall APIs, but we also need them for compat handling on 64-bit builds. Redefining them is error prone (as shown by the example that parisc gets it wrong currently), so we should use the same defines for both case. In

[PATCH 1/5] uapi: remove the unused HAVE_ARCH_STRUCT_FLOCK64 define

2022-01-11 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/uapi/asm-generic/fcntl.h | 2 -- tools/include/uapi/asm-generic/fcntl.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h index ecd0f5bdfc1d6..caa482e3b01af 100644 --- a/incl

[PATCH 3/5] uapi: merge the 32-bit mips struct flock into the generic one

2022-01-11 Thread Christoph Hellwig
Add a new __ARCH_FLOCK_EXTRA_SYSID macro following the style of __ARCH_FLOCK_PAD to avoid having a separate definition just for one architecture. Signed-off-by: Christoph Hellwig --- arch/mips/include/uapi/asm/fcntl.h | 26 +++--- include/uapi/asm-generic/fcntl.h |

consolidate the compat fcntl definitions

2022-01-11 Thread Christoph Hellwig
Hi all, currenty the compat fcnt definitions are duplicate for all compat architectures, and the native fcntl64 definitions aren't even usable from userspace due to a bogus CONFIG_64BIT ifdef. This series tries to sort out all that. Diffstat: arch/arm64/include/asm/compat.h| 20 --

[PATCH 2/5] uapi: simplify __ARCH_FLOCK{,64}_PAD a little

2022-01-11 Thread Christoph Hellwig
Don't bother to define the symbols empty, just don't use them. That makes the intent a little more clear. Signed-off-by: Christoph Hellwig --- include/uapi/asm-generic/fcntl.h | 12 tools/include/uapi/asm-generic/fcntl.h | 12 2 files changed, 8 insertions(+), 16