[PATCH] powerpc/32: Select ARCH_SPLIT_ARG64

2022-10-31 Thread Michael Ellerman
On 32-bit kernels, 64-bit syscall arguments are split into two registers. For that to work with syscall wrappers, the prototype of the syscall must have the argument split so that the wrapper macro properly unpacks the arguments from pt_regs. The fanotify_mark() syscall is one such syscall, which

Re: [PATCH] Change maintainers for vnic driver

2022-10-31 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (master) by Jakub Kicinski : On Fri, 28 Oct 2022 13:35:11 -0700 you wrote: > Changed maintainers for vnic driver, since Dany has new responsibilities. > Also added Nick Child as reviewer. > > Signed-off-by: Rick Lindsley > > --- > MAINTAINERS |

[PATCH] powerpc: Fix some kernel-doc warnings

2022-10-31 Thread Bo Liu
The current code provokes some kernel-doc warnings: arch/powerpc/kernel/process.c:1606: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Signed-off-by: Bo Liu --- arch/powerpc/kernel/process.c | 2 +- 1 file changed,

Re: [PATCH v6 22/25] powerpc/64s: Clear user GPRs in syscall interrupt entry

2022-10-31 Thread Rohan McLure
> On 23 Sep 2022, at 6:02 pm, Nicholas Piggin wrote: > > On Wed Sep 21, 2022 at 4:56 PM AEST, Rohan McLure wrote: >> Clear user state in gprs (assign to zero) to reduce the influence of user >> registers on speculation within kernel syscall handlers. Clears occur >> at the very beginning of the

Re: [PATCH net-next v7 08/10] powerpc: dts: t208x: Mark MAC1 and MAC2 as 10G

2022-10-31 Thread Sean Anderson
On 10/31/22 10:12, Camelia Alexandra Groza wrote: >> -Original Message- >> From: Sean Anderson >> Sent: Friday, October 28, 2022 19:55 >> To: Camelia Alexandra Groza ; Sean Anderson >> ; David S . Miller ; >> Jakub Kicinski ; Madalin Bucur >> ; net...@vger.kernel.org >> Cc: Eric Dumazet ;

[PATCH v4 2/2] mm, hwpoison: When copy-on-write hits poison, take page offline

2022-10-31 Thread Tony Luck
Cannot call memory_failure() directly from the fault handler because mmap_lock (and others) are held. It is important, but not urgent, to mark the source page as h/w poisoned and unmap it from other tasks. Use memory_failure_queue() to request a call to memory_failure() for the page with the

[PATCH v4 1/2] mm, hwpoison: Try to recover from copy-on write faults

2022-10-31 Thread Tony Luck
If the kernel is copying a page as the result of a copy-on-write fault and runs into an uncorrectable error, Linux will crash because it does not have recovery code for this case where poison is consumed by the kernel. It is easy to set up a test case. Just inject an error into a private page,

[PATCH v4 0/2] Copy-on-write poison recovery

2022-10-31 Thread Tony Luck
Recover from poison consumption while copying pages in the kernel for a copy-on-write fault. Changes since v3: 1) Miaohe Lin pointed out that a recent change by Alexander Potapenko to copy_user_highpage() added a call to kmsan_unpoison_memory(). Same is needed in my cloned

Re: [PATCH] powerpc/32: fix syscall wrappers with 64-bit arguments

2022-10-31 Thread Arnd Bergmann
On Mon, Oct 31, 2022, at 15:47, Andreas Schwab wrote: > With the introducion of syscall wrappers all wrappers for syscalls with > 64-bit arguments must be handled specially, not only those that have > unaligned 64-bit arguments. This left out the fallocate and > sync_file_range2 syscalls. > >

Re: [PATCH v4 2/2] arm64: support batched/deferred tlb shootdown during page reclamation

2022-10-31 Thread Punit Agrawal
Barry Song <21cn...@gmail.com> writes: > On Sat, Oct 29, 2022 at 2:11 AM Punit Agrawal > wrote: >> >> Yicong Yang writes: >> >> > On 2022/10/27 22:19, Punit Agrawal wrote: >> >> >> >> [ Apologies for chiming in late in the conversation ] >> >> >> >> Anshuman Khandual writes: >> >> >> >>> On

Re: [PATCH 1/3] ASoC: dt-bindings: fsl,micfil: Add compatible string for i.MX93 platform

