[PATCH] module: tracking: Extend format string of a seq_printf() call in unloaded_tainted_modules_seq_show()

2024-07-14 Thread Markus Elfring
From: Markus Elfring Date: Sun, 14 Jul 2024 13:43:06 +0200 Subject: [PATCH] module: tracking: Extend format string of a seq_printf() call in unloaded_tainted_modules_seq_show() * Move the specification of a single line break from a seq_puts() call into the format string of a previous

[PATCH] module: Use seq_putc() in two functions

2024-07-14 Thread Markus Elfring
From: Markus Elfring Date: Sun, 14 Jul 2024 13:13:15 +0200 Single characters should be put into a sequence. Thus use the corresponding function “seq_putc”. This issue was transformed by using the Coccinelle software. Signed-off-by: Markus Elfring --- kernel/module/procfs.c | 4 ++-- 1 file

[RFC PATCH v4 01/17] powerpc/trace: Account for -fpatchable-function-entry support by toolchain

2024-07-14 Thread Naveen N Rao
So far, we have relied on the fact that gcc supports both -mprofile-kernel, as well as -fpatchable-function-entry, and clang supports neither. Our Makefile only checks for CONFIG_MPROFILE_KERNEL to decide which files to build. Clang has a feature request out [*] to implement

[RFC PATCH v4 10/17] powerpc/ftrace: Add a postlink script to validate function tracer

2024-07-14 Thread Naveen N Rao
Function tracer on powerpc can only work with vmlinux having a .text size of up to ~64MB due to powerpc branch instruction having a limited relative branch range of 32MB. Today, this is only detected on kernel boot when ftrace is init'ed. Add a post-link script to check the size of .text so that

[RFC PATCH v4 09/17] powerpc64/bpf: Fold bpf_jit_emit_func_call_hlp() into bpf_jit_emit_func_call_rel()

2024-07-14 Thread Naveen N Rao
Commit 61688a82e047 ("powerpc/bpf: enable kfunc call") enhanced bpf_jit_emit_func_call_hlp() to handle calls out to module region, where bpf progs are generated. The only difference now between bpf_jit_emit_func_call_hlp() and bpf_jit_emit_func_call_rel() is in handling of the initial pass where

[RFC PATCH v4 08/17] powerpc/ftrace: Move ftrace stub used for init text before _einittext

2024-07-14 Thread Naveen N Rao
Move the ftrace stub used to cover inittext before _einittext so that it is within kernel text, as seen through core_kernel_text(). This is required for a subsequent change to ftrace. Signed-off-by: Naveen N Rao --- arch/powerpc/kernel/vmlinux.lds.S | 3 +-- 1 file changed, 1 insertion(+), 2

[RFC PATCH v4 07/17] powerpc/ftrace: Skip instruction patching if the instructions are the same

2024-07-14 Thread Naveen N Rao
To simplify upcoming changes to ftrace, add a check to skip actual instruction patching if the old and new instructions are the same. We still validate that the instruction is what we expect, but don't actually patch the same instruction again. Signed-off-by: Naveen N Rao ---

[RFC PATCH v4 06/17] powerpc/ftrace: Remove pointer to struct module from dyn_arch_ftrace

2024-07-14 Thread Naveen N Rao
Pointer to struct module is only relevant for ftrace records belonging to kernel modules. Having this field in dyn_arch_ftrace wastes memory for all ftrace records belonging to the kernel. Remove the same in favour of looking up the module from the ftrace record address, similar to other

[RFC PATCH v4 05/17] powerpc/module_64: Convert #ifdef to IS_ENABLED()

2024-07-14 Thread Naveen N Rao
Minor refactor for converting #ifdef to IS_ENABLED(). Reviewed-by: Nicholas Piggin Signed-off-by: Naveen N Rao --- arch/powerpc/kernel/module_64.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c

[RFC PATCH v4 04/17] powerpc32/ftrace: Unify 32-bit and 64-bit ftrace entry code

2024-07-14 Thread Naveen N Rao
On 32-bit powerpc, gcc generates a three instruction sequence for function profiling: mflrr0 stw r0, 4(r1) bl _mcount On kernel boot, the call to _mcount() is nop-ed out, to be patched back in when ftrace is actually enabled. The 'stw' instruction therefore is

[RFC PATCH v4 03/17] powerpc64/ftrace: Nop out additional 'std' instruction emitted by gcc v5.x

2024-07-14 Thread Naveen N Rao
Gcc v5.x emits a 3-instruction sequence for -mprofile-kernel: mflrr0 std r0, 16(r1) bl _mcount Gcc v6.x moved to a simpler 2-instruction sequence by removing the 'std' instruction. The store saved the return address in the LR save area in the caller stack

[RFC PATCH v4 02/17] powerpc/kprobes: Use ftrace to determine if a probe is at function entry

2024-07-14 Thread Naveen N Rao
Rather than hard-coding the offset into a function to be used to determine if a kprobe is at function entry, use ftrace_location() to determine the ftrace location within the function and categorize all instructions till that offset to be function entry. For functions that cannot be traced, we

[RFC PATCH v4 17/17] powerpc64/bpf: Add support for bpf trampolines

2024-07-14 Thread Naveen N Rao
Add support for bpf_arch_text_poke() and arch_prepare_bpf_trampoline() for 64-bit powerpc. While the code is generic, BPF trampolines are only enabled on 64-bit powerpc. 32-bit powerpc will need testing and some updates. BPF Trampolines adhere to the existing ftrace ABI utilizing a

