Re: [PATCH 1/5] KVM: e500: always restore irqs

2025-01-20 Thread Nicholas Piggin
On Sun Jan 12, 2025 at 7:55 PM AEST, Paolo Bonzini wrote: > If find_linux_pte fails, IRQs will not be restored. This is unlikely > to happen in practice since it would have been reported as hanging > hosts, but it should of course be fixed anyway. > > Cc: sta...@vger.kernel.org > Reported-by: Sean

Re: [PATCH v3 0/1] powerpc: Enable dynamic preemption

2025-01-20 Thread Shrikanth Hegde
On 1/6/25 10:49, Shrikanth Hegde wrote: Now that preempt=lazy patches[1] are in powerpc-next tree, sending out the patch to support dynamic preemption based on DYNAMIC_KEY. base: powerpc-next +ankur, sebastian; sorry for not cc'ing earlier. Once the arch supports static inline calls, it

Re: linux-next: duplicate patch in the powerpc tree

2025-01-20 Thread Michael Ellerman
Stephen Rothwell writes: > Hi all, > > The following commit is also in Linus Torvalds' tree as a different commit > (but the same patch): > > 7fee0217538a ("MAINTAINERS: powerpc: Update my status") > > This is commit > > 77a903cd8e5a ("MAINTAINERS: powerpc: Update my status") > > in Linus' tre

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.14-1 tag

2025-01-20 Thread pr-tracker-bot
The pull request you sent on Tue, 21 Jan 2025 10:21:42 +0530: > https://lore.kernel.org/all/20250109104611.2491c...@canb.auug.org.au/ Thanks has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/95ec54a420b8f445e04a7ca0ea8deb72c51fe1d3 Thank you! -- Deet-doot-dot, I am a b

[GIT PULL] Please pull powerpc/linux.git powerpc-6.14-1 tag

2025-01-20 Thread Madhavan Srinivasan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull powerpc updates for 6.14. There is one trivial conflict in arch/powerpc/Kconfig with the mm tree. More info https://lore.kernel.org/all/20250109104611.2491c...@canb.auug.org.au/ Thanks The following changes since commit f

Re: [PATCH v3 20/28] powerpc/ftrace: Use RCU in all users of __module_text_address().

2025-01-20 Thread Shrikanth Hegde
On 1/8/25 14:34, Sebastian Andrzej Siewior wrote: __module_text_address() can be invoked within a RCU section, there is no requirement to have preemption disabled. Replace the preempt_disable() section around __module_text_address() with RCU. Cc: Christophe Leroy Cc: Madhavan Srinivasan Cc

Re: [PATCH v2] selftests: livepatch: handle PRINTK_CALLER in check_result()

2025-01-20 Thread Miroslav Benes
On Sun, 19 Jan 2025, Madhavan Srinivasan wrote: > Some arch configs (like ppc64) enable CONFIG_PRINTK_CALLER, > which adds the caller id as part of the dmesg. With recent > util-linux's update 467a5b3192f16 ('dmesg: add caller_id support') > the standard "dmesg" has been enhanced to print PRINTK_C

Re: [PATCH] of: address: Unify resource bounds overflow checking

2025-01-20 Thread Basharath Hussain Khaja
> On Fri, Jan 17, 2025 at 12:23:53PM +0530, Basharath Hussain Khaja wrote: >> >> >> Thomas Weißschuh writes: >> >> >> > The members "start" and "end" of struct resource are of type >> >> >> > "resource_size_t" which can be 32bit wide. >> >> >> > Values read from OF however are always 64bit wide.

[PATCH] ibmvnic: Add tx check to prevent skb leak

2025-01-20 Thread Denis Arefev
From: Nick Child From: Nick Child commit 0983d288caf984de0202c66641577b739caad561 upstream. Below is a summary of how the driver stores a reference to an skb during transmit: tx_buff[free_map[consumer_index]]->skb = new_skb; free_map[consumer_index] = IBMVNIC_INVALID_MAP; consumer_