2022-10-31 Thread Rob Herring
On Fri, 28 Oct 2022 16:27:48 +0800, Chancel Liu wrote: > Add compatible string "fsl,imx93-micfil" for i.MX93 platform > > Signed-off-by: Chancel Liu > --- > Documentation/devicetree/bindings/sound/fsl,micfil.yaml | 1 + > 1 file changed, 1 insertion(+) > Acked-by: Rob Herring

RE: [PATCH v3 5/5] PCI: Remove unnecessary includes

2022-10-31 Thread Roy Zang
> -Original Message- > From: Bjorn Helgaas > Subject: [PATCH v3 5/5] PCI: Remove unnecessary includes > > From: Bjorn Helgaas > > Many host controller drivers #include even though they > don't need it. Remove the unnecessary #includes. > > Signed-off-by: Bjorn Helgaas > --- >

[PATCH v3 5/5] PCI: Remove unnecessary includes

2022-10-31 Thread Bjorn Helgaas
From: Bjorn Helgaas Many host controller drivers #include even though they don't need it. Remove the unnecessary #includes. Signed-off-by: Bjorn Helgaas --- drivers/pci/controller/cadence/pci-j721e.c | 1 - drivers/pci/controller/dwc/pci-layerscape.c | 1 -

[PATCH v3 4/5] PCI: xgene-msi: Include explicitly

2022-10-31 Thread Bjorn Helgaas
From: Bjorn Helgaas pci-xgene-msi.c uses irq_domain_add_linear() and related interfaces, so it needs but doesn't include it directly; it relies on the fact that includes it. But pci-xgene-msi.c *doesn't* need itself. Include directly to remove this implicit dependency so a future patch can

[PATCH v3 3/5] PCI: mvebu: Include explicitly

2022-10-31 Thread Bjorn Helgaas
From: Bjorn Helgaas pci-mvebu.c uses irq_domain_add_linear() and related interfaces but relies on but doesn't include it directly; it relies on the fact that includes it. Include directly to remove this implicit dependency. Signed-off-by: Bjorn Helgaas Acked-by: Thomas Petazzoni ---

[PATCH v3 2/5] PCI: microchip: Include explicitly

2022-10-31 Thread Bjorn Helgaas
From: Bjorn Helgaas pcie-microchip-host.c uses irq_domain_add_linear() and related interfaces, so it needs but doesn't include it directly; it relies on the fact that includes it. But pcie-microchip-host.c *doesn't* need itself. Include directly to remove this implicit dependency so a

[PATCH v3 1/5] PCI: altera-msi: Include explicitly

2022-10-31 Thread Bjorn Helgaas
From: Bjorn Helgaas pcie-altera-msi.c uses irq_domain_add_linear() and related interfaces, so it needs but doesn't include it directly; it relies on the fact that includes it. But pcie-altera-msi.c *doesn't* need itself. Include directly to remove this implicit dependency so a future patch

[PATCH v3 0/5] PCI: Remove unnecessary includes

2022-10-31 Thread Bjorn Helgaas
From: Bjorn Helgaas Many host controller drivers #include even though they don't need it. Remove the unnecessary #includes. v2: https://lore.kernel.org/r/20221025185147.665365-1-helg...@kernel.org/ v1: https://lore.kernel.org/r/20221019195452.37606-1-helg...@kernel.org/ Changes from v2 to

Re: [PATCH v8 4/9] phy: fsl: Add Lynx 10G SerDes driver

2022-10-31 Thread Sean Anderson
On 10/29/22 05:11, Bagas Sanjaya wrote: > On Thu, Oct 27, 2022 at 03:11:08PM -0400, Sean Anderson wrote: >> .. only:: subproject and html >> diff --git a/Documentation/driver-api/phy/lynx_10g.rst >> b/Documentation/driver-api/phy/lynx_10g.rst >> new file mode 100644 >> index

[PATCH] powerpc/32: fix syscall wrappers with 64-bit arguments

2022-10-31 Thread Andreas Schwab
With the introducion of syscall wrappers all wrappers for syscalls with 64-bit arguments must be handled specially, not only those that have unaligned 64-bit arguments. This left out the fallocate and sync_file_range2 syscalls. Fixes: 7e92e01b7245 ("powerpc: Provide syscall wrapper") Fixes:

RE: [PATCH net-next v7 08/10] powerpc: dts: t208x: Mark MAC1 and MAC2 as 10G

