Re: [RFC PATCH] vhost_vdpa: assign irq bypass producer token correctly

2024-08-11 Thread Jason Wang
On Mon, Aug 12, 2024 at 1:47 PM Jason Wang wrote: > > On Fri, Aug 9, 2024 at 2:04 AM Dragos Tatulea wrote: > > > > > > > > On 08.08.24 10:20, Jason Wang wrote: > > > We used to call irq_bypass_unregister_producer() in > > > vhost_vdpa_setup_vq_irq() which is problematic as we don't know if the >

Re: [RFC PATCH] vhost_vdpa: assign irq bypass producer token correctly

2024-08-11 Thread Jason Wang
On Fri, Aug 9, 2024 at 2:04 AM Dragos Tatulea wrote: > > > > On 08.08.24 10:20, Jason Wang wrote: > > We used to call irq_bypass_unregister_producer() in > > vhost_vdpa_setup_vq_irq() which is problematic as we don't know if the > > token pointer is still valid or not. > > > > Actually, we use the

Re: [syzbot] [perf?] KASAN: slab-use-after-free Read in __uprobe_unregister

2024-08-11 Thread Andrii Nakryiko
On Sun, Aug 11, 2024 at 5:35 AM Oleg Nesterov wrote: > > On 08/11, Oleg Nesterov wrote: > > > > Hmm, bpf_uprobe_multi_link_attach() looks obviously wrong. > > > > bpf_link_prime() is called after the > > > > for (i = 0; i < cnt; i++) { > > uprobe_register(...); > >

[PATCH v6 3/3] irqchip/loongson-eiointc: Add extioi virt extension support

2024-08-11 Thread Bibo Mao
Interrupts can be routed to maximal four virtual CPUs with one HW EIOINTC interrupt controller model, since interrupt routing is encoded with CPU bitmap and EIOINTC node combined method. Here add the EIOINTC virt extension support so that interrupts can be routed to 256 vCPUs on hypervisor mode. CP

[PATCH v6 2/3] LoongArch: KVM: Implement function kvm_para_has_feature

2024-08-11 Thread Bibo Mao
Function kvm_para_has_feature() is to detect supported paravirt features, it can be used by device driver to detect and enable paravirt features, such as extioi irqchip driver can detect KVM_FEATURE_VIRT_EXTIOI and do some optimization. Signed-off-by: Bibo Mao --- arch/loongarch/include/asm/kvm_

[PATCH v6 1/3] LoongArch: KVM: Enable paravirt feature control from VMM

2024-08-11 Thread Bibo Mao
Export kernel paravirt features to user space, so that VMM can control the single paravirt feature. By default paravirt features will be the same with kvm supported features if VMM does not set it. Also a new feature KVM_FEATURE_VIRT_EXTIOI is added which can be set from user space. This feature i

[PATCH v6 0/3] Add extioi virt extension support

2024-08-11 Thread Bibo Mao
KVM_FEATURE_VIRT_EXTIOI is paravirt feature defined with EXTIOI interrupt controller, it can route interrupt to 256 vCPUs and CPU interrupt pin IP0-IP7. Now EXTIOI irqchip is emulated in user space rather than kernel space, here interface is provided for VMM to pass this feature to KVM hypervisor.

Re: [PATCH v5 3/3] irqchip/loongson-eiointc: Add extioi virt extension support

2024-08-11 Thread maobibo
On 2024/8/11 上午4:46, Thomas Gleixner wrote: On Mon, Aug 05 2024 at 15:35, Bibo Mao wrote: Interrupts can be routed to maximal four virtual CPUs with one external hardware interrupt. Add the extioi virt extension support so that Interrupts can be routed to 256 vcpus on hypervisor mode. inte

Re: [PATCH] rpmsg: char: Export alias for RPMSG ID rpmsg-raw from table

2024-08-11 Thread Mathieu Poirier
Hi Andrew, On Mon, Jul 29, 2024 at 11:45:27AM -0500, Andrew Davis wrote: > Module aliases are used by userspace to identify the correct module to > load for a detected hardware. The currently supported RPMSG device IDs for > this module include "rpmsg-raw", but the module alias is "rpmsg_chrdev".

[PATCH] dt-bindings: remoteproc: xlnx,zynqmp-r5fss: add missing "additionalProperties" on child nodes

2024-08-11 Thread Krzysztof Kozlowski
All nodes need an explicit additionalProperties or unevaluatedProperties unless a $ref has one that's false. Add missing additionalProperties to fix dt_binding_check warning: xlnx,zynqmp-r5fss.yaml: ^r(.*)@[0-9a-f]+$: Missing additionalProperties/unevaluatedProperties constraint Fixes: 9e1b2a

Re: [syzbot] [perf?] KASAN: slab-use-after-free Read in __uprobe_unregister

2024-08-11 Thread syzbot
Hello, syzbot has tested the proposed patch and the reproducer did not trigger any issue: Reported-by: syzbot+f7a1c2c2711e4a780...@syzkaller.appspotmail.com Tested-by: syzbot+f7a1c2c2711e4a780...@syzkaller.appspotmail.com Tested on: commit: 6a0e3826 Merge tag 'for-6.11-rc2-tag' of git:

Re: [syzbot] [perf?] KASAN: slab-use-after-free Read in __uprobe_unregister

2024-08-11 Thread Oleg Nesterov
On 08/10, syzbot wrote: > > syzbot found the following issue on: > > HEAD commit:6a0e38264012 Merge tag 'for-6.11-rc2-tag' of git://git.ker.. > git tree: upstream #syz test: upstream 6a0e38264012 diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index cd098846e251..5d9c96

Re: [syzbot] [perf?] KASAN: slab-use-after-free Read in __uprobe_unregister

2024-08-11 Thread Oleg Nesterov
On 08/11, Oleg Nesterov wrote: > > Hmm, bpf_uprobe_multi_link_attach() looks obviously wrong. > > bpf_link_prime() is called after the > > for (i = 0; i < cnt; i++) { > uprobe_register(...); > ... > } > > loop. If bpf_link_prime() fails, bpf_uprobe_multi_link

Re: [syzbot] [perf?] KASAN: slab-use-after-free Read in __uprobe_unregister

2024-08-11 Thread Oleg Nesterov
Hmm, bpf_uprobe_multi_link_attach() looks obviously wrong. bpf_link_prime() is called after the for (i = 0; i < cnt; i++) { uprobe_register(...); ... } loop. If bpf_link_prime() fails, bpf_uprobe_multi_link_attach() just do kvfree(uprobes) without