[RFC PATCH v4 16/17] samples/ftrace: Add support for ftrace direct samples on powerpc

2024-07-14 Thread Naveen N Rao
Add powerpc 32-bit and 64-bit samples for ftrace direct. This serves to show the sample instruction sequence to be used by ftrace direct calls to adhere to the ftrace ABI. On 64-bit powerpc, TOC setup requires some additional work. Signed-off-by: Naveen N Rao --- arch/powerpc/Kconfig

[RFC PATCH v4 15/17] powerpc/ftrace: Add support for DYNAMIC_FTRACE_WITH_DIRECT_CALLS

2024-07-14 Thread Naveen N Rao
Add support for DYNAMIC_FTRACE_WITH_DIRECT_CALLS similar to the arm64 implementation. ftrace direct calls allow custom trampolines to be called into directly from function ftrace call sites, bypassing the ftrace trampoline completely. This functionality is currently utilized by BPF trampolines to

[RFC PATCH v4 14/17] powerpc/ftrace: Add support for DYNAMIC_FTRACE_WITH_CALL_OPS

2024-07-14 Thread Naveen N Rao
Implement support for DYNAMIC_FTRACE_WITH_CALL_OPS similar to the arm64 implementation. This works by patching-in a pointer to an associated ftrace_ops structure before each traceable function. If multiple ftrace_ops are associated with a call site, then a special ftrace_list_ops is used to

[RFC PATCH v4 13/17] powerpc64/ftrace: Support .text larger than 32MB with out-of-line stubs

2024-07-14 Thread Naveen N Rao
We are restricted to a .text size of ~32MB when using out-of-line function profile sequence. Allow this to be extended up to the previous limit of ~64MB by reserving space in the middle of .text. A new config option CONFIG_PPC_FTRACE_OUT_OF_LINE_NUM_RESERVE is introduced to specify the number of

[RFC PATCH v4 12/17] powerpc64/ftrace: Move ftrace sequence out of line

2024-07-14 Thread Naveen N Rao
Function profile sequence on powerpc includes two instructions at the beginning of each function: mflrr0 bl ftrace_caller The call to ftrace_caller() gets nop'ed out during kernel boot and is patched in when ftrace is enabled. Given the sequence, we cannot return from

[RFC PATCH v4 11/17] kbuild: Add generic hook for architectures to use before the final vmlinux link

2024-07-14 Thread Naveen N Rao
On powerpc, we would like to be able to make a pass on vmlinux.o and generate a new object file to be linked into vmlinux. Add a generic pass in Makefile.vmlinux that architectures can use for this purpose. Architectures need to select CONFIG_ARCH_WANTS_PRE_LINK_VMLINUX and must provide

[RFC PATCH v4 00/17] powerpc: Core ftrace rework, support for ftrace direct and bpf trampolines

2024-07-14 Thread Naveen N Rao
This is v4 of the series posted here: http://lkml.kernel.org/r/cover.1718908016.git.nav...@kernel.org This series reworks core ftrace support on powerpc to have the function profiling sequence moved out of line. This enables us to have a single nop at kernel function entry virtually eliminating

Re: [PATCH net-next] virtio_net: Fix napi_skb_cache_put warning

2024-07-14 Thread Michael S. Tsirkin
On Fri, Jul 12, 2024 at 04:53:25AM -0700, Breno Leitao wrote: > After the commit bdacf3e34945 ("net: Use nested-BH locking for > napi_alloc_cache.") was merged, the following warning began to appear: > >WARNING: CPU: 5 PID: 1 at net/core/skbuff.c:1451 > napi_skb_cache_put+0x82/0x4b0 > >

Re: [PATCH net-next] virtio_net: Fix napi_skb_cache_put warning

2024-07-13 Thread Jakub Kicinski
On Fri, 12 Jul 2024 07:58:49 -0700 Breno Leitao wrote: > I didn't send to `net` since this WARNING is only "showing" in net-next, > due to commit bdacf3e34945 ("net: Use nested-BH locking for > napi_alloc_cache.") being only in net-next. > > But you have a good point, this is a fix and it should

[syzbot] [bpf?] [trace?] possible deadlock in console_flush_all (3)

2024-07-13 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:40ab9e0dc865 netxen_nic: Use {low,upp}er_32_bits() helpers git tree: net-next console+strace: https://syzkaller.appspot.com/x/log.txt?x=10a186a598 kernel config: https://syzkaller.appspot.com/x/.config?x=db697e01efa9d1d7

Re: [PATCH V2] test/vsock: add install target

2024-07-13 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Wed, 10 Jul 2024 20:27:28 +0800 you wrote: > From: Peng Fan > > Add install target for vsock to make Yocto easy to install the images. > > Signed-off-by: Peng Fan > --- > > [...] Here is the summary with

Re: [PATCH] arm64: dts: exynos: exynos7885-jackpotlte: Correct RAM amount to 4GB

2024-07-13 Thread David Virag
On Sat, 2024-07-13 at 20:54 +0200, Krzysztof Kozlowski wrote: > On 13/07/2024 19:58, David Virag wrote: > > All known jackpotlte variants have 4GB of RAM, let's use it all. > > RAM was set to 3GB from a mistake in the vendor provided DTS file. > > Hm, vendor DTS rarely has a mistake of missing 1

