Re: [PATCH v9 4/4] vhost: Add a KConfig knob to enable IOCTL VHOST_FORK_FROM_OWNER

2025-05-14 Thread Michael S. Tsirkin
On Wed, May 14, 2025 at 10:52:58AM +0800, Jason Wang wrote: > On Tue, May 13, 2025 at 3:09 PM Michael S. Tsirkin wrote: > > > > On Tue, May 13, 2025 at 12:08:51PM +0800, Jason Wang wrote: > > > On Wed, Apr 30, 2025 at 5:27 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Wed, Apr 30, 2025 a

Re: [PATCH v9 4/4] vhost: Add a KConfig knob to enable IOCTL VHOST_FORK_FROM_OWNER

2025-05-14 Thread Cindy Lu
Thank you for the comments; I will prepare a new patch version. Thanks, Cindy On Wed, May 14, 2025 at 10:53 AM Jason Wang wrote: > > On Tue, May 13, 2025 at 3:09 PM Michael S. Tsirkin wrote: > > > > On Tue, May 13, 2025 at 12:08:51PM +0800, Jason Wang wrote: > > > On Wed, Apr 30, 2025 at 5:27 

Re: [PATCH v4 00/38] Mediated vPMU 4.0 for x86

2025-05-14 Thread Mi, Dapeng
On 5/15/2025 8:49 AM, Sean Christopherson wrote: > On Mon, Mar 24, 2025, Mingwei Zhang wrote: >> Dapeng Mi (18): >> KVM: x86/pmu: Introduce enable_mediated_pmu global parameter >> KVM: x86/pmu: Check PMU cpuid configuration from user space >> KVM: x86: Rename vmx_vmentry/vmexit_ctrl() helpe

Re: [PATCH v4 27/38] KVM: x86/pmu: Handle PMU MSRs interception and event filtering

2025-05-14 Thread Mi, Dapeng
On 5/15/2025 8:43 AM, Sean Christopherson wrote: > Again, be more precise. > > On Mon, Mar 24, 2025, Mingwei Zhang wrote: >> From: Dapeng Mi >> >> Mediated vPMU needs to intercept EVENTSELx and FIXED_CNTR_CTRL MSRs to >> filter out guest malicious perf events. Either writing these MSRs or >> upd

Re: [PATCH v4 23/38] KVM: x86/pmu: Configure the interception of PMU MSRs

2025-05-14 Thread Mi, Dapeng
On 5/15/2025 8:41 AM, Sean Christopherson wrote: > Again, use more precise language. "Configure interceptions" is akin to "do > work". > It gives readers a vague idea of what's going on, but this > > KVM: x86/pmu: Disable interception of select PMU MSRs for mediated vPMUs > > is just as conci

Re: [PATCH v4 26/38] KVM: x86/pmu: Introduce eventsel_hw to prepare for pmu event filtering

2025-05-14 Thread Mi, Dapeng
On 5/15/2025 8:42 AM, Sean Christopherson wrote: > On Mon, Mar 24, 2025, Mingwei Zhang wrote: >> -pmu->fixed_ctr_ctrl = pmu->global_ctrl = pmu->global_status = 0; >> +pmu->fixed_ctr_ctrl = pmu->fixed_ctr_ctrl_hw = 0; >> +pmu->global_ctrl = pmu->global_status = 0; > VMCS needs to be up

[PATCH] kselftest/arm64: Set default OUTPUT path when undefined

2025-05-14 Thread tanze
When running 'make' in tools/testing/selftests/arm64/ without explicitly setting the OUTPUT variable, the build system will creates test directories (e.g., /bti) in the root filesystem due to OUTPUT defaulting to an empty string. This causes unintended pollution of the root directory. This patch a

Re: [PATCH v4 22/38] KVM: x86/pmu: Optimize intel/amd_pmu_refresh() helpers

2025-05-14 Thread Mi, Dapeng
On 5/15/2025 8:37 AM, Sean Christopherson wrote: > This is not an optimization in any sane interpretation of that word. Yes, maybe clean up or bug fix is more accurate. > > On Mon, Mar 24, 2025, Mingwei Zhang wrote: >> From: Dapeng Mi >> >> Currently pmu->global_ctrl is initialized in the com

Re: [PATCH bpf-next v3 4/8] selftests/bpf: Introduce verdict programs for sockmap_redir

2025-05-14 Thread John Fastabend
On 2025-05-15 00:15:27, Michal Luczaj wrote: > Instead of piggybacking on test_sockmap_listen, introduce > test_sockmap_redir especially for sockmap redirection tests. > > Suggested-by: Jiayuan Chen > Acked-by: John Fastabend > Signed-off-by: Michal Luczaj > --- LGTM, this is a net new patch i

Re: [linux-next:master] [rcutorture] c27d0d38f2: WARNING:at_kernel/rcu/rcutorture.c:#rcutorture_one_extend_check[rcutorture]

2025-05-14 Thread Paul E. McKenney
> what's the base of the patch? I tried to apply it upon c27d0d38f2 or lastest > linux-next/master > bdd609656ff55 (tag: next-20250514, linux-next/master) Add linux-next specific > files for 20250514 > > both failed. thanks Apologies, I just now pushed it out on my -rcu tree

Re: [PATCH v4 20/38] KVM: x86/pmu: Check if mediated vPMU can intercept rdpmc

2025-05-14 Thread Mi, Dapeng
On 5/15/2025 8:19 AM, Sean Christopherson wrote: > The shortlog is wildly inaccurate. KVM is not simply checking, KVM is > actively > disabling RDPMC interception. *That* needs to be the focus of the shortlog > and > changelog. Sure. > >> diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.

Re: [PATCH v4 21/38] KVM: x86/pmu/vmx: Save/load guest IA32_PERF_GLOBAL_CTRL with vm_exit/entry_ctrl

