Linux 6.1.82
Sasha Levin
maintainer-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
I'm announcing the release of the 6.1.82 kernel.
All users of the 6.1 kernel series must upgrade.
The updated 6.1.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.1.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
Thanks,
Sasha
- ------------
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEE4n5dijQDou9mhzu83qZv95d3LNwFAmX0mg8ACgkQ3qZv95d3 LNzr0xAAsq7KbI+iOpJ1QUuNbFVKuk5d4BrzhtVTe0GwwriKWPO1Hz8/7OuKyORr OmiWYs3rT6daI0n2lAhlF9o4u8A30n8Vu6EVcUklNOjZULH1kzLjwHFg48moKc9c Dieio0QAkkjkF3SfSghUI3/CjhLhmQqAcvXawkYEEG+SUIpXLWnJ5iSf4Gf88SvK GV9Kr4Y0fdZZ+5hCxo8BurIsnDCjewu6PLaMSfUbkMEsH8YQkjjo4Owvidx2UwJZ AohRB3/xjpZd3kzEeWo/l+GkQyxBSV0BpDvyTHl/vEepm1G1469Fw+movBFFGOgX lo6Mac387PpJAsTZfuG8w/HUBd/Qsqr3Ypr3K6bEvD7I0zJXwRZLfpedaoKz43yQ nAGDJ/RXJdqhW+N95sEtvJm5HSCErZqup6qHUx7pht1Z+QQrgSt7GjPFGSV6w90v ZAW77AZND3xlt746hbz2sXBxlMB7N9yy6rMN0ON6QDzj9RZhQUCBePqdOPXgZkU4 ics5pqXbFtK6mAXgHWK97IXaFEcxjgjJiaKiNNcPrUq0wveANzfYB/5oaXhNph+c cmcL+/OpekamoA4MB90BQ3l/PfzaBofuYBLMjhGBBi/da18H0KdRbR7pWqDwI2iY tF0FuT9EsirSITxXu5LCcQJYPY8FmQXeVs1CjlrRd7m7Ev0nRSo= =0dE0
-----END PGP SIGNATURE-----
Sasha Levin
maintainerDocumentation/ABI/testing/sysfs-devices-system-cpu +1 -0
@@ -519,6 +519,7 @@ What: /sys/devices/system/cpu/vulnerabilities /sys/devices/system/cpu/vulnerabilities/mds /sys/devices/system/cpu/vulnerabilities/meltdown /sys/devices/system/cpu/vulnerabilities/mmio_stale_data + /sys/devices/system/cpu/vulnerabilities/reg_file_data_sampling /sys/devices/system/cpu/vulnerabilities/retbleed /sys/devices/system/cpu/vulnerabilities/spec_store_bypass /sys/devices/system/cpu/vulnerabilities/spectre_v1
Documentation/admin-guide/hw-vuln/index.rst +1 -0
@@ -21,3 +21,4 @@ are configurable at compile, boot or run time. cross-thread-rsb.rst gather_data_sampling.rst srso + reg-file-data-sampling
Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst new file +104 -0
104 lines not on this page · raw message
Documentation/admin-guide/kernel-parameters.txt +21 -0
@@ -1107,6 +1107,26 @@ The filter can be disabled or changed to another driver later using sysfs. + reg_file_data_sampling= + [X86] Controls mitigation for Register File Data + Sampling (RFDS) vulnerability. RFDS is a CPU + vulnerability which may allow userspace to infer + kernel data values previously stored in floating point + registers, vector registers, or integer registers. + RFDS only affects Intel Atom processors. + + on: Turns ON the mitigation. + off: Turns OFF the mitigation. + + This parameter overrides the compile time default set + by CONFIG_MITIGATION_RFDS. Mitigation cannot be + disabled when other VERW based mitigations (like MDS) + are enabled. In order to disable RFDS mitigation all + VERW based mitigations need to be disabled. + + For details see: + Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst + driver_async_probe= [KNL] List of driver names to be probed asynchronously. * matches with all driver names. If * is specified, the
@@ -3262,6 +3282,7 @@ nospectre_bhb [ARM64] nospectre_v1 [X86,PPC] nospectre_v2 [X86,PPC,S390,ARM64] + reg_file_data_sampling=off [X86] retbleed=off [X86] spec_store_bypass_disable=off [X86,PPC] spectre_v2_user=off [X86]
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 1 -SUBLEVEL = 81 +SUBLEVEL = 82 EXTRAVERSION = NAME = Curry Ramen
arch/s390/include/asm/kvm_host.h +7 -0
@@ -777,6 +777,13 @@ struct kvm_vm_stat {u64 inject_service_signal;u64 inject_virtio;u64 aen_forward; +u64 gmap_shadow_create; +u64 gmap_shadow_reuse; +u64 gmap_shadow_r1_entry; +u64 gmap_shadow_r2_entry; +u64 gmap_shadow_r3_entry; +u64 gmap_shadow_sg_entry; +u64 gmap_shadow_pg_entry; };struct kvm_arch_memory_slot {
arch/s390/kvm/gaccess.c +7 -0
@@ -1273,6 +1273,7 @@ static int kvm_s390_shadow_tables(struct gmap *sg, unsigned long saddr, unsigned long *pgt, int *dat_protection, int *fake) { + struct kvm *kvm;struct gmap *parent;union asce asce;union vaddress vaddr;
@@ -1281,6 +1282,7 @@ static int kvm_s390_shadow_tables(struct gmap *sg, unsigned long saddr, *fake =0 ; *dat_protection =0 ; + kvm = sg->private; parent = sg->parent; vaddr.addr = saddr; asce.val = sg->orig_asce;
@@ -1341,6 +1343,7 @@ static int kvm_s390_shadow_tables(struct gmap *sg, unsigned long saddr, rc =gmap_shadow_r2t (sg, saddr, rfte.val, *fake);if (rc)return rc; + kvm->stat.gmap_shadow_r1_entry++; } fallthrough;case ASCE_TYPE_REGION2 : {
@@ -1369,6 +1372,7 @@ static int kvm_s390_shadow_tables(struct gmap *sg, unsigned long saddr, rc =gmap_shadow_r3t (sg, saddr, rste.val, *fake);if (rc)return rc; + kvm->stat.gmap_shadow_r2_entry++; } fallthrough;case ASCE_TYPE_REGION3 : {
@@ -1406,6 +1410,7 @@ static int kvm_s390_shadow_tables(struct gmap *sg, unsigned long saddr, rc =gmap_shadow_sgt (sg, saddr, rtte.val, *fake);if (rc)return rc; + kvm->stat.gmap_shadow_r3_entry++; } fallthrough;case ASCE_TYPE_SEGMENT : {
@@ -1439,6 +1444,7 @@ static int kvm_s390_shadow_tables(struct gmap *sg, unsigned long saddr, rc =gmap_shadow_pgt (sg, saddr, ste.val, *fake);if (rc)return rc; + kvm->stat.gmap_shadow_sg_entry++; } }/* Return the parent address of the page table */
@@ -1509,6 +1515,7 @@ int kvm_s390_shadow_fault(struct kvm_vcpu *vcpu, struct gmap *sg, pte.p |= dat_protection;if (!rc) rc =gmap_shadow_page (sg, saddr,__pte (pte.val)); + vcpu->kvm->stat.gmap_shadow_pg_entry++;ipte_unlock (vcpu->kvm);mmap_read_unlock (sg->mm);return rc;
arch/s390/kvm/kvm-s390.c +8 -1
@@ -66,7 +66,14 @@ const struct _kvm_stats_desc kvm_vm_stats_desc[] = {STATS_DESC_COUNTER (VM , inject_pfault_done),STATS_DESC_COUNTER (VM , inject_service_signal),STATS_DESC_COUNTER (VM , inject_virtio), -STATS_DESC_COUNTER (VM , aen_forward) +STATS_DESC_COUNTER (VM , aen_forward), +STATS_DESC_COUNTER (VM , gmap_shadow_reuse), +STATS_DESC_COUNTER (VM , gmap_shadow_create), +STATS_DESC_COUNTER (VM , gmap_shadow_r1_entry), +STATS_DESC_COUNTER (VM , gmap_shadow_r2_entry), +STATS_DESC_COUNTER (VM , gmap_shadow_r3_entry), +STATS_DESC_COUNTER (VM , gmap_shadow_sg_entry), + STATS_DESC_COUNTER(VM, gmap_shadow_pg_entry), }; const struct kvm_stats_header kvm_vm_stats_header = {
arch/s390/kvm/vsie.c +4 -2
@@ -1206,15 +1206,17 @@ static int acquire_gmap_shadow(struct kvm_vcpu *vcpu,* we're holding has been unshadowed. If the gmap is still valid, * we can safely reuse it. */ -if (vsie_page->gmap &&gmap_shadow_valid (vsie_page->gmap, asce, edat)) +if (vsie_page->gmap &&gmap_shadow_valid (vsie_page->gmap, asce, edat)) { + vcpu->kvm->stat.gmap_shadow_reuse++;return 0 ; + }/* release the old shadow - if any, and mark the prefix as unmapped */ release_gmap_shadow (vsie_page); gmap =gmap_shadow (vcpu->arch.gmap, asce, edat);if (IS_ERR (gmap))return PTR_ERR (gmap); - gmap->private = vcpu->kvm; + vcpu->kvm->stat.gmap_shadow_create++;WRITE_ONCE (vsie_page->gmap, gmap);return 0 ; }
arch/s390/mm/gmap.c +1 -0
@@ -1675,6 +1675,7 @@ struct gmap *gmap_shadow(struct gmap *parent, unsigned long asce,return ERR_PTR (-ENOMEM ); new->mm = parent->mm; new->parent =gmap_get (parent); + new->private = parent->private; new->orig_asce = asce; new->edat_level = edat_level; new->initialized = false;
arch/x86/Kconfig +11 -0
@@ -2565,6 +2565,17 @@ config GDS_FORCE_MITIGATION If in doubt, say N. +config MITIGATION_RFDS + bool "RFDS Mitigation" + depends on CPU_SUP_INTEL + default y + help + Enable mitigation for Register File Data Sampling (RFDS) by default. + RFDS is a hardware vulnerability which affects Intel Atom CPUs. It + allows unprivileged speculative access to stale data previously + stored in floating point, vector and integer registers. + See also <file:Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst> + endif config ARCH_HAS_ADD_PAGES
arch/x86/include/asm/cpufeatures.h +1 -0
@@ -477,4 +477,5 @@/* BUG word 2 */ #define X86_BUG_SRSO X86_BUG(1*32 + 0)/* AMD SRSO bug */ #define X86_BUG_DIV0 X86_BUG(1*32 + 1)/* AMD DIV0 speculation bug */ +#define X86_BUG_RFDS X86_BUG(1*32 + 2)/* CPU is vulnerable to Register File Data Sampling */ #endif /* _ASM_X86_CPUFEATURES_H */
arch/x86/include/asm/msr-index.h +8 -0
@@ -168,6 +168,14 @@* CPU is not vulnerable to Gather * Data Sampling (GDS). */ +#define ARCH_CAP_RFDS_NO BIT(27)/* +* Not susceptible to Register +* File Data Sampling. +*/ +#define ARCH_CAP_RFDS_CLEAR BIT(28)/* +* VERW clears CPU Register +* File. +*/ #define ARCH_CAP_XAPIC_DISABLE BIT(21)/* * IA32_XAPIC_DISABLE_STATUS MSR
arch/x86/kernel/cpu/bugs.c +87 -5
143 lines not on this page · raw message
arch/x86/kernel/cpu/common.c +35 -3
@@ -1248,6 +1248,8 @@ static const __initconst struct x86_cpu_id cpu_vuln_whitelist[] = {#define SRSO BIT(5)/* CPU is affected by GDS */ #define GDS BIT(6) +/* CPU is affected by Register File Data Sampling */ +#define RFDS BIT(7)static const struct x86_cpu_id cpu_vuln_blacklist[]__initconst = {VULNBL_INTEL_STEPPINGS (IVYBRIDGE ,X86_STEPPING_ANY ,SRBDS ),
@@ -1275,9 +1277,18 @@ static const struct x86_cpu_id cpu_vuln_blacklist[] __initconst = {VULNBL_INTEL_STEPPINGS (TIGERLAKE ,X86_STEPPING_ANY ,GDS ),VULNBL_INTEL_STEPPINGS (LAKEFIELD ,X86_STEPPING_ANY ,MMIO |MMIO_SBDS |RETBLEED ),VULNBL_INTEL_STEPPINGS (ROCKETLAKE ,X86_STEPPING_ANY ,MMIO |RETBLEED |GDS ), -VULNBL_INTEL_STEPPINGS (ATOM_TREMONT ,X86_STEPPING_ANY ,MMIO |MMIO_SBDS ), -VULNBL_INTEL_STEPPINGS (ATOM_TREMONT_D ,X86_STEPPING_ANY ,MMIO ), -VULNBL_INTEL_STEPPINGS (ATOM_TREMONT_L ,X86_STEPPING_ANY ,MMIO |MMIO_SBDS ), +VULNBL_INTEL_STEPPINGS (ALDERLAKE ,X86_STEPPING_ANY ,RFDS ), +VULNBL_INTEL_STEPPINGS (ALDERLAKE_L ,X86_STEPPING_ANY ,RFDS ), +VULNBL_INTEL_STEPPINGS (RAPTORLAKE ,X86_STEPPING_ANY ,RFDS ), +VULNBL_INTEL_STEPPINGS (RAPTORLAKE_P ,X86_STEPPING_ANY ,RFDS ), +VULNBL_INTEL_STEPPINGS (RAPTORLAKE_S ,X86_STEPPING_ANY ,RFDS ), +VULNBL_INTEL_STEPPINGS (ALDERLAKE_N ,X86_STEPPING_ANY ,RFDS ), +VULNBL_INTEL_STEPPINGS (ATOM_TREMONT ,X86_STEPPING_ANY ,MMIO |MMIO_SBDS |RFDS ), +VULNBL_INTEL_STEPPINGS (ATOM_TREMONT_D ,X86_STEPPING_ANY ,MMIO |RFDS ), +VULNBL_INTEL_STEPPINGS (ATOM_TREMONT_L ,X86_STEPPING_ANY ,MMIO |MMIO_SBDS |RFDS ), +VULNBL_INTEL_STEPPINGS (ATOM_GOLDMONT ,X86_STEPPING_ANY ,RFDS ), +VULNBL_INTEL_STEPPINGS (ATOM_GOLDMONT_D ,X86_STEPPING_ANY ,RFDS ), +VULNBL_INTEL_STEPPINGS (ATOM_GOLDMONT_PLUS ,X86_STEPPING_ANY ,RFDS ),VULNBL_AMD (0x15 ,RETBLEED ), VULNBL_AMD(0x16, RETBLEED),
@@ -1311,6 +1322,24 @@ static bool arch_cap_mmio_immune(u64 ia32_cap) ia32_cap & ARCH_CAP_SBDR_SSDP_NO); } +static bool __init vulnerable_to_rfds (u64 ia32_cap) +{ +/* The "immunity" bit trumps everything else: */ +if (ia32_cap &ARCH_CAP_RFDS_NO ) +return false; + +/* +* VMMs set ARCH_CAP_RFDS_CLEAR for processors not in the blacklist to +* indicate that mitigation is needed because guest is running on a +* vulnerable hardware or may migrate to such hardware: +*/ +if (ia32_cap &ARCH_CAP_RFDS_CLEAR ) +return true; + +/* Only consult the blacklist when there is no enumeration: */ +return cpu_matches (cpu_vuln_blacklist,RFDS ); +} +static void __init cpu_set_bug_bits (struct cpuinfo_x86 *c) {u64 ia32_cap =x86_read_arch_cap_msr ();
@@ -1419,6 +1448,9 @@ static void __init cpu_set_bug_bits(struct cpuinfo_x86 *c)setup_force_cpu_bug (X86_BUG_SRSO ); } +if (vulnerable_to_rfds (ia32_cap)) +setup_force_cpu_bug (X86_BUG_RFDS ); +if (cpu_matches (cpu_vuln_whitelist,NO_MELTDOWN ))return ;
arch/x86/kvm/x86.c +4 -1
@@ -1613,7 +1613,8 @@ static unsigned int num_msr_based_features; ARCH_CAP_SKIP_VMENTRY_L1DFLUSH | ARCH_CAP_SSB_NO | ARCH_CAP_MDS_NO | \ ARCH_CAP_PSCHANGE_MC_NO | ARCH_CAP_TSX_CTRL_MSR | ARCH_CAP_TAA_NO | \ ARCH_CAP_SBDR_SSDP_NO | ARCH_CAP_FBSDP_NO | ARCH_CAP_PSDP_NO | \ - ARCH_CAP_FB_CLEAR | ARCH_CAP_RRSBA | ARCH_CAP_PBRSB_NO | ARCH_CAP_GDS_NO) + ARCH_CAP_FB_CLEAR | ARCH_CAP_RRSBA | ARCH_CAP_PBRSB_NO | ARCH_CAP_GDS_NO | \ + ARCH_CAP_RFDS_NO | ARCH_CAP_RFDS_CLEAR)static u64 kvm_get_arch_capabilities (void ) {
@@ -1650,6 +1651,8 @@ static u64 kvm_get_arch_capabilities(void) data |=ARCH_CAP_SSB_NO ;if (!boot_cpu_has_bug (X86_BUG_MDS )) data |=ARCH_CAP_MDS_NO ; +if (!boot_cpu_has_bug (X86_BUG_RFDS )) + data |=ARCH_CAP_RFDS_NO ;if (!boot_cpu_has (X86_FEATURE_RTM )) {/*
drivers/base/cpu.c +8 -0
@@ -589,6 +589,12 @@ ssize_t __weak cpu_show_spec_rstack_overflow(struct device *dev,return sysfs_emit (buf,"Not affected\n" ); } +ssize_t __weak cpu_show_reg_file_data_sampling (struct device *dev, +struct device_attribute *attr,char *buf) +{ +return sysfs_emit (buf,"Not affected\n" ); +} + static DEVICE_ATTR(meltdown, 0444, cpu_show_meltdown, NULL); static DEVICE_ATTR(spectre_v1, 0444, cpu_show_spectre_v1, NULL); static DEVICE_ATTR(spectre_v2, 0444, cpu_show_spectre_v2, NULL);
@@ -602,6 +608,7 @@ static DEVICE_ATTR(mmio_stale_data, 0444, cpu_show_mmio_stale_data, NULL); static DEVICE_ATTR(retbleed, 0444, cpu_show_retbleed, NULL); static DEVICE_ATTR(gather_data_sampling, 0444, cpu_show_gds, NULL); static DEVICE_ATTR(spec_rstack_overflow, 0444, cpu_show_spec_rstack_overflow, NULL); +static DEVICE_ATTR(reg_file_data_sampling, 0444, cpu_show_reg_file_data_sampling, NULL);static struct attribute *cpu_root_vulnerabilities_attrs[] = { &dev_attr_meltdown.attr,
@@ -617,6 +624,7 @@ static struct attribute *cpu_root_vulnerabilities_attrs[] = { &dev_attr_retbleed.attr, &dev_attr_gather_data_sampling.attr, &dev_attr_spec_rstack_overflow.attr, + &dev_attr_reg_file_data_sampling.attr, NULL };
drivers/gpu/drm/amd/amdgpu/cik_ih.c +6 -0
@@ -204,6 +204,12 @@ static u32 cik_ih_get_wptr(struct amdgpu_device *adev, tmp =RREG32 (mmIH_RB_CNTL); tmp |=IH_RB_CNTL__WPTR_OVERFLOW_CLEAR_MASK ;WREG32 (mmIH_RB_CNTL, tmp); + +/* Unset the CLEAR_OVERFLOW bit immediately so new overflows +* can be detected. +*/ + tmp &= ~IH_RB_CNTL__WPTR_OVERFLOW_CLEAR_MASK ; +WREG32 (mmIH_RB_CNTL, tmp); }return (wptr & ih->ptr_mask); }
drivers/gpu/drm/amd/amdgpu/cz_ih.c +5 -0
@@ -216,6 +216,11 @@ static u32 cz_ih_get_wptr(struct amdgpu_device *adev, tmp =REG_SET_FIELD (tmp,IH_RB_CNTL ,WPTR_OVERFLOW_CLEAR ,1 );WREG32 (mmIH_RB_CNTL, tmp); +/* Unset the CLEAR_OVERFLOW bit immediately so new overflows +* can be detected. +*/ + tmp =REG_SET_FIELD (tmp,IH_RB_CNTL ,WPTR_OVERFLOW_CLEAR ,0 ); +WREG32 (mmIH_RB_CNTL, tmp); out:return (wptr & ih->ptr_mask);
drivers/gpu/drm/amd/amdgpu/iceland_ih.c +5 -0
@@ -215,6 +215,11 @@ static u32 iceland_ih_get_wptr(struct amdgpu_device *adev, tmp =REG_SET_FIELD (tmp,IH_RB_CNTL ,WPTR_OVERFLOW_CLEAR ,1 );WREG32 (mmIH_RB_CNTL, tmp); +/* Unset the CLEAR_OVERFLOW bit immediately so new overflows +* can be detected. +*/ + tmp =REG_SET_FIELD (tmp,IH_RB_CNTL ,WPTR_OVERFLOW_CLEAR ,0 ); +WREG32 (mmIH_RB_CNTL, tmp); out:return (wptr & ih->ptr_mask);
drivers/gpu/drm/amd/amdgpu/ih_v6_0.c +6 -0
@@ -417,6 +417,12 @@ static u32 ih_v6_0_get_wptr(struct amdgpu_device *adev, tmp =RREG32_NO_KIQ (ih_regs->ih_rb_cntl); tmp =REG_SET_FIELD (tmp,IH_RB_CNTL ,WPTR_OVERFLOW_CLEAR ,1 );WREG32_NO_KIQ (ih_regs->ih_rb_cntl, tmp); + +/* Unset the CLEAR_OVERFLOW bit immediately so new overflows +* can be detected. +*/ + tmp =REG_SET_FIELD (tmp,IH_RB_CNTL ,WPTR_OVERFLOW_CLEAR ,0 ); +WREG32_NO_KIQ (ih_regs->ih_rb_cntl, tmp); out:return (wptr & ih->ptr_mask); }
drivers/gpu/drm/amd/amdgpu/navi10_ih.c +6 -0
@@ -442,6 +442,12 @@ static u32 navi10_ih_get_wptr(struct amdgpu_device *adev, tmp =RREG32_NO_KIQ (ih_regs->ih_rb_cntl); tmp =REG_SET_FIELD (tmp,IH_RB_CNTL ,WPTR_OVERFLOW_CLEAR ,1 );WREG32_NO_KIQ (ih_regs->ih_rb_cntl, tmp); + +/* Unset the CLEAR_OVERFLOW bit immediately so new overflows +* can be detected. +*/ + tmp =REG_SET_FIELD (tmp,IH_RB_CNTL ,WPTR_OVERFLOW_CLEAR ,0 ); +WREG32_NO_KIQ (ih_regs->ih_rb_cntl, tmp); out:return (wptr & ih->ptr_mask); }
drivers/gpu/drm/amd/amdgpu/si_ih.c +6 -0
@@ -119,6 +119,12 @@ static u32 si_ih_get_wptr(struct amdgpu_device *adev, tmp =RREG32 (IH_RB_CNTL ); tmp |=IH_RB_CNTL__WPTR_OVERFLOW_CLEAR_MASK ;WREG32 (IH_RB_CNTL , tmp); + +/* Unset the CLEAR_OVERFLOW bit immediately so new overflows +* can be detected. +*/ + tmp &= ~IH_RB_CNTL__WPTR_OVERFLOW_CLEAR_MASK ; +WREG32 (IH_RB_CNTL , tmp); }return (wptr & ih->ptr_mask); }
drivers/gpu/drm/amd/amdgpu/tonga_ih.c +6 -0
@@ -219,6 +219,12 @@ static u32 tonga_ih_get_wptr(struct amdgpu_device *adev, tmp =REG_SET_FIELD (tmp,IH_RB_CNTL ,WPTR_OVERFLOW_CLEAR ,1 );WREG32 (mmIH_RB_CNTL, tmp); +/* Unset the CLEAR_OVERFLOW bit immediately so new overflows +* can be detected. +*/ + tmp =REG_SET_FIELD (tmp,IH_RB_CNTL ,WPTR_OVERFLOW_CLEAR ,0 ); +WREG32 (mmIH_RB_CNTL, tmp); + out:return (wptr & ih->ptr_mask); }
drivers/gpu/drm/amd/amdgpu/vega10_ih.c +6 -0
@@ -373,6 +373,12 @@ static u32 vega10_ih_get_wptr(struct amdgpu_device *adev, tmp =REG_SET_FIELD (tmp,IH_RB_CNTL ,WPTR_OVERFLOW_CLEAR ,1 );WREG32_NO_KIQ (ih_regs->ih_rb_cntl, tmp); +/* Unset the CLEAR_OVERFLOW bit immediately so new overflows +* can be detected. +*/ + tmp =REG_SET_FIELD (tmp,IH_RB_CNTL ,WPTR_OVERFLOW_CLEAR ,0 ); +WREG32_NO_KIQ (ih_regs->ih_rb_cntl, tmp); + out:return (wptr & ih->ptr_mask); }
drivers/gpu/drm/amd/amdgpu/vega20_ih.c +6 -0
@@ -424,6 +424,12 @@ static u32 vega20_ih_get_wptr(struct amdgpu_device *adev, tmp =REG_SET_FIELD (tmp,IH_RB_CNTL ,WPTR_OVERFLOW_CLEAR ,1 );WREG32_NO_KIQ (ih_regs->ih_rb_cntl, tmp); +/* Unset the CLEAR_OVERFLOW bit immediately so new overflows +* can be detected. +*/ + tmp =REG_SET_FIELD (tmp,IH_RB_CNTL ,WPTR_OVERFLOW_CLEAR ,0 ); +WREG32_NO_KIQ (ih_regs->ih_rb_cntl, tmp); + out:return (wptr & ih->ptr_mask); }
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +11 -6
@@ -5938,6 +5938,7 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,bool scale = dm_state ? (dm_state->scaling !=RMX_OFF ) : false;int mode_refresh;int preferred_refresh =0 ; +enum color_transfer_func tf =TRANSFER_FUNC_UNKNOWN ;#if defined(CONFIG_DRM_AMD_DC_DCN )struct dsc_dec_dpcd_caps dsc_caps;#endif
@@ -6071,7 +6072,9 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,if (stream->link->dpcd_caps.dprx_feature.bits.VSC_SDP_COLORIMETRY_SUPPORTED) stream->use_vsc_sdp_for_colorimetry = true; } -mod_build_vsc_infopacket (stream, &stream->vsc_infopacket, stream->output_color_space); +if (stream->out_transfer_func->tf ==TRANSFER_FUNCTION_GAMMA22 ) + tf =TRANSFER_FUNC_GAMMA_22 ; +mod_build_vsc_infopacket (stream, &stream->vsc_infopacket, stream->output_color_space, tf); aconnector->psr_skip_count =AMDGPU_DM_PSR_ENTRY_DELAY ; }
@@ -10120,11 +10123,13 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev, }#if defined(CONFIG_DRM_AMD_DC_DCN ) - ret =compute_mst_dsc_configs_for_state (state, dm_state->context, vars); -if (ret) { -DRM_DEBUG_DRIVER ("compute_mst_dsc_configs_for_state() failed\n" ); - ret = -EINVAL ; - goto fail; +if (dc_resource_is_dsc_encoding_supported (dc)) { + ret =compute_mst_dsc_configs_for_state (state, dm_state->context, vars); +if (ret) { +DRM_DEBUG_DRIVER ("compute_mst_dsc_configs_for_state() failed\n" ); + ret = -EINVAL ; + goto fail; + } } ret =dm_update_mst_vcpi_slots_for_dsc (state, dm_state->context, vars);
drivers/gpu/drm/amd/display/dc/core/dc_link_dpcd.c +2 -2
@@ -202,7 +202,7 @@ enum dc_status core_link_read_dpcd(uint32_t extended_size;/* size of the remaining partitioned address space */ uint32_t size_left_to_read; -enum dc_status status; +enum dc_status status =DC_ERROR_UNEXPECTED ;/* size of the next partition to be read from */ uint32_t partition_size;uint32_t data_index =0 ;
@@ -231,7 +231,7 @@ enum dc_status core_link_write_dpcd( {uint32_t partition_size;uint32_t data_index =0 ; -enum dc_status status; +enum dc_status status =DC_ERROR_UNEXPECTED ;while (size) { partition_size =dpcd_get_next_partition_size (address, size);
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +6 -0
@@ -3038,6 +3038,12 @@ static void set_avi_info_frame( hdmi_info.bits.C0_C1 =COLORIMETRY_EXTENDED ; } +if (pixel_encoding && color_space ==COLOR_SPACE_2020_YCBCR && + stream->out_transfer_func->tf ==TRANSFER_FUNCTION_GAMMA22 ) { + hdmi_info.bits.EC0_EC2 =0 ; + hdmi_info.bits.C0_C1 =COLORIMETRY_ITU709 ; + } +/* TODO: un-hardcode aspect ratio */ aspect = stream->timing.aspect_ratio;
drivers/gpu/drm/amd/display/modules/inc/mod_info_packet.h +2 -1
@@ -35,7 +35,8 @@ struct mod_vrr_params;void mod_build_vsc_infopacket (const struct dc_stream_state *stream,struct dc_info_packet *info_packet, -enum dc_color_space cs); +enum dc_color_space cs, +enum color_transfer_func tf);void mod_build_hf_vsif_infopacket (const struct dc_stream_state *stream,struct dc_info_packet *info_packet);
drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c +5 -1
@@ -132,7 +132,8 @@ enum ColorimetryYCCDP {void mod_build_vsc_infopacket (const struct dc_stream_state *stream,struct dc_info_packet *info_packet, -enum dc_color_space cs) +enum dc_color_space cs, +enum color_transfer_func tf) {unsigned int vsc_packet_revision = vsc_packet_undefined;unsigned int i;
@@ -382,6 +383,9 @@ void mod_build_vsc_infopacket(const struct dc_stream_state *stream, colorimetryFormat = ColorimetryYCC_DP_AdobeYCC; else if (cs == COLOR_SPACE_2020_YCBCR) colorimetryFormat = ColorimetryYCC_DP_ITU2020YCbCr; + +if (cs ==COLOR_SPACE_2020_YCBCR && tf ==TRANSFER_FUNC_GAMMA_22 ) + colorimetryFormat = ColorimetryYCC_DP_ITU709;break ;default :
drivers/net/dsa/microchip/ksz8795.c +2 -2
@@ -49,9 +49,9 @@ static int ksz8_ind_write8(struct ksz_device *dev, u8 table, u16 addr, u8 data)mutex_lock (&dev->alu_mutex); ctrl_addr =IND_ACC_TABLE (table) | addr; - ret =ksz_write8 (dev, regs[REG_IND_BYTE ], data); + ret =ksz_write16 (dev, regs[REG_IND_CTRL_0 ], ctrl_addr);if (!ret) - ret =ksz_write16 (dev, regs[REG_IND_CTRL_0 ], ctrl_addr); + ret =ksz_write8 (dev, regs[REG_IND_BYTE ], data);mutex_unlock (&dev->alu_mutex);
drivers/net/ethernet/intel/i40e/i40e_main.c +1 -1
@@ -13569,9 +13569,9 @@ int i40e_queue_pair_disable(struct i40e_vsi *vsi, int queue_pair)return err;i40e_queue_pair_disable_irq (vsi, queue_pair); +i40e_queue_pair_toggle_napi (vsi, queue_pair, false/* off */ ); err =i40e_queue_pair_toggle_rings (vsi, queue_pair, false/* off */ );i40e_clean_rx_ring (vsi->rx_rings[queue_pair]); -i40e_queue_pair_toggle_napi (vsi, queue_pair, false/* off */ );i40e_queue_pair_clean_rings (vsi, queue_pair);i40e_queue_pair_reset_stats (vsi, queue_pair);
drivers/net/ethernet/intel/ice/ice_main.c +2 -0
@@ -7681,6 +7681,8 @@ ice_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh, pf_sw = pf->first_sw;/* find the attribute in the netlink message */ br_spec =nlmsg_find_attr (nlh,sizeof (struct ifinfomsg ),IFLA_AF_SPEC ); +if (!br_spec) +return -EINVAL ;nla_for_each_nested (attr, br_spec, rem) {__u16 mode;
drivers/net/ethernet/intel/ice/ice_virtchnl.c +1 -8
@@ -440,7 +440,6 @@ static int ice_vc_get_vf_res_msg(struct ice_vf *vf, u8 *msg) vf->driver_caps = *(u32 *)msg; else vf->driver_caps = VIRTCHNL_VF_OFFLOAD_L2 | -VIRTCHNL_VF_OFFLOAD_RSS_REG |VIRTCHNL_VF_OFFLOAD_VLAN ; vfres->vf_cap_flags =VIRTCHNL_VF_OFFLOAD_L2 ;
@@ -453,14 +452,8 @@ static int ice_vc_get_vf_res_msg(struct ice_vf *vf, u8 *msg) vfres->vf_cap_flags |=ice_vc_get_vlan_caps (hw, vf, vsi, vf->driver_caps); -if (vf->driver_caps &VIRTCHNL_VF_OFFLOAD_RSS_PF ) { +if (vf->driver_caps &VIRTCHNL_VF_OFFLOAD_RSS_PF ) vfres->vf_cap_flags |=VIRTCHNL_VF_OFFLOAD_RSS_PF ; - }else { -if (vf->driver_caps &VIRTCHNL_VF_OFFLOAD_RSS_AQ ) - vfres->vf_cap_flags |=VIRTCHNL_VF_OFFLOAD_RSS_AQ ; -else - vfres->vf_cap_flags |=VIRTCHNL_VF_OFFLOAD_RSS_REG ; - }if (vf->driver_caps &VIRTCHNL_VF_OFFLOAD_FDIR_PF ) vfres->vf_cap_flags |=VIRTCHNL_VF_OFFLOAD_FDIR_PF ;
drivers/net/ethernet/intel/ice/ice_virtchnl_allowlist.c +0 -2
@@ -13,8 +13,6 @@* - opcodes needed by VF when caps are activated * * Caps that don't use new opcodes (no opcodes should be allowed): -* - VIRTCHNL_VF_OFFLOAD_RSS_AQ -* - VIRTCHNL_VF_OFFLOAD_RSS_REG * - VIRTCHNL_VF_OFFLOAD_WB_ON_ITR * - VIRTCHNL_VF_OFFLOAD_CRC * - VIRTCHNL_VF_OFFLOAD_RX_POLLING
drivers/net/ethernet/intel/ice/ice_xsk.c +5 -4
@@ -171,6 +171,10 @@ static int ice_qp_dis(struct ice_vsi *vsi, u16 q_idx)return -EBUSY ;usleep_range (1000 ,2000 ); } + +ice_qvec_dis_irq (vsi, rx_ring, q_vector); +ice_qvec_toggle_napi (vsi, q_vector, false); +netif_tx_stop_queue (netdev_get_tx_queue (vsi->netdev, q_idx));ice_fill_txq_meta (vsi, tx_ring, &txq_meta);
@@ -187,13 +191,10 @@ static int ice_qp_dis(struct ice_vsi *vsi, u16 q_idx)if (err)return err; } -ice_qvec_dis_irq (vsi, rx_ring, q_vector); - err =ice_vsi_ctrl_one_rx_ring (vsi, false, q_idx, true);if (err)return err; -ice_qvec_toggle_napi (vsi, q_vector, false);ice_qp_clean_rings (vsi, q_idx);ice_qp_reset_stats (vsi, q_idx);
@@ -256,11 +257,11 @@ static int ice_qp_ena(struct ice_vsi *vsi, u16 q_idx)if (err) goto free_buf; -clear_bit (ICE_CFG_BUSY , vsi->state);ice_qvec_toggle_napi (vsi, q_vector, true);ice_qvec_ena_irq (vsi, q_vector);netif_tx_start_queue (netdev_get_tx_queue (vsi->netdev, q_idx)); +clear_bit (ICE_CFG_BUSY , vsi->state); free_buf:kfree (qg_buf);return err;
drivers/net/ethernet/intel/igc/igc_main.c +6 -7
@@ -6330,7 +6330,7 @@ static int igc_xdp_xmit(struct net_device *dev, int num_frames,int cpu =smp_processor_id ();struct netdev_queue *nq;struct igc_ring *ring; -int i, drops; +int i, nxmit;if (unlikely (!netif_carrier_ok (dev)))return -ENETDOWN ;
@@ -6346,16 +6346,15 @@ static int igc_xdp_xmit(struct net_device *dev, int num_frames,/* Avoid transmit queue timeout since we share it with the slow path */ txq_trans_cond_update (nq); - drops =0 ; + nxmit =0 ;for (i =0 ; i < num_frames; i++) {int err;struct xdp_frame *xdpf = frames[i]; err =igc_xdp_init_tx_descriptor (ring, xdpf); -if (err) { -xdp_return_frame_rx_napi (xdpf); - drops++; - } +if (err) +break ; + nxmit++; }if (flags &XDP_XMIT_FLUSH )
@@ -6363,7 +6362,7 @@ static int igc_xdp_xmit(struct net_device *dev, int num_frames,__netif_tx_unlock (nq); -return num_frames - drops; +return nxmit; } static void igc_trigger_rxtxq_interrupt(struct igc_adapter *adapter,
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +49 -7
93 lines not on this page · raw message
drivers/net/ethernet/microchip/sparx5/sparx5_mactable.c +2 -2
@@ -347,10 +347,10 @@ int sparx5_del_mact_entry(struct sparx5 *sparx5, list) {if ((vid ==0 || mact_entry->vid == vid) &ðer_addr_equal (addr, mact_entry->mac)) { +sparx5_mact_forget (sparx5, addr, mact_entry->vid); +list_del (&mact_entry->list);devm_kfree (sparx5->dev, mact_entry); - -sparx5_mact_forget (sparx5, addr, mact_entry->vid); } }mutex_unlock (&sparx5->mact_lock);
drivers/net/ethernet/netronome/nfp/flower/conntrack.c +26 -2
@@ -1243,7 +1243,7 @@ static int nfp_ct_do_tc_merge(struct nfp_fl_ct_zone_entry *zt,/* Checks that the chain_index of the filter matches the * chain_index of the GOTO action. */ -if (post_ct_entry->chain_index != pre_ct_entry->chain_index) +if (post_ct_entry->chain_index != pre_ct_entry->goto_chain_index)return -EINVAL ; err =nfp_ct_merge_check (pre_ct_entry, post_ct_entry);
@@ -1776,7 +1776,8 @@ int nfp_fl_ct_handle_pre_ct(struct nfp_flower_priv *priv,if (IS_ERR (ct_entry))return PTR_ERR (ct_entry); ct_entry->type =CT_TYPE_PRE_CT ; - ct_entry->chain_index = ct_goto->chain_index; + ct_entry->chain_index = flow->common.chain_index; + ct_entry->goto_chain_index = ct_goto->chain_index;list_add (&ct_entry->list_node, &zt->pre_ct_list); zt->pre_ct_count++;
@@ -1796,9 +1797,30 @@ int nfp_fl_ct_handle_post_ct(struct nfp_flower_priv *priv, {struct flow_rule *rule =flow_cls_offload_flow_rule (flow);struct nfp_fl_ct_flow_entry *ct_entry; +struct flow_action_entry *ct_goto;struct nfp_fl_ct_zone_entry *zt; +struct flow_action_entry *act;bool wildcarded = false;struct flow_match_ct ct; +int i; + +flow_action_for_each (i, act, &rule->action) { +switch (act->id) { +case FLOW_ACTION_REDIRECT : +case FLOW_ACTION_REDIRECT_INGRESS : +case FLOW_ACTION_MIRRED : +case FLOW_ACTION_MIRRED_INGRESS : +if (act->dev->rtnl_link_ops && + !strcmp (act->dev->rtnl_link_ops->kind,"openvswitch" )) { +NL_SET_ERR_MSG_MOD (extack, +"unsupported offload: out port is openvswitch internal port" ); +return -EOPNOTSUPP ; + } +break ; +default : +break ; + } + }flow_rule_match_ct (rule, &ct);if (!ct.mask->ct_zone) {
@@ -1823,6 +1845,8 @@ int nfp_fl_ct_handle_post_ct(struct nfp_flower_priv *priv, ct_entry->type =CT_TYPE_POST_CT ; ct_entry->chain_index = flow->common.chain_index; + ct_goto =get_flow_act (flow->rule,FLOW_ACTION_GOTO ); + ct_entry->goto_chain_index = ct_goto ? ct_goto->chain_index :0 ;list_add (&ct_entry->list_node, &zt->post_ct_list); zt->post_ct_count++;
drivers/net/ethernet/netronome/nfp/flower/conntrack.h +2 -0
@@ -112,6 +112,7 @@ enum nfp_nfp_layer_name {* @cookie: Flow cookie, same as original TC flow, used as key * @list_node: Used by the list * @chain_index: Chain index of the original flow +* @goto_chain_index: goto chain index of the flow * @netdev: netdev structure. * @type: Type of pre-entry from enum ct_entry_type * @zt: Reference to the zone table this belongs to
@@ -125,6 +126,7 @@ struct nfp_fl_ct_flow_entry {unsigned long cookie;struct list_head list_node;u32 chain_index; +u32 goto_chain_index;enum ct_entry_type type;struct net_device *netdev;struct nfp_fl_ct_zone_entry *zt;
drivers/net/geneve.c +16 -2
@@ -221,7 +221,7 @@ static void geneve_rx(struct geneve_dev *geneve, struct geneve_sock *gs,struct genevehdr *gnvh =geneve_hdr (skb);struct metadata_dst *tun_dst =NULL ;unsigned int len; -int err =0 ; +int nh, err =0 ;void *oiph;if (ip_tunnel_collect_metadata () || gs->collect_md) {
@@ -272,9 +272,23 @@ static void geneve_rx(struct geneve_dev *geneve, struct geneve_sock *gs, skb->pkt_type =PACKET_HOST ; } - oiph =skb_network_header (skb); +/* Save offset of outer header relative to skb->head, +* because we are going to reset the network header to the inner header +* and might change skb->head. +*/ + nh =skb_network_header (skb) - skb->head; +skb_reset_network_header (skb); +if (!pskb_inet_may_pull (skb)) { +DEV_STATS_INC (geneve->dev, rx_length_errors); +DEV_STATS_INC (geneve->dev, rx_errors); + goto drop; + } + +/* Get the outer header. */ + oiph = skb->head + nh; +if (geneve_get_sk_family (gs) ==AF_INET ) err =IP_ECN_decapsulate (oiph, skb);#if IS_ENABLED (CONFIG_IPV6 )
drivers/net/usb/lan78xx.c +2 -1
@@ -3137,7 +3137,8 @@ static int lan78xx_open(struct net_device *net) done:mutex_unlock (&dev->dev_mutex); -usb_autopm_put_interface (dev->intf); +if (ret <0 ) +usb_autopm_put_interface (dev->intf);return ret; }
drivers/usb/host/xhci-ring.c +65 -15
126 lines not on this page · raw message
drivers/usb/host/xhci.h +1 -0
@@ -1570,6 +1570,7 @@ struct xhci_td {struct xhci_segment *bounce_seg;/* actual_length of the URB has already been set */ bool urb_length_set; +bool error_mid_td;unsigned int num_trbs; };
fs/ceph/mdsmap.c +4 -3
@@ -379,10 +379,11 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end, bool msgr2)ceph_decode_skip_8 (p, end, bad_ext);/* required_client_features */ ceph_decode_skip_set (p, end,64 , bad_ext); +/* bal_rank_mask */ +ceph_decode_skip_string (p, end, bad_ext); + } +if (mdsmap_ev >=18 ) {ceph_decode_64_safe (p, end, m->m_max_xattr_size, bad_ext); - }else { -/* This forces the usage of the (sync) SETXATTR Op */ - m->m_max_xattr_size =0 ; } bad_ext: dout("mdsmap_decode m_enabled: %d, m_damaged: %d, m_num_laggy: %d\n",
fs/erofs/data.c +1 -0
@@ -440,4 +440,5 @@ const struct file_operations erofs_file_fops = { .read_iter = erofs_file_read_iter, .mmap = erofs_file_mmap, .splice_read = generic_file_splice_read, + .get_unmapped_area = thp_get_unmapped_area, };
fs/proc/array.c +32 -25
89 lines not on this page · raw message
include/linux/ceph/mdsmap.h +5 -1
@@ -25,7 +25,11 @@ struct ceph_mdsmap {u32 m_session_timeout;/* seconds */ u32 m_session_autoclose;/* seconds */ u64 m_max_file_size; -u64 m_max_xattr_size;/* maximum size for xattrs blob */ +/* +* maximum size for xattrs blob. +* Zeroed by default to force the usage of the (sync) SETXATTR Op. +*/ +u64 m_max_xattr_size;u32 m_max_mds;/* expected up:active mds number */ u32 m_num_active_mds;/* actual up:active mds number */ u32 possible_max_rank;/* possible max rank index */
include/linux/cpu.h +2 -0
@@ -74,6 +74,8 @@ extern ssize_t cpu_show_spec_rstack_overflow(struct device *dev, struct device_attribute *attr, char *buf);extern ssize_t cpu_show_gds (struct device *dev,struct device_attribute *attr,char *buf); +extern ssize_t cpu_show_reg_file_data_sampling (struct device *dev, +struct device_attribute *attr,char *buf); extern __printf(4, 5) struct device *cpu_device_create(struct device *parent, void *drvdata,
include/trace/events/qdisc.h +10 -10
@@ -81,14 +81,14 @@ TRACE_EVENT(qdisc_reset,TP_ARGS (q),TP_STRUCT__entry ( - __string( dev, qdisc_dev(q) ) - __string( kind, q->ops->id ) - __field( u32, parent ) -__field ( u32, handle ) + __string( dev, qdisc_dev(q)->name ) + __string( kind, q->ops->id ) + __field( u32, parent ) +__field ( u32, handle ) ),TP_fast_assign ( - __assign_str(dev, qdisc_dev(q)); + __assign_str(dev, qdisc_dev(q)->name);__assign_str (kind, q->ops->id); __entry->parent = q->parent; __entry->handle = q->handle;
@@ -106,14 +106,14 @@ TRACE_EVENT(qdisc_destroy,TP_ARGS (q),TP_STRUCT__entry ( - __string( dev, qdisc_dev(q) ) - __string( kind, q->ops->id ) - __field( u32, parent ) -__field ( u32, handle ) + __string( dev, qdisc_dev(q)->name ) + __string( kind, q->ops->id ) + __field( u32, parent ) +__field ( u32, handle ) ),TP_fast_assign ( - __assign_str(dev, qdisc_dev(q)); + __assign_str(dev, qdisc_dev(q)->name);__assign_str (kind, q->ops->id); __entry->parent = q->parent; __entry->handle = q->handle;
kernel/bpf/cpumap.c +1 -1
@@ -222,7 +222,7 @@ static int cpu_map_bpf_prog_run_xdp(struct bpf_cpu_map_entry *rcpu, void **frames, int n, struct xdp_cpumap_stats *stats) { - struct xdp_rxq_info rxq; + struct xdp_rxq_info rxq = {};struct xdp_buff xdp;int i, nframes =0 ;
kernel/sys.c +52 -39
126 lines not on this page · raw message
mm/readahead.c +2 -2
@@ -483,7 +483,7 @@ static inline int ra_alloc_folio(struct readahead_control *ractl, pgoff_t index,if (!folio)return -ENOMEM ; - mark =round_up (mark,1UL << order); + mark =round_down (mark,1UL << order);if (index == mark)folio_set_readahead (folio); err =filemap_add_folio (ractl->mapping, folio, index, gfp);
@@ -591,7 +591,7 @@ static void ondemand_readahead(struct readahead_control *ractl,* It's the expected callback index, assume sequential access. * Ramp up sizes, and push forward the readahead window. */ - expected =round_up (ra->start + ra->size - ra->async_size, + expected =round_down (ra->start + ra->size - ra->async_size,1UL << order);if (index == expected || index == (ra->start + ra->size)) { ra->start += ra->size;
net/ipv6/route.c +7 -14
@@ -5335,19 +5335,7 @@ static int ip6_route_multipath_add(struct fib6_config *cfg, err_nh =NULL ;list_for_each_entry (nh, &rt6_nh_list, next) { err =__ip6_ins_rt (nh->fib6_info, info, extack); -fib6_info_release (nh->fib6_info); - -if (!err) { -/* save reference to last route successfully inserted */ - rt_last = nh->fib6_info; - -/* save reference to first route for notification */ -if (!rt_notif) - rt_notif = nh->fib6_info; - } -/* nh->fib6_info is used or freed at this point, reset to NULL*/ - nh->fib6_info =NULL ;if (err) {if (replace && nhn) NL_SET_ERR_MSG_MOD(extack,
@@ -5355,6 +5343,12 @@ static int ip6_route_multipath_add(struct fib6_config *cfg, err_nh = nh; goto add_errout; } +/* save reference to last route successfully inserted */ + rt_last = nh->fib6_info; + +/* save reference to first route for notification */ +if (!rt_notif) + rt_notif = nh->fib6_info;/* Because each route is added like a single route we remove * these flags after the first nexthop: if there is a collision,
@@ -5415,8 +5409,7 @@ static int ip6_route_multipath_add(struct fib6_config *cfg, cleanup:list_for_each_entry_safe (nh, nh_safe, &rt6_nh_list, next) { -if (nh->fib6_info) -fib6_info_release (nh->fib6_info); +fib6_info_release (nh->fib6_info);list_del (&nh->next);kfree (nh); }
net/netfilter/nf_conntrack_h323_asn1.c +4 -0
@@ -533,6 +533,8 @@ static int decode_seq(struct bitstr *bs, const struct field_t *f,/* Get fields bitmap */ if (nf_h323_error_boundary (bs,0 , f->sz))return H323_ERROR_BOUND ; +if (f->sz >32 ) +return H323_ERROR_RANGE ; bmp =get_bitmap (bs, f->sz);if (base) *(unsigned int *)base = bmp;
@@ -589,6 +591,8 @@ static int decode_seq(struct bitstr *bs, const struct field_t *f, bmp2_len =get_bits (bs,7 ) +1 ;if (nf_h323_error_boundary (bs,0 , bmp2_len))return H323_ERROR_BOUND ; +if (bmp2_len >32 ) +return H323_ERROR_RANGE ; bmp2 =get_bitmap (bs, bmp2_len); bmp |= bmp2 >> f->sz;if (base)
net/netfilter/nft_ct.c +5 -6
@@ -1237,14 +1237,13 @@ static int nft_ct_expect_obj_init(const struct nft_ctx *ctx,switch (priv->l3num) {case NFPROTO_IPV4 :case NFPROTO_IPV6 : -if (priv->l3num != ctx->family) -return -EINVAL ; +if (priv->l3num == ctx->family || ctx->family ==NFPROTO_INET ) +break ; - fallthrough; -case NFPROTO_INET : -break ; +return -EINVAL ; +case NFPROTO_INET :/* tuple.src.l3num supports NFPROTO_IPV4/6 only */ default : -return -EOPNOTSUPP ; +return -EAFNOSUPPORT ; } priv->l4proto =nla_get_u8 (tb[NFTA_CT_EXPECT_L4PROTO ]);
net/netrom/af_netrom.c +7 -7
@@ -453,16 +453,16 @@ static int nr_create(struct net *net, struct socket *sock, int protocol,nr_init_timers (sk); nr->t1 = -msecs_to_jiffies (sysctl_netrom_transport_timeout); +msecs_to_jiffies (READ_ONCE (sysctl_netrom_transport_timeout)); nr->t2 = -msecs_to_jiffies (sysctl_netrom_transport_acknowledge_delay); +msecs_to_jiffies (READ_ONCE (sysctl_netrom_transport_acknowledge_delay)); nr->n2 = -msecs_to_jiffies (sysctl_netrom_transport_maximum_tries); +msecs_to_jiffies (READ_ONCE (sysctl_netrom_transport_maximum_tries)); nr->t4 = -msecs_to_jiffies (sysctl_netrom_transport_busy_delay); +msecs_to_jiffies (READ_ONCE (sysctl_netrom_transport_busy_delay)); nr->idle = -msecs_to_jiffies (sysctl_netrom_transport_no_activity_timeout); - nr->window = sysctl_netrom_transport_requested_window_size; +msecs_to_jiffies (READ_ONCE (sysctl_netrom_transport_no_activity_timeout)); + nr->window =READ_ONCE (sysctl_netrom_transport_requested_window_size); nr->bpqext =1 ; nr->state =NR_STATE_0 ;
@@ -954,7 +954,7 @@ int nr_rx_frame(struct sk_buff *skb, struct net_device *dev)* G8PZT's Xrouter which is sending packets with command type 7 * as an extension of the protocol. */ -if (sysctl_netrom_reset_circuit && +if (READ_ONCE (sysctl_netrom_reset_circuit) && (frametype !=NR_RESET || flags !=0 ))nr_transmit_reset (skb,1 );
net/netrom/nr_dev.c +1 -1
@@ -81,7 +81,7 @@ static int nr_header(struct sk_buff *skb, struct net_device *dev, buff[6 ] |=AX25_SSSID_SPARE ; buff +=AX25_ADDR_LEN ; - *buff++ = sysctl_netrom_network_ttl_initialiser; + *buff++ =READ_ONCE (sysctl_netrom_network_ttl_initialiser); *buff++ =NR_PROTO_IP ; *buff++ =NR_PROTO_IP ;
net/netrom/nr_in.c +3 -3
@@ -97,7 +97,7 @@ static int nr_state1_machine(struct sock *sk, struct sk_buff *skb,break ;case NR_RESET : -if (sysctl_netrom_reset_circuit) +if (READ_ONCE (sysctl_netrom_reset_circuit))nr_disconnect (sk,ECONNRESET );break ;
@@ -128,7 +128,7 @@ static int nr_state2_machine(struct sock *sk, struct sk_buff *skb,break ;case NR_RESET : -if (sysctl_netrom_reset_circuit) +if (READ_ONCE (sysctl_netrom_reset_circuit))nr_disconnect (sk,ECONNRESET );break ;
@@ -262,7 +262,7 @@ static int nr_state3_machine(struct sock *sk, struct sk_buff *skb, int frametypebreak ;case NR_RESET : -if (sysctl_netrom_reset_circuit) +if (READ_ONCE (sysctl_netrom_reset_circuit))nr_disconnect (sk,ECONNRESET );break ;
net/netrom/nr_out.c +1 -1
@@ -204,7 +204,7 @@ void nr_transmit_buffer(struct sock *sk, struct sk_buff *skb) dptr[6 ] |=AX25_SSSID_SPARE ; dptr +=AX25_ADDR_LEN ; - *dptr++ = sysctl_netrom_network_ttl_initialiser; + *dptr++ =READ_ONCE (sysctl_netrom_network_ttl_initialiser);if (!nr_route_frame (skb,NULL )) {kfree_skb (skb);
net/netrom/nr_route.c +4 -4
@@ -153,7 +153,7 @@ static int __must_check nr_add_node(ax25_address *nr, const char *mnemonic, nr_neigh->digipeat =NULL ; nr_neigh->ax25 =NULL ; nr_neigh->dev = dev; - nr_neigh->quality = sysctl_netrom_default_path_quality; + nr_neigh->quality =READ_ONCE (sysctl_netrom_default_path_quality); nr_neigh->locked =0 ; nr_neigh->count =0 ; nr_neigh->number = nr_neigh_no++;
@@ -728,7 +728,7 @@ void nr_link_failed(ax25_cb *ax25, int reason) nr_neigh->ax25 =NULL ;ax25_cb_put (ax25); -if (++nr_neigh->failed < sysctl_netrom_link_fails_count) { +if (++nr_neigh->failed <READ_ONCE (sysctl_netrom_link_fails_count)) {nr_neigh_put (nr_neigh);return ; }
@@ -766,7 +766,7 @@ int nr_route_frame(struct sk_buff *skb, ax25_cb *ax25)if (ax25 !=NULL ) { ret =nr_add_node (nr_src,"" , &ax25->dest_addr, ax25->digipeat, ax25->ax25_dev->dev,0 , - sysctl_netrom_obsolescence_count_initialiser); +READ_ONCE (sysctl_netrom_obsolescence_count_initialiser));if (ret)return ret; }
@@ -780,7 +780,7 @@ int nr_route_frame(struct sk_buff *skb, ax25_cb *ax25)return ret; } -if (!sysctl_netrom_routing_control && ax25 !=NULL ) +if (!READ_ONCE (sysctl_netrom_routing_control) && ax25 !=NULL )return 0 ;/* Its Time-To-Live has expired */
net/netrom/nr_subr.c +3 -2
@@ -182,7 +182,8 @@ void nr_write_internal(struct sock *sk, int frametype) *dptr++ = nr->my_id; *dptr++ = frametype; *dptr++ = nr->window; -if (nr->bpqext) *dptr++ = sysctl_netrom_network_ttl_initialiser; +if (nr->bpqext) + *dptr++ =READ_ONCE (sysctl_netrom_network_ttl_initialiser);break ;case NR_DISCREQ :
@@ -236,7 +237,7 @@ void __nr_transmit_reply(struct sk_buff *skb, int mine, unsigned char cmdflags) dptr[6 ] |=AX25_SSSID_SPARE ; dptr +=AX25_ADDR_LEN ; - *dptr++ = sysctl_netrom_network_ttl_initialiser; + *dptr++ =READ_ONCE (sysctl_netrom_network_ttl_initialiser);if (mine) { *dptr++ =0 ;
net/rds/rdma.c +3 -0
@@ -301,6 +301,9 @@ static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args,kfree (sg); } ret =PTR_ERR (trans_private); +/* Trigger connection so that its ready for the next retry */ +if (ret == -ENODEV ) +rds_conn_connect_if_down (cp->cp_conn); goto out; }
net/rds/send.c +1 -5
@@ -1314,12 +1314,8 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len)/* Parse any control messages the user may have included. */ ret =rds_cmsg_send (rs, rm, msg, &allocated_mr, &vct); -if (ret) { -/* Trigger connection so that its ready for the next retry */ -if (ret == -EAGAIN ) -rds_conn_connect_if_down (conn); +if (ret) goto out; - }if (rm->rdma.op_active && !conn->c_trans->xmit_rdma) { printk_ratelimited(KERN_NOTICE "rdma_op %p conn xmit_rdma %p\n",
sound/soc/codecs/wcd938x.c +1 -1
@@ -210,7 +210,7 @@ struct wcd938x_priv { }; static const SNDRV_CTL_TLVD_DECLARE_DB_MINMAX(ear_pa_gain, 600, -1800); -static const DECLARE_TLV_DB_SCALE(line_gain, -3000, 150, -3000); +static const DECLARE_TLV_DB_SCALE(line_gain, -3000, 150, 0); static const SNDRV_CTL_TLVD_DECLARE_DB_MINMAX(analog_gain, 0, 3000);struct wcd938x_mbhc_zdet_param {
tools/testing/selftests/net/mptcp/simult_flows.sh +4 -4
@@ -301,10 +301,10 @@ done setup run_test 10 10 0 0 "balanced bwidth" -run_test 10 10 1 50 "balanced bwidth with unbalanced delay" +run_test 10 10 1 25 "balanced bwidth with unbalanced delay" # we still need some additional infrastructure to pass the following test-cases -run_test 30 10 0 0 "unbalanced bwidth" -run_test 30 10 1 50 "unbalanced bwidth with unbalanced delay" -run_test 30 10 50 1 "unbalanced bwidth with opposed, unbalanced delay" +run_test 10 3 0 0 "unbalanced bwidth" +run_test 10 3 1 25 "unbalanced bwidth with unbalanced delay" +run_test 10 3 25 1 "unbalanced bwidth with opposed, unbalanced delay" exit $ret
tools/testing/selftests/vm/charge_reserved_hugetlb.sh +1 -1
@@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # SPDX-License-Identifier: GPL-2.0 # Kselftest framework requirement - SKIP code is 4.
tools/testing/selftests/vm/map_hugetlb.c +7 -0
@@ -15,6 +15,7 @@#include <unistd.h> #include <sys/mman.h> #include <fcntl.h> +#include "vm_util.h" #define LENGTH (256UL*1024*1024)#define PROTECTION (PROT_READ | PROT_WRITE)
@@ -70,10 +71,16 @@ int main(int argc, char **argv) {void *addr;int ret; +size_t hugepage_size;size_t length =LENGTH ;int flags =FLAGS ;int shift =0 ; + hugepage_size =default_huge_page_size (); +/* munmap with fail if the length is not page aligned */ +if (hugepage_size > length) + length = hugepage_size; +if (argc >1 ) length =atol (argv[1 ]) <<20 ;if (argc >2 ) {
tools/testing/selftests/vm/write_hugetlb_memory.sh +1 -1
@@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # SPDX-License-Identifier: GPL-2.0 set -e