Re: [PATCH] arm64: dts: exynos: exynos7885-jackpotlte: Correct RAM amount to 4GB

2024-07-13 Thread Krzysztof Kozlowski
On 13/07/2024 19:58, David Virag wrote: > All known jackpotlte variants have 4GB of RAM, let's use it all. > RAM was set to 3GB from a mistake in the vendor provided DTS file. Hm, vendor DTS rarely has a mistake of missing 1 GB of RAM, so I assume there was some reason behind it. Trusted apps?

Re: [PATCH] arm64: dts: exynos: exynos7885-jackpotlte: Correct RAM amount to 4GB

2024-07-13 Thread Sam Protsenko
On Sat, Jul 13, 2024 at 1:08 PM David Virag wrote: > > All known jackpotlte variants have 4GB of RAM, let's use it all. > RAM was set to 3GB from a mistake in the vendor provided DTS file. > > Fixes: 06874015327b ("arm64: dts: exynos: Add initial device tree support for > Exynos7885 SoC") >

[PATCH] arm64: dts: exynos: exynos7885-jackpotlte: Correct RAM amount to 4GB

2024-07-13 Thread David Virag
All known jackpotlte variants have 4GB of RAM, let's use it all. RAM was set to 3GB from a mistake in the vendor provided DTS file. Fixes: 06874015327b ("arm64: dts: exynos: Add initial device tree support for Exynos7885 SoC") Signed-off-by: David Virag ---

Re: [PATCH v4 2/5] remoteproc: qcom: pas: Add SDX75 remoteproc support

2024-07-13 Thread Dmitry Baryshkov
On Tue, Jul 09, 2024 at 12:19:21PM GMT, Naina Mehta wrote: > Add MPSS Peripheral Authentication Service support for SDX75 platform. > > Signed-off-by: Naina Mehta > --- > drivers/remoteproc/qcom_q6v5_pas.c | 1 + > 1 file changed, 1 insertion(+) > Reviewed-by: Dmitry Baryshkov -- With

Re: [PATCH net-next] virtio_net: Fix napi_skb_cache_put warning

2024-07-12 Thread Jakub Kicinski
On Fri, 12 Jul 2024 04:53:25 -0700 Breno Leitao wrote: > After the commit bdacf3e34945 ("net: Use nested-BH locking for > napi_alloc_cache.") was merged, the following warning began to appear: > >WARNING: CPU: 5 PID: 1 at net/core/skbuff.c:1451 > napi_skb_cache_put+0x82/0x4b0 > >

Re: [BUG REPORT] kernel BUG at lib/dynamic_queue_limits.c:99!

2024-07-12 Thread Jakub Kicinski
On Fri, 12 Jul 2024 17:43:21 -0700 Jakub Kicinski wrote: > CC: virtio_net maintainers and Jiri who added BQL Oh, sounds like the fix may be already posted: https://lore.kernel.org/all/20240712080329.197605-2-jean-phili...@linaro.org/

Re: [BUG REPORT] kernel BUG at lib/dynamic_queue_limits.c:99!

2024-07-12 Thread Jakub Kicinski
CC: virtio_net maintainers and Jiri who added BQL On Fri, 12 Jul 2024 10:12:42 +0800 xiujianfeng wrote: > On 2024/7/12 10:08, xiujianfeng wrote: > > I found a problem with my QEMU environment, and the log is as follows. > > > > After I did the bisect to locate the issue, I found > >

[PATCH v3 4/4] trace: platform/x86/intel/ifs: Add SBAF trace support

2024-07-12 Thread Kuppuswamy Sathyanarayanan
From: Jithu Joseph Add tracing support for the SBAF IFS tests, which may be useful for debugging systems that fail these tests. Log details like test content batch number, SBAF bundle ID, program index and the exact errors or warnings encountered by each HT thread during the test. Reviewed-by:

[PATCH v3 3/4] platform/x86/intel/ifs: Add SBAF test support

2024-07-12 Thread Kuppuswamy Sathyanarayanan
From: Jithu Joseph In a core, the SBAF test engine is shared between sibling CPUs. An SBAF test image contains multiple bundles. Each bundle is further composed of subunits called programs. When a SBAF test (for a particular core) is triggered by the user, each SBAF bundle from the loaded test

[PATCH v3 2/4] platform/x86/intel/ifs: Add SBAF test image loading support

2024-07-12 Thread Kuppuswamy Sathyanarayanan
From: Jithu Joseph Structural Based Functional Test at Field (SBAF) is a new type of testing that provides comprehensive core test coverage complementing existing IFS tests like Scan at Field (SAF) or ArrayBist. SBAF device will appear as a new device instance (intel_ifs_2) under

[PATCH v3 1/4] platform/x86/intel/ifs: Refactor MSR usage in IFS test code

2024-07-12 Thread Kuppuswamy Sathyanarayanan
IFS tests such as Scan at Field (SAF) or Structural Based Functional Test at Field (SBAF), require the user to load a test image. The image loading process is similar across these tests, with the only difference being MSR addresses used. To reuse the code between these tests, remove the hard

[PATCH v3 0/4] Add SBAF test to IFS

2024-07-12 Thread Kuppuswamy Sathyanarayanan
This patch series adds support for Structural Based Functional Test at Field (SBAF) in the IFS driver. SBAF is a new type of testing that provides comprehensive core test coverage, complementing existing IFS tests like Scan at Field (SAF) and ArrayBist. Granite Rapids (GNR) is the first platform