2022-10-31 Thread Camelia Alexandra Groza
> -Original Message- > From: Sean Anderson > Sent: Friday, October 28, 2022 19:55 > To: Camelia Alexandra Groza ; Sean Anderson > ; David S . Miller ; > Jakub Kicinski ; Madalin Bucur > ; net...@vger.kernel.org > Cc: Eric Dumazet ; linuxppc-dev @ lists . ozlabs . > org ;

[PATCH] asm-generic: compat: fix compat_arg_u64 and compat_arg_u64_dual

2022-10-31 Thread Andreas Schwab
The macros are defined backwards. Fixes: 43d5de2b67d7 ("asm-generic: compat: Support BE for long long args in 32-bit ABIs") Signed-off-by: Andreas Schwab --- include/asm-generic/compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-generic/compat.h

[PATCH v5 2/2] powerpc/64: Add module check for ELF ABI version

2022-10-31 Thread Nicholas Piggin
Override the generic module ELF check to provide a check for the ELF ABI version. This becomes important if we allow big-endian ELF ABI V2 builds but it doesn't hurt to check now. Cc: Jessica Yu Signed-off-by: Michael Ellerman [np: split patch, added changelog, adjust to Jessica's proposal]

[PATCH v5 1/2] module: add module_elf_check_arch for module-specific checks

2022-10-31 Thread Nicholas Piggin
The elf_check_arch() function is also used to test compatibility of usermode binaries. Kernel modules may have more specific requirements, for example powerpc would like to test for ABI version compatibility. Add a weak module_elf_check_arch() that defaults to true, and call it from

[PATCH v5 0/2] powerpc module arch checks

2022-10-31 Thread Nicholas Piggin
These slipped through the cracks. Picking them up again... The story so far is that Jessica gave us the new scheme in patch 1, now slightly rebased. Patch 2 implements the additional check that powerpc wants which originally came from Michael, and has been updated to the new approach. This was

Re: [PATCH v3 2/2] x86: Fix /proc/cpuinfo cpumask warning

