6.0.9-rc1 review
Subsystems (3)
Greg Kroah-Hartman
maintainerPATCH 162/190 can: j1939: j1939_send_one(): fix missing CAN header initialization
In reply to Greg Kroah-HartmanFrom: Oliver Hartkopp <[email protected]>
commit 3eb3d283e8579a22b81dd2ac3987b77465b2a22f upstream.
The read access to struct canxl_frame::len inside of a j1939 created skbuff revealed a missing initialization of reserved and later filled elements in struct can_frame.
This patch initializes the 8 byte CAN header with zero.
--- net/can/j1939/main.c | 3 +++ 1 file changed, 3 insertions(+)
net/can/j1939/main.c +3 -0
@@ -332,6 +332,9 @@ int j1939_send_one(struct j1939_priv *pr/* re-claim the CAN_HDR from the SKB */ cf =skb_push (skb,J1939_CAN_HDR ); +/* initialize header structure */ +memset (cf,0 ,J1939_CAN_HDR ); +/* make it a full can frame again */ skb_put (skb,J1939_CAN_FTR + (8 - dlc));
Greg Kroah-Hartman
maintainerPATCH 163/190 can: isotp: fix tx state handling for echo tx processing
In reply to Greg Kroah-HartmanFrom: Oliver Hartkopp <[email protected]>
commit 866337865f3747c68a3e7bb837611e39cec1ecd6 upstream.
In commit 4b7fe92c0690 ("can: isotp: add local echo tx processing for consecutive frames") the data flow for consecutive frames (CF) has been reworked to improve the reliability of long data transfers.
This rework did not touch the transmission and the tx state changes of single frame (SF) transfers which likely led to the WARN in the isotp_tx_timer_handler() catching a wrong tx state. This patch makes use of the improved frame processing for SF frames and sets the ISOTP_SENDING state in isotp_sendmsg() within the cmpxchg() condition handling.
A review of the state machine and the timer handling additionally revealed a missing echo timeout handling in the case of the burst mode in isotp_rcv_echo() and removes a potential timer configuration uncertainty in isotp_rcv_fc() when the receiver requests consecutive frames.
--- net/can/isotp.c | 71 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 33 deletions(-)
net/can/isotp.c +38 -33
@@ -111,6 +111,9 @@ MODULE_ALIAS("can-proto-6");#define ISOTP_FC_WT 1/* wait */ #define ISOTP_FC_OVFLW 2/* overflow */ +#define ISOTP_FC_TIMEOUT 1/* 1 sec */ +#define ISOTP_ECHO_TIMEOUT 2/* 2 secs */ +enum {ISOTP_IDLE =0 ,ISOTP_WAIT_FIRST_FC ,
@@ -258,7 +261,8 @@ static int isotp_send_fc(struct sock *sk so->lastrxcf_tstamp =ktime_set (0 ,0 );/* start rx timeout watchdog */ -hrtimer_start (&so->rxtimer,ktime_set (1 ,0 ),HRTIMER_MODE_REL_SOFT ); +hrtimer_start (&so->rxtimer,ktime_set (ISOTP_FC_TIMEOUT ,0 ), +HRTIMER_MODE_REL_SOFT );return 0 ; }
@@ -344,6 +348,8 @@ static int check_pad(struct isotp_sock *return 0 ; } +static void isotp_send_cframe (struct isotp_sock *so); +static int isotp_rcv_fc (struct isotp_sock *so,struct canfd_frame *cf,int ae) {struct sock *sk = &so->sk;
@@ -398,14 +404,15 @@ static int isotp_rcv_fc(struct isotp_soccase ISOTP_FC_CTS : so->tx.bs =0 ; so->tx.state =ISOTP_SENDING ; -/* start cyclic timer for sending CF frame */ -hrtimer_start (&so->txtimer, so->tx_gap, +/* send CF frame and enable echo timeout handling */ +hrtimer_start (&so->txtimer,ktime_set (ISOTP_ECHO_TIMEOUT ,0 ),HRTIMER_MODE_REL_SOFT ); +isotp_send_cframe (so);break ;case ISOTP_FC_WT :/* start timer to wait for next FC frame */ -hrtimer_start (&so->txtimer,ktime_set (1 ,0 ), +hrtimer_start (&so->txtimer,ktime_set (ISOTP_FC_TIMEOUT ,0 ),HRTIMER_MODE_REL_SOFT );break ;
@@ -600,7 +607,7 @@ static int isotp_rcv_cf(struct sock *sk,/* perform blocksize handling, if enabled */ if (!so->rxfc.bs || ++so->rx.bs < so->rxfc.bs) {/* start rx timeout watchdog */ -hrtimer_start (&so->rxtimer,ktime_set (1 ,0 ), +hrtimer_start (&so->rxtimer,ktime_set (ISOTP_FC_TIMEOUT ,0 ),HRTIMER_MODE_REL_SOFT );return 0 ; }
@@ -829,7 +836,7 @@ static void isotp_rcv_echo(struct sk_bufstruct isotp_sock *so =isotp_sk (sk);struct canfd_frame *cf = (struct canfd_frame *)skb->data; -/* only handle my own local echo skb's */ +/* only handle my own local echo CF/SF skb's (no FF!) */ if (skb->sk != sk || so->cfecho != *(u32 *)cf->data)return ;
@@ -849,13 +856,16 @@ static void isotp_rcv_echo(struct sk_bufif (so->txfc.bs && so->tx.bs >= so->txfc.bs) {/* stop and wait for FC with timeout */ so->tx.state =ISOTP_WAIT_FC ; -hrtimer_start (&so->txtimer,ktime_set (1 ,0 ), +hrtimer_start (&so->txtimer,ktime_set (ISOTP_FC_TIMEOUT ,0 ),HRTIMER_MODE_REL_SOFT );return ; }/* no gap between data frames needed => use burst mode */ if (!so->tx_gap) { +/* enable echo timeout handling */ +hrtimer_start (&so->txtimer,ktime_set (ISOTP_ECHO_TIMEOUT ,0 ), +HRTIMER_MODE_REL_SOFT );isotp_send_cframe (so);return ; }
@@ -879,7 +889,7 @@ static enum hrtimer_restart isotp_tx_tim/* start timeout for unlikely lost echo skb */ hrtimer_set_expires (&so->txtimer,ktime_add (ktime_get (), -ktime_set (2 ,0 ))); +ktime_set (ISOTP_ECHO_TIMEOUT ,0 ))); restart =HRTIMER_RESTART ;/* push out the next consecutive frame */
@@ -907,7 +917,8 @@ static enum hrtimer_restart isotp_tx_timbreak ;default : -WARN_ON_ONCE (1 ); +WARN_ONCE (1 ,"can-isotp: tx timer state %08X cfecho %08X\n" , + so->tx.state, so->cfecho); }return restart;
@@ -923,7 +934,7 @@ static int isotp_sendmsg(struct socket *struct canfd_frame *cf;int ae = (so->opt.flags &CAN_ISOTP_EXTEND_ADDR ) ?1 :0 ;int wait_tx_done = (so->opt.flags &CAN_ISOTP_WAIT_TX_DONE ) ?1 :0 ; -s64 hrtimer_sec =0 ; +s64 hrtimer_sec =ISOTP_ECHO_TIMEOUT ;int off;int err;
@@ -942,6 +953,8 @@ static int isotp_sendmsg(struct socket * err =wait_event_interruptible (so->wait, so->tx.state ==ISOTP_IDLE );if (err) goto err_out; + + so->tx.state =ISOTP_SENDING ; }if (!size || size >MAX_MSG_LENGTH ) {
@@ -986,6 +999,10 @@ static int isotp_sendmsg(struct socket * cf = (struct canfd_frame *)skb->data;skb_put_zero (skb, so->ll.mtu); +/* cfecho should have been zero'ed by init / former isotp_rcv_echo() */ +if (so->cfecho) +pr_notice_once ("can-isotp: uninit cfecho %08X\n" , so->cfecho); +/* check for single frame transmission depending on TX_DL */ if (size <= so->tx.ll_dl -SF_PCI_SZ4 - ae - off) {/* The message size generally fits into a SingleFrame - good.
@@ -1011,11 +1028,8 @@ static int isotp_sendmsg(struct socket *else cf->data[ae] |= size; - so->tx.state =ISOTP_IDLE ; -wake_up_interruptible (&so->wait); - -/* don't enable wait queue for a single frame transmission */ - wait_tx_done =0 ; +/* set CF echo tag for isotp_rcv_echo() (SF-mode) */ + so->cfecho = *(u32 *)cf->data; }else {/* send first frame */
@@ -1031,31 +1045,23 @@ static int isotp_sendmsg(struct socket */* disable wait for FCs due to activated block size */ so->txfc.bs =0 ; -/* cfecho should have been zero'ed by init */ -if (so->cfecho) -pr_notice_once ("can-isotp: no fc cfecho %08X\n" , - so->cfecho); - -/* set consecutive frame echo tag */ +/* set CF echo tag for isotp_rcv_echo() (CF-mode) */ so->cfecho = *(u32 *)cf->data; - -/* switch directly to ISOTP_SENDING state */ - so->tx.state =ISOTP_SENDING ; - -/* start timeout for unlikely lost echo skb */ - hrtimer_sec =2 ; }else {/* standard flow control check */ so->tx.state =ISOTP_WAIT_FIRST_FC ;/* start timeout for FC */ - hrtimer_sec =1 ; - } + hrtimer_sec =ISOTP_FC_TIMEOUT ; -hrtimer_start (&so->txtimer,ktime_set (hrtimer_sec,0 ), -HRTIMER_MODE_REL_SOFT ); +/* no CF echo tag for isotp_rcv_echo() (FF-mode) */ + so->cfecho =0 ; + } } +hrtimer_start (&so->txtimer,ktime_set (hrtimer_sec,0 ), +HRTIMER_MODE_REL_SOFT ); +/* send the first or only CAN frame */ cf->flags = so->ll.tx_flags;
@@ -1068,8 +1074,7 @@ static int isotp_sendmsg(struct socket * __func__, ERR_PTR(err));/* no transmission -> no timeout monitoring */ -if (hrtimer_sec) -hrtimer_cancel (&so->txtimer); +hrtimer_cancel (&so->txtimer);/* reset consecutive frame echo tag */ so->cfecho =0 ;
Greg Kroah-Hartman
maintainerPATCH 164/190 can: rcar_canfd: Add missing ECC error checks for channels 2-7
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
commit 8b043dfb3dc7c32f9c2c0c93e3c2de346ee5e358 upstream.
When introducing support for R-Car V3U, which has 8 instead of 2 channels, the ECC error bitmask was extended to take into account the extra channels, but rcar_canfd_global_error() was not updated to act upon the extra bits.
Replace the RCANFD_GERFL_EEF[01] macros by a new macro that takes the channel number, fixing R-Car V3U while simplifying the code.
--- drivers/net/can/rcar/rcar_canfd.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)
drivers/net/can/rcar/rcar_canfd.c +4 -9
@@ -81,8 +81,7 @@ enum rcanfd_chip_id {/* RSCFDnCFDGERFL / RSCFDnGERFL */ #define RCANFD_GERFL_EEF0_7 GENMASK(23, 16) -#define RCANFD_GERFL_EEF1 BIT(17) -#define RCANFD_GERFL_EEF0 BIT(16) +#define RCANFD_GERFL_EEF (ch) BIT(16 + (ch))#define RCANFD_GERFL_CMPOF BIT(3)/* CAN FD only */ #define RCANFD_GERFL_THLES BIT(2)#define RCANFD_GERFL_MES BIT(1)
@@ -90,7 +89,7 @@ enum rcanfd_chip_id {#define RCANFD_GERFL_ERR (gpriv, x) \ ((x) & (reg_v3u(gpriv, RCANFD_GERFL_EEF0_7, \ - RCANFD_GERFL_EEF0 | RCANFD_GERFL_EEF1) | \ + RCANFD_GERFL_EEF(0) | RCANFD_GERFL_EEF(1)) | \ RCANFD_GERFL_MES | \ ((gpriv)->fdmode ? RCANFD_GERFL_CMPOF : 0)))
@@ -936,12 +935,8 @@ static void rcar_canfd_global_error(struu32 ridx = ch +RCANFD_RFFIFO_IDX ; gerfl =rcar_canfd_read (priv->base,RCANFD_GERFL ); -if ((gerfl &RCANFD_GERFL_EEF0 ) && (ch ==0 )) { -netdev_dbg (ndev,"Ch0: ECC Error flag\n" ); - stats->tx_dropped++; - } -if ((gerfl &RCANFD_GERFL_EEF1 ) && (ch ==1 )) { -netdev_dbg (ndev,"Ch1: ECC Error flag\n" ); +if (gerfl &RCANFD_GERFL_EEF (ch)) { +netdev_dbg (ndev,"Ch%u: ECC Error flag\n" , ch); stats->tx_dropped++; }if (gerfl &RCANFD_GERFL_MES ) {
Greg Kroah-Hartman
maintainerPATCH 165/190 KVM: x86/mmu: Block all page faults during kvm_zap_gfn_range()
In reply to Greg Kroah-HartmanFrom: Sean Christopherson <[email protected]>
commit 6d3085e4d89ad7e6c7f1c6cf929d903393565861 upstream.
When zapping a GFN range, pass 0 => ALL_ONES for the to-be-invalidated range to effectively block all page faults while the zap is in-progress. The invalidation helpers take a host virtual address, whereas zapping a GFN obviously provides a guest physical address and with the wrong unit of measurement (frame vs. byte).
Alternatively, KVM could walk all memslots to get the associated HVAs, but thanks to SMM, that would require multiple lookups. And practically speaking, kvm_zap_gfn_range() usage is quite rare and not a hot path, e.g. MTRR and CR0.CD are almost guaranteed to be done only on vCPU0 during boot, and APICv inhibits are similarly infrequent operations.
Message-Id: <[email protected]>
--- arch/x86/kvm/mmu/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kvm/mmu/mmu.c +2 -2
@@ -6044,7 +6044,7 @@ void kvm_zap_gfn_range(struct kvm *kvm,write_lock (&kvm->mmu_lock); -kvm_mmu_invalidate_begin (kvm, gfn_start, gfn_end); +kvm_mmu_invalidate_begin (kvm,0 ,-1ul ); flush =kvm_rmap_zap_gfn_range (kvm, gfn_start, gfn_end);
@@ -6058,7 +6058,7 @@ void kvm_zap_gfn_range(struct kvm *kvm,kvm_flush_remote_tlbs_with_address (kvm, gfn_start, gfn_end - gfn_start); -kvm_mmu_invalidate_end (kvm, gfn_start, gfn_end); +kvm_mmu_invalidate_end (kvm,0 ,-1ul );write_unlock (&kvm->mmu_lock); }
Greg Kroah-Hartman
maintainerPATCH 166/190 KVM: x86/pmu: Do not speculatively query Intel GP PMCs that dont exist yet
In reply to Greg Kroah-HartmanFrom: Like Xu <[email protected]>
commit 8631ef59b62290c7d88e7209e35dfb47f33f4902 upstream.
The SDM lists an architectural MSR IA32_CORE_CAPABILITIES (0xCF) that limits the theoretical maximum value of the Intel GP PMC MSRs allocated at 0xC1 to 14; likewise the Intel April 2022 SDM adds IA32_OVERCLOCKING_STATUS at 0x195 which limits the number of event selection MSRs to 15 (0x186-0x194).
Limiting the maximum number of counters to 14 or 18 based on the currently allocated MSRs is clearly fragile, and it seems likely that Intel will even place PMCs 8-15 at a completely different range of MSR indices. So stop at the maximum number of GP PMCs supported today on Intel processors.
There are some machines, like Intel P4 with non Architectural PMU, that may indeed have 18 counters, but those counters are in a completely different MSR address range and are not supported by KVM.
Message-Id: <[email protected]>
--- arch/x86/kvm/x86.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-)
arch/x86/kvm/x86.c +2 -12
@@ -1431,20 +1431,10 @@ static const u32 msrs_to_save_all[] = {MSR_ARCH_PERFMON_PERFCTR0 +2 ,MSR_ARCH_PERFMON_PERFCTR0 +3 ,MSR_ARCH_PERFMON_PERFCTR0 +4 ,MSR_ARCH_PERFMON_PERFCTR0 +5 ,MSR_ARCH_PERFMON_PERFCTR0 +6 ,MSR_ARCH_PERFMON_PERFCTR0 +7 , -MSR_ARCH_PERFMON_PERFCTR0 +8 ,MSR_ARCH_PERFMON_PERFCTR0 +9 , -MSR_ARCH_PERFMON_PERFCTR0 +10 ,MSR_ARCH_PERFMON_PERFCTR0 +11 , -MSR_ARCH_PERFMON_PERFCTR0 +12 ,MSR_ARCH_PERFMON_PERFCTR0 +13 , -MSR_ARCH_PERFMON_PERFCTR0 +14 ,MSR_ARCH_PERFMON_PERFCTR0 +15 , -MSR_ARCH_PERFMON_PERFCTR0 +16 ,MSR_ARCH_PERFMON_PERFCTR0 +17 ,MSR_ARCH_PERFMON_EVENTSEL0 ,MSR_ARCH_PERFMON_EVENTSEL1 ,MSR_ARCH_PERFMON_EVENTSEL0 +2 ,MSR_ARCH_PERFMON_EVENTSEL0 +3 ,MSR_ARCH_PERFMON_EVENTSEL0 +4 ,MSR_ARCH_PERFMON_EVENTSEL0 +5 ,MSR_ARCH_PERFMON_EVENTSEL0 +6 ,MSR_ARCH_PERFMON_EVENTSEL0 +7 , -MSR_ARCH_PERFMON_EVENTSEL0 +8 ,MSR_ARCH_PERFMON_EVENTSEL0 +9 , -MSR_ARCH_PERFMON_EVENTSEL0 +10 ,MSR_ARCH_PERFMON_EVENTSEL0 +11 , -MSR_ARCH_PERFMON_EVENTSEL0 +12 ,MSR_ARCH_PERFMON_EVENTSEL0 +13 , -MSR_ARCH_PERFMON_EVENTSEL0 +14 ,MSR_ARCH_PERFMON_EVENTSEL0 +15 , -MSR_ARCH_PERFMON_EVENTSEL0 +16 ,MSR_ARCH_PERFMON_EVENTSEL0 +17 ,MSR_IA32_PEBS_ENABLE ,MSR_IA32_DS_AREA ,MSR_PEBS_DATA_CFG , MSR_K7_EVNTSEL0, MSR_K7_EVNTSEL1, MSR_K7_EVNTSEL2, MSR_K7_EVNTSEL3,
@@ -7005,12 +6995,12 @@ static void kvm_init_msr_list(void) intel_pt_validate_hw_cap(PT_CAP_num_address_ranges) * 2)continue ;break ; - case MSR_ARCH_PERFMON_PERFCTR0 ... MSR_ARCH_PERFMON_PERFCTR0 + 17: + case MSR_ARCH_PERFMON_PERFCTR0 ... MSR_ARCH_PERFMON_PERFCTR0 + 7:if (msrs_to_save_all[i] -MSR_ARCH_PERFMON_PERFCTR0 >=min (INTEL_PMC_MAX_GENERIC , kvm_pmu_cap.num_counters_gp))continue ;break ; - case MSR_ARCH_PERFMON_EVENTSEL0 ... MSR_ARCH_PERFMON_EVENTSEL0 + 17: + case MSR_ARCH_PERFMON_EVENTSEL0 ... MSR_ARCH_PERFMON_EVENTSEL0 + 7:if (msrs_to_save_all[i] -MSR_ARCH_PERFMON_EVENTSEL0 >=min (INTEL_PMC_MAX_GENERIC , kvm_pmu_cap.num_counters_gp))continue ;
Greg Kroah-Hartman
maintainerPATCH 167/190 KVM: x86: use a separate asm-offsets.c file
In reply to Greg Kroah-HartmanFrom: Paolo Bonzini <[email protected]>
commit debc5a1ec0d195ffea70d11efeffb713de9fdbc7 upstream.
This already removes an ugly #include "" from asm-offsets.c, but especially it avoids a future error when trying to define asm-offsets for KVM's svm/svm.h header.
This would not work for kernel/asm-offsets.c, because svm/svm.h includes kvm_cache_regs.h which is not in the include path when compiling asm-offsets.c. The problem is not there if the .c file is in arch/x86/kvm.
--- arch/x86/kernel/asm-offsets.c | 6 ------ arch/x86/kvm/.gitignore | 2 ++ arch/x86/kvm/Makefile | 9 +++++++++ arch/x86/kvm/kvm-asm-offsets.c | 18 ++++++++++++++++++ arch/x86/kvm/vmx/vmenter.S | 2 +- 5 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 arch/x86/kvm/.gitignore create mode 100644 arch/x86/kvm/kvm-asm-offsets.c
arch/x86/kernel/asm-offsets.c +0 -6
@@ -19,7 +19,6 @@#include <asm/suspend.h> #include <asm/tlbflush.h> #include <asm/tdx.h> -#include "../kvm/vmx/vmx.h" #ifdef CONFIG_XEN #include <xen/interface/xen.h>
@@ -108,9 +107,4 @@ static void __used common(void)OFFSET (TSS_sp0, tss_struct, x86_tss.sp0);OFFSET (TSS_sp1, tss_struct, x86_tss.sp1);OFFSET (TSS_sp2, tss_struct, x86_tss.sp2); - -if (IS_ENABLED (CONFIG_KVM_INTEL )) { -BLANK (); -OFFSET (VMX_spec_ctrl, vcpu_vmx, spec_ctrl); - } }
arch/x86/kvm/.gitignore new file +2 -0
@@ -0,0 +1,2 @@ +/kvm-asm-offsets.s +/kvm-asm-offsets.h
arch/x86/kvm/Makefile +9 -0
@@ -34,3 +34,12 @@ endif obj-$(CONFIG_KVM) += kvm.o obj-$(CONFIG_KVM_INTEL) += kvm-intel.o obj-$(CONFIG_KVM_AMD) += kvm-amd.o + +AFLAGS_vmx/vmenter.o := -iquote $(obj) +$(obj)/vmx/vmenter.o: $(obj)/kvm-asm-offsets.h + +$(obj)/kvm-asm-offsets.h: $(obj)/kvm-asm-offsets.s FORCE + $(call filechk,offsets,__KVM_ASM_OFFSETS_H__) + +targets += kvm-asm-offsets.s +clean-files += kvm-asm-offsets.h
arch/x86/kvm/kvm-asm-offsets.c new file +18 -0
@@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Generate definitions needed by assembly language modules. +* This code generates raw asm output which is post-processed to extract +* and format the required data. +*/ +#define COMPILE_OFFSETS + +#include <linux/kbuild.h> +#include "vmx/vmx.h" + +static void __used common (void ) +{ +if (IS_ENABLED (CONFIG_KVM_INTEL )) { +BLANK (); +OFFSET (VMX_spec_ctrl, vcpu_vmx, spec_ctrl); + } +}
arch/x86/kvm/vmx/vmenter.S +1 -1
@@ -1,12 +1,12 @@ /* SPDX-License-Identifier: GPL-2.0 */ #include <linux/linkage.h> #include <asm/asm.h> -#include <asm/asm-offsets.h> #include <asm/bitsperlong.h> #include <asm/kvm_vcpu_regs.h> #include <asm/nospec-branch.h> #include <asm/percpu.h> #include <asm/segment.h> +#include "kvm-asm-offsets.h" #include "run_flags.h" #define WORD_SIZE (BITS_PER_LONG / 8)
Greg Kroah-Hartman
maintainerPATCH 168/190 KVM: SVM: replace regs argument of __svm_vcpu_run() with vcpu_svm
In reply to Greg Kroah-HartmanFrom: Paolo Bonzini <[email protected]>
commit 16fdc1de169ee0a4e59a8c02244414ec7acd55c3 upstream.
Since registers are reachable through vcpu_svm, and we will need to access more fields of that struct, pass it instead of the regs[] array.
No functional change intended.
--- arch/x86/kvm/Makefile | 3 +++ arch/x86/kvm/kvm-asm-offsets.c | 6 ++++++ arch/x86/kvm/svm/svm.c | 2 +- arch/x86/kvm/svm/svm.h | 2 +- arch/x86/kvm/svm/vmenter.S | 37 +++++++++++++++++++------------------ 5 files changed, 30 insertions(+), 20 deletions(-)
arch/x86/kvm/Makefile +3 -0
@@ -35,6 +35,9 @@ obj-$(CONFIG_KVM) += kvm.o obj-$(CONFIG_KVM_INTEL) += kvm-intel.o obj-$(CONFIG_KVM_AMD) += kvm-amd.o +AFLAGS_svm/vmenter.o := -iquote $(obj) +$(obj)/svm/vmenter.o: $(obj)/kvm-asm-offsets.h + AFLAGS_vmx/vmenter.o := -iquote $(obj) $(obj)/vmx/vmenter.o: $(obj)/kvm-asm-offsets.h
arch/x86/kvm/kvm-asm-offsets.c +6 -0
@@ -8,9 +8,15 @@#include <linux/kbuild.h> #include "vmx/vmx.h" +#include "svm/svm.h" static void __used common (void ) { +if (IS_ENABLED (CONFIG_KVM_AMD )) { +BLANK (); +OFFSET (SVM_vcpu_arch_regs, vcpu_svm, vcpu.arch.regs); + } +if (IS_ENABLED (CONFIG_KVM_INTEL )) {BLANK ();OFFSET (VMX_spec_ctrl, vcpu_vmx, spec_ctrl);
arch/x86/kvm/svm/svm.c +1 -1
@@ -3931,7 +3931,7 @@ static noinstr void svm_vcpu_enter_exit(* vmcb02 when switching vmcbs for nested virtualization. */ vmload (svm->vmcb01.pa); -__svm_vcpu_run (vmcb_pa, (unsigned long *)&vcpu->arch.regs); +__svm_vcpu_run (vmcb_pa, svm);vmsave (svm->vmcb01.pa);vmload (__sme_page_pa (sd->save_area));
arch/x86/kvm/svm/svm.h +1 -1
@@ -684,6 +684,6 @@ void sev_es_unmap_ghcb(struct vcpu_svm */* vmenter.S */ void __svm_sev_es_vcpu_run (unsigned long vmcb_pa); -void __svm_vcpu_run (unsigned long vmcb_pa,unsigned long *regs); +void __svm_vcpu_run (unsigned long vmcb_pa,struct vcpu_svm *svm);#endif
arch/x86/kvm/svm/vmenter.S +19 -18
@@ -4,27 +4,28 @@ #include <asm/bitsperlong.h> #include <asm/kvm_vcpu_regs.h> #include <asm/nospec-branch.h> +#include "kvm-asm-offsets.h" #define WORD_SIZE (BITS_PER_LONG / 8) /* Intentionally omit RAX as it's context switched by hardware */ -#define VCPU_RCX __VCPU_REGS_RCX * WORD_SIZE -#define VCPU_RDX __VCPU_REGS_RDX * WORD_SIZE -#define VCPU_RBX __VCPU_REGS_RBX * WORD_SIZE +#define VCPU_RCX (SVM_vcpu_arch_regs + __VCPU_REGS_RCX * WORD_SIZE) +#define VCPU_RDX (SVM_vcpu_arch_regs + __VCPU_REGS_RDX * WORD_SIZE) +#define VCPU_RBX (SVM_vcpu_arch_regs + __VCPU_REGS_RBX * WORD_SIZE) /* Intentionally omit RSP as it's context switched by hardware */ -#define VCPU_RBP __VCPU_REGS_RBP * WORD_SIZE -#define VCPU_RSI __VCPU_REGS_RSI * WORD_SIZE -#define VCPU_RDI __VCPU_REGS_RDI * WORD_SIZE +#define VCPU_RBP (SVM_vcpu_arch_regs + __VCPU_REGS_RBP * WORD_SIZE) +#define VCPU_RSI (SVM_vcpu_arch_regs + __VCPU_REGS_RSI * WORD_SIZE) +#define VCPU_RDI (SVM_vcpu_arch_regs + __VCPU_REGS_RDI * WORD_SIZE) #ifdef CONFIG_X86_64 -#define VCPU_R8 __VCPU_REGS_R8 * WORD_SIZE -#define VCPU_R9 __VCPU_REGS_R9 * WORD_SIZE -#define VCPU_R10 __VCPU_REGS_R10 * WORD_SIZE -#define VCPU_R11 __VCPU_REGS_R11 * WORD_SIZE -#define VCPU_R12 __VCPU_REGS_R12 * WORD_SIZE -#define VCPU_R13 __VCPU_REGS_R13 * WORD_SIZE -#define VCPU_R14 __VCPU_REGS_R14 * WORD_SIZE -#define VCPU_R15 __VCPU_REGS_R15 * WORD_SIZE +#define VCPU_R8 (SVM_vcpu_arch_regs + __VCPU_REGS_R8 * WORD_SIZE) +#define VCPU_R9 (SVM_vcpu_arch_regs + __VCPU_REGS_R9 * WORD_SIZE) +#define VCPU_R10 (SVM_vcpu_arch_regs + __VCPU_REGS_R10 * WORD_SIZE) +#define VCPU_R11 (SVM_vcpu_arch_regs + __VCPU_REGS_R11 * WORD_SIZE) +#define VCPU_R12 (SVM_vcpu_arch_regs + __VCPU_REGS_R12 * WORD_SIZE) +#define VCPU_R13 (SVM_vcpu_arch_regs + __VCPU_REGS_R13 * WORD_SIZE) +#define VCPU_R14 (SVM_vcpu_arch_regs + __VCPU_REGS_R14 * WORD_SIZE) +#define VCPU_R15 (SVM_vcpu_arch_regs + __VCPU_REGS_R15 * WORD_SIZE) #endif .section .noinstr.text, "ax"
@@ -32,7 +33,7 @@ /** * __svm_vcpu_run - Run a vCPU via a transition to SVM guest mode * @vmcb_pa: unsigned long - * @regs: unsigned long * (to guest registers) + * @svm: struct vcpu_svm * */ SYM_FUNC_START(__svm_vcpu_run) push %_ASM_BP
@@ -47,13 +48,13 @@ SYM_FUNC_START(__svm_vcpu_run) #endif push %_ASM_BX - /* Save @regs. */ + /* Save @svm. */ push %_ASM_ARG2 /* Save @vmcb. */ push %_ASM_ARG1 - /* Move @regs to RAX. */ + /* Move @svm to RAX. */ mov %_ASM_ARG2, %_ASM_AX /* Load guest registers. */
@@ -89,7 +90,7 @@ SYM_FUNC_START(__svm_vcpu_run) FILL_RETURN_BUFFER %_ASM_AX, RSB_CLEAR_LOOPS, X86_FEATURE_RETPOLINE #endif - /* "POP" @regs to RAX. */ + /* "POP" @svm to RAX. */ pop %_ASM_AX /* Save all guest registers. */
Greg Kroah-Hartman
maintainerPATCH 169/190 KVM: SVM: adjust register allocation for __svm_vcpu_run()
In reply to Greg Kroah-HartmanFrom: Paolo Bonzini <[email protected]>
commit f7ef280132f9bf6f82acf5aa5c3c837206eef501 upstream.
32-bit ABI uses RAX/RCX/RDX as its argument registers, so they are in the way of instructions that hardcode their operands such as RDMSR/WRMSR or VMLOAD/VMRUN/VMSAVE.
In preparation for moving vmload/vmsave to __svm_vcpu_run(), keep the pointer to the struct vcpu_svm in %rdi. In particular, it is now possible to load svm->vmcb01.pa in %rax without clobbering the struct vcpu_svm pointer.
No functional change intended.
--- arch/x86/kvm/svm/vmenter.S | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-)
arch/x86/kvm/svm/vmenter.S +19 -19
@@ -54,29 +54,29 @@ SYM_FUNC_START(__svm_vcpu_run) /* Save @vmcb. */ push %_ASM_ARG1 - /* Move @svm to RAX. */ - mov %_ASM_ARG2, %_ASM_AX + /* Move @svm to RDI. */ + mov %_ASM_ARG2, %_ASM_DI + + /* "POP" @vmcb to RAX. */ + pop %_ASM_AX /* Load guest registers. */ - mov VCPU_RCX(%_ASM_AX), %_ASM_CX - mov VCPU_RDX(%_ASM_AX), %_ASM_DX - mov VCPU_RBX(%_ASM_AX), %_ASM_BX - mov VCPU_RBP(%_ASM_AX), %_ASM_BP - mov VCPU_RSI(%_ASM_AX), %_ASM_SI - mov VCPU_RDI(%_ASM_AX), %_ASM_DI + mov VCPU_RCX(%_ASM_DI), %_ASM_CX + mov VCPU_RDX(%_ASM_DI), %_ASM_DX + mov VCPU_RBX(%_ASM_DI), %_ASM_BX + mov VCPU_RBP(%_ASM_DI), %_ASM_BP + mov VCPU_RSI(%_ASM_DI), %_ASM_SI #ifdef CONFIG_X86_64 - mov VCPU_R8 (%_ASM_AX), %r8 - mov VCPU_R9 (%_ASM_AX), %r9 - mov VCPU_R10(%_ASM_AX), %r10 - mov VCPU_R11(%_ASM_AX), %r11 - mov VCPU_R12(%_ASM_AX), %r12 - mov VCPU_R13(%_ASM_AX), %r13 - mov VCPU_R14(%_ASM_AX), %r14 - mov VCPU_R15(%_ASM_AX), %r15 + mov VCPU_R8 (%_ASM_DI), %r8 + mov VCPU_R9 (%_ASM_DI), %r9 + mov VCPU_R10(%_ASM_DI), %r10 + mov VCPU_R11(%_ASM_DI), %r11 + mov VCPU_R12(%_ASM_DI), %r12 + mov VCPU_R13(%_ASM_DI), %r13 + mov VCPU_R14(%_ASM_DI), %r14 + mov VCPU_R15(%_ASM_DI), %r15 #endif - - /* "POP" @vmcb to RAX. */ - pop %_ASM_AX + mov VCPU_RDI(%_ASM_DI), %_ASM_DI /* Enter guest mode */ sti
Greg Kroah-Hartman
maintainerPATCH 170/190 KVM: SVM: Only dump VMSA to klog at KERN_DEBUG level
In reply to Greg Kroah-HartmanFrom: Peter Gonda <[email protected]>
commit 0bd8bd2f7a789fe1dcb21ad148199d2f62d79873 upstream.
Explicitly print the VMSA dump at KERN_DEBUG log level, KERN_CONT uses KERNEL_DEFAULT if the previous log line has a newline, i.e. if there's nothing to continuing, and as a result the VMSA gets dumped when it shouldn't.
The KERN_CONT documentation says it defaults back to KERNL_DEFAULT if the previous log line has a newline. So switch from KERN_CONT to print_hex_dump_debug().
Jarkko pointed this out in reference to the original patch. See:
https://lore.kernel.org/all/[email protected]/print_hex_dump(KERN_DEBUG, ...) was pointed out there, but print_hex_dump_debug() should similar.
Message-Id: <[email protected]>
--- arch/x86/kvm/svm/sev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/svm/sev.c +1 -1
@@ -605,7 +605,7 @@ static int sev_es_sync_vmsa(struct vcpu_ save->dr6 = svm->vcpu.arch.dr6;pr_debug ("Virtual Machine Save Area (VMSA):\n" ); -print_hex_dump (KERN_CONT ,"" ,DUMP_PREFIX_NONE ,16 ,1 , save,sizeof (*save), false); +print_hex_dump_debug ("" ,DUMP_PREFIX_NONE ,16 ,1 , save,sizeof (*save), false);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 171/190 KVM: SVM: retrieve VMCB from assembly
In reply to Greg Kroah-HartmanFrom: Paolo Bonzini <[email protected]>
commit f6d58266d731fd7e63163790aad21e0dbb1d5264 upstream.
Continue moving accesses to struct vcpu_svm to vmenter.S. Reducing the number of arguments limits the chance of mistakes due to different registers used for argument passing in 32- and 64-bit ABIs; pushing the VMCB argument and almost immediately popping it into a different register looks pretty weird.
32-bit ABI is not a concern for __svm_sev_es_vcpu_run() which is 64-bit only; however, it will soon need @svm to save/restore SPEC_CTRL so stay consistent with __svm_vcpu_run() and let them share the same prototype.
No functional change intended.
--- arch/x86/kvm/kvm-asm-offsets.c | 2 ++ arch/x86/kvm/svm/svm.c | 5 ++--- arch/x86/kvm/svm/svm.h | 4 ++-- arch/x86/kvm/svm/vmenter.S | 20 ++++++++++---------- 4 files changed, 16 insertions(+), 15 deletions(-)
arch/x86/kvm/kvm-asm-offsets.c +2 -0
@@ -15,6 +15,8 @@ static void __used common(void)if (IS_ENABLED (CONFIG_KVM_AMD )) {BLANK ();OFFSET (SVM_vcpu_arch_regs, vcpu_svm, vcpu.arch.regs); +OFFSET (SVM_current_vmcb, vcpu_svm, current_vmcb); +OFFSET (KVM_VMCB_pa, kvm_vmcb_info, pa); }if (IS_ENABLED (CONFIG_KVM_INTEL )) {
arch/x86/kvm/svm/svm.c +2 -3
@@ -3915,12 +3915,11 @@ static fastpath_t svm_exit_handlers_fast static noinstr void svm_vcpu_enter_exit(struct kvm_vcpu *vcpu) {struct vcpu_svm *svm =to_svm (vcpu); -unsigned long vmcb_pa = svm->current_vmcb->pa;guest_state_enter_irqoff ();if (sev_es_guest (vcpu->kvm)) { -__svm_sev_es_vcpu_run (vmcb_pa); +__svm_sev_es_vcpu_run (svm); }else {struct svm_cpu_data *sd =per_cpu (svm_data, vcpu->cpu);
@@ -3931,7 +3930,7 @@ static noinstr void svm_vcpu_enter_exit(* vmcb02 when switching vmcbs for nested virtualization. */ vmload (svm->vmcb01.pa); -__svm_vcpu_run (vmcb_pa, svm); +__svm_vcpu_run (svm);vmsave (svm->vmcb01.pa);vmload (__sme_page_pa (sd->save_area));
arch/x86/kvm/svm/svm.h +2 -2
@@ -683,7 +683,7 @@ void sev_es_unmap_ghcb(struct vcpu_svm */* vmenter.S */ -void __svm_sev_es_vcpu_run (unsigned long vmcb_pa); -void __svm_vcpu_run (unsigned long vmcb_pa,struct vcpu_svm *svm); +void __svm_sev_es_vcpu_run (struct vcpu_svm *svm); +void __svm_vcpu_run (struct vcpu_svm *svm);#endif
arch/x86/kvm/svm/vmenter.S +10 -10
@@ -32,7 +32,6 @@ /** * __svm_vcpu_run - Run a vCPU via a transition to SVM guest mode - * @vmcb_pa: unsigned long * @svm: struct vcpu_svm * */ SYM_FUNC_START(__svm_vcpu_run)
@@ -49,16 +48,16 @@ SYM_FUNC_START(__svm_vcpu_run) push %_ASM_BX /* Save @svm. */ - push %_ASM_ARG2 - - /* Save @vmcb. */ push %_ASM_ARG1 +.ifnc _ASM_ARG1, _ASM_DI /* Move @svm to RDI. */ - mov %_ASM_ARG2, %_ASM_DI + mov %_ASM_ARG1, %_ASM_DI +.endif - /* "POP" @vmcb to RAX. */ - pop %_ASM_AX + /* Get svm->current_vmcb->pa into RAX. */ + mov SVM_current_vmcb(%_ASM_DI), %_ASM_AX + mov KVM_VMCB_pa(%_ASM_AX), %_ASM_AX /* Load guest registers. */ mov VCPU_RCX(%_ASM_DI), %_ASM_CX
@@ -170,7 +169,7 @@ SYM_FUNC_END(__svm_vcpu_run) /** * __svm_sev_es_vcpu_run - Run a SEV-ES vCPU via a transition to SVM guest mode - * @vmcb_pa: unsigned long + * @svm: struct vcpu_svm * */ SYM_FUNC_START(__svm_sev_es_vcpu_run) push %_ASM_BP
@@ -185,8 +184,9 @@ SYM_FUNC_START(__svm_sev_es_vcpu_run) #endif push %_ASM_BX - /* Move @vmcb to RAX. */ - mov %_ASM_ARG1, %_ASM_AX + /* Get svm->current_vmcb->pa into RAX. */ + mov SVM_current_vmcb(%_ASM_ARG1), %_ASM_AX + mov KVM_VMCB_pa(%_ASM_AX), %_ASM_AX /* Enter guest mode */ sti
Greg Kroah-Hartman
maintainerPATCH 172/190 KVM: SVM: move guest vmsave/vmload back to assembly
In reply to Greg Kroah-HartmanFrom: Paolo Bonzini <[email protected]>
commit e61ab42de874c5af8c5d98b327c77a374d9e7da1 upstream.
It is error-prone that code after vmexit cannot access percpu data because GSBASE has not been restored yet. It forces MSR_IA32_SPEC_CTRL save/restore to happen very late, after the predictor untraining sequence, and it gets in the way of return stack depth tracking (a retbleed mitigation that is in linux-next as of 2022-11-09).
As a first step towards fixing that, move the VMCB VMSAVE/VMLOAD to assembly, essentially undoing commit fb0c4a4fee5a ("KVM: SVM: move VMLOAD/VMSAVE to C code", 2021-03-15). The reason for that commit was that it made it simpler to use a different VMCB for VMLOAD/VMSAVE versus VMRUN; but that is not a big hassle anymore thanks to the kvm-asm-offsets machinery and other related cleanups.
The idea on how to number the exception tables is stolen from a prototype patch by Peter Zijlstra.
--- arch/x86/kvm/kvm-asm-offsets.c | 1 arch/x86/kvm/svm/svm.c | 9 ------- arch/x86/kvm/svm/vmenter.S | 49 +++++++++++++++++++++++++++++++---------- 3 files changed, 39 insertions(+), 20 deletions(-)
arch/x86/kvm/kvm-asm-offsets.c +1 -0
@@ -16,6 +16,7 @@ static void __used common(void)BLANK ();OFFSET (SVM_vcpu_arch_regs, vcpu_svm, vcpu.arch.regs);OFFSET (SVM_current_vmcb, vcpu_svm, current_vmcb); +OFFSET (SVM_vmcb01, vcpu_svm, vmcb01);OFFSET (KVM_VMCB_pa, kvm_vmcb_info, pa); }
arch/x86/kvm/svm/svm.c +0 -9
@@ -3923,16 +3923,7 @@ static noinstr void svm_vcpu_enter_exit( }else {struct svm_cpu_data *sd =per_cpu (svm_data, vcpu->cpu); -/* -* Use a single vmcb (vmcb01 because it's always valid) for -* context switching guest state via VMLOAD/VMSAVE, that way -* the state doesn't need to be copied between vmcb01 and -* vmcb02 when switching vmcbs for nested virtualization. -*/ -vmload (svm->vmcb01.pa);__svm_vcpu_run (svm); -vmsave (svm->vmcb01.pa); -vmload (__sme_page_pa (sd->save_area)); }
arch/x86/kvm/svm/vmenter.S +38 -11
83 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 173/190 can: dev: fix skb drop check
In reply to Greg Kroah-HartmanFrom: Oliver Hartkopp <[email protected]>
commit ae64438be1923e3c1102d90fd41db7afcfaf54cc upstream.
In commit a6d190f8c767 ("can: skb: drop tx skb if in listen only mode") the priv->ctrlmode element is read even on virtual CAN interfaces that do not create the struct can_priv at startup. This out-of-bounds read may lead to CAN frame drops for virtual CAN interfaces like vcan and vxcan.
This patch mainly reverts the original commit and adds a new helper for CAN interface drivers that provide the required information in struct can_priv.
--- drivers/net/can/at91_can.c | 2 +- drivers/net/can/c_can/c_can_main.c | 2 +- drivers/net/can/can327.c | 2 +- drivers/net/can/cc770/cc770.c | 2 +- drivers/net/can/ctucanfd/ctucanfd_base.c | 2 +- drivers/net/can/dev/skb.c | 9 +-------- drivers/net/can/flexcan/flexcan-core.c | 2 +- drivers/net/can/grcan.c | 2 +- drivers/net/can/ifi_canfd/ifi_canfd.c | 2 +- drivers/net/can/janz-ican3.c | 2 +- drivers/net/can/kvaser_pciefd.c | 2 +- drivers/net/can/m_can/m_can.c | 2 +- drivers/net/can/mscan/mscan.c | 2 +- drivers/net/can/pch_can.c | 2 +- drivers/net/can/peak_canfd/peak_canfd.c | 2 +- drivers/net/can/rcar/rcar_can.c | 2 +- drivers/net/can/rcar/rcar_canfd.c | 2 +- drivers/net/can/sja1000/sja1000.c | 2 +- drivers/net/can/slcan/slcan-core.c | 2 +- drivers/net/can/softing/softing_main.c | 2 +- drivers/net/can/spi/hi311x.c | 2 +- drivers/net/can/spi/mcp251x.c | 2 +- drivers/net/can/spi/mcp251xfd/mcp251xfd-tx.c | 2 +- drivers/net/can/sun4i_can.c | 2 +- drivers/net/can/ti_hecc.c | 2 +- drivers/net/can/usb/ems_usb.c | 2 +- drivers/net/can/usb/esd_usb.c | 2 +- drivers/net/can/usb/etas_es58x/es58x_core.c | 2 +- drivers/net/can/usb/gs_usb.c | 2 +- drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 2 +- drivers/net/can/usb/mcba_usb.c | 2 +- drivers/net/can/usb/peak_usb/pcan_usb_core.c | 2 +- drivers/net/can/usb/ucan.c | 2 +- drivers/net/can/usb/usb_8dev.c | 2 +- drivers/net/can/xilinx_can.c | 2 +- include/linux/can/dev.h | 16 ++++++++++++++++ 36 files changed, 51 insertions(+), 42 deletions(-)
drivers/net/can/at91_can.c +1 -1
@@ -452,7 +452,7 @@ static netdev_tx_t at91_start_xmit(strucunsigned int mb, prio;u32 reg_mid, reg_mcr; -if (can_dropped_invalid_skb (dev, skb)) +if (can_dev_dropped_skb (dev, skb))return NETDEV_TX_OK ; mb =get_tx_next_mb (priv);
drivers/net/can/c_can/c_can_main.c +1 -1
@@ -457,7 +457,7 @@ static netdev_tx_t c_can_start_xmit(strustruct c_can_tx_ring *tx_ring = &priv->tx;u32 idx, obj, cmd =IF_COMM_TX ; -if (can_dropped_invalid_skb (dev, skb)) +if (can_dev_dropped_skb (dev, skb))return NETDEV_TX_OK ;if (c_can_tx_busy (priv, tx_ring))
drivers/net/can/can327.c +1 -1
@@ -813,7 +813,7 @@ static netdev_tx_t can327_netdev_start_xstruct can327 *elm =netdev_priv (dev);struct can_frame *frame = (struct can_frame *)skb->data; -if (can_dropped_invalid_skb (dev, skb)) +if (can_dev_dropped_skb (dev, skb))return NETDEV_TX_OK ;/* We shouldn't get here after a hardware fault:
drivers/net/can/cc770/cc770.c +1 -1
@@ -429,7 +429,7 @@ static netdev_tx_t cc770_start_xmit(strustruct cc770_priv *priv =netdev_priv (dev);unsigned int mo =obj2msgobj (CC770_OBJ_TX ); -if (can_dropped_invalid_skb (dev, skb)) +if (can_dev_dropped_skb (dev, skb))return NETDEV_TX_OK ;netif_stop_queue (dev);
drivers/net/can/ctucanfd/ctucanfd_base.c +1 -1
@@ -600,7 +600,7 @@ static netdev_tx_t ctucan_start_xmit(strbool ok;unsigned long flags; -if (can_dropped_invalid_skb (ndev, skb)) +if (can_dev_dropped_skb (ndev, skb))return NETDEV_TX_OK ;if (unlikely (!CTU_CAN_FD_TXTNF (priv))) {
drivers/net/can/dev/skb.c +1 -8
@@ -5,7 +5,6 @@*/ #include <linux/can/dev.h> -#include <linux/can/netlink.h> #include <linux/module.h> #define MOD_DESC "CAN device driver interface"
@@ -300,7 +299,6 @@ static bool can_skb_headroom_valid(strucbool can_dropped_invalid_skb (struct net_device *dev,struct sk_buff *skb) {const struct canfd_frame *cfd = (struct canfd_frame *)skb->data; -struct can_priv *priv =netdev_priv (dev);if (skb->protocol ==htons (ETH_P_CAN )) { if (unlikely(skb->len != CAN_MTU ||
@@ -314,13 +312,8 @@ bool can_dropped_invalid_skb(struct net_ goto inval_skb; } -if (!can_skb_headroom_valid (dev, skb)) { - goto inval_skb; - }else if (priv->ctrlmode &CAN_CTRLMODE_LISTENONLY ) { -netdev_info_once (dev, -"interface in listen only mode, dropping skb\n" ); +if (!can_skb_headroom_valid (dev, skb)) goto inval_skb; - }return false;
drivers/net/can/flexcan/flexcan-core.c +1 -1
@@ -742,7 +742,7 @@ static netdev_tx_t flexcan_start_xmit(stu32 ctrl =FLEXCAN_MB_CODE_TX_DATA | ((can_fd_len2dlc (cfd->len)) <<16 );int i; -if (can_dropped_invalid_skb (dev, skb)) +if (can_dev_dropped_skb (dev, skb))return NETDEV_TX_OK ;netif_stop_queue (dev);
drivers/net/can/grcan.c +1 -1
@@ -1345,7 +1345,7 @@ static netdev_tx_t grcan_start_xmit(struunsigned long flags;u32 oneshotmode = priv->can.ctrlmode &CAN_CTRLMODE_ONE_SHOT ; -if (can_dropped_invalid_skb (dev, skb)) +if (can_dev_dropped_skb (dev, skb))return NETDEV_TX_OK ;/* Trying to transmit in silent mode will generate error interrupts, but
drivers/net/can/ifi_canfd/ifi_canfd.c +1 -1
@@ -860,7 +860,7 @@ static netdev_tx_t ifi_canfd_start_xmit(u32 txst, txid, txdlc;int i; -if (can_dropped_invalid_skb (ndev, skb)) +if (can_dev_dropped_skb (ndev, skb))return NETDEV_TX_OK ;/* Check if the TX buffer is full */
drivers/net/can/janz-ican3.c +1 -1
@@ -1693,7 +1693,7 @@ static netdev_tx_t ican3_xmit(struct sk_void __iomem *desc_addr;unsigned long flags; -if (can_dropped_invalid_skb (ndev, skb)) +if (can_dev_dropped_skb (ndev, skb))return NETDEV_TX_OK ;spin_lock_irqsave (&mod->lock, flags);
drivers/net/can/kvaser_pciefd.c +1 -1
@@ -775,7 +775,7 @@ static netdev_tx_t kvaser_pciefd_start_xint nwords;u8 count; -if (can_dropped_invalid_skb (netdev, skb)) +if (can_dev_dropped_skb (netdev, skb))return NETDEV_TX_OK ; nwords =kvaser_pciefd_prepare_tx_packet (&packet, can, skb);
drivers/net/can/m_can/m_can.c +1 -1
@@ -1722,7 +1722,7 @@ static netdev_tx_t m_can_start_xmit(stru {struct m_can_classdev *cdev =netdev_priv (dev); -if (can_dropped_invalid_skb (dev, skb)) +if (can_dev_dropped_skb (dev, skb))return NETDEV_TX_OK ;if (cdev->is_peripheral) {
drivers/net/can/mscan/mscan.c +1 -1
@@ -191,7 +191,7 @@ static netdev_tx_t mscan_start_xmit(struint i, rtr, buf_id;u32 can_id; -if (can_dropped_invalid_skb (dev, skb)) +if (can_dev_dropped_skb (dev, skb))return NETDEV_TX_OK ;out_8 (®s->cantier,0 );
drivers/net/can/pch_can.c +1 -1
@@ -882,7 +882,7 @@ static netdev_tx_t pch_xmit(struct sk_buint i;u32 id2; -if (can_dropped_invalid_skb (ndev, skb)) +if (can_dev_dropped_skb (ndev, skb))return NETDEV_TX_OK ; tx_obj_no = priv->tx_obj;
drivers/net/can/peak_canfd/peak_canfd.c +1 -1
@@ -651,7 +651,7 @@ static netdev_tx_t peak_canfd_start_xmitint room_left;u8 len; -if (can_dropped_invalid_skb (ndev, skb)) +if (can_dev_dropped_skb (ndev, skb))return NETDEV_TX_OK ; msg_size =ALIGN (sizeof (*msg) + cf->len,4 );
drivers/net/can/rcar/rcar_can.c +1 -1
@@ -590,7 +590,7 @@ static netdev_tx_t rcar_can_start_xmit(sstruct can_frame *cf = (struct can_frame *)skb->data;u32 data, i; -if (can_dropped_invalid_skb (ndev, skb)) +if (can_dev_dropped_skb (ndev, skb))return NETDEV_TX_OK ;if (cf->can_id &CAN_EFF_FLAG )/* Extended frame format */
drivers/net/can/rcar/rcar_canfd.c +1 -1
@@ -1476,7 +1476,7 @@ static netdev_tx_t rcar_canfd_start_xmitunsigned long flags;u32 ch = priv->channel; -if (can_dropped_invalid_skb (ndev, skb)) +if (can_dev_dropped_skb (ndev, skb))return NETDEV_TX_OK ;if (cf->can_id &CAN_EFF_FLAG ) {
drivers/net/can/sja1000/sja1000.c +1 -1
@@ -291,7 +291,7 @@ static netdev_tx_t sja1000_start_xmit(stu8 cmd_reg_val =0x00 ;int i; -if (can_dropped_invalid_skb (dev, skb)) +if (can_dev_dropped_skb (dev, skb))return NETDEV_TX_OK ;netif_stop_queue (dev);
drivers/net/can/slcan/slcan-core.c +1 -1
@@ -594,7 +594,7 @@ static netdev_tx_t slcan_netdev_xmit(str {struct slcan *sl =netdev_priv (dev); -if (can_dropped_invalid_skb (dev, skb)) +if (can_dev_dropped_skb (dev, skb))return NETDEV_TX_OK ;spin_lock (&sl->lock);
drivers/net/can/softing/softing_main.c +1 -1
@@ -60,7 +60,7 @@ static netdev_tx_t softing_netdev_start_struct can_frame *cf = (struct can_frame *)skb->data;uint8_t buf[DPRAM_TX_SIZE ]; -if (can_dropped_invalid_skb (dev, skb)) +if (can_dev_dropped_skb (dev, skb))return NETDEV_TX_OK ;spin_lock (&card->spin);
drivers/net/can/spi/hi311x.c +1 -1
@@ -373,7 +373,7 @@ static netdev_tx_t hi3110_hard_start_xmireturn NETDEV_TX_BUSY ; } -if (can_dropped_invalid_skb (net, skb)) +if (can_dev_dropped_skb (net, skb))return NETDEV_TX_OK ;netif_stop_queue (net);
drivers/net/can/spi/mcp251x.c +1 -1
@@ -789,7 +789,7 @@ static netdev_tx_t mcp251x_hard_start_xmreturn NETDEV_TX_BUSY ; } -if (can_dropped_invalid_skb (net, skb)) +if (can_dev_dropped_skb (net, skb))return NETDEV_TX_OK ;netif_stop_queue (net);
drivers/net/can/spi/mcp251xfd/mcp251xfd-tx.c +1 -1
@@ -172,7 +172,7 @@ netdev_tx_t mcp251xfd_start_xmit(structu8 tx_head;int err; -if (can_dropped_invalid_skb (ndev, skb)) +if (can_dev_dropped_skb (ndev, skb))return NETDEV_TX_OK ;if (mcp251xfd_tx_busy (priv, tx_ring))
drivers/net/can/sun4i_can.c +1 -1
@@ -429,7 +429,7 @@ static netdev_tx_t sun4ican_start_xmit(scanid_t id;int i; -if (can_dropped_invalid_skb (dev, skb)) +if (can_dev_dropped_skb (dev, skb))return NETDEV_TX_OK ;netif_stop_queue (dev);
drivers/net/can/ti_hecc.c +1 -1
@@ -470,7 +470,7 @@ static netdev_tx_t ti_hecc_xmit(struct su32 mbxno, mbx_mask, data;unsigned long flags; -if (can_dropped_invalid_skb (ndev, skb)) +if (can_dev_dropped_skb (ndev, skb))return NETDEV_TX_OK ; mbxno =get_tx_head_mb (priv);
drivers/net/can/usb/ems_usb.c +1 -1
@@ -747,7 +747,7 @@ static netdev_tx_t ems_usb_start_xmit(stsize_t size =CPC_HEADER_SIZE +CPC_MSG_HEADER_LEN +sizeof (struct cpc_can_msg ); -if (can_dropped_invalid_skb (netdev, skb)) +if (can_dev_dropped_skb (netdev, skb))return NETDEV_TX_OK ;/* create a URB, and a buffer for it, and copy the data to the URB */
drivers/net/can/usb/esd_usb.c +1 -1
@@ -725,7 +725,7 @@ static netdev_tx_t esd_usb_start_xmit(stint ret =NETDEV_TX_OK ;size_t size =sizeof (struct esd_usb_msg ); -if (can_dropped_invalid_skb (netdev, skb)) +if (can_dev_dropped_skb (netdev, skb))return NETDEV_TX_OK ;/* create a URB, and a buffer for it, and copy the data to the URB */
drivers/net/can/usb/etas_es58x/es58x_core.c +1 -1
@@ -1913,7 +1913,7 @@ static netdev_tx_t es58x_start_xmit(struunsigned int frame_len;int ret; -if (can_dropped_invalid_skb (netdev, skb)) { +if (can_dev_dropped_skb (netdev, skb)) {if (priv->tx_urb) goto xmit_commit;return NETDEV_TX_OK ;
drivers/net/can/usb/gs_usb.c +1 -1
@@ -605,7 +605,7 @@ static netdev_tx_t gs_can_start_xmit(strunsigned int idx;struct gs_tx_context *txc; -if (can_dropped_invalid_skb (netdev, skb)) +if (can_dev_dropped_skb (netdev, skb))return NETDEV_TX_OK ;/* find an empty context to keep track of transmission */
drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c +1 -1
@@ -570,7 +570,7 @@ static netdev_tx_t kvaser_usb_start_xmitunsigned int i;unsigned long flags; -if (can_dropped_invalid_skb (netdev, skb)) +if (can_dev_dropped_skb (netdev, skb))return NETDEV_TX_OK ; urb =usb_alloc_urb (0 ,GFP_ATOMIC );
drivers/net/can/usb/mcba_usb.c +1 -1
@@ -311,7 +311,7 @@ static netdev_tx_t mcba_usb_start_xmit(s .cmd_id = MBCA_CMD_TRANSMIT_MESSAGE_EV }; -if (can_dropped_invalid_skb (netdev, skb)) +if (can_dev_dropped_skb (netdev, skb))return NETDEV_TX_OK ; ctx =mcba_usb_get_free_ctx (priv, cf);
drivers/net/can/usb/peak_usb/pcan_usb_core.c +1 -1
@@ -351,7 +351,7 @@ static netdev_tx_t peak_usb_ndo_start_xmint i, err;size_t size = dev->adapter->tx_buffer_size; -if (can_dropped_invalid_skb (netdev, skb)) +if (can_dev_dropped_skb (netdev, skb))return NETDEV_TX_OK ;for (i =0 ; i <PCAN_USB_MAX_TX_URBS ; i++)
drivers/net/can/usb/ucan.c +1 -1
@@ -1120,7 +1120,7 @@ static netdev_tx_t ucan_start_xmit(strucstruct can_frame *cf = (struct can_frame *)skb->data;/* check skb */ -if (can_dropped_invalid_skb (netdev, skb)) +if (can_dev_dropped_skb (netdev, skb))return NETDEV_TX_OK ;/* allocate a context and slow down tx path, if fifo state is low */
drivers/net/can/usb/usb_8dev.c +1 -1
@@ -602,7 +602,7 @@ static netdev_tx_t usb_8dev_start_xmit(sint i, err;size_t size =sizeof (struct usb_8dev_tx_msg ); -if (can_dropped_invalid_skb (netdev, skb)) +if (can_dev_dropped_skb (netdev, skb))return NETDEV_TX_OK ;/* create a URB, and a buffer for it, and copy the data to the URB */
drivers/net/can/xilinx_can.c +1 -1
@@ -743,7 +743,7 @@ static netdev_tx_t xcan_start_xmit(strucstruct xcan_priv *priv =netdev_priv (ndev);int ret; -if (can_dropped_invalid_skb (ndev, skb)) +if (can_dev_dropped_skb (ndev, skb))return NETDEV_TX_OK ;if (priv->devtype.flags &XCAN_FLAG_TX_MAILBOXES )
include/linux/can/dev.h +16 -0
@@ -147,6 +147,22 @@ static inline u32 can_get_static_ctrlmodreturn priv->ctrlmode & ~priv->ctrlmode_supported; } +/* drop skb if it does not contain a valid CAN frame for sending */ +static inline bool can_dev_dropped_skb (struct net_device *dev,struct sk_buff *skb) +{ +struct can_priv *priv =netdev_priv (dev); + +if (priv->ctrlmode &CAN_CTRLMODE_LISTENONLY ) { +netdev_info_once (dev, +"interface in listen only mode, dropping skb\n" ); +kfree_skb (skb); + dev->stats.tx_dropped++; +return true; + } + +return can_dropped_invalid_skb (dev, skb); +} +void can_setup (struct net_device *dev); struct net_device *alloc_candev_mqs(int sizeof_priv, unsigned int echo_skb_max,
Greg Kroah-Hartman
maintainerPATCH 174/190 dmaengine: at_hdmac: Fix at_lli struct definition
In reply to Greg Kroah-HartmanFrom: Tudor Ambarus <[email protected]>
commit f1171bbdd2ba2a50ee64bb198a78c268a5baf5f1 upstream.
Those hardware registers are all of 32 bits, while dma_addr_t ca be of type u64 or u32 depending on CONFIG_ARCH_DMA_ADDR_T_64BIT. Force u32 to comply with what the hardware expects.
--- drivers/dma/at_hdmac_regs.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/dma/at_hdmac_regs.h +5 -5
@@ -186,13 +186,13 @@/* LLI == Linked List Item; aka DMA buffer descriptor */ struct at_lli {/* values that are not changed by hardware */ -dma_addr_t saddr; -dma_addr_t daddr; +u32 saddr; +u32 daddr;/* value that may get written back: */ -u32 ctrla; +u32 ctrla;/* more values that are not changed by hardware */ -u32 ctrlb; -dma_addr_t dscr;/* chain to next lli */ +u32 ctrlb; +u32 dscr;/* chain to next lli */ };/**
Greg Kroah-Hartman
maintainerPATCH 175/190 dmaengine: at_hdmac: Dont start transactions at tx_submit level
In reply to Greg Kroah-HartmanFrom: Tudor Ambarus <[email protected]>
commit 7176a6a8982d311e50a7c1168868d26e65bbba19 upstream.
tx_submit is supposed to push the current transaction descriptor to a pending queue, waiting for issue_pending() to be called. issue_pending() must start the transfer, not tx_submit(), thus remove atc_dostart() from atc_tx_submit(). Clients of at_xdmac that assume that tx_submit() starts the transfer must be updated and call dma_async_issue_pending() if they miss to call it.
The vdbg print was moved to after the lock is released. It is desirable to do the prints without the lock held if possible, and because the if statement disappears there's no reason why to do the print while holding the lock.
--- drivers/dma/at_hdmac.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-)
drivers/dma/at_hdmac.c +3 -11
@@ -691,19 +691,11 @@ static dma_cookie_t atc_tx_submit(structspin_lock_irqsave (&atchan->lock, flags); cookie =dma_cookie_assign (tx); -if (list_empty (&atchan->active_list)) { -dev_vdbg (chan2dev (tx->chan),"tx_submit: started %u\n" , - desc->txd.cookie); -atc_dostart (atchan, desc); -list_add_tail (&desc->desc_node, &atchan->active_list); - }else { -dev_vdbg (chan2dev (tx->chan),"tx_submit: queued %u\n" , - desc->txd.cookie); -list_add_tail (&desc->desc_node, &atchan->queue); - } - +list_add_tail (&desc->desc_node, &atchan->queue);spin_unlock_irqrestore (&atchan->lock, flags); +dev_vdbg (chan2dev (tx->chan),"tx_submit: queued %u\n" , + desc->txd.cookie);return cookie; }
Greg Kroah-Hartman
maintainerPATCH 176/190 dmaengine: at_hdmac: Start transfer for cyclic channels in issue_pending
In reply to Greg Kroah-HartmanFrom: Tudor Ambarus <[email protected]>
commit 8a47221fc28417ff8a32a4f92d4448a56c3cf7e1 upstream.
Cyclic channels must too call issue_pending in order to start a transfer. Start the transfer in issue_pending regardless of the type of channel. This wrongly worked before, because in the past the transfer was started at tx_submit level when only a desc in the transfer list.
--- drivers/dma/at_hdmac.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/dma/at_hdmac.c +0 -4
@@ -1536,10 +1536,6 @@ static void atc_issue_pending(struct dmadev_vdbg (chan2dev (chan),"issue_pending\n" ); -/* Not needed for cyclic transfers */ -if (atc_chan_is_cyclic (atchan)) -return ; -atc_advance_work (atchan); }
Greg Kroah-Hartman
maintainerPATCH 177/190 dmaengine: at_hdmac: Fix premature completion of desc in issue_pending
In reply to Greg Kroah-HartmanFrom: Tudor Ambarus <[email protected]>
commit fcd37565efdaffeac179d0f0ce980ac79bfdf569 upstream.
Multiple calls to atc_issue_pending() could result in a premature completion of a descriptor from the atchan->active list, as the method always completed the first active descriptor from the list. Instead, issue_pending() should just take the first transaction descriptor from the pending queue, move it to active_list and start the transfer.
--- drivers/dma/at_hdmac.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-)
drivers/dma/at_hdmac.c +13 -3
@@ -1527,16 +1527,26 @@ atc_tx_status(struct dma_chan *chan, }/** -* atc_issue_pending - try to finish work +* atc_issue_pending - takes the first transaction descriptor in the pending +* queue and starts the transfer. * @chan: target DMA channel */ static void atc_issue_pending (struct dma_chan *chan) { -struct at_dma_chan *atchan =to_at_dma_chan (chan); +struct at_dma_chan *atchan =to_at_dma_chan (chan); +struct at_desc *desc; +unsigned long flags;dev_vdbg (chan2dev (chan),"issue_pending\n" ); -atc_advance_work (atchan); +spin_lock_irqsave (&atchan->lock, flags); +if (atc_chan_is_enabled (atchan) ||list_empty (&atchan->queue)) +return spin_unlock_irqrestore (&atchan->lock, flags); + + desc =atc_first_queued (atchan); +list_move_tail (&desc->desc_node, &atchan->active_list); +atc_dostart (atchan, desc); +spin_unlock_irqrestore (&atchan->lock, flags); }/**
Greg Kroah-Hartman
maintainerPATCH 178/190 dmaengine: at_hdmac: Do not call the complete callback on device_terminate_all
In reply to Greg Kroah-HartmanFrom: Tudor Ambarus <[email protected]>
commit f645f85ae1104f8bd882f962ac0a69a1070076dd upstream.
The method was wrong because it violated the dmaengine API. For aborted transfers the complete callback should not be called. Fix the behavior and do not call the complete callback on device_terminate_all.
--- drivers/dma/at_hdmac.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)
drivers/dma/at_hdmac.c +2 -9
@@ -1437,11 +1437,8 @@ static int atc_terminate_all(struct dma_struct at_dma_chan *atchan =to_at_dma_chan (chan);struct at_dma *atdma =to_at_dma (chan->device);int chan_id = atchan->chan_common.chan_id; -struct at_desc *desc, *_desc;unsigned long flags; -LIST_HEAD (list); -dev_vdbg (chan2dev (chan),"%s\n" , __func__);/*
@@ -1460,15 +1457,11 @@ static int atc_terminate_all(struct dma_cpu_relax ();/* active_list entries will end up before queued entries */ -list_splice_init (&atchan->queue, &list); -list_splice_init (&atchan->active_list, &list); +list_splice_tail_init (&atchan->queue, &atchan->free_list); +list_splice_tail_init (&atchan->active_list, &atchan->free_list);spin_unlock_irqrestore (&atchan->lock, flags); -/* Flush all pending and queued descriptors */ -list_for_each_entry_safe (desc, _desc, &list, desc_node) -atc_chain_complete (atchan, desc); -clear_bit (ATC_IS_PAUSED , &atchan->status);/* if channel dedicated to cyclic operations, free it */ clear_bit (ATC_IS_CYCLIC , &atchan->status);
Greg Kroah-Hartman
maintainerPATCH 179/190 dmaengine: at_hdmac: Protect atchan->status with the channel lock
In reply to Greg Kroah-HartmanFrom: Tudor Ambarus <[email protected]>
commit 6e5ad28d16f082efeae3d0bd2e31f24bed218019 upstream.
Now that the complete callback call was removed from device_terminate_all(), we can protect the atchan->status with the channel lock. The atomic bitops on atchan->status do not substitute proper locking on the status, as one could still modify the status after the lock was dropped in atc_terminate_all() but before the atomic bitops were executed.
--- drivers/dma/at_hdmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dma/at_hdmac.c +2 -2
@@ -1460,12 +1460,12 @@ static int atc_terminate_all(struct dma_list_splice_tail_init (&atchan->queue, &atchan->free_list);list_splice_tail_init (&atchan->active_list, &atchan->free_list); -spin_unlock_irqrestore (&atchan->lock, flags); -clear_bit (ATC_IS_PAUSED , &atchan->status);/* if channel dedicated to cyclic operations, free it */ clear_bit (ATC_IS_CYCLIC , &atchan->status); +spin_unlock_irqrestore (&atchan->lock, flags); +return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 180/190 dmaengine: at_hdmac: Fix concurrency problems by removing atc_complete_all()
In reply to Greg Kroah-HartmanFrom: Tudor Ambarus <[email protected]>
commit c6babed879fbe82796a601bf097649e07382db46 upstream.
atc_complete_all() had concurrency bugs, thus remove it:
1/ atc_complete_all() in its entirety was buggy, as when the atchan->queue list (the one that contains descriptors that are not yet issued to the hardware) contained descriptors, it fired just the first from the atchan->queue, but moved all the desc from atchan->queue to atchan->active_list and considered them all as fired. This could result in calling the completion of a descriptor that was not yet issued to the hardware.
2/ when in tasklet at atc_advance_work() time, atchan->active_list was queried without holding the lock of the chan. This can result in atchan->active_list concurrency problems between the tasklet and issue_pending().
--- drivers/dma/at_hdmac.c | 49 ++++--------------------------------------------- 1 file changed, 4 insertions(+), 45 deletions(-)
drivers/dma/at_hdmac.c +4 -45
@@ -486,67 +486,26 @@ atc_chain_complete(struct at_dma_chan *a }/** -* atc_complete_all - finish work for all transactions -* @atchan: channel to complete transactions for -* -* Eventually submit queued descriptors if any -* -* Assume channel is idle while calling this function -* Called with atchan->lock held and bh disabled -*/ -static void atc_complete_all (struct at_dma_chan *atchan) -{ -struct at_desc *desc, *_desc; -LIST_HEAD (list); -unsigned long flags; - -dev_vdbg (chan2dev (&atchan->chan_common),"complete all\n" ); - -spin_lock_irqsave (&atchan->lock, flags); - -/* -* Submit queued descriptors ASAP, i.e. before we go through -* the completed ones. -*/ -if (!list_empty (&atchan->queue)) -atc_dostart (atchan,atc_first_queued (atchan)); -/* empty active_list now it is completed */ -list_splice_init (&atchan->active_list, &list); -/* empty queue list by moving descriptors (if any) to active_list */ -list_splice_init (&atchan->queue, &atchan->active_list); - -spin_unlock_irqrestore (&atchan->lock, flags); - -list_for_each_entry_safe (desc, _desc, &list, desc_node) -atc_chain_complete (atchan, desc); -} - -/** * atc_advance_work - at the end of a transaction, move forward * @atchan: channel where the transaction ended */ static void atc_advance_work (struct at_dma_chan *atchan) {unsigned long flags; -int ret;dev_vdbg (chan2dev (&atchan->chan_common),"advance_work\n" );spin_lock_irqsave (&atchan->lock, flags); - ret =atc_chan_is_enabled (atchan); +if (atc_chan_is_enabled (atchan) ||list_empty (&atchan->active_list)) +return spin_unlock_irqrestore (&atchan->lock, flags);spin_unlock_irqrestore (&atchan->lock, flags); -if (ret) -return ; - -if (list_empty (&atchan->active_list) || -list_is_singular (&atchan->active_list)) -return atc_complete_all (atchan);atc_chain_complete (atchan,atc_first_active (atchan));/* advance work */ spin_lock_irqsave (&atchan->lock, flags); -atc_dostart (atchan,atc_first_active (atchan)); +if (!list_empty (&atchan->active_list)) +atc_dostart (atchan,atc_first_active (atchan));spin_unlock_irqrestore (&atchan->lock, flags); }
Greg Kroah-Hartman
maintainerPATCH 181/190 dmaengine: at_hdmac: Fix concurrency over descriptor
In reply to Greg Kroah-HartmanFrom: Tudor Ambarus <[email protected]>
commit 06988949df8c3007ad82036d3606d8ae72ed9000 upstream.
The descriptor was added to the free_list before calling the callback, which could result in reissuing of the same descriptor and calling of a single callback for both. Move the decriptor to the free list after the callback is invoked.
--- drivers/dma/at_hdmac.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
drivers/dma/at_hdmac.c +9 -5
@@ -469,11 +469,8 @@ atc_chain_complete(struct at_dma_chan *a desc->memset_buffer = false; } -/* move children to free_list */ -list_splice_init (&desc->tx_list, &atchan->free_list); -/* move myself to free_list */ -list_move (&desc->desc_node, &atchan->free_list); - +/* Remove transfer node from the active list. */ +list_del_init (&desc->desc_node);spin_unlock_irqrestore (&atchan->lock, flags);dma_descriptor_unmap (txd);
@@ -483,6 +480,13 @@ atc_chain_complete(struct at_dma_chan *admaengine_desc_get_callback_invoke (txd,NULL );dma_run_dependencies (txd); + +spin_lock_irqsave (&atchan->lock, flags); +/* move children to free_list */ +list_splice_init (&desc->tx_list, &atchan->free_list); +/* add myself to free_list */ +list_add (&desc->desc_node, &atchan->free_list); +spin_unlock_irqrestore (&atchan->lock, flags); }/**
Greg Kroah-Hartman
maintainerPATCH 182/190 dmaengine: at_hdmac: Free the memset buf without holding the chan lock
In reply to Greg Kroah-HartmanFrom: Tudor Ambarus <[email protected]>
commit 6ba826cbb57d675f447b59323204d1473bbd5593 upstream.
There's no need to hold the channel lock when freeing the memset buf, as the operation has already completed. Free the memset buf without holding the channel lock.
--- drivers/dma/at_hdmac.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/dma/at_hdmac.c +7 -7
@@ -462,13 +462,6 @@ atc_chain_complete(struct at_dma_chan *aif (!atc_chan_is_cyclic (atchan))dma_cookie_complete (txd); -/* If the transfer was a memset, free our temporary buffer */ -if (desc->memset_buffer) { -dma_pool_free (atdma->memset_pool, desc->memset_vaddr, - desc->memset_paddr); - desc->memset_buffer = false; - } -/* Remove transfer node from the active list. */ list_del_init (&desc->desc_node);spin_unlock_irqrestore (&atchan->lock, flags);
@@ -487,6 +480,13 @@ atc_chain_complete(struct at_dma_chan *a/* add myself to free_list */ list_add (&desc->desc_node, &atchan->free_list);spin_unlock_irqrestore (&atchan->lock, flags); + +/* If the transfer was a memset, free our temporary buffer */ +if (desc->memset_buffer) { +dma_pool_free (atdma->memset_pool, desc->memset_vaddr, + desc->memset_paddr); + desc->memset_buffer = false; + } }/**
Greg Kroah-Hartman
maintainerPATCH 183/190 dmaengine: at_hdmac: Fix concurrency over the active list
In reply to Greg Kroah-HartmanFrom: Tudor Ambarus <[email protected]>
commit 03ed9ba357cc78116164b90b87f45eacab60b561 upstream.
The tasklet (atc_advance_work()) did not held the channel lock when retrieving the first active descriptor, causing concurrency problems if issue_pending() was called in between. If issue_pending() was called exactly after the lock was released in the tasklet (atc_advance_work()), atc_chain_complete() could complete a descriptor for which the controller has not yet raised an interrupt.
--- drivers/dma/at_hdmac.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/dma/at_hdmac.c +6 -4
@@ -462,8 +462,6 @@ atc_chain_complete(struct at_dma_chan *aif (!atc_chan_is_cyclic (atchan))dma_cookie_complete (txd); -/* Remove transfer node from the active list. */ -list_del_init (&desc->desc_node);spin_unlock_irqrestore (&atchan->lock, flags);dma_descriptor_unmap (txd);
@@ -495,6 +493,7 @@ atc_chain_complete(struct at_dma_chan *a*/ static void atc_advance_work (struct at_dma_chan *atchan) { +struct at_desc *desc;unsigned long flags;dev_vdbg (chan2dev (&atchan->chan_common),"advance_work\n" );
@@ -502,9 +501,12 @@ static void atc_advance_work(struct at_dspin_lock_irqsave (&atchan->lock, flags);if (atc_chan_is_enabled (atchan) ||list_empty (&atchan->active_list))return spin_unlock_irqrestore (&atchan->lock, flags); -spin_unlock_irqrestore (&atchan->lock, flags); -atc_chain_complete (atchan,atc_first_active (atchan)); + desc =atc_first_active (atchan); +/* Remove the transfer node from the active list. */ +list_del_init (&desc->desc_node); +spin_unlock_irqrestore (&atchan->lock, flags); +atc_chain_complete (atchan, desc);/* advance work */ spin_lock_irqsave (&atchan->lock, flags);
Greg Kroah-Hartman
maintainerPATCH 184/190 dmaengine: at_hdmac: Fix descriptor handling when issuing it to hardware
In reply to Greg Kroah-HartmanFrom: Tudor Ambarus <[email protected]>
commit ba2423633ba646e1df20e30cb3cf35495c16f173 upstream.
As it was before, the descriptor was issued to the hardware without adding it to the active (issued) list. This could result in a completion of other descriptor, or/and in the descriptor never being completed.
--- drivers/dma/at_hdmac.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
drivers/dma/at_hdmac.c +11 -4
@@ -510,8 +510,11 @@ static void atc_advance_work(struct at_d/* advance work */ spin_lock_irqsave (&atchan->lock, flags); -if (!list_empty (&atchan->active_list)) -atc_dostart (atchan,atc_first_active (atchan)); +if (!list_empty (&atchan->active_list)) { + desc =atc_first_queued (atchan); +list_move_tail (&desc->desc_node, &atchan->active_list); +atc_dostart (atchan, desc); + }spin_unlock_irqrestore (&atchan->lock, flags); }
@@ -523,6 +526,7 @@ static void atc_advance_work(struct at_dstatic void atc_handle_error (struct at_dma_chan *atchan) {struct at_desc *bad_desc; +struct at_desc *desc;struct at_desc *child;unsigned long flags;
@@ -540,8 +544,11 @@ static void atc_handle_error(struct at_dlist_splice_init (&atchan->queue, atchan->active_list.prev);/* Try to restart the controller */ -if (!list_empty (&atchan->active_list)) -atc_dostart (atchan,atc_first_active (atchan)); +if (!list_empty (&atchan->active_list)) { + desc =atc_first_queued (atchan); +list_move_tail (&desc->desc_node, &atchan->active_list); +atc_dostart (atchan, desc); + }/* * KERN_CRITICAL may seem harsh, but since this only happens
Greg Kroah-Hartman
maintainerPATCH 185/190 dmaengine: at_hdmac: Fix completion of unissued descriptor in case of errors
In reply to Greg Kroah-HartmanFrom: Tudor Ambarus <[email protected]>
commit ef2cb4f0ce479f77607b04c4b0414bf32f863ee8 upstream.
In case the controller detected an error, the code took the chance to move all the queued (submitted) descriptors to the active (issued) list. This was wrong as if there were any descriptors in the submitted list they were moved to the issued list without actually issuing them to the controller, thus a completion could be raised without even fireing the descriptor.
--- drivers/dma/at_hdmac.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/dma/at_hdmac.c +0 -4
@@ -539,10 +539,6 @@ static void atc_handle_error(struct at_d bad_desc =atc_first_active (atchan);list_del_init (&bad_desc->desc_node); -/* As we are stopped, take advantage to push queued descriptors -* in active_list */ -list_splice_init (&atchan->queue, atchan->active_list.prev); -/* Try to restart the controller */ if (!list_empty (&atchan->active_list)) { desc =atc_first_queued (atchan);
Greg Kroah-Hartman
maintainerPATCH 186/190 dmaengine: at_hdmac: Dont allow CPU to reorder channel enable
In reply to Greg Kroah-HartmanFrom: Tudor Ambarus <[email protected]>
commit 580ee84405c27d6ed419abe4d2b3de1968abdafd upstream.
at_hdmac uses __raw_writel for register writes. In the absence of a barrier, the CPU may reorder the register operations. Introduce a write memory barrier so that the CPU does not reorder the channel enable, thus the start of the transfer, without making sure that all the pre-required register fields are already written.
--- drivers/dma/at_hdmac.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/dma/at_hdmac.c +2 -0
@@ -256,6 +256,8 @@ static void atc_dostart(struct at_dma_ch ATC_SPIP_BOUNDARY(first->boundary));channel_writel (atchan,DPIP ,ATC_DPIP_HOLE (first->dst_hole) |ATC_DPIP_BOUNDARY (first->boundary)); +/* Don't allow CPU to reorder channel enable. */ +wmb ();dma_writel (atdma,CHER , atchan->mask);vdbg_dump_regs (atchan);
Greg Kroah-Hartman
maintainerPATCH 187/190 dmaengine: at_hdmac: Fix impossible condition
In reply to Greg Kroah-HartmanFrom: Tudor Ambarus <[email protected]>
commit 28cbe5a0a46a6637adbda52337d7b2777fc04027 upstream.
The iterator can not be greater than ATC_MAX_DSCR_TRIALS, as the for loop will stop when i == ATC_MAX_DSCR_TRIALS. While here, use the common "i" name for the iterator.
--- drivers/dma/at_hdmac.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/dma/at_hdmac.c +4 -3
@@ -318,7 +318,8 @@ static int atc_get_bytes_left(struct dmastruct at_desc *desc_first =atc_first_active (atchan);struct at_desc *desc;int ret; -u32 ctrla, dscr, trials; +u32 ctrla, dscr; +unsigned int i;/* * If the cookie doesn't match to the currently running transfer then
@@ -388,7 +389,7 @@ static int atc_get_bytes_left(struct dma dscr =channel_readl (atchan,DSCR );rmb ();/* ensure DSCR is read before CTRLA */ ctrla =channel_readl (atchan,CTRLA ); -for (trials =0 ; trials <ATC_MAX_DSCR_TRIALS ; ++trials) { +for (i =0 ; i <ATC_MAX_DSCR_TRIALS ; ++i) {u32 new_dscr;rmb ();/* ensure DSCR is read after CTRLA */
@@ -414,7 +415,7 @@ static int atc_get_bytes_left(struct dmarmb ();/* ensure DSCR is read before CTRLA */ ctrla =channel_readl (atchan,CTRLA ); } -if (unlikely (trials >=ATC_MAX_DSCR_TRIALS )) +if (unlikely (i ==ATC_MAX_DSCR_TRIALS ))return -ETIMEDOUT ;/* for the first descriptor we can be more accurate */
Greg Kroah-Hartman
maintainerPATCH 188/190 dmaengine: at_hdmac: Check return code of dma_async_device_register
In reply to Greg Kroah-HartmanFrom: Tudor Ambarus <[email protected]>
commit c47e6403fa099f200868d6b106701cb42d181d2b upstream.
dma_async_device_register() can fail, check the return code and display an error.
--- drivers/dma/at_hdmac.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/dma/at_hdmac.c +6 -1
@@ -1928,7 +1928,11 @@ static int __init at_dma_probe(struct pldma_has_cap (DMA_SLAVE , atdma->dma_common.cap_mask) ?"slave " :"" , plat_dat->nr_channels); -dma_async_device_register (&atdma->dma_common); + err =dma_async_device_register (&atdma->dma_common); +if (err) { +dev_err (&pdev->dev,"Unable to register: %d.\n" , err); + goto err_dma_async_device_register; + }/* * Do not return an error if the dmac node is not present in order to
@@ -1948,6 +1952,7 @@ static int __init at_dma_probe(struct pl err_of_dma_controller_register:dma_async_device_unregister (&atdma->dma_common); +err_dma_async_device_register:dma_pool_destroy (atdma->memset_pool); err_memset_pool_create:dma_pool_destroy (atdma->dma_desc_pool);
Greg Kroah-Hartman
maintainerPATCH 189/190 drm/amdkfd: Migrate in CPU page fault use current mm
In reply to Greg Kroah-HartmanFrom: Philip Yang <[email protected]>
commit 3a876060892ba52dd67d197c78b955e62657d906 upstream.
migrate_vma_setup shows below warning because we don't hold another process mm mmap_lock. We should use current vmf->vma->vm_mm instead, the caller already hold current mmap lock inside CPU page fault handler.
WARNING: CPU: 10 PID: 3054 at include/linux/mmap_lock.h:155 find_vma Call Trace: walk_page_range+0x76/0x150 migrate_vma_setup+0x18a/0x640 svm_migrate_vram_to_ram+0x245/0xa10 [amdgpu] svm_migrate_to_ram+0x36f/0x470 [amdgpu] do_swap_page+0xcfe/0xec0 __handle_mm_fault+0x96b/0x15e0 handle_mm_fault+0x13f/0x3e0 do_user_addr_fault+0x1e7/0x690
--- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c +2 -1
@@ -951,7 +951,8 @@ static vm_fault_t svm_migrate_to_ram(str goto out_unlock_prange; } - r =svm_migrate_vram_to_ram (prange, mm,KFD_MIGRATE_TRIGGER_PAGEFAULT_CPU ); + r =svm_migrate_vram_to_ram (prange, vmf->vma->vm_mm, +KFD_MIGRATE_TRIGGER_PAGEFAULT_CPU );if (r)pr_debug ("failed %d migrate svms 0x%p range 0x%p [0x%lx 0x%lx]\n" , r, prange->svms, prange, prange->start, prange->last);
Greg Kroah-Hartman
maintainerPATCH 190/190 ALSA: memalloc: Try dma_alloc_noncontiguous() at first
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit 9d8e536d36e75e76614fe09ffab9a1df95b8b666 upstream.
The latest fix for the non-contiguous memalloc helper changed the allocation method for a non-IOMMU system to use only the fallback allocator. This should have worked, but it caused a problem sometimes when too many non-contiguous pages are allocated that can't be treated by HD-audio controller.
As a quirk workaround, go back to the original strategy: use dma_alloc_noncontiguous() at first, and apply the fallback only when it fails, but only for non-IOMMU case.
We'll need a better fix in the fallback code as well, but this workaround should paper over most cases.
--- sound/core/memalloc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/core/memalloc.c +3 -4
@@ -527,8 +527,10 @@ static void *snd_dma_noncontig_alloc(strstruct sg_table *sgt;void *p; + sgt =dma_alloc_noncontiguous (dmab->dev.dev, size, dmab->dev.dir, +DEFAULT_GFP ,0 );#ifdef CONFIG_SND_DMA_SGBUF -if (!get_dma_ops (dmab->dev.dev)) { +if (!sgt && !get_dma_ops (dmab->dev.dev)) {if (dmab->dev.type ==SNDRV_DMA_TYPE_DEV_WC_SG ) dmab->dev.type =SNDRV_DMA_TYPE_DEV_WC_SG_FALLBACK ;else
@@ -536,9 +538,6 @@ static void *snd_dma_noncontig_alloc(str return snd_dma_sg_fallback_alloc(dmab, size); }#endif - - sgt =dma_alloc_noncontiguous (dmab->dev.dev, size, dmab->dev.dir, -DEFAULT_GFP ,0 );if (!sgt)return NULL ;
Works fine on my Arch Linux server with Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz
Tested by: Luna Jernberg <[email protected]>
Quoted 833 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.0.9 release. There are 190 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 16 Nov 2022 12:44:21 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.0.9-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.0.y
and the diffstat can be found below.thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:Greg Kroah-Hartman <[email protected]>
Linux 6.0.9-rc1Takashi Iwai <[email protected]>
ALSA: memalloc: Trydma_alloc_noncontiguous()at firstPhilip Yang <[email protected]>
drm/amdkfd: Migrate in CPU page fault use current mmTudor Ambarus <[email protected]>
dmaengine:at_hdmac: Check return code ofdma_async_device_registerTudor Ambarus <[email protected]>
dmaengine:at_hdmac: Fix impossible conditionTudor Ambarus <[email protected]>
dmaengine:at_hdmac: Don't allow CPU to reorder channel enableTudor Ambarus <[email protected]>
dmaengine:at_hdmac: Fix completion of unissued descriptor in case of errorsTudor Ambarus <[email protected]>
dmaengine:at_hdmac: Fix descriptor handling when issuing it to hardwareTudor Ambarus <[email protected]>
dmaengine:at_hdmac: Fix concurrency over the active listTudor Ambarus <[email protected]>
dmaengine:at_hdmac: Free the memset buf without holding the chan lockTudor Ambarus <[email protected]>
dmaengine:at_hdmac: Fix concurrency over descriptorTudor Ambarus <[email protected]>
dmaengine:at_hdmac: Fix concurrency problems by removingatc_complete_all()Tudor Ambarus <[email protected]>
dmaengine: at_hdmac: Protect atchan->status with the channel lockTudor Ambarus <[email protected]>
dmaengine:at_hdmac: Do not call the complete callback ondevice_terminate_allTudor Ambarus <[email protected]>
dmaengine:at_hdmac: Fix premature completion of desc inissue_pendingTudor Ambarus <[email protected]>
dmaengine:at_hdmac: Start transfer for cyclic channels inissue_pendingTudor Ambarus <[email protected]>
dmaengine:at_hdmac: Don't start transactions attx_submitlevelTudor Ambarus <[email protected]>
dmaengine:at_hdmac: Fixat_llistruct definitionOliver Hartkopp <[email protected]>
can: dev: fix skb drop checkPaolo Bonzini <[email protected]>
KVM: SVM: move guest vmsave/vmload back to assemblyPaolo Bonzini <[email protected]>
KVM: SVM: retrieve VMCB from assemblyPeter Gonda <[email protected]>
KVM: SVM: Only dump VMSA to klog atKERN_DEBUGlevelPaolo Bonzini <[email protected]>
KVM: SVM: adjust register allocation for__svm_vcpu_run()Paolo Bonzini <[email protected]>
KVM: SVM: replace regs argument of__svm_vcpu_run()withvcpu_svmPaolo Bonzini <[email protected]>
KVM: x86: use a separateasm-offsets.cfileLike Xu <[email protected]>
KVM: x86/pmu: Do not speculatively query Intel GP PMCs that don't exist yetSean Christopherson <[email protected]>
KVM: x86/mmu: Block all page faults duringkvm_zap_gfn_range()Geert Uytterhoeven <[email protected]>
can:rcar_canfd: Add missing ECC error checks for channels 2-7Oliver Hartkopp <[email protected]>
can: isotp: fix tx state handling for echo tx processingOliver Hartkopp <[email protected]>
can: j1939:j1939_send_one(): fix missing CAN header initializationPeter Xu <[email protected]>
mm/shmem: usepage_mapping()to detect page cache for uffd continuePankaj Gupta <[email protected]>
mm/memremap.c: mapFS_DAXdevice memory as decryptedSeongJae Park <[email protected]>
mm/damon/dbgfs: check ifrm_contextsinput is for a real contextFenghua Yu <[email protected]>
dmaengine: idxd: Do not enable user type Work Queue without Shared Virtual AddressingVasily Gorbik <[email protected]>
mm:hugetlb_vmemmap: include missinglinux/moduleparam.hNaoya Horiguchi <[email protected]>
arch/x86/mm/hugetlbpage.c:pud_huge()returns 0 when using 2-level pagingMika Westerberg <[email protected]>
spi: intel: Use correct mask for flash and protected regionsZhangPeng <[email protected]>
udf: Fix a slab-out-of-bounds write bug inudf_find_entry()Brian Norris <[email protected]>
mms: sdhci-esdhc-imx: FixSDHCI_RESET_ALLfor CQHCIRoger Quadros <[email protected]>
net: ethernet: ti: am65-cpsw: Fix segmentation fault at module unloadJohan Hovold <[email protected]>
phy: qcom-qmp-combo: fix NULL-deref on runtime resumeJens Axboe <[email protected]>
io_uring: check for rollover of buffer ID when providing buffersJohannes Thumshirn <[email protected]>
btrfs: zoned: initialize device's zone info for seedingJohannes Thumshirn <[email protected]>
btrfs: zoned: clone zoned device info when cloning a deviceZhang Xiaoxu <[email protected]>
btrfs: selftests: fix wrong error check inbtrfs_free_dummy_root()Liu Shixin <[email protected]>
btrfs: fix match incorrectly indev_args_match_deviceWen Gong <[email protected]>
wifi: ath11k: avoid deadlock during regulatory update inath11k_regd_update()Jorge Lopez <[email protected]>
platform/x86:hp_wmi: Fix rfkill causing soft blocked wifiFelix Kuehling <[email protected]>
drm/amdkfd: Fix error handling inkfd_criu_restore_eventsFelix Kuehling <[email protected]>
drm/amdkfd: Fix error handling incriu_checkpointGuchun Chen <[email protected]>
drm/amdgpu: disable BACO on specialBEIGE_GOBYcardChristian König <[email protected]>
drm/amdgpu: workaround for TLB seq raceNicholas Kazlauskas <[email protected]>
drm/amd/display: Update SR watermarks for DCN314Tim Huang <[email protected]>
drm/amd/pm: update SMU IP v13.0.4 msg interface headerNicholas Kazlauskas <[email protected]>
drm/amd/display: Fix reg timeout inenc314_enable_fifoMatthew Auld <[email protected]>
drm/i915/dmabuf: fixsg_tablehandling inmap_dma_bufRyusuke Konishi <[email protected]>
nilfs2: fix use-after-free bug ofns_writeron remountRyusuke Konishi <[email protected]>
nilfs2: fix deadlock innilfs_count_free_blocks()Shin'ichiro Kawasaki <[email protected]>
ata: libata-scsi: fix SYNCHRONIZE CACHE (16) command failureNathan Chancellor <[email protected]>
vmlinux.lds.h: Fix placement of '.data..decrypted' sectionJussi Laako <[email protected]>
ALSA: usb-audio: Add DSD support for Accuphase DAC-60Takashi Iwai <[email protected]>
ALSA: usb-audio: Add quirk entry for M-Audio MicroTakashi Iwai <[email protected]>
ALSA: usb-audio: Yet more regression for for the delayed card registrationEdson Juliano Drosdeck <[email protected]>
ALSA: hda/realtek: Add Positivo C6300 model quirkStefan Binding <[email protected]>
ALSA: hda/realtek: Add quirk for ASUS Zenbook using CS35L41Ye Bin <[email protected]>
ALSA: hda: fix potential memleak in 'add_widget_node'Xian Wang <[email protected]>
ALSA: hda/ca0132: add quirk for EVGA Z390 DARKEvan Quan <[email protected]>
ALSA: hda/hdmi - enable runtime pm for more AMD display audioHaibo Chen <[email protected]>
mmc: sdhci-esdhc-imx: use the correct host caps forMMC_CAP_8_BIT_DATABrian Norris <[email protected]>
mmc: sdhci-tegra: FixSDHCI_RESET_ALLfor CQHCIBrian Norris <[email protected]>
mmc:sdhci_am654: FixSDHCI_RESET_ALLfor CQHCIBrian Norris <[email protected]>
mmc: sdhci-brcmstb: FixSDHCI_RESET_ALLfor CQHCIBrian Norris <[email protected]>
mmc: sdhci-of-arasan: FixSDHCI_RESET_ALLfor CQHCIBrian Norris <[email protected]>
mmc: cqhci: Provide helper for resetting both SDHCI and CQHCIMa Jun <[email protected]>
drm/amdgpu: Fix the lpfn checking condition in drm buddyJiaxun Yang <[email protected]>
MIPS:jump_label: Fix compat branch range checkArd Biesheuvel <[email protected]>
arm64: efi: Fix handling of misaligned runtime regions and drop warningWei Yongjun <[email protected]>
eth: sp7021: dropfree_netdev()fromspl2sw_init_netdev()Conor Dooley <[email protected]>
riscv: fix reserved memory setupJisheng Zhang <[email protected]>
riscv: vdso: fix build with llvmJisheng Zhang <[email protected]>
riscv: process: fix kernel info leakageChuang Wang <[email protected]>
net: macvlan: fix memory leaks ofmacvlan_common_newlinkZhengchao Shao <[email protected]>
ethernet: tundra: free irq when alloc ring failed intsi108_open()Takashi Iwai <[email protected]>
ALSA: memalloc: Don't fall back for SG-buffer with IOMMUZhengchao Shao <[email protected]>
net:mv643xx_eth: disable napi when init rxq or txq failed inmv643xx_eth_open()Zhengchao Shao <[email protected]>
ethernet: s2io: disable napi when start nic failed ins2io_card_up()Antoine Tenart <[email protected]>
net: atlantic: macsec: clear encryption keys from the stackAntoine Tenart <[email protected]>
net: phy: mscc: macsec: clear encryption keys when freeing a flowYang Yingliang <[email protected]>
stmmac: dwmac-loongson: fix missingof_node_put()while module exitingYang Yingliang <[email protected]>
stmmac: dwmac-loongson: fix missingpci_disable_device()inloongson_dwmac_probe()Yang Yingliang <[email protected]>
stmmac: dwmac-loongson: fix missingpci_disable_msi()while module exitingZhengchao Shao <[email protected]>
cxgb4vf: shut down the adapter whent4vf_update_port_info()failed incxgb4vf_open()Wei Yongjun <[email protected]>
mctp: Fix an error handling path inmctp_init()Tan, Tee Min <[email protected]>
stmmac: intel: Update PCH PTP clock rate from 200MHz to 204.8MHzZhengchao Shao <[email protected]>
net:cxgb3_main: disable napi when bind qsets failed incxgb_up()Zhengchao Shao <[email protected]>
net: cpsw: disable napi incpsw_ndo_open()Michal Jaron <[email protected]>
iavf: Fix VF driver counting VLAN 0 filtersNorbert Zulinski <[email protected]>
ice: Fix spurious interrupt during removal of trusted VFRoi Dayan <[email protected]>
net/mlx5e: E-Switch, Fix comparing termination table instanceJianbo Liu <[email protected]>
net/mlx5e: TC, Fix wrong rejection of packet-per-second policingRoi Dayan <[email protected]>
net/mlx5e: Fix tc acts array not to be dependent on enum orderMaxim Mikityanskiy <[email protected]>
net/mlx5e: Add missing sanity checks for max TX WQE sizeShay Drory <[email protected]>
net/mlx5:fw_reset: Don't try to load device in case PCI isn't workingChris Mi <[email protected]>
net/mlx5: E-switch, Set to legacy mode if failed to change switchdev modeRoy Novich <[email protected]>
net/mlx5: Allow async trigger completion execution on single CPU systemsVlad Buslov <[email protected]>
net/mlx5: Bridge, verify LAG state when adding bond to bridgeM Chetan Kumar <[email protected]>
net: wwan: iosm: fix invalid mux header typeM Chetan Kumar <[email protected]>
net: wwan: iosm: fix memory leak inipc_pcie_read_bios_cfgZhengchao Shao <[email protected]>
net: nixge: disable napi when enable interrupts failed innixge_open()Eric Dumazet <[email protected]>
net: tun: callnapi_schedule_prep()to ensure we own a napiZhengchao Shao <[email protected]>
net: marvell: prestera: fix memory leak inprestera_rxtx_switch_init()Shigeru Yoshida <[email protected]>
netfilter: Cleanup nft_net->module_list from nf_tables_exit_net()Ziyang Xuan <[email protected]>
netfilter: nfnetlink: fix potential dead lock innfnetlink_rcv_msg()Donglin Peng <[email protected]>
perf tools: Add theinclude/perf/directory to .gitignoreJames Clark <[email protected]>
perf test: Fix skipping branch stack sampling testAthira Rajeev <[email protected]>
perf stat: Fix printing os->prefix in CSV metrics outputNamhyung Kim <[email protected]>
perf stat: Fix crash with --per-node --metric-only in CSV modeZhengchao Shao <[email protected]>
drivers: net: xgene: disable napi when register irq failed inxgene_enet_open()Ratheesh Kannoth <[email protected]>
octeontx2-pf: Fix SQE threshold checkingZhengchao Shao <[email protected]>
net: ethernet: mtk-star-emac: disable napi when connect and start PHY failed inmtk_star_enable()Zhengchao Shao <[email protected]>
net: lapbether: fix issue of invalid opcode inlapbeth_open()Amelie Delaunay <[email protected]>
dmaengine: stm32-dma: fix potential race between pause and resumeYang Yingliang <[email protected]>
dmaengine: ti: k3-udma-glue: fix memory leak when register device failChristophe JAILLET <[email protected]>
dmaengine:mv_xor_v2: Fix a resource leak inmv_xor_v2_remove()Martin Povišer <[email protected]>
dmaengine: apple-admac: Fix grabbing of channels inof_xlateFengqian Gao <[email protected]>
dmaengine: idxd: fix RO device state error after been disabled/resetXiaochen Shen <[email protected]>
dmaengine: idxd: Fix max batch size for Intel IAADave Jiang <[email protected]>
dmanegine: idxd: reformat opcap output to matchbitmap_parse()inputDoug Brown <[email protected]>
dmaengine:pxa_dma: useplatform_get_irq_optionalXin Long <[email protected]>
tipc: fix the msg->req tlv len check in tipc_nl_compat_name_table_dump_headerYueHaibing <[email protected]>
net: broadcom: Fix BCMGENETKconfigMiquel Raynal <[email protected]>
dt-bindings: net: tsnep: Fix typo on generic nvmem propertyRasmus Villemoes <[email protected]>
net: stmmac: dwmac-meson8b: fixmeson8b_devm_clk_prepare_enable()Niranjana Vishwanathapura <[email protected]>
drm/i915: Do not setcache_dirtyfor DGFXJouni Högander <[email protected]>
drm/i915/psr: Send update also on invalidateZhengchao Shao <[email protected]>
can:af_can: fix NULL pointer dereference incan_rx_register()Alexander Potapenko <[email protected]>
ipv6: addrlabel: fix infoleak when sending struct ifaddrlblmsg to networkAndy Shevchenko <[email protected]>
platform/x86: p2sb: Don't fail if unknown CPU is foundLu Wei <[email protected]>
tcp: prohibitTCP_REPAIR_OPTIONSif data was already sentYuan Can <[email protected]>
drm/vc4: Fix missingplatform_unregister_drivers()call invc4_drm_register()HW He <[email protected]>
net: wwan: mhi: fix memory leak inmhi_mbim_dellinkHW He <[email protected]>
net: wwan: iosm: fix memory leak inipc_wwan_dellinkZhengchao Shao <[email protected]>
hamradio: fix issue of dev reference count leakage inbpq_device_event()Zhengchao Shao <[email protected]>
net: lapbether: fix issue of dev reference count leakage inlapbeth_device_event()Rafael Mendonca <[email protected]>
KVM: s390: pci: Fix allocation size of aift kzdev elementsNico Boehr <[email protected]>
KVM: s390: pv: don't allow userspace to set the clock under PVJohn Thomson <[email protected]>
phy: ralink: mt7621-pci: add sentinel to quirks tableGaosheng Cui <[email protected]>
capabilities: fix undefined behavior in bit shift forCAP_TO_MASKSean Anderson <[email protected]>
net: fman: Unregister ethernet device on removalAlex Barba <[email protected]>
bnxt_en: fix potentially incorrect return value forndo_rx_flow_steerMichael Chan <[email protected]>
bnxt_en: Fix possible crash inbnxt_hwrm_set_coal()Wang Yufen <[email protected]>
net: tun: Fix memory leaks ofnapi_get_fragsRatheesh Kannoth <[email protected]>
octeontx2-pf: NIX TX overwrites SQ_CTX_HW_S[SQ_INT]Sabrina Dubroca <[email protected]>
macsec: clear encryption keys from the stack after setting up offloadSabrina Dubroca <[email protected]>
macsec: fix detection of RXSCs when toggling offloadingSabrina Dubroca <[email protected]>
macsec: fix secy->n_rx_sc accountingSabrina Dubroca <[email protected]>
macsec: delete new rxsc when offload failsJiri Benc <[email protected]>
net: gso: fix panic onfrag_listwith mixed head alloc typesYoulin Li <[email protected]>
bpf: Fix wrong reg type conversion inrelease_reference()Kumar Kartikeya Dwivedi <[email protected]>
bpf: Add helper macrobpf_for_each_reg_in_vstateDexuan Cui <[email protected]>
PCI: hv: Fix the definition of vector inhv_compose_msi_msg()Cong Wang <[email protected]>
bpf,sock_map: Movecancel_work_sync()out of sock lock[email protected] <[email protected]>
drm/vc4: hdmi: Fix HSM clock too low on Pi4Yang Yingliang <[email protected]>
HID: hyperv: fix possible memory leak inmousevsc_probe()Pu Lehui <[email protected]>
bpftool: Fix NULL pointer dereference when pin {PROG, MAP, LINK} without FILEHoward Hsu <[email protected]>
wifi: mac80211: Set TWT Information Frame Disabled bit as 1Zhengchao Shao <[email protected]>
wifi: mac80211: fix general-protection-fault inieee80211_subif_start_xmit()Wang Yufen <[email protected]>
bpf, sockmap: Fix the sk->sk_forward_alloc warning of sk_stream_kill_queuesKees Cook <[email protected]>
bpf, verifier: Fix memory leak in array reallocation for stack statezhichao.liu <[email protected]>
spi: mediatek: Fix package division errorYang Yingliang <[email protected]>
ALSA: arm: pxa: pxa2xx-ac97-lib: fix return value check ofplatform_get_irq()Srinivas Kandagatla <[email protected]>
soundwire: qcom: check for outanding writes before doing a readSrinivas Kandagatla <[email protected]>
soundwire: qcom: reinit broadcast completionArend van Spriel <[email protected]>
wifi: cfg80211: fix memory leak inquery_regdb_file()Johannes Berg <[email protected]>
wifi: cfg80211: silence a sparse RCU warningDan Carpenter <[email protected]>
phy: stm32: fix an error code in probeKrzysztof Kozlowski <[email protected]>
hwspinlock: qcom: correct MMIO max register for newer SoCsJason Gerecke <[email protected]>
HID: wacom: Fix logic used for 3rd barrel switch emulationDan Williams <[email protected]>
cxl/region: Recycle region idsYang Li <[email protected]>
drm/amdkfd: Fix NULL pointer dereference insvm_migrate_to_ram()Philip Yang <[email protected]>
drm/amdkfd: handle CPU fault on COW mappingDillon Varone <[email protected]>
drm/amd/display: Set memclk levels to be at least 1 for dcn32Jun Lei <[email protected]>
drm/amd/display: Limit dcn32 to 1950Mhz display clockDillon Varone <[email protected]>
drm/amd/display: Acquire FCLK DPM levels on DCN32Ville Syrjälä <[email protected]>
drm/i915/sdvo: Grab mode_config.mutex during LVDS init to avoid WARNsVille Syrjälä <[email protected]>
drm/i915: Simplifyintel_panel_add_edid_alt_fixed_modes()Ville Syrjälä <[email protected]>
drm/i915: Allow more varied alternate fixed modes for panelsHou Wenlong <[email protected]>
KVM: debugfs: Return retval ofsimple_attr_open()if it failsJason A. Donenfeld <[email protected]>
m68k: ReworkBI_VIRT_RNG_SEEDasBI_RNG_SEEDJason Gunthorpe <[email protected]>
drm/i915/gvt: Add missingvfio_unregister_group_dev()callSanjay R Mehta <[email protected]>
thunderbolt: Add DP OUT resource when DP tunnel is discovered-------------
Diffstat:
.../devicetree/bindings/net/engleder,tsnep.yaml | 2 +- Documentation/virt/kvm/devices/vm.rst | 3 + Makefile | 4 +- arch/arm64/kernel/efi.c | 52 ++++--- arch/m68k/include/uapi/asm/bootinfo-virt.h | 9 +- arch/m68k/include/uapi/asm/bootinfo.h | 7 + arch/m68k/kernel/setup_mm.c | 12 ++ arch/m68k/virt/config.c | 11 -- arch/mips/kernel/jump_label.c | 2 +- arch/riscv/kernel/process.c | 2 + arch/riscv/kernel/setup.c | 1 + arch/riscv/kernel/vdso/Makefile | 2 +- arch/riscv/mm/init.c | 1 - arch/s390/kvm/kvm-s390.c | 26 ++-- arch/s390/kvm/kvm-s390.h | 1 - arch/s390/kvm/pci.c | 2 +- arch/x86/kernel/asm-offsets.c | 6 - arch/x86/kvm/.gitignore | 2 + arch/x86/kvm/Makefile | 12 ++ arch/x86/kvm/kvm-asm-offsets.c | 27 ++++ arch/x86/kvm/mmu/mmu.c | 4 +- arch/x86/kvm/svm/sev.c | 2 +- arch/x86/kvm/svm/svm.c | 14 +- arch/x86/kvm/svm/svm.h | 4 +- arch/x86/kvm/svm/vmenter.S | 134 +++++++++++------- arch/x86/kvm/vmx/vmenter.S | 2 +- arch/x86/kvm/x86.c | 14 +- arch/x86/mm/hugetlbpage.c | 4 + drivers/ata/libata-scsi.c | 3 + drivers/cxl/core/region.c | 20 +++ drivers/dma/apple-admac.c | 2 +- drivers/dma/at_hdmac.c | 153 ++++++++------------- drivers/dma/at_hdmac_regs.h | 10 +- drivers/dma/idxd/cdev.c | 18 +++ drivers/dma/idxd/device.c | 26 ++-- drivers/dma/idxd/idxd.h | 34 +++++ drivers/dma/idxd/init.c | 24 +++- drivers/dma/idxd/registers.h | 2 + drivers/dma/idxd/sysfs.c | 11 +- drivers/dma/mv_xor_v2.c | 1 + drivers/dma/pxa_dma.c | 4 +- drivers/dma/stm32-dma.c | 14 +- drivers/dma/ti/k3-udma-glue.c | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 15 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 34 ++--- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 3 +- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 49 ++++--- .../amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c | 32 ++--- .../amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 52 ++++--- .../display/dc/dcn314/dcn314_dio_stream_encoder.c | 24 +++- .../gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c | 4 +- drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 15 +- .../amd/pm/swsmu/inc/pmfw_if/smu_v13_0_4_ppsmc.h | 15 +- .../drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 4 +- drivers/gpu/drm/i915/display/intel_dp.c | 2 +- drivers/gpu/drm/i915/display/intel_lvds.c | 3 +- drivers/gpu/drm/i915/display/intel_panel.c | 29 ++-- drivers/gpu/drm/i915/display/intel_panel.h | 2 +- drivers/gpu/drm/i915/display/intel_psr.c | 5 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 6 +- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 4 +- drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 4 +- drivers/gpu/drm/i915/gvt/kvmgt.c | 3 + drivers/gpu/drm/vc4/vc4_drv.c | 7 +- drivers/gpu/drm/vc4/vc4_hdmi.c | 21 ++- drivers/gpu/drm/vc4/vc4_hdmi.h | 1 + drivers/hid/hid-hyperv.c | 2 +- drivers/hid/wacom_wac.c | 11 +- drivers/hwspinlock/qcom_hwspinlock.c | 2 +- drivers/mmc/host/sdhci-brcmstb.c | 3 +- drivers/mmc/host/sdhci-cqhci.h | 24 ++++ drivers/mmc/host/sdhci-esdhc-imx.c | 7 +- drivers/mmc/host/sdhci-of-arasan.c | 3 +- drivers/mmc/host/sdhci-tegra.c | 3 +- drivers/mmc/host/sdhci_am654.c | 7 +- drivers/net/can/at91_can.c | 2 +- drivers/net/can/c_can/c_can_main.c | 2 +- drivers/net/can/can327.c | 2 +- drivers/net/can/cc770/cc770.c | 2 +- drivers/net/can/ctucanfd/ctucanfd_base.c | 2 +- drivers/net/can/dev/skb.c | 9 +- drivers/net/can/flexcan/flexcan-core.c | 2 +- drivers/net/can/grcan.c | 2 +- drivers/net/can/ifi_canfd/ifi_canfd.c | 2 +- drivers/net/can/janz-ican3.c | 2 +- drivers/net/can/kvaser_pciefd.c | 2 +- drivers/net/can/m_can/m_can.c | 2 +- drivers/net/can/mscan/mscan.c | 2 +- drivers/net/can/pch_can.c | 2 +- drivers/net/can/peak_canfd/peak_canfd.c | 2 +- drivers/net/can/rcar/rcar_can.c | 2 +- drivers/net/can/rcar/rcar_canfd.c | 15 +- drivers/net/can/sja1000/sja1000.c | 2 +- drivers/net/can/slcan/slcan-core.c | 2 +- drivers/net/can/softing/softing_main.c | 2 +- drivers/net/can/spi/hi311x.c | 2 +- drivers/net/can/spi/mcp251x.c | 2 +- drivers/net/can/spi/mcp251xfd/mcp251xfd-tx.c | 2 +- drivers/net/can/sun4i_can.c | 2 +- drivers/net/can/ti_hecc.c | 2 +- drivers/net/can/usb/ems_usb.c | 2 +- drivers/net/can/usb/esd_usb.c | 2 +- drivers/net/can/usb/etas_es58x/es58x_core.c | 2 +- drivers/net/can/usb/gs_usb.c | 2 +- drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 2 +- drivers/net/can/usb/mcba_usb.c | 2 +- drivers/net/can/usb/peak_usb/pcan_usb_core.c | 2 +- drivers/net/can/usb/ucan.c | 2 +- drivers/net/can/usb/usb_8dev.c | 2 +- drivers/net/can/xilinx_can.c | 2 +- drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 4 +- drivers/net/ethernet/aquantia/atlantic/aq_macsec.c | 2 + .../ethernet/aquantia/atlantic/macsec/macsec_api.c | 18 ++- drivers/net/ethernet/broadcom/Kconfig | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 +- drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 1 + .../net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 2 +- drivers/net/ethernet/freescale/fman/mac.c | 9 ++ drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 2 + drivers/net/ethernet/intel/ice/ice_base.c | 2 +- drivers/net/ethernet/intel/ice/ice_lib.c | 25 ++++ drivers/net/ethernet/intel/ice/ice_lib.h | 1 + drivers/net/ethernet/intel/ice/ice_vf_lib.c | 5 +- drivers/net/ethernet/marvell/mv643xx_eth.c | 1 + .../ethernet/marvell/octeontx2/nic/otx2_common.c | 1 + .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 135 ++++++++++++++---- .../ethernet/marvell/octeontx2/nic/otx2_struct.h | 57 ++++++++ .../net/ethernet/marvell/octeontx2/nic/otx2_txrx.c | 32 +++-- .../net/ethernet/marvell/octeontx2/nic/otx2_txrx.h | 1 + .../net/ethernet/marvell/prestera/prestera_rxtx.c | 7 +- drivers/net/ethernet/mediatek/mtk_star_emac.c | 2 + drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 11 +- .../ethernet/mellanox/mlx5/core/en/rep/bridge.c | 31 +++++ .../ethernet/mellanox/mlx5/core/en/tc/act/act.c | 92 +++++-------- drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h | 24 +++- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 7 + drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 6 - drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 5 + drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 14 +- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 18 +-- .../mellanox/mlx5/core/eswitch_offloads_termtbl.c | 14 +- drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c | 3 +- drivers/net/ethernet/neterion/s2io.c | 29 ++-- drivers/net/ethernet/ni/nixge.c | 1 + drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 11 +- .../net/ethernet/stmicro/stmmac/dwmac-loongson.c | 39 ++++-- .../net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 8 +- drivers/net/ethernet/sunplus/spl2sw_driver.c | 1 - drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 +- drivers/net/ethernet/ti/cpsw.c | 2 + drivers/net/ethernet/tundra/tsi108_eth.c | 5 +- drivers/net/hamradio/bpqether.c | 2 +- drivers/net/macsec.c | 23 ++-- drivers/net/macvlan.c | 4 +- drivers/net/phy/mscc/mscc_macsec.c | 1 + drivers/net/tun.c | 18 ++- drivers/net/wan/lapbether.c | 3 +- drivers/net/wireless/ath/ath11k/reg.c | 6 +- drivers/net/wwan/iosm/iosm_ipc_imem_ops.c | 8 ++ drivers/net/wwan/iosm/iosm_ipc_mux.h | 1 + drivers/net/wwan/iosm/iosm_ipc_pcie.c | 11 +- drivers/net/wwan/iosm/iosm_ipc_wwan.c | 1 + drivers/net/wwan/mhi_wwan_mbim.c | 1 + drivers/pci/controller/pci-hyperv.c | 22 ++- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 2 +- drivers/phy/ralink/phy-mt7621-pci.c | 3 +- drivers/phy/st/phy-stm32-usbphyc.c | 2 + drivers/platform/x86/hp-wmi.c | 12 +- drivers/platform/x86/p2sb.c | 15 +- drivers/soundwire/qcom.c | 9 ++ drivers/spi/spi-intel.c | 8 +- drivers/spi/spi-mt65xx.c | 23 ++-- drivers/thunderbolt/tb.c | 28 ++++ fs/btrfs/disk-io.c | 4 +- fs/btrfs/tests/btrfs-tests.c | 2 +- fs/btrfs/volumes.c | 39 ++++-- fs/btrfs/volumes.h | 2 +- fs/btrfs/zoned.c | 40 ++++++ fs/btrfs/zoned.h | 11 ++ fs/nilfs2/segment.c | 15 +- fs/nilfs2/super.c | 2 - fs/nilfs2/the_nilfs.c | 2 - fs/udf/namei.c | 2 +- include/asm-generic/vmlinux.lds.h | 2 +- include/linux/bpf_verifier.h | 21 +++ include/linux/can/dev.h | 16 +++ include/linux/skmsg.h | 2 +- include/uapi/linux/capability.h | 2 +- include/uapi/linux/idxd.h | 1 + io_uring/kbuf.c | 2 + kernel/bpf/verifier.c | 148 ++++++-------------- mm/damon/dbgfs.c | 7 + mm/hugetlb_vmemmap.c | 1 + mm/memremap.c | 1 + mm/userfaultfd.c | 2 +- net/can/af_can.c | 2 +- net/can/isotp.c | 71 +++++----- net/can/j1939/main.c | 3 + net/core/skbuff.c | 36 ++--- net/core/skmsg.c | 7 +- net/core/sock_map.c | 7 +- net/ipv4/tcp.c | 2 +- net/ipv4/tcp_bpf.c | 8 +- net/ipv6/addrlabel.c | 1 + net/mac80211/s1g.c | 3 + net/mac80211/tx.c | 5 + net/mctp/af_mctp.c | 4 +- net/mctp/route.c | 2 +- net/netfilter/nf_tables_api.c | 3 +- net/netfilter/nfnetlink.c | 1 + net/tipc/netlink_compat.c | 2 +- net/wireless/reg.c | 12 +- net/wireless/scan.c | 4 +- sound/arm/pxa2xx-ac97-lib.c | 4 +- sound/core/memalloc.c | 15 +- sound/hda/hdac_sysfs.c | 4 +- sound/pci/hda/hda_intel.c | 3 + sound/pci/hda/patch_ca0132.c | 1 + sound/pci/hda/patch_realtek.c | 2 + sound/usb/card.c | 29 ++-- sound/usb/quirks-table.h | 4 + sound/usb/quirks.c | 1 + tools/bpf/bpftool/common.c | 3 + tools/perf/.gitignore | 1 + tools/perf/tests/shell/test_brstack.sh | 5 +- tools/perf/util/parse-branch-options.c | 4 +- tools/perf/util/stat-display.c | 6 +- virt/kvm/kvm_main.c | 13 +- 230 files changed, 1662 insertions(+), 944 deletions(-)
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.0.9 release. There are 190 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 16 Nov 2022 12:44:21 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.0.9-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.0.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v6.0:
11 builds: 11 pass, 0 fail
28 boots: 28 pass, 0 fail
130 tests: 130 pass, 0 failLinux version: 6.0.9-rc1-gf8896c3ebbcf
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
tegra20-ventana, tegra210-p2371-2180,
tegra210-p3450-0000, tegra30-cardhu-a04Jon
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.0.9 release. There are 190 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 16 Nov 2022 12:44:21 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.0.9-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.0.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.0.9 release. There are 190 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 16 Nov 2022 12:44:21 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.0.9-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.0.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on BMIPS_GENERIC:
Signature · 1 line
Florian
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.0.9 release. There are 190 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 16 Nov 2022 12:44:21 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.0.9-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.0.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.0.9 release. There are 190 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 16 Nov 2022 12:44:21 +0000. Anything received after that time might be too late.
Build results:
total: 152 pass: 152 fail: 0 Qemu test results: total: 500 pass: 500 fail: 0
Guenter
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.0.9 release. There are 190 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 16 Nov 2022 12:44:21 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.0.9-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.0.y
and the diffstat can be found below.thanks,
greg k-h
Hi Greg,
Compiled and booted on my test system Lenovo P50s: Intel Core i7 No emergency and critical messages in the dmesg
./perf bench sched all
# Running sched/messaging benchmark...
# 20 sender and receiver processes per group
# 10 groups == 400 processes run
Total time: 0.816 [sec]
# Running sched/pipe benchmark...
# Executed 1000000 pipe operations between two processes
Total time: 9.507 [sec]
9.507659 usecs/op
105178 ops/secThanks
-Zan
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.0.9 release. There are 190 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 16 Nov 2022 12:44:21 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.0.9-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.0.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro's test farm.
No regressions on arm64, arm, x86_64, and i386.
## Build
* kernel: 6.0.9-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-6.0.y
* git commit: f8896c3ebbcfcc053d9c27413bea3af94c01fd71
* git describe: v6.0.8-191-gf8896c3ebbcf
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.0.y/build/v6.0.8-191-gf8896c3ebbcf
## Test Regressions (compared to v6.0.8)
## Metric Regressions (compared to v6.0.8)
## Test Fixes (compared to v6.0.8)
## Metric Fixes (compared to v6.0.8)
## Test result summary
total: 70795, pass: 60088, fail: 2510, skip: 7975, xfail: 222
## Build Summary
* arc: 10 total, 10 passed, 0 failed
* arm: 289 total, 283 passed, 6 failed
* arm64: 80 total, 80 passed, 0 failed
* i386: 71 total, 69 passed, 2 failed
* mips: 54 total, 52 passed, 2 failed
* parisc: 12 total, 12 passed, 0 failed
* powerpc: 68 total, 60 passed, 8 failed
* riscv: 24 total, 24 passed, 0 failed
* s390: 24 total, 24 passed, 0 failed
* sh: 24 total, 24 passed, 0 failed
* sparc: 12 total, 12 passed, 0 failed
* x86_64: 76 total, 76 passed, 0 failed
## Test suites summary
* fwts
* igt-gpu-tools
* kselftest-android
* kselftest-arm64
* kselftest-arm64/arm64.btitest.bti_c_func
* kselftest-arm64/arm64.btitest.bti_j_func
* kselftest-arm64/arm64.btitest.bti_jc_func
* kselftest-arm64/arm64.btitest.bti_none_func
* kselftest-arm64/arm64.btitest.nohint_func
* kselftest-arm64/arm64.btitest.paciasp_func
* kselftest-arm64/arm64.nobtitest.bti_c_func
* kselftest-arm64/arm64.nobtitest.bti_j_func
* kselftest-arm64/arm64.nobtitest.bti_jc_func
* kselftest-arm64/arm64.nobtitest.bti_none_func
* kselftest-arm64/arm64.nobtitest.nohint_func
* kselftest-arm64/arm64.nobtitest.paciasp_func
* kselftest-breakpoints
* kselftest-drivers-dma-buf
* kselftest-efivarfs
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-kvm
* kselftest-lib
* kselftest-net
* kselftest-net-forwarding
* kselftest-net-mptcp
* kselftest-netfilter
* kselftest-openat2
* kselftest-seccomp
* kselftest-timens
* kunit
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-test
* ltp-
* ltp-at
* ltp-cap_bounds
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-etlb
* ltp-fcntl-locktests
* ltp-filecaps
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-fsx
* ltp-hugetlb
* ltp-io
* ltp-ipc
* ltp-math
* ltp-math++
* ltp-mm
* ltp-nptl
* ltp-open-posix-tests
* ltp-pty
* ltp-sched
* ltp-securebits
* ltp-syscalls
* ltp-tracing
* network-basic-tests
* packetdrill
* perf
* perf/Zstd-perf.data-compression
* rcutorture
* v4l2-compliance
* vdso
--
Linaro LKFT
https://lkft.linaro.org
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.0.9 release. There are 190 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Successfully cross-compiled for arm64 (bcm2711_defconfig, GCC 10.2.0) and powerpc (ps3_defconfig, GCC 12.2.0).
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.0.9 release. There are 190 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 16 Nov 2022 12:44:21 +0000. Anything received after that time might be too late.
Hi Greg,
6.0.9-rc1 tested.
Run tested on:
- Intel Alder Lake x86_64 (nuc12 i7-1260P)
- SolidRun Cubox-i Dual/Quad - NXP iMX6 (Cubox-i4Pro)
In addition - build tested for:
- Allwinner A64
- Allwinner H3
- Allwinner H5
- Allwinner H6
- NXP iMX8
- Qualcomm Dragonboard
- Rockchip RK3288
- Rockchip RK3328
- Rockchip RK3399pro
- Samsung Exynos
--
Rudi
Hi Greg,
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.0.9 release. There are 190 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 16 Nov 2022 12:44:21 +0000. Anything received after that time might be too late.
Build test (gcc version 12.2.1 20221016):
mips: 52 configs -> no failure
arm: 100 configs -> no failure
arm64: 3 configs -> no failurex86_64: 4 configs -> no failure alpha allmodconfig -> no failure csky allmodconfig -> no failure powerpc allmodconfig -> no failure riscv allmodconfig -> no failure s390 allmodconfig -> no failure xtensa allmodconfig -> no failure
Boot test:x86_64: Booted on my test laptop. No regression.x86_64: Booted on qemu. No regression. [1]
arm64: Booted on rpi4b (4GB model). No regression. [2]
[1]. https://openqa.qa.codethink.co.uk/tests/2159
[2]. https://openqa.qa.codethink.co.uk/tests/2165
Signature · 2 lines
Regards Sudip
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.0.9 release. There are 190 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 16 Nov 2022 12:44:21 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.0.9-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.0.y
and the diffstat can be found below.thanks,
greg k-h
Tested rc1 against the Fedora build system (aarch64, armv7, ppc64le, s390x, x86_64), and boot tested x86_64. No regressions noted.
Quoted 5 lines
This is the start of the stable review cycle for the 6.0.9 release. There are 190 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 9 lines
Responses should be made by Wed, 16 Nov 2022 12:44:21 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.0.9-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.0.y
and the diffstat can be found below.
Compiled and booted on my x86_64 and ARM64 test systems. No errors or regressions.
Thanks.