Re: [PATCH] tracing: remove unreachable trace_array_put

2024-07-12 Thread Steven Rostedt
On Fri, 12 Jul 2024 23:12:58 +0300 Nikita Kiryushin wrote: > There is a trace_array_put() in check result for > nonseekable_open() in tracing_buffers_open(). However, > it would be never executed as nonseekable_open never fails > (by design). > > Remove the check and associated unreachable

Re: [PATCH v2 11/11] perf/uprobe: Add uretprobe timer

2024-07-12 Thread Andrii Nakryiko
+ bpf On Thu, Jul 11, 2024 at 4:07 AM Peter Zijlstra wrote: > > In order to put a bound on the uretprobe_srcu critical section, add a > timer to uprobe_task. Upon every RI added or removed the timer is > pushed forward to now + 1s. If the timer were ever to fire, it would > convert the SRCU

Re: [PATCH v2 10/11] perf/uprobe: Convert single-step and uretprobe to SRCU

2024-07-12 Thread Andrii Nakryiko
+ bpf On Thu, Jul 11, 2024 at 4:07 AM Peter Zijlstra wrote: > > Both single-step and uretprobes take a refcount on struct uprobe in > handle_swbp() in order to ensure struct uprobe stays extant until a > next trap. > > Since uprobe_unregister() only cares about the uprobe_consumer > life-time,

Re: [PATCH v2 08/11] perf/uprobe: Convert (some) uprobe->refcount to SRCU

2024-07-12 Thread Andrii Nakryiko
+ bpf On Thu, Jul 11, 2024 at 4:07 AM Peter Zijlstra wrote: > > With handle_swbp() hitting concurrently on (all) CPUs, potentially on > the same uprobe, the uprobe->refcount can get *very* hot. Move the > struct uprobe lifetime into uprobes_srcu such that it covers both the > uprobe and the

Re: [PATCH v2 07/11] perf/uprobe: Split uprobe_unregister()

2024-07-12 Thread Andrii Nakryiko
+ bpf On Thu, Jul 11, 2024 at 4:07 AM Peter Zijlstra wrote: > > With uprobe_unregister() having grown a synchronize_srcu(), it becomes > fairly slow to call. Esp. since both users of this API call it in a > loop. > > Peel off the sync_srcu() and do it once, after the loop. > > Signed-off-by:

Re: [PATCH v2 06/11] perf/uprobe: SRCU-ify uprobe->consumer list

2024-07-12 Thread Andrii Nakryiko
+ bpf@vger, please cc bpf ML for the next revision, these changes are very relevant there as well, thanks On Thu, Jul 11, 2024 at 4:07 AM Peter Zijlstra wrote: > > With handle_swbp() hitting concurrently on (all) CPUs the > uprobe->register_rwsem can get very contended. Add an SRCU instance to >

Re: [PATCH v2 03/11] rbtree: Provide rb_find_rcu() / rb_find_add_rcu()

2024-07-12 Thread Andrii Nakryiko
On Thu, Jul 11, 2024 at 4:07 AM Peter Zijlstra wrote: > > Much like latch_tree, add two RCU methods for the regular RB-tree, > which can be used in conjunction with a seqcount to provide lockless > lookups. > > Signed-off-by: Peter Zijlstra (Intel) > Reviewed-by: Masami Hiramatsu (Google) > ---

[PATCH] tracing: remove unreachable trace_array_put

2024-07-12 Thread Nikita Kiryushin
There is a trace_array_put() in check result for nonseekable_open() in tracing_buffers_open(). However, it would be never executed as nonseekable_open never fails (by design). Remove the check and associated unreachable code. Found by Linux Verification Center (linuxtesting.org) with SVACE.

Re: [PATCH 2/2] selftests/bpf: Change uretprobe syscall number in uprobe_syscall test

2024-07-12 Thread Andrii Nakryiko
On Fri, Jul 12, 2024 at 6:53 AM Jiri Olsa wrote: > > Fixing the syscall number value. > > Fixes: 9e7f74e64ae5 ("selftests/bpf: Add uretprobe syscall call from user > space test") > Signed-off-by: Jiri Olsa > --- > tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c | 2 +- > 1 file

Re: [PATCH 1/2] uprobe: Change uretprobe syscall scope and number

2024-07-12 Thread Andrii Nakryiko
On Fri, Jul 12, 2024 at 6:52 AM Jiri Olsa wrote: > > After discussing with Arnd [1] it's preferable to change uretprobe > syscall number to 467 to omit the merge conflict with xattrat syscalls. > > Also changing the ABI to 'common' which will ease up the global > scripts/syscall.tbl management.

Re: [PATCH v2 00/11] perf/uprobe: Optimize uprobes

2024-07-12 Thread Andrii Nakryiko
On Fri, Jul 12, 2024 at 6:10 AM Peter Zijlstra wrote: > > On Thu, Jul 11, 2024 at 09:57:44PM -0700, Andrii Nakryiko wrote: > > > Anyways, if you'd like to use it, it's at [0]. All you should need to > > build and run it is: > > > > $ cd examples/c > > $ make -j$(nproc) uprobe-stress > > $

Re: [PATCH net-next] virtio_net: Fix napi_skb_cache_put warning

2024-07-12 Thread Breno Leitao
Hello Jakub, On Fri, Jul 12, 2024 at 07:54:32AM -0700, Jakub Kicinski wrote: > On Fri, 12 Jul 2024 04:53:25 -0700 Breno Leitao wrote: > > Subject: [PATCH net-next] virtio_net: Fix napi_skb_cache_put warning > > [PATCH net] for fixes so that the bot knows what to test against :) > No need to