[PATCH 0/4] seccomp: remove the 'sd' argument from __secure_computing()

2025-01-20 Thread Oleg Nesterov
Hello, I know nothing about arch/mips and I don't have a mips machine, 1/4 wasn't even compile tested. Oleg. --- arch/mips/kernel/ptrace.c | 20 ++-- arch/powerpc/kernel/ptrace/ptrace.c | 2 +- include/linux/seccomp.h | 12 kernel/entry/common

[PATCH 3/4] seccomp: remove the 'sd' argument from __secure_computing()

2025-01-20 Thread Oleg Nesterov
After the previous changes 'sd' is always NULL. Signed-off-by: Oleg Nesterov --- arch/powerpc/kernel/ptrace/ptrace.c | 2 +- include/linux/seccomp.h | 8 kernel/entry/common.c | 2 +- kernel/seccomp.c| 7 +++ 4 files changed, 9 insertion

[PATCH 4/4] seccomp: remove the 'sd' argument from __seccomp_filter()

2025-01-20 Thread Oleg Nesterov
After the previous change 'sd' is always NULL. Signed-off-by: Oleg Nesterov --- kernel/seccomp.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/kernel/seccomp.c b/kernel/seccomp.c index c29dfe82139e..75e293d3c1a1 100644 --- a/kernel/seccomp.c +++ b/ker

[PATCH 2/4] seccomp: kill the dead code in the !CONFIG_HAVE_ARCH_SECCOMP_FILTER version of __secure_computing()

2025-01-20 Thread Oleg Nesterov
Depending on CONFIG_HAVE_ARCH_SECCOMP_FILTER, __secure_computing(NULL) will crash or not, this is not consistent/safe. Fortunately, if CONFIG_HAVE_ARCH_SECCOMP_FILTER=n, __secure_computing() has no callers, these architectures use secure_computing_strict(). Also, after the previous change __secur

[PATCH 1/4] seccomp/mips: change syscall_trace_enter() to use secure_computing()

2025-01-20 Thread Oleg Nesterov
arch/mips/Kconfig selects HAVE_ARCH_SECCOMP_FILTER so syscall_trace_enter() can just use __secure_computing(NULL) and rely on populate_seccomp_data(sd) and "sd == NULL" checks in __secure_computing(sd) paths. With the change above syscall_trace_enter() can just use secure_computing() and avoid #if

Re: [PATCH] tools/perf/tests: Update event_groups test to use instructions as one of the sibling event for hw type

2025-01-20 Thread Ravi Bangoria
>>> In some of the powerpc platforms, event group testcase fails as below: >>> >>> # perf test -v 'Event groups' >>> 69: Event groups: >>> --- start --- >>> test child forked, pid 9765 >>> Using CPUID 0x00820200 >>> Using hv_24x7 for u

Re: [PATCH 2/2] ASoC: fsl_asrc_m2m: return error value in asrc_m2m_device_run()