2025-05-14 Thread Mi, Dapeng
On 5/15/2025 8:33 AM, Sean Christopherson wrote: > On Wed, Mar 26, 2025, Mingwei Zhang wrote: >> On Wed, Mar 26, 2025 at 9:51 AM Chen, Zide wrote: diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c index 6ad71752be4b..4e8cefcce7ab 100644 --- a/arch/x86/kvm/pmu.c +++ b/arch/

Re: [PATCH v4 17/38] KVM: x86/pmu: Add perf_capabilities field in struct kvm_host_values{}

2025-05-14 Thread Mi, Dapeng
On 5/15/2025 8:12 AM, Sean Christopherson wrote: > On Mon, Mar 24, 2025, Mingwei Zhang wrote: >> From: Dapeng Mi >> >> Add perf_capabilities in kvm_host_values{} structure to record host perf >> capabilities. KVM needs to know if host supports some PMU capabilities >> and then decide if passthro

Re: [PATCH v4 15/38] KVM: x86/pmu: Check PMU cpuid configuration from user space

2025-05-14 Thread Mi, Dapeng
On 5/15/2025 8:12 AM, Sean Christopherson wrote: > On Mon, Mar 24, 2025, Mingwei Zhang wrote: >> From: Dapeng Mi >> >> Check user space's PMU cpuid configuration and filter the invalid >> configuration. >> >> Either legacy perf-based vPMU or mediated vPMU needs kernel to support >> local APIC, o

Re: [PATCH v4 14/38] KVM: x86/pmu: Introduce enable_mediated_pmu global parameter

2025-05-14 Thread Mi, Dapeng
On 5/15/2025 8:09 AM, Sean Christopherson wrote: > On Mon, Mar 24, 2025, Mingwei Zhang wrote: >> From: Dapeng Mi >> >> Introduce enable_mediated_pmu global parameter to control if mediated >> vPMU can be enabled on KVM level. Even enable_mediated_pmu is set to >> true in KVM, user space hypervis

Re: [linux-next:master] [rcutorture] c27d0d38f2: WARNING:at_kernel/rcu/rcutorture.c:#rcutorture_one_extend_check[rcutorture]

2025-05-14 Thread Oliver Sang
this, and the patch at the end of this email fixes it > for me. Does it work for you as well? thanks a lot for information! what's the base of the patch? I tried to apply it upon c27d0d38f2 or lastest linux-next/master bdd609656ff55 (tag: next-20250514, linux-next/mast

Re: [PATCH v4 06/38] x86/irq: Factor out common code for installing kvm irq handler

2025-05-14 Thread Mi, Dapeng
On 5/15/2025 7:21 AM, Sean Christopherson wrote: > On Mon, Mar 24, 2025, Mingwei Zhang wrote: >> diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c >> index 385e3a5fc304..18cd418fe106 100644 >> --- a/arch/x86/kernel/irq.c >> +++ b/arch/x86/kernel/irq.c >> @@ -312,16 +312,22 @@ DEFINE_IDTE

Re: [PATCH v4 11/38] perf/x86: Forbid PMI handler when guest own PMU

2025-05-14 Thread Mi, Dapeng
On 5/15/2025 8:00 AM, Sean Christopherson wrote: > On Mon, Mar 24, 2025, Mingwei Zhang wrote: >> If a guest PMI is delivered after VM-exit, the KVM maskable interrupt will >> be held pending until EFLAGS.IF is set. In the meantime, if the logical >> processor receives an NMI for any reason at all

Re: [PATCH v4 09/38] perf: Add switch_guest_ctx() interface

2025-05-14 Thread Mi, Dapeng
On 5/15/2025 7:30 AM, Sean Christopherson wrote: > On Mon, Mar 24, 2025, Mingwei Zhang wrote: >> From: Kan Liang >> >> When entering/exiting a guest, some contexts for a guest have to be >> switched. For examples, there is a dedicated interrupt vector for >> guests on Intel platforms. >> >> When

Re: [PATCH v4 07/38] perf: core/x86: Register a new vector for KVM GUEST PMI

2025-05-14 Thread Mi, Dapeng
On 5/15/2025 7:24 AM, Sean Christopherson wrote: > On Mon, Mar 24, 2025, Mingwei Zhang wrote: >> diff --git a/arch/x86/include/asm/idtentry.h >> b/arch/x86/include/asm/idtentry.h >> index ad5c68f0509d..b0cb3220e1bb 100644 >> --- a/arch/x86/include/asm/idtentry.h >> +++ b/arch/x86/include/asm/idt

Re: [PATCH v4 05/38] perf: Add generic exclude_guest support

2025-05-14 Thread Mi, Dapeng
On 5/15/2025 7:19 AM, Sean Christopherson wrote: > On Fri, Apr 25, 2025, Peter Zijlstra wrote: >> On Mon, Mar 24, 2025 at 05:30:45PM +, Mingwei Zhang wrote: >> >>> @@ -6040,6 +6041,71 @@ void perf_put_mediated_pmu(void) >>> } >>> EXPORT_SYMBOL_GPL(perf_put_mediated_pmu); >>> >>> +static i

Re: [PATCH v4 04/38] perf: Add a EVENT_GUEST flag