Re: [PATCH net-next v3 2/2] vsock/virtio: avoid queuing packets when work queue is empty

2024-07-12 Thread Stefano Garzarella
On Thu, Jul 11, 2024 at 04:58:47PM GMT, Luigi Leonardi via B4 Relay wrote: From: Luigi Leonardi Introduce an optimization in virtio_transport_send_pkt: when the work queue (send_pkt_queue) is empty the packet is Note: send_pkt_queue is just a queue of sk_buff, is not really a work queue.

Re: [PATCH net-next] virtio_net: Fix napi_skb_cache_put warning

2024-07-12 Thread Jakub Kicinski
On Fri, 12 Jul 2024 04:53:25 -0700 Breno Leitao wrote: > Subject: [PATCH net-next] virtio_net: Fix napi_skb_cache_put warning [PATCH net] for fixes so that the bot knows what to test against :) No need to repost (this time).

Re: [PATCH] virtio-pci: Add MSI support

2024-07-12 Thread Manivannan Sadhasivam
+ Jason Wang (email got truncated). On Fri, Jul 12, 2024 at 07:59:14PM +0530, Manivannan Sadhasivam wrote: > Virtio spec has so far only supported MSI-X and INTX for receiving the > interrupts from the virtio device on PCI transport. But this becomes a > limiting factor for devices supporting

[PATCH] virtio-pci: Add MSI support

2024-07-12 Thread Manivannan Sadhasivam
Virtio spec has so far only supported MSI-X and INTX for receiving the interrupts from the virtio device on PCI transport. But this becomes a limiting factor for devices supporting only MSI (plus INTX emulation) as they have to use the legacy INTX emulation which is limited to one IRQ per PCIe

Re: [PATCH V2 0/7] vdpa live update

2024-07-12 Thread Steven Sistare
On 7/12/2024 9:18 AM, Steve Sistare wrote: Live update is a technique wherein an application saves its state, exec's to an updated version of itself, and restores its state. Clients of the application experience a brief suspension of service, on the order of 100's of milliseconds, but are

[PATCH] vdpa/octeon_ep: Fix error code in octep_process_mbox()

2024-07-12 Thread Dan Carpenter
Return -EINVAL for invalid signatures. Don't return success. Fixes: 8b6c724cdab8 ("virtio: vdpa: vDPA driver for Marvell OCTEON DPU devices") Signed-off-by: Dan Carpenter --- Nag mode: When we add a new driver, then could we use the patch prefix for the driver not for the subsystem only. BAD:

[PATCH 2/2] selftests/bpf: Change uretprobe syscall number in uprobe_syscall test

2024-07-12 Thread Jiri Olsa
Fixing the syscall number value. Fixes: 9e7f74e64ae5 ("selftests/bpf: Add uretprobe syscall call from user space test") Signed-off-by: Jiri Olsa --- tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 1/2] uprobe: Change uretprobe syscall scope and number

2024-07-12 Thread Jiri Olsa
After discussing with Arnd [1] it's preferable to change uretprobe syscall number to 467 to omit the merge conflict with xattrat syscalls. Also changing the ABI to 'common' which will ease up the global scripts/syscall.tbl management. One consequence is we generate uretprobe syscall numbers for

[PATCH 0/2] uprobe: Fix uretprobe syscall wiring

2024-07-12 Thread Jiri Olsa
hi, the uretprobe syscall clashed in linux-next tree with xattrat syscalls, so after discussing with Arnd, changing the syscall number to 467. I'm also changing the ABI to 'common' which will ease up the global scripts/syscall.tbl management. I split the change into syscall_64.tbl and selftest

Re: [PATCH net-next v3 1/2] vsock/virtio: refactor virtio_transport_send_pkt_work

2024-07-12 Thread Stefano Garzarella
On Thu, Jul 11, 2024 at 04:58:46PM GMT, Luigi Leonardi via B4 Relay wrote: From: Marco Pinna Preliminary patch to introduce an optimization to the enqueue system. All the code used to enqueue a packet into the virtqueue is removed from virtio_transport_send_pkt_work() and moved to the new

[PATCH V2 3/7] vhost-vdpa: VHOST_NEW_OWNER

2024-07-12 Thread Steve Sistare
Add an ioctl to transfer file descriptor ownership and pinned memory accounting from one process to another. This is more efficient than VHOST_RESET_OWNER followed by VHOST_SET_OWNER, as that would unpin all physical pages, requiring them to be repinned in the new process. That would cost

[PATCH V2 0/7] vdpa live update

2024-07-12 Thread Steve Sistare
Live update is a technique wherein an application saves its state, exec's to an updated version of itself, and restores its state. Clients of the application experience a brief suspension of service, on the order of 100's of milliseconds, but are otherwise unaffected. Define and implement

[PATCH V2 1/7] vhost-vdpa: count pinned memory

2024-07-12 Thread Steve Sistare
Remember the count of pinned memory for the device. Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 63a53680a85c..963f3704bc39 100644 --- a/drivers/vhost/vdpa.c +++

[PATCH V2 7/7] vdpa/mlx5: new owner capability