2022-10-31 Thread Andrew Jones
On Mon, Oct 31, 2022 at 09:58:57AM +0100, Borislav Petkov wrote: > On Mon, Oct 31, 2022 at 09:06:04AM +0100, Andrew Jones wrote: > > The valid cpumask range is [0, nr_cpu_ids) and cpumask_next() always > > returns a CPU ID greater than its input, which results in its input > > range being [-1,

Re: [PATCH v3 2/2] x86: Fix /proc/cpuinfo cpumask warning

2022-10-31 Thread Borislav Petkov
On Mon, Oct 31, 2022 at 09:06:04AM +0100, Andrew Jones wrote: > The valid cpumask range is [0, nr_cpu_ids) and cpumask_next() always > returns a CPU ID greater than its input, which results in its input > range being [-1, nr_cpu_ids - 1). Ensure showing CPU info avoids > triggering error

Re: [PATCH v3 2/2] x86: Fix /proc/cpuinfo cpumask warning

2022-10-31 Thread Andrew Jones
On Fri, Oct 28, 2022 at 06:06:41PM +0200, Borislav Petkov wrote: > On Fri, Oct 28, 2022 at 10:13:28AM -0500, Yury Norov wrote: > > Because it's related to bitmap API usage and has been revealed after > > some work in bitmaps. > > So first of all, that "fix" needs to explain what exactly it is

[PATCH] powerpc/pseries/eeh: Fix some kernel-doc warnings

2022-10-31 Thread Bo Liu
Fixes the following W=1 kernel build warning(s): arch/powerpc/platforms/pseries/eeh_pseries.c:163: warning: Function parameter or member 'config_addr' not described in 'pseries_eeh_phb_reset' arch/powerpc/platforms/pseries/eeh_pseries.c:163: warning: Excess function parameter 'config_adddr'

[RFC PATCH 19/19] powerpc/64: ELFv2 use reserved word in the stack frame for the regs marker

2022-10-31 Thread Nicholas Piggin
There are 4 unused bytes in the minimum frame in the ELFv2 ABI. At the risk of causing a future ABI incompatibility, use this and save 16 bytes from interrupt and switch frames. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/ptrace.h | 15 ++- 1 file changed, 10

[RFC PATCH 18/19] powerpc: change stack marker memory operations to 32-bit

2022-10-31 Thread Nicholas Piggin
The marker is a 32-bit constant across all platforms now, so use 32-bit memory accesses. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/ptrace.h| 1 - arch/powerpc/kernel/exceptions-64e.S | 2 +- arch/powerpc/kernel/exceptions-64s.S | 2 +- arch/powerpc/kernel/interrupt_64.S

[RFC PATCH 17/19] powerpc: remove STACK_FRAME_OVERHEAD

2022-10-31 Thread Nicholas Piggin
This is equal to STACK_FRAME_MIN_SIZE on 32-bit and 64-bit ELFv1, and no longer used in 64-bit ELFv2, so replace it with that constant. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/ptrace.h | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff

[RFC PATCH 16/19] powerpc/64: ELFv2 use minimal stack frames in int and switch frame sizes

2022-10-31 Thread Nicholas Piggin
This requires an extra 16 bytes beyond the minimum frame size for the aligned regs marker for the int frame. The switch frame needs to match that because they share some offset definitions. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/ptrace.h | 21 +++-- 1 file

[RFC PATCH 15/19] powerpc: allow minimum sized kernel stack frames

2022-10-31 Thread Nicholas Piggin
This affects only 64-bit ELFv2 kernels, and reduces the minimum asm-created stack frame size from 112 to 32 byte on those kernels. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/head_40x.S | 2 +- arch/powerpc/kernel/head_44x.S | 6 +++--- arch/powerpc/kernel/head_64.S

[RFC PATCH 14/19] powerpc: split validate_sp into two functions

2022-10-31 Thread Nicholas Piggin
Most callers just want to validate an arbitrary kernel stack pointer, some need a particular size. Make the size case the exceptional one with an extra function. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/processor.h | 15 --- arch/powerpc/kernel/process.c|

[RFC PATCH 13/19] powerpc: copy_thread add a back chain to the switch stack frame

2022-10-31 Thread Nicholas Piggin
Stack unwinders need LR and the back chain as a minimum. The switch stack uses regs->nip for its return pointer rather than lrsave, so that was not filled in, and neither was the back chain. With this and the previous change, a stack trace in the switch or interrupt stack goes from looking like

[RFC PATCH 12/19] powerpc: copy_thread fill in interrupt frame marker and back chain

2022-10-31 Thread Nicholas Piggin
Backtraces will not recognise the fork system call interrupt without the regs marker. And at least perf starts unwinding the user stack from gpr[1] directly, but regular interrupt entry from userspace creates the back chain to the user stack, so do this too, to be consistent. Signed-off-by:

[RFC PATCH 11/19] powerpc: add a define for the switch frame size and regs offset

2022-10-31 Thread Nicholas Piggin
This is open-coded in process.c, ppc32 uses a different define with the same value, and the C definition is name differently which makes it an extra indirection to grep for. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/ptrace.h | 6 -- arch/powerpc/kernel/asm-offsets.c | 2

[RFC PATCH 10/19] powerpc: add a define for the user interrupt frame size

2022-10-31 Thread Nicholas Piggin
The user interrupt frame is a different size from the kernel frame, so give it its own name. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/ptrace.h | 6 +++--- arch/powerpc/kernel/process.c | 6 +++--- arch/powerpc/kernel/stacktrace.c | 4 ++-- 3 files changed, 8

[RFC PATCH 09/19] powerpc: Rename STACK_FRAME_MARKER and derive it from frame offset

2022-10-31 Thread Nicholas Piggin
This is a count of longs from the stack pointer to the regs marker. Rename it to make it more distinct from the other byte offsets. It can be derived from the byte offset definitions just added. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/ptrace.h | 4 ++--

[RFC PATCH 08/19] powerpc: add a definition for the marker offset within the interrupt frame

2022-10-31 Thread Nicholas Piggin
Define a constant rather than open-code the offset for the "regs" marker. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/ptrace.h | 2 ++ arch/powerpc/kernel/entry_32.S | 2 +- arch/powerpc/kernel/exceptions-64e.S| 2 +- arch/powerpc/kernel/exceptions-64s.S

[RFC PATCH 07/19] powerpc: add definition for pt_regs offset within an interrupt frame

2022-10-31 Thread Nicholas Piggin
This is a common offset that currently uses the overloaded STACK_FRAME_OVERHEAD constant. It's easier to read and more flexible to use a specific regs offset for this. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/ptrace.h | 2 + arch/powerpc/kernel/asm-offsets.c

[RFC PATCH 06/19] powerpc: simplify ppc_save_regs

2022-10-31 Thread Nicholas Piggin
Adjust the pt_regs pointer so the interrupt frame offsets can be used directly to save registers. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/ppc_save_regs.S | 58 +++-- 1 file changed, 14 insertions(+), 44 deletions(-) diff --git