[PATCH] uprobes: prevent mutex_lock() under rcu_read_lock()

2024-05-20 Thread Andrii Nakryiko
Recent changes made uprobe_cpu_buffer preparation lazy, and moved it deeper into __uprobe_trace_func(). This is problematic because __uprobe_trace_func() is called inside rcu_read_lock()/rcu_read_unlock() block, which then calls prepare_uprobe_buffer() -> uprobe_buffer_get() -> mutex_lock(>mutex),

[GIT PULL] remoteproc updates for v6.10

2024-05-20 Thread Bjorn Andersson
The following changes since commit 4cece764965020c22cff7665b18a012006359095: Linux 6.9-rc1 (2024-03-24 14:10:05 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git tags/rproc-v6.10 for you to fetch changes up to

[GIT PULL] rpmsg updates for v6.10

2024-05-20 Thread Bjorn Andersson
The following changes since commit 4cece764965020c22cff7665b18a012006359095: Linux 6.9-rc1 (2024-03-24 14:10:05 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git tags/rpmsg-v6.10 for you to fetch changes up to

[PATCH v3 2/2] LoongArch: Add steal time support in guest side

2024-05-20 Thread Bibo Mao
Percpu struct kvm_steal_time is added here, its size is 64 bytes and also defined as 64 bytes, so that the whole structure is in one physical page. When vcpu is onlined, function pv_enable_steal_time() is called. This function will pass guest physical address of struct kvm_steal_time and tells

[PATCH v3 0/2] LoongArch: Add steal time support

2024-05-20 Thread Bibo Mao
Para-virt feature steal time is added in both kvm and guest kernel side. It is silimar with other architectures, steal time structure comes from guest memory, also pseduo register is used to save/restore base address of steal time structure, so that vm migration is supported also. --- v2 ... v3:

[PATCH v3 1/2] LoongArch: KVM: Add steal time support in kvm side

2024-05-20 Thread Bibo Mao
Steal time feature is added here in kvm side, VM can search supported features provided by KVM hypervisor, feature KVM_FEATURE_STEAL_TIME is added here. Like x86, steal time structure is saved in guest memory, one hypercall function KVM_HCALL_FUNC_NOTIFY is added to notify KVM to enable the

Re: [PATCH v1 1/2] virt: pvmemcontrol: control guest physical memory properties

2024-05-20 Thread kernel test robot
Hi Yuanchu, kernel test robot noticed the following build errors: [auto build test ERROR on linus/master] [also build test ERROR on v6.9 next-20240520] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented

Re: [PATCH V3 3/3] vdpa_sim: flush workers on suspend

2024-05-20 Thread Jason Wang
On Mon, May 20, 2024 at 11:21 PM Steve Sistare wrote: > > Flush to guarantee no workers are running when suspend returns. > Add a lock to enforce ordering between clearing running, flushing, > and posting new work in vdpasim_kick_vq. It must be a spin lock > because vdpasim_kick_vq may be

Re: [PATCH V3 2/3] vduse: suspend

2024-05-20 Thread Jason Wang
On Mon, May 20, 2024 at 11:21 PM Steve Sistare wrote: > > Support the suspend operation. There is little to do, except flush to > guarantee no workers are running when suspend returns. > > Signed-off-by: Steve Sistare > --- > drivers/vdpa/vdpa_user/vduse_dev.c | 24 >

Re: [PATCH V3 1/3] vhost-vdpa: flush workers on suspend

2024-05-20 Thread Jason Wang
On Mon, May 20, 2024 at 11:21 PM Steve Sistare wrote: > > Flush to guarantee no workers are running when suspend returns. > > Fixes: f345a0143b4d ("vhost-vdpa: uAPI to suspend the device") > Signed-off-by: Steve Sistare > Acked-by: Eugenio Pérez > --- > drivers/vhost/vdpa.c | 3 +++ > 1 file

Re: [PATCHv5 bpf-next 6/8] x86/shstk: Add return uprobe support

2024-05-20 Thread Edgecombe, Rick P
On Mon, 2024-05-20 at 00:18 +0200, Jiri Olsa wrote: > anyway I think we can fix that in another way by using the optimized > trampoline, > but returning to the user space through iret when shadow stack is detected > (as I did in the first version, before you adjusted it to the sysret path). > >

Re: [PATCH 2/4] perf,uprobes: fix user stack traces in the presence of pending uretprobes

2024-05-20 Thread Andrii Nakryiko
On Mon, May 20, 2024 at 8:20 AM Jiri Olsa wrote: > > On Wed, May 15, 2024 at 08:32:30AM -0600, Andrii Nakryiko wrote: > > On Wed, May 15, 2024 at 3:30 AM Peter Zijlstra wrote: > > > > > > On Wed, May 08, 2024 at 02:26:03PM -0700, Andrii Nakryiko wrote: > > > > > > > +static void

Re: [PATCH v3 4/6] module: script to generate offset ranges for builtin modules

2024-05-20 Thread Masahiro Yamada
On Fri, May 17, 2024 at 1:31 PM Kris Van Hees wrote: > > The offset range data for builtin modules is generated using: > - modules.builtin.modinfo: associates object files with module names > - vmlinux.map: provides load order of sections and offset of first member > per section > -

[PATCH V3 3/3] vdpa_sim: flush workers on suspend

2024-05-20 Thread Steve Sistare
Flush to guarantee no workers are running when suspend returns. Add a lock to enforce ordering between clearing running, flushing, and posting new work in vdpasim_kick_vq. It must be a spin lock because vdpasim_kick_vq may be reached va eventfd_write. Signed-off-by: Steve Sistare ---

[PATCH V3 2/3] vduse: suspend

2024-05-20 Thread Steve Sistare
Support the suspend operation. There is little to do, except flush to guarantee no workers are running when suspend returns. Signed-off-by: Steve Sistare --- drivers/vdpa/vdpa_user/vduse_dev.c | 24 1 file changed, 24 insertions(+) diff --git

[PATCH V3 0/3] flush workers on suspend

2024-05-20 Thread Steve Sistare
Flush to guarantee no workers are running when suspend returns, for vdpa, vdpa_sim, and vduse. (mlx5 already does so, via the path mlx5_vdpa_suspend -> unregister_link_notifier -> flush_workqueue.) Changes in V2: - renamed "vduse: suspend" (was vduse: flush workers on suspend) - call

[PATCH V3 1/3] vhost-vdpa: flush workers on suspend

2024-05-20 Thread Steve Sistare
Flush to guarantee no workers are running when suspend returns. Fixes: f345a0143b4d ("vhost-vdpa: uAPI to suspend the device") Signed-off-by: Steve Sistare Acked-by: Eugenio Pérez --- drivers/vhost/vdpa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/vhost/vdpa.c

Re: [PATCH 3/4] perf,x86: avoid missing caller address in stack traces captured in uprobe

2024-05-20 Thread Jiri Olsa
On Wed, May 08, 2024 at 02:26:04PM -0700, Andrii Nakryiko wrote: > When tracing user functions with uprobe functionality, it's common to > install the probe (e.g., a BPF program) at the first instruction of the > function. This is often going to be `push %rbp` instruction in function > preamble,

Re: [PATCH 2/4] perf,uprobes: fix user stack traces in the presence of pending uretprobes

2024-05-20 Thread Jiri Olsa
On Wed, May 15, 2024 at 08:32:30AM -0600, Andrii Nakryiko wrote: > On Wed, May 15, 2024 at 3:30 AM Peter Zijlstra wrote: > > > > On Wed, May 08, 2024 at 02:26:03PM -0700, Andrii Nakryiko wrote: > > > > > +static void fixup_uretprobe_trampoline_entries(struct > > > perf_callchain_entry *entry, >

Re: [PATCH v3 2/2] remoteproc: k3-r5: Do not allow core1 to power up before core0 via sysfs

2024-05-20 Thread Mathieu Poirier
On Sat, 18 May 2024 at 04:44, Christophe JAILLET wrote: > > Le 30/04/2024 à 12:53, Beleswar Padhi a écrit : > > PSC controller has a limitation that it can only power-up the second > > core when the first core is in ON state. Power-state for core0 should be > > equal to or higher than core1. > >

Re: [PATCH RFC 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc

2024-05-20 Thread Luca Weiss
On Montag, 20. Mai 2024 08:46:39 MESZ Krzysztof Kozlowski wrote: > On 15/05/2024 17:06, Luca Weiss wrote: > > Hi Rob, > > > > Any feedback on the below topic? > > Can be explained in description, like > mboxes: > description: Each entry corresponds to one remote processor > maxItems: 5 Hi

Re: [PATCH] rpmsg: char: fix rpmsg_eptdev structure documentation

2024-05-20 Thread Mukesh Ojha
On 5/17/2024 10:26 PM, Arnaud Pouliquen wrote: Add missing @ tags for some rpmsg_eptdev structure parameters. This fixes warning messages on build: drivers/rpmsg/rpmsg_char.c:75: warning: Function parameter or struct member 'remote_flow_restricted' not described in 'rpmsg_eptdev'

Re: [PATCH] remoteproc: mediatek: Zero out only remaining bytes of IPI buffer

2024-05-20 Thread Mukesh Ojha
On 5/20/2024 4:57 PM, AngeloGioacchino Del Regno wrote: In scp_ipi_handler(), instead of zeroing out the entire shared buffer, which may be as large as 600 bytes, overwrite it with the received data, then zero out only the remaining bytes. Signed-off-by: AngeloGioacchino Del Regno ---

Re: UBSAN: shift-out-of-bounds in validate_sb_layout

2024-05-20 Thread Kent Overstreet
On Mon, May 20, 2024 at 10:31:53AM -0400, Steven Rostedt wrote: > On Mon, 20 May 2024 15:02:26 +0800 > "Ubisectech Sirius" wrote: > > > Hello. > > We are Ubisectech Sirius Team, the vulnerability lab of China ValiantSec. > > Recently, our team has discovered a issue in Linux kernel 6.7.

Re: UBSAN: shift-out-of-bounds in validate_sb_layout

2024-05-20 Thread Steven Rostedt
On Mon, 20 May 2024 15:02:26 +0800 "Ubisectech Sirius" wrote: > Hello. > We are Ubisectech Sirius Team, the vulnerability lab of China ValiantSec. > Recently, our team has discovered a issue in Linux kernel 6.7. Attached to > the email were a PoC file of the issue. > > Stack dump: > UBSAN:

Re: [PATCH 2/2] ring-buffer: Fix a race between readers and resize checks

2024-05-20 Thread Steven Rostedt
On Fri, 17 May 2024 15:40:08 +0200 Petr Pavlu wrote: > The reader code in rb_get_reader_page() swaps a new reader page into the > ring buffer by doing cmpxchg on old->list.prev->next to point it to the > new page. Following that, if the operation is successful, > old->list.next->prev gets

[PATCH] remoteproc: mediatek: Zero out only remaining bytes of IPI buffer

2024-05-20 Thread AngeloGioacchino Del Regno
In scp_ipi_handler(), instead of zeroing out the entire shared buffer, which may be as large as 600 bytes, overwrite it with the received data, then zero out only the remaining bytes. Signed-off-by: AngeloGioacchino Del Regno --- drivers/remoteproc/mtk_scp.c | 2 +- 1 file changed, 1

[PATCH] dts: imx8mq-librem5: Don't wake up on volume key press

2024-05-20 Thread Guido Günther
The only key that should wake up the phone is power button press. This prevents accidental wakeup due to e.g. pressing the buttons in the pocket or backpack and is in line what userspace uses to unblank the device. Signed-off-by: Guido Günther ---

Re: [PATCH v3 2/6] trace: add CONFIG_BUILTIN_MODULE_RANGES option

2024-05-20 Thread Masahiro Yamada
On Fri, May 17, 2024 at 1:30 PM Kris Van Hees wrote: > > The CONFIG_BUILTIN_MODULE_RANGES option controls whether offset range data > is generated for kernel modules that are built into the kernel image. > > Signed-off-by: Kris Van Hees > Reviewed-by: Nick Alcock > Reviewed-by: Alan Maguire >

Re: [PATCH] livepatch: introduce klp_func called interface

2024-05-20 Thread zhang warden
OK, I will try to optimize my description after the patch is reviewed. I am sure there are something still need to be fix for that patch. > On May 20, 2024, at 16:00, Markus Elfring wrote: > > Please add a version identifier to the message subject. > > > … >> If the patched function have

Re: [PATCH v3 2/6] trace: add CONFIG_BUILTIN_MODULE_RANGES option

2024-05-20 Thread Masahiro Yamada
On Fri, May 17, 2024 at 1:30 PM Kris Van Hees wrote: > > The CONFIG_BUILTIN_MODULE_RANGES option controls whether offset range data > is generated for kernel modules that are built into the kernel image. > > Signed-off-by: Kris Van Hees > Reviewed-by: Nick Alcock > Reviewed-by: Alan Maguire >

Re: [PATCH v3 6/6] module: add install target for modules.builtin.ranges

2024-05-20 Thread Masahiro Yamada
On Fri, May 17, 2024 at 1:32 PM Kris Van Hees wrote: > > When CONFIG_BUILTIN_MODULE_RANGES is enabled, the modules.builtin.ranges > file should be installed in the module install location. > > Signed-off-by: Kris Van Hees > Reviewed-by: Nick Alcock > --- > Changes since v2: > - Include

Re: [PATCH] livepatch: introduce klp_func called interface

2024-05-20 Thread Markus Elfring
Please add a version identifier to the message subject. … > If the patched function have bug, it may cause serious result > such as kernel crash. Wording suggestion: If the patched function has a bug, it might cause serious side effects like a kernel crash. > This is a kobject

Re: [PATCH] livepatch: introduce klp_func called interface

2024-05-20 Thread zhang warden
> On May 20, 2024, at 14:46, Miroslav Benes wrote: > > Hi, > > On Mon, 20 May 2024, Wardenjohn wrote: > >> Livepatch module usually used to modify kernel functions. >> If the patched function have bug, it may cause serious result >> such as kernel crash. >> >> This is a kobject attribute

Re: [PATCH RFC 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc

2024-05-20 Thread Krzysztof Kozlowski
On 15/05/2024 17:06, Luca Weiss wrote: > Hi Rob, > > Any feedback on the below topic? Can be explained in description, like mboxes: description: Each entry corresponds to one remote processor maxItems: 5 Best regards, Krzysztof

Re: [PATCH] livepatch: introduce klp_func called interface

2024-05-20 Thread Miroslav Benes
Hi, On Mon, 20 May 2024, Wardenjohn wrote: > Livepatch module usually used to modify kernel functions. > If the patched function have bug, it may cause serious result > such as kernel crash. > > This is a kobject attribute of klp_func. Sysfs interface named > "called" is introduced to