2024-07-12 Thread Steve Sistare
The mlx5 vdpa device supports ownership transfer to a new process, so advertise VHOST_BACKEND_F_NEW_OWNER. User virtual addresses are not used after they are initially translated to physical, so VHOST_IOTLB_REMAP is not required, hence VHOST_BACKEND_F_IOTLB_REMAP is not advertised.

[PATCH V2 5/7] vhost-vdpa: VHOST_IOTLB_REMAP

2024-07-12 Thread Steve Sistare
When device ownership is passed to a new process via VHOST_NEW_OWNER, some devices need to know the new userland addresses of the dma mappings. Define the new iotlb message type VHOST_IOTLB_REMAP to update the uaddr of a mapping. The new uaddr must address the same memory object as originally

[PATCH V2 6/7] vhost-vdpa: VHOST_BACKEND_F_IOTLB_REMAP

2024-07-12 Thread Steve Sistare
Add the VHOST_BACKEND_F_IOTLB_REMAP backend capability, which indicates that VHOST_IOTLB_REMAP is supported. If VHOST_BACKEND_F_IOTLB_REMAP is advertised, then the user must call VHOST_IOTLB_REMAP after ownership of a device is transferred to a new process via VHOST_NEW_OWNER. Disabling the

[PATCH V2 2/7] vhost-vdpa: pass mm to bind

2024-07-12 Thread Steve Sistare
Pass the target mm to vhost_vdpa_bind_mm. No functional change. Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 963f3704bc39..b49e5831b3f0 100644 ---

[PATCH V2 4/7] vhost-vdpa: VHOST_BACKEND_F_NEW_OWNER

2024-07-12 Thread Steve Sistare
Add the VHOST_BACKEND_F_NEW_OWNER backend capability, which indicates that VHOST_NEW_OWNER is supported. Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 7 ++- include/uapi/linux/vhost_types.h | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v2 00/11] perf/uprobe: Optimize uprobes

2024-07-12 Thread Peter Zijlstra
On Thu, Jul 11, 2024 at 09:57:44PM -0700, Andrii Nakryiko wrote: > Anyways, if you'd like to use it, it's at [0]. All you should need to > build and run it is: > > $ cd examples/c > $ make -j$(nproc) uprobe-stress > $ sudo ./uprobe-stress -tN -aM -mP -fR > [0] >

Re: [PATCH] xfs: fix file_path handling in tracepoints

2024-07-12 Thread Steven Rostedt
On Thu, 11 Jul 2024 22:03:17 -0700 Christoph Hellwig wrote: > On Thu, Jul 11, 2024 at 09:17:54PM -0400, Steven Rostedt wrote: > > That "f->f_path.dentry" is a dereference of the passed in pointer. If we > > did that in the TP_printk(), then it would dereference that file pointer > > saved by the

[PATCH net-next] virtio_net: Fix napi_skb_cache_put warning

2024-07-12 Thread Breno Leitao
After the commit bdacf3e34945 ("net: Use nested-BH locking for napi_alloc_cache.") was merged, the following warning began to appear: WARNING: CPU: 5 PID: 1 at net/core/skbuff.c:1451 napi_skb_cache_put+0x82/0x4b0 __warn+0x12f/0x340 napi_skb_cache_put+0x82/0x4b0

Re: [PATCH v2 10/11] perf/uprobe: Convert single-step and uretprobe to SRCU

2024-07-12 Thread Oleg Nesterov
On 07/11, Peter Zijlstra wrote: > > uprobe_free_stage1 > call_srcu(_srcu, >rcu, uprobe_free_stage2); > > put_uprobe() > if (refcount_dec_and_test) > call_srcu(_srcu, >rcu, uprobe_free_stage1); > > > So my thinking was since we take uretprobe_srcu *inside* uprobe_srcu, Ah,

Re: [PATCH 0/2] Cleanup the MAINTAINER's file

2024-07-12 Thread Andi Shyti
Hi Wolfram, On Fri, Jul 12, 2024 at 08:34:11AM GMT, Wolfram Sang wrote: > On Fri, Jul 12, 2024 at 01:19:24AM +0200, Andi Shyti wrote: > > Hi, > > > > while reviewing Wolfram's series, I received some delivery > > failure notifications for e-mails that don't exist anymore. > > > > With this

Re: [PATCH v2 00/11] perf/uprobe: Optimize uprobes

2024-07-12 Thread Peter Zijlstra
On Thu, Jul 11, 2024 at 09:57:44PM -0700, Andrii Nakryiko wrote: > You should only need not-too-old Clang to build everything (Clang 12+ > should work, I believe). But do let me know if you run into troubles. A quick look at the thing shows me it's full of BPF gunk :/ Which means, I probably

Re: [PATCH] test/vsock: add install target

2024-07-12 Thread Stefano Garzarella
On Thu, Jul 11, 2024 at 07:14:55AM GMT, Jakub Kicinski wrote: On Thu, 11 Jul 2024 15:38:01 +0200 Stefan Hajnoczi wrote: > Usually vsock tests test both the driver (virtio-vsock) in the guest and the > device in the host kernel (vhost-vsock). So I usually run the tests in 2 > nested VMs to test

[PATCH 6/6] remoteproc: imx_rproc: handle system off for i.MX7ULP

2024-07-12 Thread Peng Fan (OSS)
From: Peng Fan The i.MX7ULP Cortex-A7 is under control of Cortex-M4. The i.MX7ULP Linux poweroff and restart rely on rpmsg driver to send a message to Cortex-M4 firmware. Then Cortex-A7 could poweroff or restart by Cortex-M4 to configure the i.MX7ULP power controller properly. However the

