Linux 4.14.38
Greg KH
maintainerI'm announcing the release of the 4.14.38 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/admin-guide/kernel-parameters.txt | 3 Makefile | 2 arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 11 arch/microblaze/Kconfig.platform | 1 arch/microblaze/lib/fastcopy.S | 4 arch/s390/Kconfig | 47 +++ arch/s390/Makefile | 10 arch/s390/include/asm/alternative.h | 149 ++++++++++++ arch/s390/include/asm/barrier.h | 24 ++ arch/s390/include/asm/facility.h | 18 + arch/s390/include/asm/kvm_host.h | 3 arch/s390/include/asm/lowcore.h | 7 arch/s390/include/asm/nospec-branch.h | 17 + arch/s390/include/asm/processor.h | 4 arch/s390/include/asm/thread_info.h | 4 arch/s390/include/uapi/asm/kvm.h | 5 arch/s390/kernel/Makefile | 6 arch/s390/kernel/alternative.c | 112 +++++++++ arch/s390/kernel/early.c | 5 arch/s390/kernel/entry.S | 250 ++++++++++++++++++--- arch/s390/kernel/ipl.c | 1 arch/s390/kernel/module.c | 65 +++++ arch/s390/kernel/nospec-branch.c | 169 ++++++++++++++ arch/s390/kernel/processor.c | 18 + arch/s390/kernel/setup.c | 14 + arch/s390/kernel/smp.c | 7 arch/s390/kernel/uprobes.c | 9 arch/s390/kernel/vmlinux.lds.S | 37 +++ arch/s390/kvm/kvm-s390.c | 12 + arch/s390/kvm/vsie.c | 30 ++ drivers/acpi/acpi_video.c | 27 ++ drivers/block/swim.c | 49 +--- drivers/block/swim3.c | 6 drivers/cdrom/cdrom.c | 2 drivers/char/tpm/tpm-interface.c | 131 ++++++++--- drivers/char/tpm/tpm.h | 1 drivers/char/tpm/tpm_crb.c | 108 ++++++--- drivers/char/tpm/tpm_tis_core.c | 4 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 3 drivers/message/fusion/mptsas.c | 1 drivers/net/bonding/bond_main.c | 3 drivers/net/ethernet/amd/xgbe/xgbe-common.h | 8 drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c | 16 + drivers/net/ethernet/amd/xgbe/xgbe-main.c | 1 drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 24 +- drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 2 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 196 ++++++++++++++-- drivers/net/ethernet/amd/xgbe/xgbe.h | 9 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 11 drivers/net/ethernet/ti/cpsw.c | 2 drivers/net/ppp/pppoe.c | 4 drivers/net/team/team.c | 38 ++- drivers/net/virtio_net.c | 68 +++-- drivers/net/wireless/ath/ath10k/mac.c | 5 drivers/pinctrl/intel/pinctrl-intel.c | 23 - drivers/s390/block/dasd_alias.c | 13 - drivers/s390/char/Makefile | 2 drivers/s390/cio/chsc.c | 14 - include/linux/fsnotify_backend.h | 4 include/linux/hmm.h | 9 include/linux/if_vlan.h | 7 include/linux/tpm.h | 2 include/net/ife.h | 3 include/net/llc_conn.h | 1 include/net/tcp.h | 1 include/uapi/linux/kvm.h | 1 kernel/trace/trace_entries.h | 2 net/core/dev.c | 2 net/core/neighbour.c | 40 ++- net/dns_resolver/dns_key.c | 13 - net/ife/ife.c | 38 +++ net/ipv4/tcp.c | 7 net/ipv4/tcp_input.c | 7 net/ipv6/route.c | 2 net/ipv6/seg6_iptunnel.c | 2 net/l2tp/l2tp_ppp.c | 7 net/llc/af_llc.c | 14 + net/llc/llc_c_ac.c | 9 net/llc/llc_conn.c | 22 + net/packet/af_packet.c | 83 ++++-- net/packet/internal.h | 10 net/sched/act_ife.c | 9 net/sctp/ipv6.c | 60 ++--- net/smc/af_smc.c | 10 net/strparser/strparser.c | 9 net/tipc/netlink.c | 3 security/commoncap.c | 2 87 files changed, 1835 insertions(+), 359 deletions(-)
Ahmed Abdelsalam (1):
ipv6: sr: fix NULL pointer dereference in seg6_do_srh_encap()- v4 pkts
Alexander Aring (3):
net: sched: ife: signal not finding metaid
net: sched: ife: handle malformed tlv length
net: sched: ife: check on metadata length
Christian Borntraeger (3):
KVM: s390: wire up bpb feature
KVM: s390: force bp isolation for VSIE
s390/entry.S: fix spurious zeroing of r0
Cong Wang (3):
llc: delete timers synchronously in llc_sk_free()
llc: hold llc_sap before release_sock()
llc: fix NULL pointer deref for SOCK_ZAPPED
Dan Carpenter (1):
cdrom: information leak in cdrom_ioctl_media_changed()
Doron Roberts-Kedes (2):
strparser: Do not call mod_delayed_work with a timeout of LONG_MAX
strparser: Fix incorrect strp->need_bytes value.
Eric Biggers (1):
KEYS: DNS: limit the length of option strings
Eric Dumazet (5):
ipv6: add RTA_TABLE and RTA_PREFSRC to rtm_ipv6_policy
net: validate attribute sizes in neigh_dump_table()
net: af_packet: fix race in PACKET_{R|T}X_RING
tcp: md5: reject TCP_MD5SIG or TCP_MD5SIG_EXT on established sockets
tipc: add policy for TIPC_NLA_NET_ADDR
Eugeniu Rosca (1):
s390: Replace IS_ENABLED(EXPOLINE_*) with IS_ENABLED(CONFIG_EXPOLINE_*)
Finn Thain (8):
m68k/mac: Don't remap SWIM MMIO region
block/swim: Check drive type
block/swim: Don't log an error message for an invalid ioctl block/swim: Remove extra put_disk() call from error path block/swim: Rename macros to avoid inconsistent inverted logic block/swim: Select appropriate drive on device open block/swim: Fix array bounds check
block/swim: Fix IO error at end of medium
Greg Kroah-Hartman (3):
Revert "pinctrl: intel: Initialize GPIO properly when used through irqchip" Revert "mm/hmm: fix header file if/else/endif maze"
Linux 4.14.38
Guillaume Nault (2):
l2tp: check sockaddr length in pppol2tp_connect()
pppoe: check sockaddr length in pppoe_connect()
Hans de Goede (1):
ACPI / video: Only default only_lcd to true on Win8-ready _desktops_
Heiko Carstens (2):
s390: enable CPU alternatives unconditionally s390/uprobes: implement arch_uretprobe_is_alive()
Ivan Khoronzhuk (1):
net: ethernet: ti: cpsw: fix tx vlan priority mapping
James Bottomley (1):
tpm: add retry logic
Jann Horn (1):
tcp: don't read out-of-bounds opsize
Karthikeyan Periyasamy (1):
Revert "ath10k: send (re)assoc peer command when NSS changed"
Klaus Goger (1):
arm64: dts: rockchip: remove vdd_log from rk3399-puma
Martin K. Petersen (1):
scsi: mptsas: Disable WRITE SAME
Martin Schwidefsky (13):
s390: scrub registers on kernel entry and KVM exit
s390: add optimized array_index_mask_nospec s390/alternative: use a copy of the facility bit mask
s390: add options to change branch prediction behaviour for the kernel
s390: run user space and KVM guests with modified branch prediction
s390: introduce execute-trampolines for branches
s390: do not bypass BPENTER for interrupt system calls
s390: move nobp parameter functions to nospec-branch.c
s390: add automatic detection of the spectre defense
s390: report spectre mitigation via syslog
s390: add sysfs attributes for spectre
s390: correct nospec auto detection init order
s390: correct module section names for expoline code revert
Michael S. Tsirkin (2):
virtio_net: split out ctrl buffer
virtio_net: fix adding vids on big-endian
Michal Simek (1):
microblaze: Setup dependencies for ASM optimized lib functions
Neil Armstrong (1):
drm: bridge: dw-hdmi: Fix overflow workaround for Amlogic Meson GX SoCs
Paolo Abeni (1):
team: avoid adding twice the same option to the event list
Paweł Jabłoński (1):
i40e: Fix attach VF to VM issue
Peter Xu (1):
tracing: Fix missing tab for hwlat_detector print format
Robert Kolchmeyer (1):
fsnotify: Fix fsnotify_mark_connector race
Sebastian Ott (1):
s390/cio: update chpid descriptor after resource accessibility event
Soheil Hassas Yeganeh (1):
tcp: clear tp->packets_out when purging write queue
Stefan Haberland (1):
s390/dasd: fix IO error for newly defined devices
Tetsuo Handa (1):
commoncap: Handle memory allocation failure.
Tom Lendacky (3):
amd-xgbe: Add pre/post auto-negotiation phy hooks
amd-xgbe: Improve KR auto-negotiation and training
amd-xgbe: Only use the SFP supported transceiver signals
Tomas Winkler (1):
tpm: cmd_ready command can be issued only after granting locality
Toshiaki Makita (1):
vlan: Fix reading memory beyond skb->tail in skb_vlan_tagged_multi
Ursula Braun (1):
net/smc: fix shutdown in state SMC_LISTEN
Vasily Gorbik (1):
s390: introduce CPU alternatives
Willem de Bruijn (1):
packet: fix bitfield update race
Winkler, Tomas (1):
tpm: tpm-interface: fix tpm_transmit/_cmd kdoc
Wolfgang Bumiller (1):
net: fix deadlock while clearing neighbor proxy table
Xin Long (3):
bonding: do not set slave_dev npinfo before slave_enable_netpoll in bond_enslave
team: fix netconsole setup over team
sctp: do not check port in sctp_inet6_cmp_addr
Greg KH
maintainerDocumentation/admin-guide/kernel-parameters.txt +3 -0
@@ -2541,6 +2541,9 @@ noalign [KNL,ARM] + noaltinstr [S390] Disables alternative instructions patching + (CPU alternatives feature). + noapic [SMP,APIC] Tells the kernel to not make use of any IOAPICs that may be present in the system.
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 37 +SUBLEVEL = 38 EXTRAVERSION = NAME = Petit Gorille
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi +0 -11
@@ -155,17 +155,6 @@ regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; }; - - vdd_log: vdd-log { - compatible = "pwm-regulator"; - pwms = <&pwm2 0 25000 0>; - regulator-name = "vdd_log"; - regulator-min-microvolt = <800000>; - regulator-max-microvolt = <1400000>; - regulator-always-on; - regulator-boot-on; - status = "okay"; - }; }; &cpu_b0 {
arch/microblaze/Kconfig.platform +1 -0
@@ -20,6 +20,7 @@ config OPT_LIB_FUNCTION config OPT_LIB_ASM bool "Optimalized lib function ASM" depends on OPT_LIB_FUNCTION && (XILINX_MICROBLAZE0_USE_BARREL = 1) + depends on CPU_BIG_ENDIAN default n help Allows turn on optimalized library function (memcpy and memmove).
arch/microblaze/lib/fastcopy.S +0 -4
@@ -29,10 +29,6 @@ * between mem locations with size of xfer spec'd in bytes */ -#ifdef __MICROBLAZEEL__ -#error Microblaze LE not support ASM optimized lib func. Disable OPT_LIB_ASM. -#endif - #include <linux/linkage.h> .text .globl memcpy
arch/s390/Kconfig +47 -0
65 lines not on this page · raw message
arch/s390/Makefile +10 -0
@@ -81,6 +81,16 @@ ifeq ($(call cc-option-yn,-mwarn-dynamicstack),y) cflags-$(CONFIG_WARN_DYNAMIC_STACK) += -mwarn-dynamicstack endif +ifdef CONFIG_EXPOLINE + ifeq ($(call cc-option-yn,$(CC_FLAGS_MARCH) -mindirect-branch=thunk),y) + CC_FLAGS_EXPOLINE := -mindirect-branch=thunk + CC_FLAGS_EXPOLINE += -mfunction-return=thunk + CC_FLAGS_EXPOLINE += -mindirect-branch-table + export CC_FLAGS_EXPOLINE + cflags-y += $(CC_FLAGS_EXPOLINE) -DCC_USING_EXPOLINE + endif +endif + ifdef CONFIG_FUNCTION_TRACER # make use of hotpatch feature if the compiler supports it cc_hotpatch := -mhotpatch=0,3
arch/s390/include/asm/alternative.h new file +149 -0
149 lines not on this page · raw message
arch/s390/include/asm/barrier.h +24 -0
@@ -49,6 +49,30 @@ do { \#define __smp_mb__before_atomic () barrier()#define __smp_mb__after_atomic () barrier() +/** +* array_index_mask_nospec - generate a mask for array_idx() that is +* ~0UL when the bounds check succeeds and 0 otherwise +* @index: array element index +* @size: number of elements in array +*/ +#define array_index_mask_nospec array_index_mask_nospec +static inline unsigned long array_index_mask_nospec (unsigned long index, +unsigned long size) +{ +unsigned long mask; + +if (__builtin_constant_p (size) && size >0 ) { + asm(" clgr %2,%1\n" +" slbgr %0,%0\n" + :"=d" (mask) :"d" (size-1 ),"d" (index) :"cc" ); +return mask; + } + asm(" clgr %1,%2\n" +" slbgr %0,%0\n" + :"=d" (mask) :"d" (size),"d" (index) :"cc" ); +return ~mask; +} +#include <asm-generic/barrier.h> #endif /* __ASM_BARRIER_H */
arch/s390/include/asm/facility.h +18 -0
@@ -15,6 +15,24 @@#define MAX_FACILITY_BIT (sizeof(((struct lowcore *)0)->stfle_fac_list) * 8) +static inline void __set_facility (unsigned long nr,void *facilities) +{ +unsigned char *ptr = (unsigned char *) facilities; + +if (nr >=MAX_FACILITY_BIT ) +return ; + ptr[nr >>3 ] |=0x80 >> (nr &7 ); +} + +static inline void __clear_facility (unsigned long nr,void *facilities) +{ +unsigned char *ptr = (unsigned char *) facilities; + +if (nr >=MAX_FACILITY_BIT ) +return ; + ptr[nr >>3 ] &= ~(0x80 >> (nr &7 )); +} +static inline int __test_facility (unsigned long nr,void *facilities) {unsigned char *ptr;
arch/s390/include/asm/kvm_host.h +2 -1
@@ -210,7 +210,8 @@ struct kvm_s390_sie_block {__u16 ipa;/* 0x0056 */ __u32 ipb;/* 0x0058 */ __u32 scaoh;/* 0x005c */ -__u8 reserved60;/* 0x0060 */ +#define FPF_BPBC 0x20 +__u8 fpf;/* 0x0060 */ #define ECB_GS 0x40#define ECB_TE 0x10#define ECB_SRSI 0x04
arch/s390/include/asm/lowcore.h +5 -2
@@ -140,7 +140,9 @@ struct lowcore {/* Per cpu primary space access list */ __u32 paste[16 ];/* 0x0400 */ -__u8 pad_0x04c0[0x0e00 -0x0440 ];/* 0x0440 */ +/* br %r1 trampoline */ +__u16 br_r1_trampoline;/* 0x0440 */ +__u8 pad_0x0442[0x0e00 -0x0442 ];/* 0x0442 */ /* * 0xe00 contains the address of the IPL Parameter Information
@@ -155,7 +157,8 @@ struct lowcore {__u8 pad_0x0e20[0x0f00 -0x0e20 ];/* 0x0e20 */ /* Extended facility list */ -__u64 stfle_fac_list[32 ];/* 0x0f00 */ +__u64 stfle_fac_list[16 ];/* 0x0f00 */ +__u64 alt_stfle_fac_list[16 ];/* 0x0f80 */ __u8 pad_0x1000[0x11b0 -0x1000 ];/* 0x1000 */ /* Pointer to the machine check extended save area */
arch/s390/include/asm/nospec-branch.h new file +17 -0
@@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_S390_EXPOLINE_H +#define _ASM_S390_EXPOLINE_H + +#ifndef __ASSEMBLY__ + +#include <linux/types.h> + +extern int nospec_disable; + +void nospec_init_branches (void ); +void nospec_auto_detect (void ); +void nospec_revert (s32 *start,s32 *end); + +#endif /* __ASSEMBLY__ */ + +#endif /* _ASM_S390_EXPOLINE_H */
arch/s390/include/asm/processor.h +4 -0
@@ -89,6 +89,7 @@ void cpu_detect_mhz_feature(void);extern const struct seq_operations cpuinfo_op;extern int sysctl_ieee_emulation_warnings;extern void execve_tail (void ); +extern void __bpon (void );/* * User space process size: 2GB for 31 bit, 4TB or 8PT for 64 bit.
@@ -377,6 +378,9 @@ extern void memcpy_absolute(void *, void *, size_t);memcpy_absolute (&(dest), &__tmp,sizeof (__tmp)); \ } while (0) +extern int s390_isolate_bp(void); +extern int s390_isolate_bp_guest (void ); +#endif /* __ASSEMBLY__ */ #endif /* __ASM_S390_PROCESSOR_H */
arch/s390/include/asm/thread_info.h +4 -0
@@ -60,6 +60,8 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src);#define TIF_GUARDED_STORAGE 4/* load guarded storage control block */ #define TIF_PATCH_PENDING 5/* pending live patching update */ #define TIF_PGSTE 6/* New mm's will use 4K page tables */ +#define TIF_ISOLATE_BP 8/* Run process with isolated BP */ +#define TIF_ISOLATE_BP_GUEST 9/* Run KVM guests with isolated BP */ #define TIF_31BIT 16/* 32bit process */ #define TIF_MEMDIE 17/* is terminating due to OOM killer */
@@ -80,6 +82,8 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src);#define _TIF_UPROBE _BITUL(TIF_UPROBE)#define _TIF_GUARDED_STORAGE _BITUL(TIF_GUARDED_STORAGE)#define _TIF_PATCH_PENDING _BITUL(TIF_PATCH_PENDING) +#define _TIF_ISOLATE_BP _BITUL(TIF_ISOLATE_BP) +#define _TIF_ISOLATE_BP_GUEST _BITUL(TIF_ISOLATE_BP_GUEST)#define _TIF_31BIT _BITUL(TIF_31BIT)#define _TIF_SINGLE_STEP _BITUL(TIF_SINGLE_STEP)
arch/s390/include/uapi/asm/kvm.h +4 -1
@@ -228,6 +228,7 @@ struct kvm_guest_debug_arch {#define KVM_SYNC_RICCB (1UL << 7)#define KVM_SYNC_FPRS (1UL << 8)#define KVM_SYNC_GSCB (1UL << 9) +#define KVM_SYNC_BPBC (1UL << 10)/* length and alignment of the sdnx as a power of two */ #define SDNXC 8#define SDNXL (1UL << SDNXC)
@@ -251,7 +252,9 @@ struct kvm_sync_regs { };__u8 reserved[512 ];/* for future vector expansion */ __u32 fpc;/* valid on KVM_SYNC_VRS or KVM_SYNC_FPRS */ -__u8 padding1[52 ];/* riccb needs to be 64byte aligned */ + __u8 bpbc : 1; /* bp mode */ + __u8 reserved2 : 7; +__u8 padding1[51 ];/* riccb needs to be 64byte aligned */ __u8 riccb[64 ];/* runtime instrumentation controls block */ __u8 padding2[192 ];/* sdnx needs to be 256byte aligned */ union {
arch/s390/kernel/Makefile +5 -1
@@ -29,6 +29,7 @@ UBSAN_SANITIZE_early.o := n # ifneq ($(CC_FLAGS_MARCH),-march=z900) CFLAGS_REMOVE_als.o += $(CC_FLAGS_MARCH) +CFLAGS_REMOVE_als.o += $(CC_FLAGS_EXPOLINE) CFLAGS_als.o += -march=z900 AFLAGS_REMOVE_head.o += $(CC_FLAGS_MARCH) AFLAGS_head.o += -march=z900
@@ -57,10 +58,13 @@ obj-y += processor.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o nmi.o obj-y += debug.o irq.o ipl.o dis.o diag.o vdso.o als.o obj-y += sysinfo.o jump_label.o lgr.o os_info.o machine_kexec.o pgm_check.o obj-y += runtime_instr.o cache.o fpu.o dumpstack.o guarded_storage.o -obj-y += entry.o reipl.o relocate_kernel.o kdebugfs.o +obj-y += entry.o reipl.o relocate_kernel.o kdebugfs.o alternative.o +obj-y += nospec-branch.o extra-y += head.o head64.o vmlinux.lds +CFLAGS_REMOVE_nospec-branch.o += $(CC_FLAGS_EXPOLINE) + obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_SCHED_TOPOLOGY) += topology.o
arch/s390/kernel/alternative.c new file +112 -0
112 lines not on this page · raw message
arch/s390/kernel/early.c +5 -0
@@ -329,6 +329,11 @@ static noinline __init void setup_facility_list(void) {stfle (S390_lowcore.stfle_fac_list,ARRAY_SIZE (S390_lowcore.stfle_fac_list)); +memcpy (S390_lowcore.alt_stfle_fac_list, + S390_lowcore.stfle_fac_list, +sizeof (S390_lowcore.alt_stfle_fac_list)); +if (!IS_ENABLED (CONFIG_KERNEL_NOBP )) +__clear_facility (82 , S390_lowcore.alt_stfle_fac_list); }static __init void detect_diag9c (void )
arch/s390/kernel/entry.S +225 -25
523 lines not on this page · raw message
arch/s390/kernel/ipl.c +1 -0
@@ -564,6 +564,7 @@ static struct kset *ipl_kset;static void __ipl_run (void *unused) { +__bpon ();diag308 (DIAG308_LOAD_CLEAR ,NULL );if (MACHINE_IS_VM )__cpcmd ("IPL" ,NULL ,0 ,NULL );
arch/s390/kernel/module.c +61 -4
89 lines not on this page · raw message
arch/s390/kernel/nospec-branch.c new file +169 -0
169 lines not on this page · raw message
arch/s390/kernel/processor.c +18 -0
@@ -197,3 +197,21 @@ const struct seq_operations cpuinfo_op = { .stop = c_stop, .show = show_cpuinfo, }; + +int s390_isolate_bp (void ) +{ +if (!test_facility (82 )) +return -EOPNOTSUPP ; +set_thread_flag (TIF_ISOLATE_BP ); +return 0 ; +} +EXPORT_SYMBOL (s390_isolate_bp); + +int s390_isolate_bp_guest (void ) +{ +if (!test_facility (82 )) +return -EOPNOTSUPP ; +set_thread_flag (TIF_ISOLATE_BP_GUEST ); +return 0 ; +} +EXPORT_SYMBOL (s390_isolate_bp_guest);
arch/s390/kernel/setup.c +13 -1
@@ -66,6 +66,8 @@#include <asm/sclp.h> #include <asm/sysinfo.h> #include <asm/numa.h> +#include <asm/alternative.h> +#include <asm/nospec-branch.h> #include "entry.h" /*
@@ -338,7 +340,9 @@ static void __init setup_lowcore(void) lc->preempt_count = S390_lowcore.preempt_count; lc->stfl_fac_list = S390_lowcore.stfl_fac_list;memcpy (lc->stfle_fac_list, S390_lowcore.stfle_fac_list, -MAX_FACILITY_BIT /8 ); +sizeof (lc->stfle_fac_list)); +memcpy (lc->alt_stfle_fac_list, S390_lowcore.alt_stfle_fac_list, +sizeof (lc->alt_stfle_fac_list));if (MACHINE_HAS_VX ||MACHINE_HAS_GS ) {unsigned long bits, size;
@@ -381,6 +385,7 @@ static void __init setup_lowcore(void)#ifdef CONFIG_SMP lc->spinlock_lockval =arch_spin_lockval (0 );#endif + lc->br_r1_trampoline =0x07f1 ;/* br %r1 */ set_prefix ((u32 )(unsigned long ) lc); lowcore_ptr[0 ] = lc;
@@ -892,6 +897,9 @@ void __init setup_arch(char **cmdline_p) init_mm.end_data = (unsigned long ) &_edata; init_mm.brk = (unsigned long ) &_end; +if (IS_ENABLED (CONFIG_EXPOLINE_AUTO )) +nospec_auto_detect (); +parse_early_param ();#ifdef CONFIG_CRASH_DUMP /* Deactivate elfcorehdr= kernel parameter */
@@ -955,6 +963,10 @@ void __init setup_arch(char **cmdline_p)conmode_default ();set_preferred_console (); +apply_alternative_instructions (); +if (IS_ENABLED (CONFIG_EXPOLINE )) +nospec_init_branches (); +/* Setup zfcpdump support */ setup_zfcpdump ();
arch/s390/kernel/smp.c +6 -1
@@ -228,6 +228,7 @@ static int pcpu_alloc_lowcore(struct pcpu *pcpu, int cpu) lc->mcesad = mcesa_origin | mcesa_bits; lc->cpu_nr = cpu; lc->spinlock_lockval =arch_spin_lockval (cpu); + lc->br_r1_trampoline =0x07f1 ;/* br %r1 */ if (vdso_alloc_per_cpu (lc)) goto out; lowcore_ptr[cpu] = lc;
@@ -282,7 +283,9 @@ static void pcpu_prepare_secondary(struct pcpu *pcpu, int cpu)__ctl_store (lc->cregs_save_area,0 ,15 );save_access_regs ((unsigned int *) lc->access_regs_save_area);memcpy (lc->stfle_fac_list, S390_lowcore.stfle_fac_list, -MAX_FACILITY_BIT /8 ); +sizeof (lc->stfle_fac_list)); +memcpy (lc->alt_stfle_fac_list, S390_lowcore.alt_stfle_fac_list, +sizeof (lc->alt_stfle_fac_list)); }static void pcpu_attach_task (struct pcpu *pcpu,struct task_struct *tsk)
@@ -332,6 +335,7 @@ static void pcpu_delegate(struct pcpu *pcpu, void (*func)(void *),mem_assign_absolute (lc->restart_fn, (unsigned long ) func);mem_assign_absolute (lc->restart_data, (unsigned long ) data);mem_assign_absolute (lc->restart_source, source_cpu); +__bpon (); asmvolatile ("0: sigp 0,%0,%2 # sigp restart to target cpu\n" " brc 2,0b # busy, try again\n"
@@ -907,6 +911,7 @@ void __cpu_die(unsigned int cpu)void __noreturn cpu_die (void ) {idle_task_exit (); +__bpon ();pcpu_sigp_retry (pcpu_devices +smp_processor_id (),SIGP_STOP ,0 );for (;;) ; }
arch/s390/kernel/uprobes.c +9 -0
@@ -150,6 +150,15 @@ unsigned long arch_uretprobe_hijack_return_addr(unsigned long trampoline,return orig; } +bool arch_uretprobe_is_alive (struct return_instance *ret,enum rp_check ctx, +struct pt_regs *regs) +{ +if (ctx ==RP_CHECK_CHAIN_CALL ) +return user_stack_pointer (regs) <= ret->stack; +else +return user_stack_pointer (regs) < ret->stack; +} +/* Instruction Emulation */ static void adjust_psw_addr (psw_t *psw,unsigned long len)
arch/s390/kernel/vmlinux.lds.S +37 -0
@@ -105,6 +105,43 @@ SECTIONS EXIT_DATA } + /* + * struct alt_inst entries. From the header (alternative.h): + * "Alternative instructions for different CPU types or capabilities" + * Think locking instructions on spinlocks. + * Note, that it is a part of __init region. + */ + . = ALIGN(8); + .altinstructions : { + __alt_instructions = .; + *(.altinstructions) + __alt_instructions_end = .; + } + + /* + * And here are the replacement instructions. The linker sticks + * them as binary blobs. The .altinstructions has enough data to + * get the address and the length of them to patch the kernel safely. + * Note, that it is a part of __init region. + */ + .altinstr_replacement : { + *(.altinstr_replacement) + } + + /* + * Table with the patch locations to undo expolines + */ + .nospec_call_table : { + __nospec_call_start = . ; + *(.s390_indirect*) + __nospec_call_end = . ; + } + .nospec_return_table : { + __nospec_return_start = . ; + *(.s390_return*) + __nospec_return_end = . ; + } + /* early.c uses stsi, which requires page aligned data. */ . = ALIGN(PAGE_SIZE); INIT_DATA_SECTION(0x100)
arch/s390/kvm/kvm-s390.c +12 -0
@@ -449,6 +449,9 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)case KVM_CAP_S390_GS : r =test_facility (133 );break ; +case KVM_CAP_S390_BPB : + r =test_facility (82 ); +break ;default : r =0 ; }
@@ -2231,6 +2234,8 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)kvm_s390_set_prefix (vcpu,0 );if (test_kvm_facility (vcpu->kvm,64 )) vcpu->run->kvm_valid_regs |=KVM_SYNC_RICCB ; +if (test_kvm_facility (vcpu->kvm,82 )) + vcpu->run->kvm_valid_regs |=KVM_SYNC_BPBC ;if (test_kvm_facility (vcpu->kvm,133 )) vcpu->run->kvm_valid_regs |=KVM_SYNC_GSCB ;/* fprs can be synchronized via vrs, even if the guest has no vx. With
@@ -2372,6 +2377,7 @@ static void kvm_s390_vcpu_initial_reset(struct kvm_vcpu *vcpu) current->thread.fpu.fpc =0 ; vcpu->arch.sie_block->gbea =1 ; vcpu->arch.sie_block->pp =0 ; + vcpu->arch.sie_block->fpf &= ~FPF_BPBC ; vcpu->arch.pfault_token =KVM_S390_PFAULT_TOKEN_INVALID ;kvm_clear_async_pf_completion_queue (vcpu);if (!kvm_s390_user_cpu_state_ctrl (vcpu->kvm))
@@ -3318,6 +3324,11 @@ static void sync_regs(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) vcpu->arch.sie_block->ecd |=ECD_HOSTREGMGMT ; vcpu->arch.gs_enabled =1 ; } +if ((kvm_run->kvm_dirty_regs &KVM_SYNC_BPBC ) && +test_kvm_facility (vcpu->kvm,82 )) { + vcpu->arch.sie_block->fpf &= ~FPF_BPBC ; + vcpu->arch.sie_block->fpf |= kvm_run->s.regs.bpbc ?FPF_BPBC :0 ; + }save_access_regs (vcpu->arch.host_acrs);restore_access_regs (vcpu->run->s.regs.acrs);/* save host (userspace) fprs/vrs */
@@ -3364,6 +3375,7 @@ static void store_regs(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) kvm_run->s.regs.pft = vcpu->arch.pfault_token; kvm_run->s.regs.pfs = vcpu->arch.pfault_select; kvm_run->s.regs.pfc = vcpu->arch.pfault_compare; + kvm_run->s.regs.bpbc = (vcpu->arch.sie_block->fpf &FPF_BPBC ) ==FPF_BPBC ;save_access_regs (vcpu->run->s.regs.acrs);restore_access_regs (vcpu->arch.host_acrs);/* Save guest register state */
arch/s390/kvm/vsie.c +30 -0
@@ -234,6 +234,12 @@ static void unshadow_scb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)memcpy (scb_o->gcr, scb_s->gcr,128 ); scb_o->pp = scb_s->pp; +/* branch prediction */ +if (test_kvm_facility (vcpu->kvm,82 )) { + scb_o->fpf &= ~FPF_BPBC ; + scb_o->fpf |= scb_s->fpf &FPF_BPBC ; + } +/* interrupt intercept */ switch (scb_s->icptcode) {case ICPT_PROGI :
@@ -280,6 +286,7 @@ static int shadow_scb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page) scb_s->ecb3 =0 ; scb_s->ecd =0 ; scb_s->fac =0 ; + scb_s->fpf =0 ; rc =prepare_cpuflags (vcpu, vsie_page);if (rc)
@@ -339,6 +346,9 @@ static int shadow_scb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)prefix_unmapped (vsie_page); scb_s->ecb |=ECB_TE ; } +/* branch prediction */ +if (test_kvm_facility (vcpu->kvm,82 )) + scb_s->fpf |= scb_o->fpf &FPF_BPBC ;/* SIMD */ if (test_kvm_facility (vcpu->kvm,129 )) { scb_s->eca |= scb_o->eca &ECA_VX ;
@@ -821,6 +831,7 @@ static int do_vsie_run(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page) {struct kvm_s390_sie_block *scb_s = &vsie_page->scb_s;struct kvm_s390_sie_block *scb_o = vsie_page->scb_o; +int guest_bp_isolation;int rc;handle_last_fault (vcpu, vsie_page);
@@ -831,6 +842,20 @@ static int do_vsie_run(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)s390_handle_mcck ();srcu_read_unlock (&vcpu->kvm->srcu, vcpu->srcu_idx); + +/* save current guest state of bp isolation override */ + guest_bp_isolation =test_thread_flag (TIF_ISOLATE_BP_GUEST ); + +/* +* The guest is running with BPBC, so we have to force it on for our +* nested guest. This is done by enabling BPBC globally, so the BPBC +* control in the SCB (which the nested guest can modify) is simply +* ignored. +*/ +if (test_kvm_facility (vcpu->kvm,82 ) && + vcpu->arch.sie_block->fpf &FPF_BPBC ) +set_thread_flag (TIF_ISOLATE_BP_GUEST ); +local_irq_disable ();guest_enter_irqoff ();local_irq_enable ();
@@ -840,6 +865,11 @@ static int do_vsie_run(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)local_irq_disable ();guest_exit_irqoff ();local_irq_enable (); + +/* restore guest state for bp isolation override */ +if (!guest_bp_isolation) +clear_thread_flag (TIF_ISOLATE_BP_GUEST ); + vcpu->srcu_idx =srcu_read_lock (&vcpu->kvm->srcu);if (rc == -EINTR ) {
drivers/acpi/acpi_video.c +25 -2
@@ -2123,6 +2123,25 @@ static int __init intel_opregion_present(void)return opregion; } +static bool dmi_is_desktop (void ) +{ +const char *chassis_type; + + chassis_type =dmi_get_system_info (DMI_CHASSIS_TYPE ); +if (!chassis_type) +return false; + +if (!strcmp (chassis_type,"3" ) ||/* 3: Desktop */ + !strcmp (chassis_type,"4" ) ||/* 4: Low Profile Desktop */ + !strcmp (chassis_type,"5" ) ||/* 5: Pizza Box */ + !strcmp (chassis_type,"6" ) ||/* 6: Mini Tower */ + !strcmp (chassis_type,"7" ) ||/* 7: Tower */ + !strcmp (chassis_type,"11" ))/* 11: Main Server Chassis */ +return true; + +return false; +} +int acpi_video_register (void ) {int ret =0 ;
@@ -2143,8 +2162,12 @@ int acpi_video_register(void)* win8 ready (where we also prefer the native backlight driver, so * normally the acpi_video code should not register there anyways). */ -if (only_lcd ==-1 ) - only_lcd =acpi_osi_is_win8 (); +if (only_lcd ==-1 ) { +if (dmi_is_desktop () &&acpi_osi_is_win8 ()) + only_lcd = true; +else + only_lcd = false; + }dmi_check_system (video_dmi_table);
drivers/block/swim.c +22 -27
149 lines not on this page · raw message
drivers/block/swim3.c +3 -3
@@ -148,7 +148,7 @@ struct swim3 {#define MOTOR_ON 2#define RELAX 3/* also eject in progress */ #define READ_DATA_0 4 -#define TWOMEG_DRIVE 5 +#define ONEMEG_DRIVE 5#define SINGLE_SIDED 6/* drive or diskette is 4MB type? */ #define DRIVE_PRESENT 7#define DISK_IN 8
@@ -156,9 +156,9 @@ struct swim3 {#define TRACK_ZERO 10#define TACHO 11#define READ_DATA_1 12 -#define MFM_MODE 13 +#define GCR_MODE 13#define SEEK_COMPLETE 14 -#define ONEMEG_MEDIA 15 +#define TWOMEG_MEDIA 15/* Definitions of values used in writing and formatting */ #define DATA_ESCAPE 0x99
drivers/cdrom/cdrom.c +1 -1
@@ -2374,7 +2374,7 @@ static int cdrom_ioctl_media_changed(struct cdrom_device_info *cdi,if (!CDROM_CAN (CDC_SELECT_DISC ) || arg ==CDSL_CURRENT )return media_changed (cdi,1 ); -if ((unsigned int )arg >= cdi->capacity) +if (arg >= cdi->capacity)return -EINVAL ; info =kmalloc (sizeof (*info),GFP_KERNEL );
drivers/char/tpm/tpm-interface.c +103 -28
172 lines not on this page · raw message
drivers/char/tpm/tpm.h +1 -0
@@ -106,6 +106,7 @@ enum tpm2_return_codes {TPM2_RC_COMMAND_CODE =0x0143 ,TPM2_RC_TESTING =0x090A ,/* RC_WARN */ TPM2_RC_REFERENCE_H0 =0x0910 , + TPM2_RC_RETRY = 0x0922, }; enum tpm2_algorithms {
drivers/char/tpm/tpm_crb.c +75 -33
192 lines not on this page · raw message
drivers/char/tpm/tpm_tis_core.c +3 -1
@@ -77,11 +77,13 @@ static bool check_locality(struct tpm_chip *chip, int l)return false; } -static void release_locality (struct tpm_chip *chip,int l) +static int release_locality (struct tpm_chip *chip,int l) {struct tpm_tis_data *priv =dev_get_drvdata (&chip->dev);tpm_tis_write8 (priv,TPM_ACCESS (l),TPM_ACCESS_ACTIVE_LOCALITY ); + +return 0 ; }static int request_locality (struct tpm_chip *chip,int l)
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +3 -0
@@ -1634,6 +1634,8 @@ static void dw_hdmi_clear_overflow(struct dw_hdmi *hdmi)* (and possibly on the platform). So far only i.MX6Q (v1.30a) and * i.MX6DL (v1.31a) have been identified as needing the workaround, with * 4 and 1 iterations respectively. +* The Amlogic Meson GX SoCs (v2.01a) have been identified as needing +* the workaround with a single iteration. */ switch (hdmi->version) {
@@ -1641,6 +1643,7 @@ static void dw_hdmi_clear_overflow(struct dw_hdmi *hdmi) count =4 ;break ;case 0x131a : +case 0x201a : count =1 ;break ;default :
drivers/message/fusion/mptsas.c +1 -0
@@ -1995,6 +1995,7 @@ static struct scsi_host_template mptsas_driver_template = { .cmd_per_lun = 7, .use_clustering = ENABLE_CLUSTERING, .shost_attrs = mptscsih_host_attrs, + .no_write_same = 1, };static int mptsas_get_linkerrors (struct sas_phy *phy)
drivers/net/bonding/bond_main.c +1 -2
@@ -1656,8 +1656,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) }/* switch(bond_mode) */ #ifdef CONFIG_NET_POLL_CONTROLLER - slave_dev->npinfo = bond->dev->npinfo; -if (slave_dev->npinfo) { +if (bond->dev->npinfo) {if (slave_enable_netpoll (new_slave)) {netdev_info (bond_dev,"master_dev is using netpoll, but new slave device does not support netpoll\n" ); res = -EBUSY ;
drivers/net/ethernet/amd/xgbe/xgbe-common.h +8 -0
@@ -1321,6 +1321,10 @@#define MDIO_VEND2_AN_STAT 0x8002#endif +#ifndef MDIO_VEND2_PMA_CDR_CONTROL +#define MDIO_VEND2_PMA_CDR_CONTROL 0x8056 +#endif +#ifndef MDIO_CTRL1_SPEED1G #define MDIO_CTRL1_SPEED1G (MDIO_CTRL1_SPEED10G & ~BMCR_SPEED100)#endif
@@ -1369,6 +1373,10 @@#define XGBE_AN_CL37_TX_CONFIG_MASK 0x08#define XGBE_AN_CL37_MII_CTRL_8BIT 0x0100 +#define XGBE_PMA_CDR_TRACK_EN_MASK 0x01 +#define XGBE_PMA_CDR_TRACK_EN_OFF 0x00 +#define XGBE_PMA_CDR_TRACK_EN_ON 0x01 +/* Bit setting and getting macros * The get macro will extract the current bit field value from within * the variable
drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c +16 -0
@@ -519,6 +519,22 @@ void xgbe_debugfs_init(struct xgbe_prv_data *pdata) "debugfs_create_file failed\n"); } +if (pdata->vdata->an_cdr_workaround) { + pfile =debugfs_create_bool ("an_cdr_workaround" ,0600 , + pdata->xgbe_debugfs, + &pdata->debugfs_an_cdr_workaround); +if (!pfile) +netdev_err (pdata->netdev, +"debugfs_create_bool failed\n" ); + + pfile =debugfs_create_bool ("an_cdr_track_early" ,0600 , + pdata->xgbe_debugfs, + &pdata->debugfs_an_cdr_track_early); +if (!pfile) +netdev_err (pdata->netdev, +"debugfs_create_bool failed\n" ); + } +kfree (buf); }
drivers/net/ethernet/amd/xgbe/xgbe-main.c +1 -0
@@ -349,6 +349,7 @@ int xgbe_config_netdev(struct xgbe_prv_data *pdata)XGMAC_SET_BITS (pdata->rss_options,MAC_RSSCR ,UDP4TE ,1 );/* Call MDIO/PHY initialization routine */ + pdata->debugfs_an_cdr_workaround = pdata->vdata->an_cdr_workaround; ret = pdata->phy_if.phy_init (pdata);if (ret)return ret;
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c +19 -5
@@ -432,11 +432,16 @@ static void xgbe_an73_disable(struct xgbe_prv_data *pdata)xgbe_an73_set (pdata, false, false);xgbe_an73_disable_interrupts (pdata); + pdata->an_start =0 ; +netif_dbg (pdata, link, pdata->netdev,"CL73 AN disabled\n" ); }static void xgbe_an_restart (struct xgbe_prv_data *pdata) { +if (pdata->phy_if.phy_impl.an_pre) + pdata->phy_if.phy_impl.an_pre (pdata); +switch (pdata->an_mode) {case XGBE_AN_MODE_CL73 :case XGBE_AN_MODE_CL73_REDRV :
@@ -453,6 +458,9 @@ static void xgbe_an_restart(struct xgbe_prv_data *pdata)static void xgbe_an_disable (struct xgbe_prv_data *pdata) { +if (pdata->phy_if.phy_impl.an_post) + pdata->phy_if.phy_impl.an_post (pdata); +switch (pdata->an_mode) {case XGBE_AN_MODE_CL73 :case XGBE_AN_MODE_CL73_REDRV :
@@ -505,11 +513,11 @@ static enum xgbe_an xgbe_an73_tx_training(struct xgbe_prv_data *pdata,XMDIO_WRITE (pdata,MDIO_MMD_PMAPMD ,MDIO_PMA_10GBR_PMD_CTRL , reg); -if (pdata->phy_if.phy_impl.kr_training_post) - pdata->phy_if.phy_impl.kr_training_post (pdata); -netif_dbg (pdata, link, pdata->netdev,"KR training initiated\n" ); + +if (pdata->phy_if.phy_impl.kr_training_post) + pdata->phy_if.phy_impl.kr_training_post (pdata); }return XGBE_AN_PAGE_RECEIVED ;
@@ -637,11 +645,11 @@ static enum xgbe_an xgbe_an73_incompat_link(struct xgbe_prv_data *pdata)return XGBE_AN_NO_LINK ; } -xgbe_an73_disable (pdata); +xgbe_an_disable (pdata);xgbe_switch_mode (pdata); -xgbe_an73_restart (pdata); +xgbe_an_restart (pdata);return XGBE_AN_INCOMPAT_LINK ; }
@@ -820,6 +828,9 @@ static void xgbe_an37_state_machine(struct xgbe_prv_data *pdata) pdata->an_result = pdata->an_state; pdata->an_state =XGBE_AN_READY ; +if (pdata->phy_if.phy_impl.an_post) + pdata->phy_if.phy_impl.an_post (pdata); +netif_dbg (pdata, link, pdata->netdev,"CL37 AN result: %s\n" ,xgbe_state_as_string (pdata->an_result)); }
@@ -903,6 +914,9 @@ static void xgbe_an73_state_machine(struct xgbe_prv_data *pdata) pdata->kx_state =XGBE_RX_BPA ; pdata->an_start =0 ; +if (pdata->phy_if.phy_impl.an_post) + pdata->phy_if.phy_impl.an_post (pdata); +netif_dbg (pdata, link, pdata->netdev,"CL73 AN result: %s\n" ,xgbe_state_as_string (pdata->an_result)); }
drivers/net/ethernet/amd/xgbe/xgbe-pci.c +2 -0
@@ -456,6 +456,7 @@ static const struct xgbe_version_data xgbe_v2a = { .irq_reissue_support = 1, .tx_desc_prefetch = 5, .rx_desc_prefetch = 5, + .an_cdr_workaround = 1, };static const struct xgbe_version_data xgbe_v2b = {
@@ -470,6 +471,7 @@ static const struct xgbe_version_data xgbe_v2b = { .irq_reissue_support = 1, .tx_desc_prefetch = 5, .rx_desc_prefetch = 5, + .an_cdr_workaround = 1, };static const struct pci_device_id xgbe_pci_table[] = {
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c +178 -18
279 lines not on this page · raw message
drivers/net/ethernet/amd/xgbe/xgbe.h +9 -0
@@ -833,6 +833,7 @@ struct xgbe_hw_if {/* This structure represents implementation specific routines for an * implementation of a PHY. All routines are required unless noted below. * Optional routines: +* an_pre, an_post * kr_training_pre, kr_training_post */ struct xgbe_phy_impl_if {
@@ -875,6 +876,10 @@ struct xgbe_phy_impl_if {/* Process results of auto-negotiation */ enum xgbe_mode (*an_outcome)(struct xgbe_prv_data *); +/* Pre/Post auto-negotiation support */ +void (*an_pre)(struct xgbe_prv_data *); +void (*an_post)(struct xgbe_prv_data *); +/* Pre/Post KR training enablement support */ void (*kr_training_pre)(struct xgbe_prv_data *);void (*kr_training_post)(struct xgbe_prv_data *);
@@ -989,6 +994,7 @@ struct xgbe_version_data {unsigned int irq_reissue_support;unsigned int tx_desc_prefetch;unsigned int rx_desc_prefetch; +unsigned int an_cdr_workaround; };struct xgbe_vxlan_data {
@@ -1257,6 +1263,9 @@ struct xgbe_prv_data {unsigned int debugfs_xprop_reg;unsigned int debugfs_xi2c_reg; + +bool debugfs_an_cdr_workaround; +bool debugfs_an_cdr_track_early; };/* Function prototypes*/
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +11 -0
@@ -2781,6 +2781,7 @@ int i40e_ndo_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)int ret =0 ;struct hlist_node *h;int bkt; +u8 i;/* validate the request */ if (vf_id >= pf->num_alloc_vfs) {
@@ -2792,6 +2793,16 @@ int i40e_ndo_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac) vf = &(pf->vf[vf_id]); vsi = pf->vsi[vf->lan_vsi_idx]; + +/* When the VF is resetting wait until it is done. +* It can take up to 200 milliseconds, +* but wait for up to 300 milliseconds to be safe. +*/ +for (i =0 ; i <15 ; i++) { +if (test_bit (I40E_VF_STATE_INIT , &vf->vf_states)) +break ; +msleep (20 ); + }if (!test_bit (I40E_VF_STATE_INIT , &vf->vf_states)) {dev_err (&pf->pdev->dev,"VF %d still in reset. Try again.\n" , vf_id);
drivers/net/ethernet/ti/cpsw.c +1 -1
@@ -124,7 +124,7 @@ do { \#define RX_PRIORITY_MAPPING 0x76543210#define TX_PRIORITY_MAPPING 0x33221100 -#define CPDMA_TX_PRIORITY_MAP 0x01234567 +#define CPDMA_TX_PRIORITY_MAP 0x76543210#define CPSW_VLAN_AWARE BIT(1)#define CPSW_ALE_VLAN_AWARE 1
drivers/net/ppp/pppoe.c +4 -0
@@ -620,6 +620,10 @@ static int pppoe_connect(struct socket *sock, struct sockaddr *uservaddr,lock_sock (sk); error = -EINVAL ; + +if (sockaddr_len !=sizeof (struct sockaddr_pppox )) + goto end; +if (sp->sa_protocol !=PX_PROTO_OE ) goto end;
drivers/net/team/team.c +31 -7
@@ -261,6 +261,17 @@ static void __team_option_inst_mark_removed_port(struct team *team, } } +static bool __team_option_inst_tmp_find (const struct list_head *opts, +const struct team_option_inst *needle) +{ +struct team_option_inst *opt_inst; + +list_for_each_entry (opt_inst, opts, tmp_list) +if (opt_inst == needle) +return true; +return false; +} +static int __team_options_register (struct team *team,const struct team_option *option,size_t option_count)
@@ -1061,14 +1072,11 @@ static void team_port_leave(struct team *team, struct team_port *port) }#ifdef CONFIG_NET_POLL_CONTROLLER -static int team_port_enable_netpoll (struct team *team,struct team_port *port) +static int __team_port_enable_netpoll (struct team_port *port) {struct netpoll *np;int err; -if (!team->dev->npinfo) -return 0 ; - np =kzalloc (sizeof (*np),GFP_KERNEL );if (!np)return -ENOMEM ;
@@ -1082,6 +1090,14 @@ static int team_port_enable_netpoll(struct team *team, struct team_port *port)return err; } +static int team_port_enable_netpoll (struct team_port *port) +{ +if (!port->team->dev->npinfo) +return 0 ; + +return __team_port_enable_netpoll (port); +} +static void team_port_disable_netpoll (struct team_port *port) {struct netpoll *np = port->np;
@@ -1096,7 +1112,7 @@ static void team_port_disable_netpoll(struct team_port *port) kfree(np); }#else -static int team_port_enable_netpoll (struct team *team,struct team_port *port) +static int team_port_enable_netpoll (struct team_port *port) {return 0 ; }
@@ -1204,7 +1220,7 @@ static int team_port_add(struct team *team, struct net_device *port_dev) goto err_vids_add; } - err =team_port_enable_netpoll (team, port); + err =team_port_enable_netpoll (port);if (err) {netdev_err (dev,"Failed to enable netpoll on device %s\n" , portname);
@@ -1901,7 +1917,7 @@ static int team_netpoll_setup(struct net_device *dev,mutex_lock (&team->lock);list_for_each_entry (port, &team->port_list, list) { - err =team_port_enable_netpoll (team, port); + err =__team_port_enable_netpoll (port);if (err) {__team_netpoll_cleanup (team);break ;
@@ -2561,6 +2577,14 @@ static int team_nl_cmd_options_set(struct sk_buff *skb, struct genl_info *info)if (err) goto team_put; opt_inst->changed = true; + +/* dumb/evil user-space can send us duplicate opt, +* keep only the last one +*/ +if (__team_option_inst_tmp_find (&opt_inst_list, + opt_inst)) +continue ; +list_add (&opt_inst->tmp_list, &opt_inst_list); }if (!opt_found) {
drivers/net/virtio_net.c +39 -29
164 lines not on this page · raw message
drivers/net/wireless/ath/ath10k/mac.c +2 -3
@@ -5955,9 +5955,8 @@ static void ath10k_sta_rc_update_wk(struct work_struct *wk) sta->addr, smps, err); } -if (changed &IEEE80211_RC_SUPP_RATES_CHANGED || - changed &IEEE80211_RC_NSS_CHANGED ) { -ath10k_dbg (ar,ATH10K_DBG_MAC ,"mac update sta %pM supp rates/nss\n" , +if (changed &IEEE80211_RC_SUPP_RATES_CHANGED ) { +ath10k_dbg (ar,ATH10K_DBG_MAC ,"mac update sta %pM supp rates\n" , sta->addr); err =ath10k_station_assoc (ar, arvif->vif, sta, true);
drivers/pinctrl/intel/pinctrl-intel.c +8 -15
@@ -427,18 +427,6 @@ static void __intel_gpio_set_direction(void __iomem *padcfg0, bool input)writel (value, padcfg0);
Lines of this file are not shown. View the raw message.
net/packet/af_packet.c +58 -25
83 lines not on this page · raw message
net/sctp/ipv6.c +30 -30
60 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.