2025-01-20 Thread Daniel Baluta
On Mon, Jan 20, 2025 at 10:20 AM Shengjiu Wang wrote: > > The asrc_m2m_device_run() function is the main process function > of converting, the error need to be returned to user, that user > can handle error case properly. > > Fixes: 24a01710f627 ("ASoC: fsl_asrc_m2m: Add memory to memory function"

[PATCH 0/2] ASoC: fsl: two fixes for asrc memory to memory

2025-01-20 Thread Shengjiu Wang
1. Fix the suspend failure for memory to peripheral function. 2. Return error value for processing function. Shengjiu Wang (2): ASoC: fsl_asrc_m2m: only handle pairs for m2m in the suspend ASoC: fsl_asrc_m2m: return error value in asrc_m2m_device_run() sound/soc/fsl/fsl_asrc_m2m.c | 16 +

[PATCH 2/2] ASoC: fsl_asrc_m2m: return error value in asrc_m2m_device_run()

2025-01-20 Thread Shengjiu Wang
The asrc_m2m_device_run() function is the main process function of converting, the error need to be returned to user, that user can handle error case properly. Fixes: 24a01710f627 ("ASoC: fsl_asrc_m2m: Add memory to memory function") Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc_m2m.c

Re: [PATCH] tools/perf/tests: Update event_groups test to use instructions as one of the sibling event for hw type

2025-01-20 Thread Athira Rajeev
> On 20 Jan 2025, at 12:00 PM, Ravi Bangoria wrote: > > Hi Athira, > > On 10-Jan-25 3:16 PM, Athira Rajeev wrote: >> In some of the powerpc platforms, event group testcase fails as below: >> >> # perf test -v 'Event groups' >> 69: Event groups

[PATCH 1/2] ASoC: fsl_asrc_m2m: only handle pairs for m2m in the suspend

2025-01-20 Thread Shengjiu Wang
ASRC memory to memory cases and memory to peripheral cases are sharing the same pair pools, the pairs got for m2m suspend function may be used for memory to peripheral, which is handled memory to peripheral driver and can't be handled in memory to memory suspend function. Use the "pair->dma_buffer

Re: [PATCH] tools/perf/tests: Update event_groups test to use instructions as one of the sibling event for hw type

2025-01-20 Thread Namhyung Kim
On Fri, 10 Jan 2025 15:16:20 +0530, Athira Rajeev wrote: > In some of the powerpc platforms, event group testcase fails as below: > ># perf test -v 'Event groups' >69: Event groups: >--- start --- >test child forked, pid 9765 >

[PATCH 5.10] ibmvnic: Add tx check to prevent skb leak

2025-01-20 Thread Denis Arefev
From: Nick Child From: Nick Child commit 0983d288caf984de0202c66641577b739caad561 upstream. Below is a summary of how the driver stores a reference to an skb during transmit: tx_buff[free_map[consumer_index]]->skb = new_skb; free_map[consumer_index] = IBMVNIC_INVALID_MAP; consumer_

Re: [PATCH v2] selftests: livepatch: handle PRINTK_CALLER in check_result()

2025-01-20 Thread Petr Mladek
On Sun 2025-01-19 22:02:38, Madhavan Srinivasan wrote: > Some arch configs (like ppc64) enable CONFIG_PRINTK_CALLER, > which adds the caller id as part of the dmesg. With recent > util-linux's update 467a5b3192f16 ('dmesg: add caller_id support') > the standard "dmesg" has been enhanced to print PR

[kvm-unit-tests PATCH v2 03/18] scripts: Refuse to run the tests if not configured for qemu

2025-01-20 Thread Alexandru Elisei
Arm and arm64 support running the tests under kvmtool. Unsurprisingly, kvmtool and qemu have a different command line syntax for configuring and running a virtual machine. On top of that, when kvm-unit-tests has been configured to run under kvmtool (via ./configure --target=kvmtool), the early UAR

[kvm-unit-tests PATCH v2 08/18] scripts/runtime: Detect kvmtool failure in premature_failure()

2025-01-20 Thread Alexandru Elisei
kvm-unit-tests assumes that if the VMM is able to get to where it tries to load the kernel, then the VMM and the configuration parameters will also work for running the test. All of this is done in premature_failure(). Teach premature_failure() about the kvmtool's error message when it fails to lo

[kvm-unit-tests PATCH v2 05/18] scripts: Rename run_qemu_status -> run_test_status

2025-01-20 Thread Alexandru Elisei
From: Alexandru Elisei For the arm/arm64 architectures, kvm-unit-tests can also be run using the kvmtool virtual machine manager. Rename run_qemu_status to run_test_status to make it more generic, in preparation to add support for kvmtool. Signed-off-by: Alexandru Elisei --- arm/run

[kvm-unit-tests PATCH v2 06/18] scripts: Merge the qemu parameter -smp into $qemu_opts

2025-01-20 Thread Alexandru Elisei
kvmtool has a different command line parameter to specify the number of VCPUs (-c/--cpus). To make it easier to accommodate it, merge the qemu specific parameter -smp into $qemu_opts when passing it to the $RUNTIME_arch_run script. This is safe to do because the $RUNTIME_arch_run script, on all ar

[kvm-unit-tests PATCH v2 09/18] scripts/runtime: Skip test when kvmtool and $accel is not KVM

2025-01-20 Thread Alexandru Elisei
kvmtool, unlike qemu, cannot emulate a different architecture than the host's, and as a result the only $accel parameter it can support is 'kvm'. Signed-off-by: Alexandru Elisei --- scripts/runtime.bash | 5 + 1 file changed, 5 insertions(+) diff --git a/scripts/runtime.bash b/scripts/runti

[kvm-unit-tests PATCH v2 15/18] Add kvmtool_params to test specification

2025-01-20 Thread Alexandru Elisei
arm/arm64 supports running tests under kvmtool, but kvmtool's syntax for running a virtual machine is different than qemu's. To run tests using the automated test infrastructure, add a new test parameter, kvmtool_params. The parameter serves the exact purpose as qemu_params/extra_params, but using

[kvm-unit-tests PATCH v2 14/18] run_tests: Add KVMTOOL environment variable for kvmtool binary path

2025-01-20 Thread Alexandru Elisei
kvmtool is often used for prototyping new features, and a developer might not want to install it system-wide. Add a KVMTOOL environment variable to make it easier for tests to use a binary not in $PATH. Signed-off-by: Alexandru Elisei --- run_tests.sh | 1 + scripts/arch-run.bash | 2 +-

[kvm-unit-tests PATCH v2 00/18] arm/arm64: Add kvmtool to the runner script

2025-01-20 Thread Alexandru Elisei
Finally got fed up with manually running a test with kvmtool, so I've decided to send v2 of the series [1] that adds kvmtool support to run_tests.sh. The series has significantly more patches now, but that's mostly because I split a large patch into several smaller ones (as per Andre's suggestion),

[kvm-unit-tests PATCH v2 01/18] run_tests: Document --probe-maxsmp argument

2025-01-20 Thread Alexandru Elisei
Commit 5dd20ec76ea63 ("runtime: Update MAX_SMP probe") added the --probe-maxmp argument, but the help message for run_tests.sh wasn't updated. Document --probe-maxsmp. Signed-off-by: Alexandru Elisei --- run_tests.sh | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff -

[kvm-unit-tests PATCH v2 02/18] Document environment variables

2025-01-20 Thread Alexandru Elisei
Document the environment variables that influence how a test is executed by the run_tests.sh test runner. Suggested-by: Andrew Jones Signed-off-by: Alexandru Elisei --- docs/unittests.txt | 5 - run_tests.sh | 12 +--- 2 files changed, 13 insertions(+), 4 deletions(-) diff -

[kvm-unit-tests PATCH v2 12/18] scripts/runtime: Add default arguments for kvmtool

2025-01-20 Thread Alexandru Elisei
kvmtool, unless told otherwise, will do its best to make sure that a kernel successfully boots in a virtual machine. Among things like automatically creating a rootfs, it also adds extra parameters to the kernel command line. This is actively harmful to kvm-unit-tests, because some tests parse the

[kvm-unit-tests PATCH v2 10/18] scripts/arch-run: Add support for kvmtool

2025-01-20 Thread Alexandru Elisei
Add two new functions, search_kvmtool_binary(), which, like the name suggests, searches for the location of the kvmtool binary, and run_kvmtool(), which runs a test with kvmtool as the VMM. initrd_create() has also been modified to use the kvmtool syntax for supplying an initrd, which is --initrd

[kvm-unit-tests PATCH v2 13/18] run_tests: Do not probe for maximum number of VCPUs when using kvmtool

2025-01-20 Thread Alexandru Elisei
The --probe-maxsmp parameter updates MAX_SMP with the maximum number of VCPUs that the host supports. Qemu will exit with an error when creating a virtual machine if the number of VCPUs is exceeded. kvmtool behaves differently: it will automatically limit the number of VCPUs to the what KVM suppor

[kvm-unit-tests PATCH v2 04/18] run_tests: Introduce unittest parameter 'qemu_params'

2025-01-20 Thread Alexandru Elisei
Tests for the arm and arm64 architectures can also be run with kvmtool, and work is under way to have it supported by the run_tests.sh test runner. Not suprisingly, kvmtool has a different syntax than qemu when configuring and running a virtual machine. Add a new unittest parameter, 'qemu_params',

[kvm-unit-tests PATCH v2 16/18] scripts/mkstandalone: Export $TARGET

2025-01-20 Thread Alexandru Elisei
$TARGET is needed for the test runner to decide if it should use qemu or kvmtool, so export it. Signed-off-by: Alexandru Elisei --- scripts/mkstandalone.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/mkstandalone.sh b/scripts/mkstandalone.sh index 4de97056e641..10abb5e191b7 10075

[kvm-unit-tests PATCH v2 07/18] scripts: Introduce kvmtool_opts

2025-01-20 Thread Alexandru Elisei
In preparation for supporting kvmtool, create and pass the variable 'kvmtool_opts' to the arch run script $RUNTIME_arch_run. Signed-off-by: Alexandru Elisei --- scripts/common.bash | 6 -- scripts/runtime.bash | 14 +++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --g

[kvm-unit-tests PATCH v2 18/18] run_tests: Enable kvmtool

2025-01-20 Thread Alexandru Elisei
Everything is in place to run the tests using kvmtool: $ ./configure --target=kvmtool $ make clean && make $ KVMTOOL= ./run_tests.sh so enable it, and remove ERRATA_FORCE=y when configuring for kvmtool, because the runner will generate and pass the correct environment to kvmtool. Missing is supp

[kvm-unit-tests PATCH v2 17/18] unittest: Add disabled_if parameter and use it for kvmtool

2025-01-20 Thread Alexandru Elisei
The pci-test is qemu specific. Other tests perform migration, which isn't supported by kvmtool. In general, kvmtool is not as feature-rich as qemu, so add a new unittest parameter, disabled_if, that causes a test to be skipped if the condition evaluates to true. Signed-off-by: Alexandru Elisei --

[kvm-unit-tests PATCH v2 11/18] arm/run: Add support for kvmtool

2025-01-20 Thread Alexandru Elisei
Teach the arm runner to use kvmtool when kvm-unit-tests has been configured appropriately. The test is ran using run_test_status() because kvmtool does not have a testdev device to return the test exit code, so kvm-unit-tests must always parse the "EXIT: STATUS" line for the exit code. Signed-off

Re: [PATCH v2 1/7] powerpc: properly negate error in syscall_set_return_value()

2025-01-20 Thread Christophe Leroy
Le 14/01/2025 à 18:04, Dmitry V. Levin a écrit : On Mon, Jan 13, 2025 at 06:34:44PM +0100, Christophe Leroy wrote: Le 13/01/2025 à 18:10, Dmitry V. Levin a écrit : Bring syscall_set_return_value() in sync with syscall_get_error(), and let upcoming ptrace/set_syscall_info selftest pass on pow

Re: [PATCH v2 1/7] powerpc: properly negate error in syscall_set_return_value()

2025-01-20 Thread Dmitry V. Levin
On Mon, Jan 20, 2025 at 02:51:38PM +0100, Christophe Leroy wrote: > Le 14/01/2025 à 18:04, Dmitry V. Levin a écrit : > > On Mon, Jan 13, 2025 at 06:34:44PM +0100, Christophe Leroy wrote: > >> Le 13/01/2025 à 18:10, Dmitry V. Levin a écrit : > >>> Bring syscall_set_return_value() in sync with syscal

Re: [PATCH 1/4] seccomp/mips: change syscall_trace_enter() to use secure_computing()

2025-01-20 Thread Kees Cook
On Mon, Jan 20, 2025 at 02:44:45PM +0100, Oleg Nesterov wrote: > arch/mips/Kconfig selects HAVE_ARCH_SECCOMP_FILTER so syscall_trace_enter() > can just use __secure_computing(NULL) and rely on populate_seccomp_data(sd) > and "sd == NULL" checks in __secure_computing(sd) paths. > > With the change

Re: [PATCH 4/4] seccomp: remove the 'sd' argument from __seccomp_filter()

2025-01-20 Thread Kees Cook
On Mon, Jan 20, 2025 at 02:45:05PM +0100, Oleg Nesterov wrote: > After the previous change 'sd' is always NULL. > > Signed-off-by: Oleg Nesterov Reviewed-by: Kees Cook -- Kees Cook

Re: [PATCH 2/4] seccomp: kill the dead code in the !CONFIG_HAVE_ARCH_SECCOMP_FILTER version of __secure_computing()

2025-01-20 Thread Kees Cook
On Mon, Jan 20, 2025 at 02:44:52PM +0100, Oleg Nesterov wrote: > Depending on CONFIG_HAVE_ARCH_SECCOMP_FILTER, __secure_computing(NULL) > will crash or not, this is not consistent/safe. Right now this never happens because there are no callers. > Fortunately, if CONFIG_HAVE_ARCH_SECCOMP_FILTER=n,

Re: [PATCH 3/4] seccomp: remove the 'sd' argument from __secure_computing()

2025-01-20 Thread Kees Cook
On Mon, Jan 20, 2025 at 02:44:59PM +0100, Oleg Nesterov wrote: > After the previous changes 'sd' is always NULL. > > Signed-off-by: Oleg Nesterov Reviewed-by: Kees Cook -- Kees Cook

Re: [PATCH 0/2] ASoC: fsl: two fixes for asrc memory to memory

2025-01-20 Thread Mark Brown
On Mon, 20 Jan 2025 16:19:36 +0800, Shengjiu Wang wrote: > 1. Fix the suspend failure for memory to peripheral function. > 2. Return error value for processing function. > > Shengjiu Wang (2): > ASoC: fsl_asrc_m2m: only handle pairs for m2m in the suspend > ASoC: fsl_asrc_m2m: return error val

[PATCH 1/2] powerpc: export MIN RMA size

2025-01-20 Thread Sourabh Jain
Commit 683eab94da75bc ("powerpc/fadump: setup additional parameters for dump capture kernel") introduced the additional parameter feature in fadump for HASH MMU with the understanding that GRUB does not use the memory area between 640MB and 768MB for its operation. However, the patch ("powerpc: in

[PATCH 2/2] powerpc/fadump: fix additional param memory reservation for HASH MMU

2025-01-20 Thread Sourabh Jain
Commit 683eab94da75bc ("powerpc/fadump: setup additional parameters for dump capture kernel") introduced the additional parameter feature in fadump for HASH MMU with the understanding that GRUB does not use the memory area between 640MB and 768MB for its operation. However, the patch ("powerpc: in

[PATCH 0/2] powerpc/fadump: fix additional parameter for HASH MMU

2025-01-20 Thread Sourabh Jain
Patch https://lore.kernel.org/all/20241206065545.14815-1-avn...@linux.ibm.com/ proposed the MIN RMA change to 768MB, which impacts the fadump additional parameter feature for HASH MMU. Here’s how: Commit 683eab94da75bc ("powerpc/fadump: setup additional parameters for dump capture kernel") introdu

Re: [PATCH 1/2] ASoC: fsl_asrc_m2m: only handle pairs for m2m in the suspend

2025-01-20 Thread Daniel Baluta
On Mon, Jan 20, 2025 at 10:20 AM Shengjiu Wang wrote: > > ASRC memory to memory cases and memory to peripheral cases are > sharing the same pair pools, the pairs got for m2m suspend > function may be used for memory to peripheral, which is handled > memory to peripheral driver and can't be handled