[PATCH 5/6] remoteproc: imx_rproc: allow tx_block to be set

2024-07-12 Thread Peng Fan (OSS)
From: Peng Fan Current tx_block is set to true, but there is case that no need to wait response. Linux just needs to send data to remote processor, so let's allow tx_block could be set to false. Reviewed-by: Jacky Bai Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 12

[PATCH 4/6] remoteproc: imx_rproc: merge TCML/U

2024-07-12 Thread Peng Fan (OSS)
From: Peng Fan Merge contiguous TCML/U regions into one to avoid load elf files which has large sections failure. Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c

[PATCH 3/6] remoteproc: imx_rproc: initialize workqueue earlier

2024-07-12 Thread Peng Fan (OSS)
From: Peng Fan Initialize workqueue before requesting mailbox channel, otherwise if mailbox interrupt comes before workqueue ready, the imx_rproc_rx_callback will trigger issue. Reviewed-by: Richard Zhu Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 4 ++-- 1 file changed, 2

[PATCH 2/6] remoteproc: imx_rproc: use imx specific hook for find_loaded_rsc_table

2024-07-12 Thread Peng Fan (OSS)
From: Peng Fan If there is a resource table device tree node, use the address as the resource table address, otherwise use the address(where .resource_table section loaded) inside the Cortex-M elf file. And there is an update in NXP SDK that Resource Domain Control(RDC) enabled to protect TCM,

[PATCH 1/6] remoteproc: imx_rproc: correct ddr alias for i.MX8M

2024-07-12 Thread Peng Fan (OSS)
From: Peng Fan The DDR Alias address should be 0x4000 according to RM, so correct it. Fixes: 4ab8f9607aad ("remoteproc: imx_rproc: support i.MX8MQ/M") Reported-by: Terry Lv Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 0/6] remoteproc: imx_rproc: various patches for misc

2024-07-12 Thread Peng Fan (OSS)
This patchset is to upstream a few patches that in NXP downstream for quite sometime. For patches directly cherry-picked from NXP downstream, I keep the R-b tags. Patch 1 is a minor fix to DDR alias. Patch 2 was sent out before,

Re: [PATCH v2 3/4] platform/x86/intel/ifs: Add SBAF test support

2024-07-12 Thread Ilpo Järvinen
On Thu, 11 Jul 2024, Kuppuswamy Sathyanarayanan wrote: > On 7/11/24 2:44 AM, Ilpo Järvinen wrote: > > On Wed, 10 Jul 2024, Kuppuswamy Sathyanarayanan wrote: > > > >> From: Jithu Joseph > >> > >> In a core, the SBAF test engine is shared between sibling CPUs. > >> > >> An SBAF test image contains

Re: [PATCH 1/1] remoteproc: mediatek: Support multiple reserved memory regions

2024-07-12 Thread AngeloGioacchino Del Regno
Il 03/07/24 13:53, Shun-yi Wang ha scritto: From: "shun-yi.wang" SCP supports multiple reserved memory regions, intended for specific hardwards. Signed-off-by: shun-yi.wang --- drivers/remoteproc/mtk_scp.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-)

[ANNOUNCE] 4.19.317-rt137

2024-07-12 Thread Daniel Wagner
Hello RT-list! I'm pleased to announce the 4.19.317-rt137 stable release. This just updates this series to the latest stable upstream release. No RT specific changes. You can get this release via the git tree at: git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt.git branch:

Re: [PATCH 0/2] Cleanup the MAINTAINER's file

2024-07-12 Thread Wolfram Sang
On Fri, Jul 12, 2024 at 01:19:24AM +0200, Andi Shyti wrote: > Hi, > > while reviewing Wolfram's series, I received some delivery > failure notifications for e-mails that don't exist anymore. > > With this series I'm removing: > > - Conghui Chen > - Thor Thayer Fixes for these two are

Re: [PATCH] xfs: fix file_path handling in tracepoints

2024-07-11 Thread Christoph Hellwig
On Thu, Jul 11, 2024 at 09:17:54PM -0400, Steven Rostedt wrote: > That "f->f_path.dentry" is a dereference of the passed in pointer. If we > did that in the TP_printk(), then it would dereference that file pointer > saved by the trace. This would happen at some time later from when the file >

Re: [PATCH v2 00/11] perf/uprobe: Optimize uprobes

2024-07-11 Thread Andrii Nakryiko
On Thu, Jul 11, 2024 at 4:07 AM Peter Zijlstra wrote: > > Hi! > > These patches implement the (S)RCU based proposal to optimize uprobes. > > On my c^Htrusty old IVB-EP -- where each (of the 40) CPU calls 'func' in a > tight loop: > > perf probe -x ./uprobes test=func > perf stat -ae

Re: [PATCH v2 3/4] platform/x86/intel/ifs: Add SBAF test support