2025-05-14 Thread Mi, Dapeng
On 5/15/2025 6:51 AM, Sean Christopherson wrote: > On Mon, Mar 24, 2025, Mingwei Zhang wrote: >> +{ >> +if (event->attr.exclude_guest && __this_cpu_read(perf_in_guest)) { > My vote is for s/perf_in_guest/guest_ctx_loaded, because "perf in guest" > doesn't > accurately describe just the media

Re: [PATCH v4 01/38] perf: Support get/put mediated PMU interfaces

2025-05-14 Thread Mi, Dapeng
On 5/15/2025 6:48 AM, Sean Christopherson wrote: > On Mon, Mar 24, 2025, Mingwei Zhang wrote: >> +/* >> + * Currently invoked at VM creation to >> + * - Check whether there are existing !exclude_guest events of PMU with >> + * PERF_PMU_CAP_MEDIATED_VPMU >> + * - Set nr_mediated_pmu_vms to preve

Re: [PATCH v4 00/38] Mediated vPMU 4.0 for x86

2025-05-14 Thread Sean Christopherson
On Mon, Mar 24, 2025, Mingwei Zhang wrote: > Dapeng Mi (18): > KVM: x86/pmu: Introduce enable_mediated_pmu global parameter > KVM: x86/pmu: Check PMU cpuid configuration from user space > KVM: x86: Rename vmx_vmentry/vmexit_ctrl() helpers > KVM: x86/pmu: Add perf_capabilities field in struc

Re: [PATCH v4 27/38] KVM: x86/pmu: Handle PMU MSRs interception and event filtering

2025-05-14 Thread Sean Christopherson
Again, be more precise. On Mon, Mar 24, 2025, Mingwei Zhang wrote: > From: Dapeng Mi > > Mediated vPMU needs to intercept EVENTSELx and FIXED_CNTR_CTRL MSRs to > filter out guest malicious perf events. Either writing these MSRs or > updating event filters would call reprogram_counter() eventuall

Re: [PATCH v4 26/38] KVM: x86/pmu: Introduce eventsel_hw to prepare for pmu event filtering

2025-05-14 Thread Sean Christopherson
On Mon, Mar 24, 2025, Mingwei Zhang wrote: > - pmu->fixed_ctr_ctrl = pmu->global_ctrl = pmu->global_status = 0; > + pmu->fixed_ctr_ctrl = pmu->fixed_ctr_ctrl_hw = 0; > + pmu->global_ctrl = pmu->global_status = 0; VMCS needs to be updated.

Re: [PATCH v4 23/38] KVM: x86/pmu: Configure the interception of PMU MSRs

2025-05-14 Thread Sean Christopherson
Again, use more precise language. "Configure interceptions" is akin to "do work". It gives readers a vague idea of what's going on, but this KVM: x86/pmu: Disable interception of select PMU MSRs for mediated vPMUs is just as concise, and more descriptive. > + /* > + * In mediated vP

Re: [PATCH v4 22/38] KVM: x86/pmu: Optimize intel/amd_pmu_refresh() helpers

2025-05-14 Thread Sean Christopherson
This is not an optimization in any sane interpretation of that word. On Mon, Mar 24, 2025, Mingwei Zhang wrote: > From: Dapeng Mi > > Currently pmu->global_ctrl is initialized in the common kvm_pmu_refresh() > helper since both Intel and AMD CPUs set enable bits for all GP counters > for PERF_GL

Re: [PATCH v4 21/38] KVM: x86/pmu/vmx: Save/load guest IA32_PERF_GLOBAL_CTRL with vm_exit/entry_ctrl

2025-05-14 Thread Sean Christopherson
On Wed, Mar 26, 2025, Mingwei Zhang wrote: > On Wed, Mar 26, 2025 at 9:51 AM Chen, Zide wrote: > > > diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c > > > index 6ad71752be4b..4e8cefcce7ab 100644 > > > --- a/arch/x86/kvm/pmu.c > > > +++ b/arch/x86/kvm/pmu.c > > > @@ -646,6 +646,30 @@ void kvm_

Re: [PATCH v4 20/38] KVM: x86/pmu: Check if mediated vPMU can intercept rdpmc

2025-05-14 Thread Sean Christopherson
The shortlog is wildly inaccurate. KVM is not simply checking, KVM is actively disabling RDPMC interception. *That* needs to be the focus of the shortlog and changelog. > diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c > index 92c742ead663..6ad71752be4b 100644 > --- a/arch/x86/kvm/pmu.c > +

Re: [PATCH v4 17/38] KVM: x86/pmu: Add perf_capabilities field in struct kvm_host_values{}

2025-05-14 Thread Sean Christopherson
On Mon, Mar 24, 2025, Mingwei Zhang wrote: > From: Dapeng Mi > > Add perf_capabilities in kvm_host_values{} structure to record host perf > capabilities. KVM needs to know if host supports some PMU capabilities > and then decide if passthrough or intercept some PMU MSRs or instruction > like rdpm

Re: [PATCH v4 15/38] KVM: x86/pmu: Check PMU cpuid configuration from user space

2025-05-14 Thread Sean Christopherson
On Mon, Mar 24, 2025, Mingwei Zhang wrote: > From: Dapeng Mi > > Check user space's PMU cpuid configuration and filter the invalid > configuration. > > Either legacy perf-based vPMU or mediated vPMU needs kernel to support > local APIC, otherwise PMI has no way to be injected into guest. If > ke

Re: [PATCH v4 14/38] KVM: x86/pmu: Introduce enable_mediated_pmu global parameter

2025-05-14 Thread Sean Christopherson
On Mon, Mar 24, 2025, Mingwei Zhang wrote: > From: Dapeng Mi > > Introduce enable_mediated_pmu global parameter to control if mediated > vPMU can be enabled on KVM level. Even enable_mediated_pmu is set to > true in KVM, user space hypervisor still need to enable mediated vPMU > explicitly by cal

Re: [PATCH v4 11/38] perf/x86: Forbid PMI handler when guest own PMU

2025-05-14 Thread Sean Christopherson
On Mon, Mar 24, 2025, Mingwei Zhang wrote: > If a guest PMI is delivered after VM-exit, the KVM maskable interrupt will > be held pending until EFLAGS.IF is set. In the meantime, if the logical > processor receives an NMI for any reason at all, perf_event_nmi_handler() > will be invoked. If there i

Re: [PATCH v4 09/38] perf: Add switch_guest_ctx() interface

2025-05-14 Thread Sean Christopherson
On Mon, Mar 24, 2025, Mingwei Zhang wrote: > From: Kan Liang > > When entering/exiting a guest, some contexts for a guest have to be > switched. For examples, there is a dedicated interrupt vector for > guests on Intel platforms. > > When PMI switch into a new guest vector, guest_lvtpc value nee

Re: [PATCH v4 07/38] perf: core/x86: Register a new vector for KVM GUEST PMI

2025-05-14 Thread Sean Christopherson
On Mon, Mar 24, 2025, Mingwei Zhang wrote: > diff --git a/arch/x86/include/asm/idtentry.h b/arch/x86/include/asm/idtentry.h > index ad5c68f0509d..b0cb3220e1bb 100644 > --- a/arch/x86/include/asm/idtentry.h > +++ b/arch/x86/include/asm/idtentry.h > @@ -745,6 +745,7 @@ DECLARE_IDTENTRY_SYSVEC(IRQ_WOR

Re: [PATCH v4 06/38] x86/irq: Factor out common code for installing kvm irq handler

2025-05-14 Thread Sean Christopherson
On Mon, Mar 24, 2025, Mingwei Zhang wrote: > diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c > index 385e3a5fc304..18cd418fe106 100644 > --- a/arch/x86/kernel/irq.c > +++ b/arch/x86/kernel/irq.c > @@ -312,16 +312,22 @@ DEFINE_IDTENTRY_SYSVEC(sysvec_x86_platform_ipi) > static void dummy_

Re: [PATCH v4 05/38] perf: Add generic exclude_guest support

2025-05-14 Thread Sean Christopherson
On Fri, Apr 25, 2025, Peter Zijlstra wrote: > On Mon, Mar 24, 2025 at 05:30:45PM +, Mingwei Zhang wrote: > > > @@ -6040,6 +6041,71 @@ void perf_put_mediated_pmu(void) > > } > > EXPORT_SYMBOL_GPL(perf_put_mediated_pmu); > > > > +static inline void perf_host_exit(struct perf_cpu_context *cpu

[PATCH bpf-next v3 2/8] selftests/bpf: Add socket_kind_to_str() to socket_helpers

2025-05-14 Thread Michal Luczaj
Add function that returns string representation of socket's domain/type. Suggested-by: Jakub Sitnicki Reviewed-by: Jakub Sitnicki Acked-by: John Fastabend Signed-off-by: Michal Luczaj --- .../selftests/bpf/prog_tests/socket_helpers.h | 55 ++ 1 file changed, 55 insert

[PATCH bpf-next v3 7/8] selftests/bpf: sockmap_listen cleanup: Drop af_unix redir tests

2025-05-14 Thread Michal Luczaj
Remove tests covered by sockmap_redir. Acked-by: John Fastabend Signed-off-by: Michal Luczaj --- .../selftests/bpf/prog_tests/sockmap_listen.c | 219 - 1 file changed, 219 deletions(-) diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c b/tools/testin

Re: [PATCH v4 04/38] perf: Add a EVENT_GUEST flag

2025-05-14 Thread Sean Christopherson
On Mon, Mar 24, 2025, Mingwei Zhang wrote: > +{ > + if (event->attr.exclude_guest && __this_cpu_read(perf_in_guest)) { My vote is for s/perf_in_guest/guest_ctx_loaded, because "perf in guest" doesn't accurately describe just the mediated PMU case. E.g. perf itself is running in KVM guests whe

[PATCH bpf-next v3 5/8] selftests/bpf: Add selftest for sockmap/hashmap redirection

2025-05-14 Thread Michal Luczaj
Test redirection logic. All supported and unsupported redirect combinations are tested for success and failure respectively. BPF_MAP_TYPE_SOCKMAP BPF_MAP_TYPE_SOCKHASH x sk_msg-to-egress sk_msg-to-ingress sk_skb-to-egress sk_skb-to-ingress x AF_INET, SOCK_STREAM AF_INET6, SOCK_STRE

Re: [PATCH v4 01/38] perf: Support get/put mediated PMU interfaces

2025-05-14 Thread Sean Christopherson
On Mon, Mar 24, 2025, Mingwei Zhang wrote: > +/* > + * Currently invoked at VM creation to > + * - Check whether there are existing !exclude_guest events of PMU with > + * PERF_PMU_CAP_MEDIATED_VPMU > + * - Set nr_mediated_pmu_vms to prevent !exclude_guest event creation on > + * PMUs with PERF

[PATCH bpf-next v3 8/8] selftests/bpf: sockmap_listen cleanup: Drop af_inet SOCK_DGRAM redir tests

2025-05-14 Thread Michal Luczaj
Remove tests covered by sockmap_redir. Acked-by: John Fastabend Signed-off-by: Michal Luczaj --- .../selftests/bpf/prog_tests/sockmap_listen.c | 126 - 1 file changed, 126 deletions(-) diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c b/tools/testin

[PATCH] selftests: timers: Fix grammar and clarify comments in nanosleep.c

2025-05-14 Thread Rahul Kumar
Improved the clarity and grammar in the header comment of nanosleep.c for better readability and consistency with kernel documentation style. Signed-off-by: Rahul Kumar --- tools/testing/selftests/timers/nanosleep.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-)

[PATCH bpf-next v3 3/8] selftests/bpf: Add u32()/u64() to sockmap_helpers

2025-05-14 Thread Michal Luczaj
Add integer wrappers for convenient sockmap usage. While there, fix misaligned trailing slashes. Suggested-by: Jakub Sitnicki Reviewed-by: Jakub Sitnicki Acked-by: John Fastabend Signed-off-by: Michal Luczaj --- .../selftests/bpf/prog_tests/sockmap_helpers.h | 25 ++

[PATCH bpf-next v3 6/8] selftests/bpf: sockmap_listen cleanup: Drop af_vsock redir tests

2025-05-14 Thread Michal Luczaj
Remove tests covered by sockmap_redir. Acked-by: John Fastabend Signed-off-by: Michal Luczaj --- .../selftests/bpf/prog_tests/sockmap_listen.c | 112 - 1 file changed, 112 deletions(-) diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c b/tools/testin

[PATCH bpf-next v3 0/8] selftests/bpf: Test sockmap/sockhash redirection

2025-05-14 Thread Michal Luczaj
John, this revision introduces one more patch: "selftests/bpf: Introduce verdict programs for sockmap_redir". I've kept you cross-series Acked-by. I hope it's ok. Jiayuan, I haven't heard back from you regarding [*], so I've kept things unchanged for now. Please let me know what you think. [*] ht

[PATCH bpf-next v3 4/8] selftests/bpf: Introduce verdict programs for sockmap_redir

2025-05-14 Thread Michal Luczaj
Instead of piggybacking on test_sockmap_listen, introduce test_sockmap_redir especially for sockmap redirection tests. Suggested-by: Jiayuan Chen Acked-by: John Fastabend Signed-off-by: Michal Luczaj --- .../selftests/bpf/progs/test_sockmap_redir.c | 68 ++ 1 file cha

[PATCH bpf-next v3 1/8] selftests/bpf: Support af_unix SOCK_DGRAM socket pair creation

2025-05-14 Thread Michal Luczaj
Handle af_unix in init_addr_loopback(). For pair creation, bind() the peer socket to make SOCK_DGRAM connect() happy. Reviewed-by: Jakub Sitnicki Acked-by: John Fastabend Signed-off-by: Michal Luczaj --- .../selftests/bpf/prog_tests/socket_helpers.h | 29 ++ 1 file cha

Re: [PATCH RESEND2 v2] clk: qcom: gcc-msm8939: Fix mclk0 & mclk1 for 24 MHz

2025-05-14 Thread Bjorn Andersson
On Mon, 14 Apr 2025 18:45:12 +0200, Vincent Knecht wrote: > Fix mclk0 & mclk1 parent map to use correct GPLL6 configuration and > freq_tbl to use GPLL6 instead of GPLL0 so that they tick at 24 MHz. > > Applied, thanks! [1/1] clk: qcom: gcc-msm8939: Fix mclk0 & mclk1 for 24 MHz commit: 9

Re: [PATCH v1 1/2] mm/memory_hotplug: PG_offline_skippable for offlining memory blocks with PageOffline pages

2025-05-14 Thread Zi Yan
On 14 May 2025, at 15:51, David Hildenbrand wrote: > Thanks a bucnh for the review! > >>> + >>> + if (PageOffline(page) && PageOfflineSkippable(page)) >>> + continue; >>> + >> >> Some comment like "Skippable PageOffline() pages are not migratable but are >> skipped duri

Re: [PATCH v1 2/2] mm/memory_hotplug: remove -EBUSY handling from scan_movable_pages()

2025-05-14 Thread David Hildenbrand
On 14.05.25 13:15, David Hildenbrand wrote: Now that we can reliably identify PageOffline() pages that allow for memory offlining in has_unmovable_pages(), start_isolate_page_range() will fail on PageOffline() pages that would prevent memory offlining, and we no longer have to detect them in scan

Re: [PATCH v1 1/2] mm/memory_hotplug: PG_offline_skippable for offlining memory blocks with PageOffline pages

2025-05-14 Thread David Hildenbrand
Thanks a bucnh for the review! + + if (PageOffline(page) && PageOfflineSkippable(page)) + continue; + Some comment like "Skippable PageOffline() pages are not migratable but are skipped during memory offline" might help understand the change. I can add a c

Re: [PATCH v2] params: Add support for static keys

2025-05-14 Thread Kent Overstreet
On Wed, May 14, 2025 at 12:06:44PM -0700, Josh Poimboeuf wrote: > On Tue, May 13, 2025 at 11:40:05PM -0400, Kent Overstreet wrote: > > On Tue, May 13, 2025 at 08:38:57PM -0700, Josh Poimboeuf wrote: > > > On Tue, May 13, 2025 at 08:44:49PM -0400, Kent Overstreet wrote: > > > > On Tue, May 13, 2025

Re: [PATCH v2] params: Add support for static keys

2025-05-14 Thread Josh Poimboeuf
On Tue, May 13, 2025 at 11:40:05PM -0400, Kent Overstreet wrote: > On Tue, May 13, 2025 at 08:38:57PM -0700, Josh Poimboeuf wrote: > > On Tue, May 13, 2025 at 08:44:49PM -0400, Kent Overstreet wrote: > > > On Tue, May 13, 2025 at 05:37:11PM -0700, Josh Poimboeuf wrote: > > > > On Tue, May 13, 2025

Re: [PATCH v1 1/2] mm/memory_hotplug: PG_offline_skippable for offlining memory blocks with PageOffline pages

2025-05-14 Thread Zi Yan
On 14 May 2025, at 7:15, David Hildenbrand wrote: > A long-term goal is supporting frozen PageOffline pages, and later > PageOffline pages that don't have a refcount at all. Some more work for > that is needed -- in particular around non-folio page migration and > memory ballooning drivers -- but

Re: [PATCH 1/9] CodingStyle: make Documentation/CodingStyle into symlink

2025-05-14 Thread Jonathan Corbet
Alexey Dobriyan writes: > I never liked cover letters because they don't get captured in > the commit messages so why bother. FWIW, if a cover letter contains useful information, I capture it in a merge commit that brings in the rest. I think I'm far from the only one who does that... jon

Re: [linux-next:master] [rcutorture] c27d0d38f2: WARNING:at_kernel/rcu/rcutorture.c:#rcutorture_one_extend_check[rcutorture]

2025-05-14 Thread Paul E. McKenney
entire log/backtrace) > > > > If you fix the issue in a separate patch/commit (i.e. not just a new version > of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot > | Closes: https://lore.kernel.org/oe-lkp/202505140917.8ee62cc6-...@intel

Re: [PATCH v1 0/2] mm/memory_hotplug: introduce and use PG_offline_skippable

2025-05-14 Thread David Hildenbrand
Next, the page is removed from its memory block. When will PG_offline_skippable be used? The second phase when the page is being removed from its memory block? PG_offline_skippable is used during memory offlining, while we look for any pages that are not PageBuddy (... or hwpoisoned ...), to m

Re: [PATCH v1 0/2] mm/memory_hotplug: introduce and use PG_offline_skippable

2025-05-14 Thread Zi Yan
On 14 May 2025, at 13:28, David Hildenbrand wrote: >>> >>> Note that PageOffline() is a bit confusing because it's "Memory block >>> online but page is logically offline (e.g., has a memmap that can be >>> touched, but the page content should not be touched)". >> >> So PageOffline() is before me

Re: [PATCH bpf-next v3 11/11] bpf: Fall back to nospec for sanitization-failures

2025-05-14 Thread Luis Gerhorst
Kumar Kartikeya Dwivedi writes: (including relevant part from other message) > On Thu, 1 May 2025 at 04:00, Luis Gerhorst wrote: > >> +static bool error_recoverable_with_nospec(int err) >> +{ >> + /* Should only return true for non-fatal errors that are allowed to >> +* occur dur

Re: [PATCH bpf-next v3 11/11] bpf: Fall back to nospec for sanitization-failures

2025-05-14 Thread Kumar Kartikeya Dwivedi
On Wed, 14 May 2025 at 13:30, Luis Gerhorst wrote: > > Kumar Kartikeya Dwivedi writes: > > (including relevant part from other message) > > > On Thu, 1 May 2025 at 04:00, Luis Gerhorst wrote: > > > >> +static bool error_recoverable_with_nospec(int err) > >> +{ > >> + /* Should only return

Re: [PATCH v1 0/2] mm/memory_hotplug: introduce and use PG_offline_skippable

2025-05-14 Thread David Hildenbrand
Note that PageOffline() is a bit confusing because it's "Memory block online but page is logically offline (e.g., has a memmap that can be touched, but the page content should not be touched)". So PageOffline() is before memory block offline, which is the first phase of memory hotunplug. Ye

Re: [PATCH] params: Add support for static keys

2025-05-14 Thread Kent Overstreet
On Tue, May 13, 2025 at 07:51:57PM +0200, Christophe Leroy wrote: > > > Le 10/05/2025 à 23:01, Kent Overstreet a écrit : > > Static keys can now be a module parameter, e.g. > > > > module_param_named(foo, foo.key, static_key_t, 0644) > > > > bcachefs is now using this. > > > > Cc: Luis Chamber

Re: [PATCH v1 0/2] mm/memory_hotplug: introduce and use PG_offline_skippable

2025-05-14 Thread Zi Yan
On 14 May 2025, at 10:12, David Hildenbrand wrote: > On 14.05.25 15:45, Zi Yan wrote: >> On 14 May 2025, at 7:15, David Hildenbrand wrote: >> >>> This is a requirement for making PageOffline pages not have a refcount >>> in the long future ("frozen"), and for reworking non-folio page migration >>>

[PATCH net-next v2 1/3] vsock/test: add timeout_usleep() to allow sleeping in timeout sections

2025-05-14 Thread Stefano Garzarella
From: Stefano Garzarella The timeout API uses signals, so we have documented not to use sleep(), but we can use nanosleep(2) since POSIX.1 explicitly specifies that it does not interact with signals. Let's provide timeout_usleep() for that. Signed-off-by: Stefano Garzarella --- tools/testing/

Re: [PATCH 13/19] virtio_ring: introduce virtqueue ops

2025-05-14 Thread Michael S. Tsirkin
On Wed, May 14, 2025 at 10:19:05AM -0400, Michael S. Tsirkin wrote: > On Wed, Apr 09, 2025 at 12:06:03PM +0800, Jason Wang wrote: > > On Tue, Apr 8, 2025 at 7:37 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Apr 08, 2025 at 03:02:35PM +0800, Jason Wang wrote: > > > > On Mon, Apr 7, 2025 at 4:20

[PATCH net-next v2 3/3] vsock/test: check also expected errno on sigpipe test

2025-05-14 Thread Stefano Garzarella
From: Stefano Garzarella In the sigpipe test, we expect send() to fail, but we do not check if send() fails with the errno we expect (EPIPE). Add this check and repeat the send() in case of EINTR as we do in other tests. Signed-off-by: Stefano Garzarella --- v2: - fixed loop exit condition [Pa

[PATCH net-next v2 2/3] vsock/test: retry send() to avoid occasional failure in sigpipe test

2025-05-14 Thread Stefano Garzarella
From: Stefano Garzarella When the other peer calls shutdown(SHUT_RD), there is a chance that the send() call could occur before the message carrying the close information arrives over the transport. In such cases, the send() might still succeed. To avoid this race, let's retry the send() call a f

[PATCH net-next v2 0/3] vsock/test: improve sigpipe test reliability

2025-05-14 Thread Stefano Garzarella
Running the tests continuously I noticed that sometimes the sigpipe test would fail due to a race between the control message of the test and the vsock transport messages. While I was at it I also improved the test by checking the errno we expect. Changelog: v2: - added a patch to provide timeout

Re: [PATCH 13/19] virtio_ring: introduce virtqueue ops

2025-05-14 Thread Michael S. Tsirkin
On Wed, Apr 09, 2025 at 12:06:03PM +0800, Jason Wang wrote: > On Tue, Apr 8, 2025 at 7:37 PM Michael S. Tsirkin wrote: > > > > On Tue, Apr 08, 2025 at 03:02:35PM +0800, Jason Wang wrote: > > > On Mon, Apr 7, 2025 at 4:20 PM Michael S. Tsirkin wrote: > > > > > > > > On Mon, Mar 24, 2025 at 02:01:2

Re: [PATCH v1 0/2] mm/memory_hotplug: introduce and use PG_offline_skippable

2025-05-14 Thread David Hildenbrand
On 14.05.25 15:45, Zi Yan wrote: On 14 May 2025, at 7:15, David Hildenbrand wrote: This is a requirement for making PageOffline pages not have a refcount in the long future ("frozen"), and for reworking non-folio page migration in the near future. I have patches mostly ready to go to handle th

Re: [PATCH v4 2/9] slab: add sheaf support for batching kfree_rcu() operations

2025-05-14 Thread Vlastimil Babka
On 5/6/25 23:34, Suren Baghdasaryan wrote: > On Fri, Apr 25, 2025 at 1:27 AM Vlastimil Babka wrote: >> @@ -2631,6 +2637,24 @@ static void sheaf_flush_unused(struct kmem_cache *s, >> struct slab_sheaf *sheaf) >> sheaf->size = 0; >> } >> >> +static void __rcu_free_sheaf_prepare(struct kmem

Re: [PATCH v1 0/2] mm/memory_hotplug: introduce and use PG_offline_skippable

2025-05-14 Thread Zi Yan
On 14 May 2025, at 7:15, David Hildenbrand wrote: > This is a requirement for making PageOffline pages not have a refcount > in the long future ("frozen"), and for reworking non-folio page migration > in the near future. > > I have patches mostly ready to go to handle the latter. For turning all >

Re: [PATCH v4 1/9] slab: add opt-in caching layer of percpu sheaves

2025-05-14 Thread Vlastimil Babka
On 5/7/25 01:14, Suren Baghdasaryan wrote: > On Fri, Apr 25, 2025 at 1:27 AM Vlastimil Babka wrote: >> >> Signed-off-by: Vlastimil Babka > > Reviewed-by: Suren Baghdasaryan Thanks! > One nit which is barely worth mentioning. OK, made the change.

Re: [PATCH v4 2/9] slab: add sheaf support for batching kfree_rcu() operations

2025-05-14 Thread Vlastimil Babka
On 4/29/25 09:36, Harry Yoo wrote: > On Fri, Apr 25, 2025 at 10:27:22AM +0200, Vlastimil Babka wrote: >> Extend the sheaf infrastructure for more efficient kfree_rcu() handling. >> For caches with sheaves, on each cpu maintain a rcu_free sheaf in >> addition to main and spare sheaves. >> >> kfree_

Re: [PATCH v2 52/62] objtool/klp: Introduce klp diff subcommand for diffing object files

2025-05-14 Thread laokz
On 5/14/2025 4:45 AM, Josh Poimboeuf wrote: On Tue, May 13, 2025 at 10:49:59PM +0800, laokz wrote: On 5/10/2025 4:17 AM, Josh Poimboeuf wrote: + +#define sym_for_each_reloc(elf, sym, reloc)\ + for (reloc = find_reloc_by_dest_range(elf, sym->sec, \ +

Re: [PATCH v3 0/5] module: Strict per-modname namespaces

2025-05-14 Thread Petr Pavlu
On 5/2/25 16:12, Peter Zijlstra wrote: > Hi! > > Implement means for exports to be available to an explicit list of named > modules. By explicitly limiting the usage of certain exports, the abuse > potential/risk is greatly reduced. > > Changes since v2: > > - switch to "module:" prefix (Masahi

Re: [PATCH v2] sched,livepatch: Untangle cond_resched() and live-patching

2025-05-14 Thread Peter Zijlstra
On Wed, May 14, 2025 at 11:51:44AM +0200, Petr Mladek wrote: > IMHO, it might be easier when it goes via tip. Peter, feel free to > take it. Done! > Reviewed-by: Petr Mladek > Tested-by: Petr Mladek For some reason b4 didn't pick up these tags, added them manually and force pushed it again.

[PATCH v1 1/2] mm/memory_hotplug: PG_offline_skippable for offlining memory blocks with PageOffline pages

2025-05-14 Thread David Hildenbrand
A long-term goal is supporting frozen PageOffline pages, and later PageOffline pages that don't have a refcount at all. Some more work for that is needed -- in particular around non-folio page migration and memory ballooning drivers -- but let's start by handling PageOffline pages that can be skipp

[PATCH v1 2/2] mm/memory_hotplug: remove -EBUSY handling from scan_movable_pages()

2025-05-14 Thread David Hildenbrand
Now that we can reliably identify PageOffline() pages that allow for memory offlining in has_unmovable_pages(), start_isolate_page_range() will fail on PageOffline() pages that would prevent memory offlining, and we no longer have to detect them in scan_movable_pages() anymore. Note that the previ

[PATCH v1 0/2] mm/memory_hotplug: introduce and use PG_offline_skippable

2025-05-14 Thread David Hildenbrand
This is a requirement for making PageOffline pages not have a refcount in the long future ("frozen"), and for reworking non-folio page migration in the near future. I have patches mostly ready to go to handle the latter. For turning all PageOffline() pages frozen, the non-folio page migration and

Re: [PATCH v2] sched,livepatch: Untangle cond_resched() and live-patching

2025-05-14 Thread Thomas Gleixner
On Fri, May 09 2025 at 13:36, Sebastian Andrzej Siewior wrote: > From: Peter Zijlstra > > With the goal of deprecating / removing VOLUNTARY preempt, live-patch > needs to stop relying on cond_resched() to make forward progress. > > Instead, rely on schedule() with TASK_FREEZABLE set. Just like > l

Re: [PATCH v2] sched,livepatch: Untangle cond_resched() and live-patching

2025-05-14 Thread Petr Mladek
On Tue 2025-05-13 15:34:50, Miroslav Benes wrote: > On Fri, 9 May 2025, Sebastian Andrzej Siewior wrote: > > > From: Peter Zijlstra > > > > With the goal of deprecating / removing VOLUNTARY preempt, live-patch > > needs to stop relying on cond_resched() to make forward progress. > > > > Instead

Re: [PATCH v2] sched,livepatch: Untangle cond_resched() and live-patching

2025-05-14 Thread Petr Mladek
On Tue 2025-05-13 16:05:51, Miroslav Benes wrote: > On Tue, 13 May 2025, Peter Zijlstra wrote: > > > On Tue, May 13, 2025 at 03:34:50PM +0200, Miroslav Benes wrote: > > > Hi, > > > > > > thanks for the updated version. > > > > > > On Fri, 9 May 2025, Sebastian Andrzej Siewior wrote: > > > > > >

Re: [PATCH v3 5/5] module: Provide EXPORT_SYMBOL_GPL_FOR_MODULES() helper

2025-05-14 Thread Petr Pavlu
On 5/2/25 16:12, Peter Zijlstra wrote: > Helper macro to more easily limit the export of a symbol to a given > list of modules. > > Eg: > > EXPORT_SYMBOL_GPL_FOR_MODULES(preempt_notifier_inc, "kvm"); > > will limit the use of said function to kvm.ko, any other module trying > to use this symbo

Re: [PATCH v3 4/5] module: Account for the build time module name mangling

2025-05-14 Thread Petr Pavlu
On 5/2/25 16:12, Peter Zijlstra wrote: > Sean noted that scripts/Makefile.lib:name-fix-token rule will mangle > the module name with s/-/_/g. > > Since this happens late in the build, only the kernel needs to bother > with this, the modpost tool still sees the original name. > > Reported-by: Sean

Re: [PATCH v3 3/5] module: Extend the MODULE_ namespace parsing

2025-05-14 Thread Petr Pavlu
On 5/2/25 16:12, Peter Zijlstra wrote: > Instead of only accepting "module:${name}", extend it with a comma > separated list of module names and add tail glob support. > > That is, something like: "module:foo-*,bar" is now possible. > > Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Petr Pa

Re: [PATCH v3 2/5] module: Add module specific symbol namespace support

2025-05-14 Thread Petr Pavlu
On 5/2/25 16:12, Peter Zijlstra wrote: > Designate the "module:${modname}" symbol namespace to mean: 'only > export to the named module'. > > Notably, explicit imports of anything in the "module:" space is > forbidden. > > Signed-off-by: Peter Zijlstra (Intel) Sorry, I thought this was already

[PATCH v2] selftests: riscv: add misaligned access testing

2025-05-14 Thread Clément Léger
This selftest tests all the currently emulated instructions (except for the RV32 compressed ones which are left as a future exercise for a RV32 user). For the FPU instructions, all the FPU registers are tested. Signed-off-by: Clément Léger --- Note: This test can be executed with the FWFT serie

Re: [PATCH] lib/crc32: add SPDX license identifier

2025-05-14 Thread Greg KH
On Tue, May 13, 2025 at 11:14:25PM -0700, Eric Biggers wrote: > On Wed, May 14, 2025 at 08:11:40AM +0200, Thomas Gleixner wrote: > > On Tue, May 13 2025 at 22:24, Eric Biggers wrote: > > > > > From: Eric Biggers > > > > > > lib/crc32.c and include/linux/crc32.h got missed by the bulk SPDX > > > c

RE: [PATCH v4 1/1] x86/sgx: Enable automatic SVN updates for SGX enclaves

2025-05-14 Thread Reshetova, Elena
> > >>> +static bool sgx_has_eupdatesvn; > > >> > > >> We have CPUID "caches" of sorts. Why open code this? > > > > > > You mean X86_FEATURE_*? > > > > Yes. > > > > > SGX CPUID is only defined in SGX code currently (btw, I am not sure > > > why they are made special) so it doesn’t support this. > >

Re: [PATCH] selftests: riscv: add misaligned access testing

2025-05-14 Thread Clément Léger
On 13/05/2025 13:44, Alexandre Ghiti wrote: > Hi Clément, > > On 12/05/2025 10:46, Clément Léger wrote: >> This selftest tests all the currently emulated instruction (except for >> the RV32 compressed ones which are left as a future exercise for a RV32 >> user). For the FPU instructions, all th

Re: [PATCH v5] remoteproc: Add device awake calls in rproc boot and shutdown path

2025-05-14 Thread Souradeep Chowdhury
Gentle Reminder On 4/8/2025 4:13 PM, Souradeep Chowdhury wrote: Add device awake calls in case of rproc boot and rproc shutdown path. Currently, device awake call is only present in the recovery path of remoteproc. If an user stops and starts rproc by using the sysfs interface, then on pm suspe

Re: [PATCH v2 4/4] media: i2c: imx214: Remove hard-coded external clock frequency

2025-05-14 Thread André Apitzsch
Hello Sakari, Am Dienstag, dem 06.05.2025 um 08:24 + schrieb Sakari Ailus: > Hi André, > > On Mon, May 05, 2025 at 11:05:56PM +0200, André Apitzsch via B4 Relay > wrote: > > From: André Apitzsch > > > > Instead rely on the rate set on the clock (using assigned-clock- > > rates > > etc.) > >