2024-07-11 Thread Joseph, Jithu
On 7/12/2024 2:51 AM, Ashok Raj wrote: > On Thu, Jul 11, 2024 at 12:44:23PM +0300, Ilpo Järvinen wrote: >>> +static bool sbaf_bundle_completed(union ifs_sbaf_status status) >>> +{ >>> + if (status.sbaf_status || status.error_code) >>> + return false; >>> + return true; >> >> This

Re: [PATCH v2 3/4] platform/x86/intel/ifs: Add SBAF test support

2024-07-11 Thread Joseph, Jithu
On 7/11/2024 9:28 PM, Kuppuswamy Sathyanarayanan wrote: >>> + >>> +static const char * const sbaf_test_status[] = { >>> + [IFS_SBAF_NO_ERROR] = "SBAF no error", >>> + [IFS_SBAF_OTHER_THREAD_COULD_NOT_JOIN] = "Other thread could not join.", >>> + [IFS_SBAF_INTERRUPTED_BEFORE_RENDEZVOUS] =

Re: [PATCH] xfs: fix file_path handling in tracepoints

2024-07-11 Thread Steven Rostedt
On Thu, 11 Jul 2024 09:01:28 -0700 Christoph Hellwig wrote: > On Wed, Jul 10, 2024 at 10:43:53PM -0700, Darrick J. Wong wrote: > > From: Darrick J. Wong > > > > Since file_path() takes the output buffer as one of its arguments, we > > might as well have it format directly into the tracepoint's

[PATCH] MAINTAINERS: Add uprobes entry

2024-07-11 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Add uprobes entry to MAINTAINERS to clarify the maintainers. Suggested-by: Peter Zijlstra Signed-off-by: Masami Hiramatsu (Google) --- MAINTAINERS | 13 + 1 file changed, 13 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index

[PATCH 0/2] Cleanup the MAINTAINER's file

2024-07-11 Thread Andi Shyti
Hi, while reviewing Wolfram's series, I received some delivery failure notifications for e-mails that don't exist anymore. With this series I'm removing: - Conghui Chen - Thor Thayer unfortunately both from Intel :-( In the case of Altera's subsystems (except for the i2c), I didn't really

Re: [PATCH v2] bootconfig: Remove duplicate included header file linux/bootconfig.h

2024-07-11 Thread Google
On Thu, 11 Jul 2024 10:43:16 +0200 Thorsten Blum wrote: > The header file linux/bootconfig.h is included whether __KERNEL__ is > defined or not. > > Include it only once before the #ifdef/#else/#endif preprocessor > directives and remove the following make includecheck warning: > >

Re: [PATCH v2 4/4] trace: platform/x86/intel/ifs: Add SBAF trace support

2024-07-11 Thread Steven Rostedt
On Wed, 10 Jul 2024 17:02:33 -0700 Kuppuswamy Sathyanarayanan wrote: > From: Jithu Joseph > > Add tracing support for the SBAF IFS tests, which may be useful for > debugging systems that fail these tests. Log details like test content > batch number, SBAF bundle ID, program index and the exact

[PATCH 1/2] MAINTAINERS: i2c-virtio: Drop Conghui Chen from Maintainers

2024-07-11 Thread Andi Shyti
E-mails to Conghui Chen have bounced back: : host mgamail.eglb.intel.com[198.175.65.14] said: 550 #5.1.0 Address rejected. (in reply to RCPT TO command) Remove him as maintainer of the i2c Virtio driver in the MAINTAINERS file. Signed-off-by: Andi Shyti Cc: Viresh Kumar Cc: Wolfram

Re: [PATCH v2 3/4] platform/x86/intel/ifs: Add SBAF test support

2024-07-11 Thread Ashok Raj
On Thu, Jul 11, 2024 at 12:44:23PM +0300, Ilpo Järvinen wrote: > > +static bool sbaf_bundle_completed(union ifs_sbaf_status status) > > +{ > > + if (status.sbaf_status || status.error_code) > > + return false; > > + return true; > > This is same as: > > return

Re: [PATCH] virtio: add missing MODULE_DESCRIPTION() macro

2024-07-11 Thread Michael S. Tsirkin
On Thu, Jul 11, 2024 at 11:43:18AM -0700, Jeff Johnson wrote: > On 6/23/24 10:36, Jeff Johnson wrote: > > On 6/2/2024 1:25 PM, Jeff Johnson wrote: > > > make allmodconfig && make W=1 C=1 reports: > > > WARNING: modpost: missing MODULE_DESCRIPTION() in > > > drivers/virtio/virtio_dma_buf.o > > >

Re: [PATCH] virtio: add missing MODULE_DESCRIPTION() macro

2024-07-11 Thread Jeff Johnson
On 6/23/24 10:36, Jeff Johnson wrote: On 6/2/2024 1:25 PM, Jeff Johnson wrote: make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/virtio/virtio_dma_buf.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff

Re: [PATCH v2 10/11] perf/uprobe: Convert single-step and uretprobe to SRCU

2024-07-11 Thread Peter Zijlstra
On Thu, Jul 11, 2024 at 06:06:53PM +0200, Oleg Nesterov wrote: > I'll try to actually apply the whole series and read the code tomorrow. > Right now I can't understand this change... Just one question for now. > > On 07/11, Peter Zijlstra wrote: > > > > @@ -1956,11 +1960,13 @@ static void

Re: [PATCH 3/3] uprobes: make uprobe_register() return struct uprobe *

2024-07-11 Thread Oleg Nesterov
On 07/11, Andrii Nakryiko wrote: > > On Thu, Jul 11, 2024 at 2:28 AM Oleg Nesterov wrote: > > > > On 07/10, Oleg Nesterov wrote: > > > > > > -void uprobe_unregister(struct inode *inode, loff_t offset, struct > > > uprobe_consumer *uc) > > > +void uprobe_unregister(struct uprobe *uprobe, struct

<    3   4   5   6   7   8   9   10   11   12   >