Linux 3.16.85
I'm announcing the release of the 3.16.85 kernel. This is probably the last release in the 3.16 stable series, unless some critical fix comes up later this month.
All users of the 3.16 kernel series should upgrade.
The updated 3.16.y git tree can be found at:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.16.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
The diff from 3.16.84 is attached to this message.
Ben.
------------
Documentation/ABI/testing/sysfs-devices-system-cpu | 1 + .../special-register-buffer-data-sampling.rst | 149 ++++ Documentation/kernel-parameters.txt | 20 + Makefile | 2 +- arch/x86/include/asm/acpi.h | 2 +- arch/x86/include/asm/cpu_device_id.h | 27 + arch/x86/include/asm/cpufeatures.h | 2 + arch/x86/include/asm/processor.h | 2 +- arch/x86/include/uapi/asm/msr-index.h | 4 + arch/x86/kernel/amd_nb.c | 2 +- arch/x86/kernel/asm-offsets_32.c | 2 +- arch/x86/kernel/cpu/amd.c | 28 +- arch/x86/kernel/cpu/bugs.c | 106 +++ arch/x86/kernel/cpu/centaur.c | 4 +- arch/x86/kernel/cpu/common.c | 62 +- arch/x86/kernel/cpu/cpu.h | 1 + arch/x86/kernel/cpu/cyrix.c | 2 +- arch/x86/kernel/cpu/intel.c | 18 +- arch/x86/kernel/cpu/match.c | 7 +- arch/x86/kernel/cpu/microcode/intel.c | 4 +- arch/x86/kernel/cpu/mtrr/generic.c | 2 +- arch/x86/kernel/cpu/mtrr/main.c | 4 +- arch/x86/kernel/cpu/perf_event_intel.c | 2 +- arch/x86/kernel/cpu/perf_event_intel_lbr.c | 2 +- arch/x86/kernel/cpu/perf_event_p6.c | 2 +- arch/x86/kernel/cpu/proc.c | 4 +- arch/x86/kernel/head_32.S | 4 +- arch/x86/kernel/mpparse.c | 2 +- drivers/base/cpu.c | 8 + drivers/char/hw_random/via-rng.c | 2 +- drivers/char/random.c | 3 - drivers/cpufreq/acpi-cpufreq.c | 2 +- drivers/cpufreq/longhaul.c | 6 +- drivers/cpufreq/p4-clockmod.c | 2 +- drivers/cpufreq/powernow-k7.c | 2 +- drivers/cpufreq/speedstep-centrino.c | 4 +- drivers/cpufreq/speedstep-lib.c | 6 +- drivers/crypto/padlock-aes.c | 2 +- drivers/edac/amd64_edac.c | 2 +- drivers/edac/mce_amd.c | 2 +- drivers/hwmon/coretemp.c | 6 +- drivers/hwmon/hwmon-vid.c | 2 +- drivers/hwmon/k10temp.c | 2 +- drivers/hwmon/k8temp.c | 2 +- drivers/message/fusion/mptctl.c | 215 ++---- drivers/net/can/slcan.c | 4 + drivers/net/slip/slip.c | 4 + drivers/net/wireless/mwifiex/scan.c | 7 + drivers/net/wireless/mwifiex/wmm.c | 4 + drivers/scsi/sg.c | 758 +++++++++++---------- drivers/usb/core/message.c | 53 +- drivers/usb/gadget/configfs.c | 3 + drivers/video/fbdev/geode/video_gx.c | 2 +- fs/binfmt_elf.c | 2 +- fs/exec.c | 2 +- fs/ext4/block_validity.c | 57 ++ fs/ext4/ext4.h | 19 +- fs/ext4/extents.c | 13 +- fs/ext4/inode.c | 5 + include/linux/mod_devicetable.h | 6 + include/linux/sched.h | 4 +- include/scsi/sg.h | 1 - kernel/signal.c | 2 +- net/core/net-sysfs.c | 39 +- security/selinux/hooks.c | 70 +- 65 files changed, 1102 insertions(+), 688 deletions(-)
Akinobu Mita (1):
sg: prevent integer overflow when converting from sectors to bytes
Alan Stern (1):
USB: core: Fix free-while-in-use bug in the USB S-Glibrary
Alexander Potapenko (1):
fs/binfmt_elf.c: allocate initialized memory in fill_thread_core_info()
Ben Hutchings (3):
scsi: sg: Change next_cmd_len handling to mirror upstream
scsi: sg: Re-fix off by one in sg_fill_request_table() Linux 3.16.85
Colin Ian King (1):
ext4: unsigned int compared against zero
Dan Carpenter (3):
scsi: mptfusion: Add bounds check in mptctl_hp_targetinfo()
scsi: mptfusion: Fix double fetch bug in ioctl
scsi: sg: off by one in sg_ioctl()
David Mosberger (2):
drivers: usb: core: Don't disable irqs in usb_sg_wait() during URB submit.
drivers: usb: core: Minimize irq disabling in usb_sg_cancel()
Douglas Gilbert (1):
sg: O_EXCL and other lock handling
Eric Dumazet (1):
net-sysfs: fix netdev_queue_add_kobject() breakage
Eric W. Biederman (1):
signal: Extend exec_id to 64bits
Hannes Reinecke (8):
scsi: sg: protect accesses to 'reserved' page array
scsi: sg: reset 'res_in_use' after unlinking reserved array
scsi: sg: remove 'save_scat_len'
scsi: sg: use standard lists for sg_requests
scsi: sg: factor out sg_fill_request_table()
scsi: sg: fixup infoleak when using SG_GET_REQUEST_TABLE
scsi: sg: disable SET_FORCE_LOW_DMA
scsi: sg: close race condition in sg_remove_sfp_usercontext()
Jason A. Donenfeld (1):
random: always use batched entropy for get_random_u{32,64}Jia Zhang (1):
x86/cpu: Rename cpu_data.x86_mask to cpu_data.x86_stepping
Johannes Thumshirn (5):
scsi: sg: check for valid direction before starting the request
scsi: sg: fix SG_DXFER_FROM_DEV transfers
scsi: sg: fix static checker warning in sg_is_valid_dxfer
scsi: sg: only check for dxfer_len greater than 256M
scsi: sg: don't return bogus Sg_requests
Josh Poimboeuf (1):
x86/speculation: Add Ivy Bridge to affected list
Jouni Hogander (7):
slcan: Fix memory leak in error path
can: slcan: Fix use-after-free Read in slcan_open
slip: Fix memory leak in slip_open error path
slip: Fix use-after-free Read in slip_open
net-sysfs: Fix reference count leak in rx|netdev_queue_add_kobject
net-sysfs: Call dev_hold always in netdev_queue_add_kobject
net-sysfs: Call dev_hold always in rx_queue_add_kobject
Kyungtae Kim (1):
USB: gadget: fix illegal array access in binding with UDC
Li Bin (1):
scsi: sg: add sg_remove_request in sg_common_write
Marek Milkovic (1):
selinux: Print 'sclass' as string when unrecognized netlink message occurs
Mark Gross (4):
x86/cpu: Add a steppings field to struct x86_cpu_id
x86/cpu: Add 'table' argument to cpu_matches()
x86/speculation: Add Special Register Buffer Data Sampling (SRBDS) mitigation x86/speculation: Add SRBDS vulnerability and mitigation documentation
Oliver Hartkopp (1):
slcan: not call free_netdev before rtnl_unlock in slcan_open
Paul Moore (1):
selinux: properly handle multiple messages in selinux_netlink_send()
Qing Xu (2):
mwifiex: Fix possible buffer overflows in mwifiex_cmd_append_vsie_tlv()
mwifiex: Fix possible buffer overflows in mwifiex_ret_wmm_get_status()
Richard Guy Briggs (2):
selinux: cleanup error reporting in selinux_nlmsg_perm()
selinux: convert WARN_ONCE() to printk() in selinux_nlmsg_perm()
Shijie Luo (1):
ext4: add cond_resched() to ext4_protect_reserved_inode
Tahsin Erdogan (1):
ext4: Make checks for metadata_csum feature safer
Theodore Ts'o (3):
ext4: protect journal inode's blocks using block_validity
ext4: fix block validity checks for journal inodes using indirect blocks
ext4: don't perform block validity checks on the journal inode
Todd Poynor (2):
scsi: sg: protect against races between mmap() and SG_SET_RESERVED_SIZE
scsi: sg: recheck MMAP_IO request length with lock held
Tony Battersby (1):
scsi: sg: fix minor memory leak in error path
Vladis Dronov (1):
selinux: rate-limit netlink message warnings in selinux_nlmsg_perm()
Wu Bo (1):
scsi: sg: add sg_remove_request in sg_write
yangerkun (1):
slip: not call free_netdev before rtnl_unlock in slip_open
Documentation/ABI/testing/sysfs-devices-system-cpu +1 -0
@@ -232,6 +232,7 @@ What: /sys/devices/system/cpu/vulnerabilities /sys/devices/system/cpu/vulnerabilities/spec_store_bypass /sys/devices/system/cpu/vulnerabilities/l1tf /sys/devices/system/cpu/vulnerabilities/mds + /sys/devices/system/cpu/vulnerabilities/srbds /sys/devices/system/cpu/vulnerabilities/tsx_async_abort /sys/devices/system/cpu/vulnerabilities/itlb_multihit Date: January 2018
Documentation/hw-vuln/special-register-buffer-data-sampling.rst new file +149 -0
149 lines not on this page · raw message
Documentation/kernel-parameters.txt +20 -0
@@ -3356,6 +3356,26 @@ bytes respectively. Such letter suffixes can also be entirely omitted. spia_pedr= spia_peddr= + srbds= [X86,INTEL] + Control the Special Register Buffer Data Sampling + (SRBDS) mitigation. + + Certain CPUs are vulnerable to an MDS-like + exploit which can leak bits from the random + number generator. + + By default, this issue is mitigated by + microcode. However, the microcode fix can cause + the RDRAND and RDSEED instructions to become + much slower. Among other effects, this will + result in reduced throughput from /dev/urandom. + + The microcode mitigation can be disabled with + the following option: + + off: Disable mitigation and remove + performance impact to RDRAND and RDSEED + stack_guard_gap= [MM] override the default stack gap protection. The value is in page units and it defines how many pages prior
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 16 -SUBLEVEL = 84 +SUBLEVEL = 85 EXTRAVERSION = NAME = Museum of Fishiegoodies
arch/x86/include/asm/acpi.h +1 -1
@@ -87,7 +87,7 @@ static inline unsigned int acpi_processor_cstate_check(unsigned int max_cstate)if (boot_cpu_data.x86 ==0x0F && boot_cpu_data.x86_vendor ==X86_VENDOR_AMD && boot_cpu_data.x86_model <=0x05 && - boot_cpu_data.x86_mask <0x0A ) + boot_cpu_data.x86_stepping <0x0A )return 1 ;else if (amd_e400_c1e_detected)return 1 ;
arch/x86/include/asm/cpu_device_id.h +27 -0
@@ -8,6 +8,33 @@#include <linux/mod_devicetable.h> +#define X86_STEPPINGS (mins, maxs) GENMASK(maxs, mins) + +/** +* X86_MATCH_VENDOR_FAM_MODEL_STEPPINGS_FEATURE - Base macro for CPU matching +* @_vendor: The vendor name, e.g. INTEL, AMD, HYGON, ..., ANY +* The name is expanded to X86_VENDOR_@_vendor +* @_family: The family number or X86_FAMILY_ANY +* @_model: The model number, model constant or X86_MODEL_ANY +* @_steppings: Bitmask for steppings, stepping constant or X86_STEPPING_ANY +* @_feature: A X86_FEATURE bit or X86_FEATURE_ANY +* @_data: Driver specific data or NULL. The internal storage +* format is unsigned long. The supplied value, pointer +* etc. is casted to unsigned long internally. +* +* Backport version to keep the SRBDS pile consistant. No shorter variants +* required for this. +*/ +#define X86_MATCH_VENDOR_FAM_MODEL_STEPPINGS_FEATURE (_vendor, _family, _model, \ + _steppings, _feature, _data) { \ + .vendor = X86_VENDOR_##_vendor, \ + .family = _family, \ + .model = _model, \ + .steppings = _steppings, \ + .feature = _feature, \ + .driver_data = (unsigned long) _data \ +} +extern const struct x86_cpu_id *x86_match_cpu (const struct x86_cpu_id *match);#endif
arch/x86/include/asm/cpufeatures.h +2 -0
@@ -247,6 +247,7 @@#define X86_FEATURE_AVX512CD ( 9*32+28)/* AVX-512 Conflict Detection */ /* Intel-defined CPU features, CPUID level 0x00000007:0 (EDX), word 10 */ +#define X86_FEATURE_SRBDS_CTRL (10*32+ 9)/* "" SRBDS mitigation MSR available */ #define X86_FEATURE_MD_CLEAR (10*32+10)/* VERW clears CPU buffers */ #define X86_FEATURE_SPEC_CTRL (10*32+26)/* "" Speculation Control (IBRS + IBPB) */ #define X86_FEATURE_INTEL_STIBP (10*32+27)/* "" Single Thread Indirect Branch Predictors */
@@ -281,5 +282,6 @@#define X86_BUG_SWAPGS X86_BUG(12)/* CPU is affected by speculation through SWAPGS */ #define X86_BUG_TAA X86_BUG(13)/* CPU is affected by TSX Async Abort(TAA) */ #define X86_BUG_ITLB_MULTIHIT X86_BUG(14)/* CPU may incur MCE during certain page attribute changes */ +#define X86_BUG_SRBDS X86_BUG(15)/* CPU may leak RNG bits if not mitigated */ #endif /* _ASM_X86_CPUFEATURES_H */
arch/x86/include/asm/processor.h +1 -1
@@ -82,7 +82,7 @@ struct cpuinfo_x86 {__u8 x86;/* CPU family */ __u8 x86_vendor;/* CPU vendor */ __u8 x86_model; -__u8 x86_mask; +__u8 x86_stepping;#ifdef CONFIG_X86_32 char wp_works_ok;/* It doesn't on 386's */
arch/x86/include/uapi/asm/msr-index.h +4 -0
@@ -90,6 +90,10 @@#define TSX_CTRL_RTM_DISABLE (1UL << 0)/* Disable RTM feature */ #define TSX_CTRL_CPUID_CLEAR (1UL << 1)/* Disable TSX enumeration */ +/* SRBDS support */ +#define MSR_IA32_MCU_OPT_CTRL 0x00000123 +#define RNGDS_MITG_DIS BIT(0) +#define MSR_IA32_SYSENTER_CS 0x00000174#define MSR_IA32_SYSENTER_ESP 0x00000175#define MSR_IA32_SYSENTER_EIP 0x00000176
arch/x86/kernel/amd_nb.c +1 -1
@@ -116,7 +116,7 @@ int amd_cache_northbridges(void)if (boot_cpu_data.x86 ==0x10 && boot_cpu_data.x86_model >=0x8 && (boot_cpu_data.x86_model >0x9 || - boot_cpu_data.x86_mask >=0x1 )) + boot_cpu_data.x86_stepping >=0x1 )) amd_northbridges.flags |=AMD_NB_L3_INDEX_DISABLE ;if (boot_cpu_data.x86 ==0x15 )
arch/x86/kernel/asm-offsets_32.c +1 -1
@@ -27,7 +27,7 @@ void foo(void)OFFSET (CPUINFO_x86, cpuinfo_x86, x86);OFFSET (CPUINFO_x86_vendor, cpuinfo_x86, x86_vendor);OFFSET (CPUINFO_x86_model, cpuinfo_x86, x86_model); -OFFSET (CPUINFO_x86_mask, cpuinfo_x86, x86_mask); +OFFSET (CPUINFO_x86_stepping, cpuinfo_x86, x86_stepping);OFFSET (CPUINFO_cpuid_level, cpuinfo_x86, cpuid_level);OFFSET (CPUINFO_x86_capability, cpuinfo_x86, x86_capability);OFFSET (CPUINFO_x86_vendor_id, cpuinfo_x86, x86_vendor_id);
arch/x86/kernel/cpu/amd.c +14 -14
@@ -101,7 +101,7 @@ static void init_amd_k6(struct cpuinfo_x86 *c)return ; } -if (c->x86_model ==6 && c->x86_mask ==1 ) { +if (c->x86_model ==6 && c->x86_stepping ==1 ) {const int K6_BUG_LOOP =1000000 ;int n;void (*f_vide)(void );
@@ -131,7 +131,7 @@ static void init_amd_k6(struct cpuinfo_x86 *c)/* K6 with old style WHCR */ if (c->x86_model <8 || - (c->x86_model ==8 && c->x86_mask <8 )) { + (c->x86_model ==8 && c->x86_stepping <8 )) {/* We can only write allocate on the low 508Mb */ if (mbytes >508 ) mbytes =508 ;
@@ -150,7 +150,7 @@ static void init_amd_k6(struct cpuinfo_x86 *c)return ; } -if ((c->x86_model ==8 && c->x86_mask >7 ) || +if ((c->x86_model ==8 && c->x86_stepping >7 ) || c->x86_model ==9 || c->x86_model ==13 ) {/* The more serious chips .. */
@@ -190,12 +190,12 @@ static void amd_k7_smp_check(struct cpuinfo_x86 *c)* but they are not certified as MP capable. */ /* Athlon 660/661 is valid. */ -if ((c->x86_model ==6 ) && ((c->x86_mask ==0 ) || - (c->x86_mask ==1 ))) +if ((c->x86_model ==6 ) && ((c->x86_stepping ==0 ) || + (c->x86_stepping ==1 )))return ;/* Duron 670 is valid */ -if ((c->x86_model ==7 ) && (c->x86_mask ==0 )) +if ((c->x86_model ==7 ) && (c->x86_stepping ==0 ))return ;/*
@@ -205,8 +205,8 @@ static void amd_k7_smp_check(struct cpuinfo_x86 *c)* See http://www.heise.de/newsticker/data/jow-18.10.01-000 for * more. */ -if (((c->x86_model ==6 ) && (c->x86_mask >=2 )) || - ((c->x86_model ==7 ) && (c->x86_mask >=1 )) || +if (((c->x86_model ==6 ) && (c->x86_stepping >=2 )) || + ((c->x86_model ==7 ) && (c->x86_stepping >=1 )) || (c->x86_model >7 ))if (cpu_has_mp)return ;
@@ -244,7 +244,7 @@ static void init_amd_k7(struct cpuinfo_x86 *c)* are more robust with CLK_CTL set to 200xxxxx instead of 600xxxxx * As per AMD technical note 27212 0.2 */ -if ((c->x86_model ==8 && c->x86_mask >=1 ) || (c->x86_model >8 )) { +if ((c->x86_model ==8 && c->x86_stepping >=1 ) || (c->x86_model >8 )) {rdmsr (MSR_K7_CLK_CTL , l, h);if ((l &0xfff00000 ) !=0x20000000 ) { printk(KERN_INFO
@@ -514,7 +514,7 @@ static void early_init_amd(struct cpuinfo_x86 *c)/* Set MTRR capability flag if appropriate */ if (c->x86 ==5 )if (c->x86_model ==13 || c->x86_model ==9 || - (c->x86_model ==8 && c->x86_mask >=8 )) + (c->x86_model ==8 && c->x86_stepping >=8 ))set_cpu_cap (c,X86_FEATURE_K6_MTRR );#endif #if defined(CONFIG_X86_LOCAL_APIC ) && defined(CONFIG_PCI )
@@ -561,7 +561,7 @@ static void init_amd_zn(struct cpuinfo_x86 *c)* Fix erratum 1076: CPB feature bit not being set in CPUID. It affects * all up to and including B1. */ -if (c->x86_model <=1 && c->x86_mask <=1 ) +if (c->x86_model <=1 && c->x86_stepping <=1 )set_cpu_cap (c,X86_FEATURE_CPB ); }
@@ -810,11 +810,11 @@ static unsigned int amd_size_cache(struct cpuinfo_x86 *c, unsigned int size)/* AMD errata T13 (order #21922) */ if ((c->x86 ==6 )) {/* Duron Rev A0 */ -if (c->x86_model ==3 && c->x86_mask ==0 ) +if (c->x86_model ==3 && c->x86_stepping ==0 ) size =64 ;/* Tbird rev A1/A2 */ if (c->x86_model ==4 && - (c->x86_mask ==0 || c->x86_mask ==1 )) + (c->x86_stepping ==0 || c->x86_stepping ==1 )) size =256 ; }return size;
@@ -951,7 +951,7 @@ static bool cpu_has_amd_erratum(struct cpuinfo_x86 *cpu, const int *erratum) }/* OSVW unavailable or ID unknown, match family-model-stepping range */ - ms = (cpu->x86_model <<4 ) | cpu->x86_mask; + ms = (cpu->x86_model <<4 ) | cpu->x86_stepping;while ((range = *erratum++)) if ((cpu->x86 == AMD_MODEL_RANGE_FAMILY(range)) && (ms >= AMD_MODEL_RANGE_START(range)) &&
arch/x86/kernel/cpu/bugs.c +106 -0
140 lines not on this page · raw message
arch/x86/kernel/cpu/centaur.c +2 -2
@@ -134,7 +134,7 @@ static void init_centaur(struct cpuinfo_x86 *c)clear_cpu_cap (c,X86_FEATURE_TSC );break ;case 8 : -switch (c->x86_mask) { +switch (c->x86_stepping) {default : name ="2" ;break ;
@@ -209,7 +209,7 @@ centaur_size_cache(struct cpuinfo_x86 *c, unsigned int size)* - Note, it seems this may only be in engineering samples. */ if ((c->x86 ==6 ) && (c->x86_model ==9 ) && - (c->x86_mask ==1 ) && (size ==65 )) + (c->x86_stepping ==1 ) && (size ==65 )) size -=1 ;return size; }
arch/x86/kernel/cpu/common.c +48 -14
128 lines not on this page · raw message
arch/x86/kernel/cpu/cpu.h +1 -0
@@ -63,6 +63,7 @@ extern void get_cpu_cap(struct cpuinfo_x86 *c);extern void cpu_detect_cache_sizes (struct cpuinfo_x86 *c);extern void x86_spec_ctrl_setup_ap (void ); +extern void update_srbds_msr (void );extern u64 x86_read_arch_cap_msr (void );
arch/x86/kernel/cpu/cyrix.c +1 -1
@@ -212,7 +212,7 @@ static void init_cyrix(struct cpuinfo_x86 *c)/* common case step number/rev -- exceptions handled below */ c->x86_model = (dir1 >>4 ) +1 ; - c->x86_mask = dir1 &0xf ; + c->x86_stepping = dir1 &0xf ;/* Now cook; the original recipe is by Channing Corn, from Cyrix. * We do the same thing for each generation: we work out
arch/x86/kernel/cpu/intel.c +9 -9
@@ -81,7 +81,7 @@ static bool bad_spectre_microcode(struct cpuinfo_x86 *c)for (i =0 ; i <ARRAY_SIZE (spectre_bad_microcodes); i++) {if (c->x86_model == spectre_bad_microcodes[i].model && - c->x86_mask == spectre_bad_microcodes[i].stepping) + c->x86_stepping == spectre_bad_microcodes[i].stepping)return (c->microcode <= spectre_bad_microcodes[i].microcode); }return false;
@@ -131,7 +131,7 @@ static void early_init_intel(struct cpuinfo_x86 *c)* need the microcode to have already been loaded... so if it is * not, recommend a BIOS update and disable large pages. */ -if (c->x86 ==6 && c->x86_model ==0x1c && c->x86_mask <=2 && +if (c->x86 ==6 && c->x86_model ==0x1c && c->x86_stepping <=2 && c->microcode <0x20e ) {printk (KERN_WARNING "Atom PSE erratum detected, BIOS microcode update recommended\n" );clear_cpu_cap (c,X86_FEATURE_PSE );
@@ -147,7 +147,7 @@ static void early_init_intel(struct cpuinfo_x86 *c)/* CPUID workaround for 0F33/0F34 CPU */ if (c->x86 ==0xF && c->x86_model ==0x3 - && (c->x86_mask ==0x3 || c->x86_mask ==0x4 )) + && (c->x86_stepping ==0x3 || c->x86_stepping ==0x4 )) c->x86_phys_bits =36 ;/*
@@ -246,7 +246,7 @@ int ppro_with_ram_bug(void)if (boot_cpu_data.x86_vendor ==X86_VENDOR_INTEL && boot_cpu_data.x86 ==6 && boot_cpu_data.x86_model ==1 && - boot_cpu_data.x86_mask <8 ) { + boot_cpu_data.x86_stepping <8 ) {printk (KERN_INFO "Pentium Pro with Errata#50 detected. Taking evasive action.\n" );return 1 ; }
@@ -263,7 +263,7 @@ static void intel_smp_check(struct cpuinfo_x86 *c)* Mask B, Pentium, but not Pentium MMX */ if (c->x86 ==5 && - c->x86_mask >=1 && c->x86_mask <=4 && + c->x86_stepping >=1 && c->x86_stepping <=4 && c->x86_model <=3 ) {/* * Remember we have B step Pentia with bugs
@@ -305,7 +305,7 @@ static void intel_workarounds(struct cpuinfo_x86 *c)* SEP CPUID bug: Pentium Pro reports SEP but doesn't have it until * model 3 mask 3 */ -if ((c->x86<<8 | c->x86_model<<4 | c->x86_mask) <0x633 ) +if ((c->x86<<8 | c->x86_model<<4 | c->x86_stepping) <0x633 )clear_cpu_cap (c,X86_FEATURE_SEP );/*
@@ -323,7 +323,7 @@ static void intel_workarounds(struct cpuinfo_x86 *c)* P4 Xeon errata 037 workaround. * Hardware prefetcher may cause stale data to be loaded into the cache. */ -if ((c->x86 ==15 ) && (c->x86_model ==1 ) && (c->x86_mask ==1 )) { +if ((c->x86 ==15 ) && (c->x86_model ==1 ) && (c->x86_stepping ==1 )) {if (msr_set_bit (MSR_IA32_MISC_ENABLE ,MSR_IA32_MISC_ENABLE_PREFETCH_DISABLE_BIT ) >0 ) {
@@ -339,7 +339,7 @@ static void intel_workarounds(struct cpuinfo_x86 *c)* Specification Update"). */ if (cpu_has_apic && (c->x86<<8 | c->x86_model<<4 ) ==0x520 && - (c->x86_mask <0x6 || c->x86_mask ==0xb )) + (c->x86_stepping <0x6 || c->x86_stepping ==0xb ))set_cpu_cap (c,X86_FEATURE_11AP );
@@ -523,7 +523,7 @@ static void init_intel(struct cpuinfo_x86 *c)case 6 :if (l2 ==128 ) p ="Celeron (Mendocino)" ; -else if (c->x86_mask ==0 || c->x86_mask ==5 ) +else if (c->x86_stepping ==0 || c->x86_stepping ==5 ) p ="Celeron-A" ;break ;
arch/x86/kernel/cpu/match.c +6 -1
@@ -33,13 +33,18 @@ const struct x86_cpu_id *x86_match_cpu(const struct x86_cpu_id *match)const struct x86_cpu_id *m;struct cpuinfo_x86 *c = &boot_cpu_data; -for (m = match; m->vendor | m->family | m->model | m->feature; m++) { +for (m = match; + m->vendor | m->family | m->model | m->steppings | m->feature; + m++) {if (m->vendor !=X86_VENDOR_ANY && c->x86_vendor != m->vendor)continue ;if (m->family !=X86_FAMILY_ANY && c->x86 != m->family)continue ;if (m->model !=X86_MODEL_ANY && c->x86_model != m->model)continue ; +if (m->steppings !=X86_STEPPING_ANY && + !(BIT (c->x86_stepping) & m->steppings)) +continue ;if (m->feature !=X86_FEATURE_ANY && !cpu_has (c, m->feature))continue ;return m;
arch/x86/kernel/cpu/microcode/intel.c +2 -2
@@ -291,7 +291,7 @@ static bool is_blacklisted(unsigned int cpu)*/ if (c->x86 ==6 && c->x86_model ==0x4F && - c->x86_mask ==0x01 && + c->x86_stepping ==0x01 && llc_size_per_core >2621440 && c->microcode <0x0b000021 ) {pr_err_once ("Erratum BDF90: late loading with revision < 0x0b000021 (0x%x) disabled.\n" , c->microcode);
@@ -314,7 +314,7 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device,return UCODE_NFOUND ;sprintf (name,"intel-ucode/%02x-%02x-%02x" , - c->x86, c->x86_model, c->x86_mask); + c->x86, c->x86_model, c->x86_stepping);if (request_firmware_direct (&firmware, name, device)) {pr_debug ("data file %s load failed\n" , name);
arch/x86/kernel/cpu/mtrr/generic.c +1 -1
@@ -791,7 +791,7 @@ int generic_validate_add_page(unsigned long base, unsigned long size,*/ if (is_cpu (INTEL ) && boot_cpu_data.x86 ==6 && boot_cpu_data.x86_model ==1 && - boot_cpu_data.x86_mask <=7 ) { + boot_cpu_data.x86_stepping <=7 ) {if (base & ((1 << (22 -PAGE_SHIFT )) -1 )) {pr_warning ("mtrr: base(0x%lx000) is not 4 MiB aligned\n" , base);return -EINVAL ;
arch/x86/kernel/cpu/mtrr/main.c +2 -2
@@ -688,8 +688,8 @@ void __init mtrr_bp_init(void)if (boot_cpu_data.x86_vendor ==X86_VENDOR_INTEL && boot_cpu_data.x86 ==0xF && boot_cpu_data.x86_model ==0x3 && - (boot_cpu_data.x86_mask ==0x3 || - boot_cpu_data.x86_mask ==0x4 )) + (boot_cpu_data.x86_stepping ==0x3 || + boot_cpu_data.x86_stepping ==0x4 )) phys_addr =36 ; size_or_mask =SIZE_OR_MASK_BITS (phys_addr);
arch/x86/kernel/cpu/perf_event_intel.c +1 -1
@@ -2192,7 +2192,7 @@ static int intel_snb_pebs_broken(int cpu)break ;case 45 :/* SNB-EP */ -switch (cpu_data (cpu).x86_mask) { +switch (cpu_data (cpu).x86_stepping) {case 6 : rev =0x618 ;break ;case 7 : rev =0x70c ;break ; }
arch/x86/kernel/cpu/perf_event_intel_lbr.c +1 -1
@@ -763,7 +763,7 @@ void intel_pmu_lbr_init_atom(void)* on PMU interrupt */ if (boot_cpu_data.x86_model ==28 - && boot_cpu_data.x86_mask <10 ) { + && boot_cpu_data.x86_stepping <10 ) {pr_cont ("LBR disabled due to erratum" );return ; }
arch/x86/kernel/cpu/perf_event_p6.c +1 -1
@@ -233,7 +233,7 @@ static __initconst const struct x86_pmu p6_pmu = {static __init void p6_pmu_rdpmc_quirk (void ) { -if (boot_cpu_data.x86_mask <9 ) { +if (boot_cpu_data.x86_stepping <9 ) {/* * PPro erratum 26; fixed in stepping 9 and above. */
arch/x86/kernel/cpu/proc.c +2 -2
@@ -69,8 +69,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) c->x86_model, c->x86_model_id[0] ? c->x86_model_id : "unknown"); -if (c->x86_mask || c->cpuid_level >=0 ) -seq_printf (m,"stepping\t: %d\n" , c->x86_mask); +if (c->x86_stepping || c->cpuid_level >=0 ) +seq_printf (m,"stepping\t: %d\n" , c->x86_stepping);else seq_printf (m,"stepping\t: unknown\n" );if (c->microcode)
arch/x86/kernel/head_32.S +2 -2
@@ -33,7 +33,7 @@ #define X86 new_cpu_data+CPUINFO_x86 #define X86_VENDOR new_cpu_data+CPUINFO_x86_vendor #define X86_MODEL new_cpu_data+CPUINFO_x86_model -#define X86_MASK new_cpu_data+CPUINFO_x86_mask +#define X86_STEPPING new_cpu_data+CPUINFO_x86_stepping #define X86_HARD_MATH new_cpu_data+CPUINFO_hard_math #define X86_CPUID new_cpu_data+CPUINFO_cpuid_level #define X86_CAPABILITY new_cpu_data+CPUINFO_x86_capability
@@ -433,7 +433,7 @@ ENTRY(startup_32_smp) shrb $4,%al movb %al,X86_MODEL andb $0x0f,%cl # mask mask revision - movb %cl,X86_MASK + movb %cl,X86_STEPPING movl %edx,X86_CAPABILITY is486:
arch/x86/kernel/mpparse.c +1 -1
@@ -409,7 +409,7 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type) processor.apicver = mpc_default_type >4 ?0x10 :0x01 ; processor.cpuflag =CPU_ENABLED ; processor.cpufeature = (boot_cpu_data.x86 <<8 ) | - (boot_cpu_data.x86_model <<4 ) | boot_cpu_data.x86_mask; + (boot_cpu_data.x86_model <<4 ) | boot_cpu_data.x86_stepping; processor.featureflag = boot_cpu_data.x86_capability[0 ]; processor.reserved[0 ] =0 ; processor.reserved[1 ] =0 ;
drivers/base/cpu.c +8 -0
@@ -469,6 +469,12 @@ ssize_t __weak cpu_show_itlb_multihit(struct device *dev,return sprintf (buf,"Not affected\n" ); } +ssize_t __weak cpu_show_srbds (struct device *dev, +struct device_attribute *attr,char *buf) +{ +return sprintf (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);
@@ -477,6 +483,7 @@ static DEVICE_ATTR(l1tf, 0444, cpu_show_l1tf, NULL); static DEVICE_ATTR(mds, 0444, cpu_show_mds, NULL); static DEVICE_ATTR(tsx_async_abort, 0444, cpu_show_tsx_async_abort, NULL); static DEVICE_ATTR(itlb_multihit, 0444, cpu_show_itlb_multihit, NULL); +static DEVICE_ATTR(srbds, 0444, cpu_show_srbds, NULL);static struct attribute *cpu_root_vulnerabilities_attrs[] = { &dev_attr_meltdown.attr,
@@ -487,6 +494,7 @@ static struct attribute *cpu_root_vulnerabilities_attrs[] = { &dev_attr_mds.attr, &dev_attr_tsx_async_abort.attr, &dev_attr_itlb_multihit.attr, + &dev_attr_srbds.attr, NULL };
drivers/char/hw_random/via-rng.c +1 -1
@@ -166,7 +166,7 @@ static int via_rng_init(struct hwrng *rng)/* Enable secondary noise source on CPUs where it is present. */ /* Nehemiah stepping 8 and higher */ -if ((c->x86_model ==9 ) && (c->x86_mask >7 )) +if ((c->x86_model ==9 ) && (c->x86_stepping >7 )) lo |=VIA_NOISESRC2 ;/* Esther */
drivers/char/random.c +0 -3
@@ -1700,9 +1700,6 @@ unsigned int get_random_int(void)__u32 *hash;unsigned int ret; -if (arch_get_random_int (&ret)) -return ret; - hash =get_cpu_var (get_random_int_hash); hash[0 ] += current->pid + jiffies +random_get_entropy ();
drivers/cpufreq/acpi-cpufreq.c +1 -1
@@ -628,7 +628,7 @@ static int acpi_cpufreq_blacklist(struct cpuinfo_x86 *c)if (c->x86_vendor ==X86_VENDOR_INTEL ) {if ((c->x86 ==15 ) && (c->x86_model ==6 ) && - (c->x86_mask ==8 )) { + (c->x86_stepping ==8 )) {printk (KERN_INFO "acpi-cpufreq: Intel(R) " "Xeon(R) 7100 Errata AL30, processors may " "lock up on frequency changes: disabling "
drivers/cpufreq/longhaul.c +3 -3
@@ -786,7 +786,7 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy)break ;case 7 : -switch (c->x86_mask) { +switch (c->x86_stepping) {case 0 : longhaul_version =TYPE_LONGHAUL_V1 ; cpu_model =CPU_SAMUEL2 ;
@@ -798,7 +798,7 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy)break ; case 1 ... 15: longhaul_version =TYPE_LONGHAUL_V2 ; -if (c->x86_mask <8 ) { +if (c->x86_stepping <8 ) { cpu_model =CPU_SAMUEL2 ; cpuname ="C3 'Samuel 2' [C5B]" ; }else {
@@ -825,7 +825,7 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy) numscales =32 ;memcpy (mults, nehemiah_mults,sizeof (nehemiah_mults));memcpy (eblcr, nehemiah_eblcr,sizeof (nehemiah_eblcr)); -switch (c->x86_mask) { +switch (c->x86_stepping) { case 0 ... 1: cpu_model =CPU_NEHEMIAH ; cpuname ="C3 'Nehemiah A' [C5XLOE]" ;
drivers/cpufreq/p4-clockmod.c +1 -1
@@ -176,7 +176,7 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)#endif /* Errata workaround */ - cpuid = (c->x86 <<8 ) | (c->x86_model <<4 ) | c->x86_mask; + cpuid = (c->x86 <<8 ) | (c->x86_model <<4 ) | c->x86_stepping;switch (cpuid) {case 0x0f07 :case 0x0f0a :
drivers/cpufreq/powernow-k7.c +1 -1
@@ -133,7 +133,7 @@ static int check_powernow(void)return 0 ; } -if ((c->x86_model ==6 ) && (c->x86_mask ==0 )) { +if ((c->x86_model ==6 ) && (c->x86_stepping ==0 )) { printk(KERN_INFO PFX "K7 660[A0] core detected, " "enabling errata workarounds\n"); have_a0 =1 ;
drivers/cpufreq/speedstep-centrino.c +2 -2
@@ -36,7 +36,7 @@ struct cpu_id {__u8 x86;/* CPU family */ __u8 x86_model;/* model */ -__u8 x86_mask;/* stepping */ +__u8 x86_stepping;/* stepping */ };enum {
@@ -276,7 +276,7 @@ static int centrino_verify_cpu_id(const struct cpuinfo_x86 *c, {if ((c->x86 == x->x86) && (c->x86_model == x->x86_model) && - (c->x86_mask == x->x86_mask)) + (c->x86_stepping == x->x86_stepping))return 1 ;return 0 ; }
drivers/cpufreq/speedstep-lib.c +3 -3
@@ -270,9 +270,9 @@ unsigned int speedstep_detect_processor(void) ebx =cpuid_ebx (0x00000001 ); ebx &=0x000000FF ; -pr_debug ("ebx value is %x, x86_mask is %x\n" , ebx, c->x86_mask); +pr_debug ("ebx value is %x, x86_stepping is %x\n" , ebx, c->x86_stepping); -switch (c->x86_mask) { +switch (c->x86_stepping) {case 4 :/* * B-stepping [M-P4-M]
@@ -359,7 +359,7 @@ unsigned int speedstep_detect_processor(void) msr_lo, msr_hi);if ((msr_hi & (1 <<18 )) && (relaxed_check ?1 : (msr_hi & (3 <<24 )))) { -if (c->x86_mask ==0x01 ) { +if (c->x86_stepping ==0x01 ) {pr_debug ("early PIII version\n" );return SPEEDSTEP_CPU_PIII_C_EARLY ; }else
drivers/crypto/padlock-aes.c +1 -1
@@ -535,7 +535,7 @@ static int __init padlock_init(void) printk(KERN_NOTICE PFX "Using VIA PadLock ACE for AES algorithm.\n"); -if (c->x86 ==6 && c->x86_model ==15 && c->x86_mask ==2 ) { +if (c->x86 ==6 && c->x86_model ==15 && c->x86_stepping ==2 ) { ecb_fetch_blocks =MAX_ECB_FETCH_BLOCKS ; cbc_fetch_blocks =MAX_CBC_FETCH_BLOCKS ; printk(KERN_NOTICE PFX "VIA Nano stepping 2 detected: enabling workaround.\n");
drivers/edac/amd64_edac.c +1 -1
@@ -2576,7 +2576,7 @@ static struct amd64_family_type *per_family_init(struct amd64_pvt *pvt)struct amd64_family_type *fam_type =NULL ; pvt->ext_model = boot_cpu_data.x86_model >>4 ; - pvt->stepping = boot_cpu_data.x86_mask; + pvt->stepping = boot_cpu_data.x86_stepping; pvt->model = boot_cpu_data.x86_model; pvt->fam = boot_cpu_data.x86;
drivers/edac/mce_amd.c +1 -1
@@ -744,7 +744,7 @@ int amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data) pr_emerg(HW_ERR "CPU:%d (%x:%x:%x) MC%d_STATUS[%s|%s|%s|%s|%s", m->extcpu, - c->x86, c->x86_model, c->x86_mask, + c->x86, c->x86_model, c->x86_stepping, m->bank, ((m->status & MCI_STATUS_OVER) ? "Over" : "-"), ((m->status & MCI_STATUS_UC) ? "UE" : "CE"),
drivers/hwmon/coretemp.c +3 -3
@@ -268,13 +268,13 @@ static int adjust_tjmax(struct cpuinfo_x86 *c, u32 id, struct device *dev)for (i =0 ; i <ARRAY_SIZE (tjmax_model_table); i++) {const struct tjmax_model *tm = &tjmax_model_table[i];if (c->x86_model == tm->model && - (tm->mask ==ANY || c->x86_mask == tm->mask)) + (tm->mask ==ANY || c->x86_stepping == tm->mask))return tm->tjmax; }/* Early chips have no MSR for TjMax */ -if (c->x86_model ==0xf && c->x86_mask <4 ) +if (c->x86_model ==0xf && c->x86_stepping <4 ) usemsr_ee =0 ;if (c->x86_model >0xe && usemsr_ee) {
@@ -426,7 +426,7 @@ static int chk_ucode_version(unsigned int cpu)* Readings might stop update when processor visited too deep sleep, * fixed for stepping D0 (6EC). */ -if (c->x86_model ==0xe && c->x86_mask <0xc && c->microcode <0x39 ) { +if (c->x86_model ==0xe && c->x86_stepping <0xc && c->microcode <0x39 ) {pr_err ("Errata AE18 not fixed, update BIOS or microcode of the CPU!\n" );return -ENODEV ; }
drivers/hwmon/hwmon-vid.c +1 -1
@@ -293,7 +293,7 @@ u8 vid_which_vrm(void)if (c->x86 <6 )/* Any CPU with family lower than 6 */ return 0 ;/* doesn't have VID */ - vrm_ret =find_vrm (c->x86, c->x86_model, c->x86_mask, c->x86_vendor); + vrm_ret =find_vrm (c->x86, c->x86_model, c->x86_stepping, c->x86_vendor);if (vrm_ret ==134 ) vrm_ret =get_via_model_d_vrm ();if (vrm_ret ==0 )
drivers/hwmon/k10temp.c +1 -1
@@ -126,7 +126,7 @@ static bool has_erratum_319(struct pci_dev *pdev)* and AM3 formats, but that's the best we can do. */ return boot_cpu_data.x86_model <4 || - (boot_cpu_data.x86_model ==4 && boot_cpu_data.x86_mask <=2 ); + (boot_cpu_data.x86_model ==4 && boot_cpu_data.x86_stepping <=2 ); } static int k10temp_probe(struct pci_dev *pdev,
drivers/hwmon/k8temp.c +1 -1
@@ -187,7 +187,7 @@ static int k8temp_probe(struct pci_dev *pdev,return -ENOMEM ; model = boot_cpu_data.x86_model; - stepping = boot_cpu_data.x86_mask; + stepping = boot_cpu_data.x86_stepping;/* feature available since SH-C0, exclude older revisions */ if ((model == 4 && stepping == 0) ||
drivers/message/fusion/mptctl.c +52 -163
490 lines not on this page · raw message
drivers/net/can/slcan.c +4 -0
@@ -620,6 +620,10 @@ static int slcan_open(struct tty_struct *tty) sl->tty =NULL ; tty->disc_data =NULL ;clear_bit (SLF_INUSE , &sl->flags); +/* do not call free_netdev before rtnl_unlock */ +rtnl_unlock (); +slc_free_netdev (sl->dev); +return err; err_exit:rtnl_unlock ();
drivers/net/slip/slip.c +4 -0
@@ -867,6 +867,10 @@ static int slip_open(struct tty_struct *tty) sl->tty =NULL ; tty->disc_data =NULL ;clear_bit (SLF_INUSE , &sl->flags); +/* do not call free_netdev before rtnl_unlock */ +rtnl_unlock (); +sl_free_netdev (sl->dev); +return err; err_exit:rtnl_unlock ();
drivers/net/wireless/mwifiex/scan.c +7 -0
@@ -2267,6 +2267,13 @@ mwifiex_cmd_append_vsie_tlv(struct mwifiex_private *priv, vs_param_set->header.len =cpu_to_le16 ((((u16 ) priv->vs_ie[id].ie[1 ]) &0x00FF ) +2 ); +if (le16_to_cpu (vs_param_set->header.len) > +MWIFIEX_MAX_VSIE_LEN ) { +dev_info (priv->adapter->dev, +"Invalid param length!\n" ); +break ; + } +memcpy (vs_param_set->ie, priv->vs_ie[id].ie,le16_to_cpu (vs_param_set->header.len)); *buffer += le16_to_cpu(vs_param_set->header.len) +
drivers/net/wireless/mwifiex/wmm.c +4 -0
@@ -791,6 +791,10 @@ int mwifiex_ret_wmm_get_status(struct mwifiex_private *priv, wmm_param_ie->qos_info_bitmap & IEEE80211_WMM_IE_AP_QOSINFO_PARAM_SET_CNT_MASK); +if (wmm_param_ie->vend_hdr.len +2 > +sizeof (struct ieee_types_wmm_parameter )) +break ; +memcpy ((u8 *) &priv->curr_bss_params.bss_descriptor. wmm_ie, wmm_param_ie, wmm_param_ie->vend_hdr.len +2 );
drivers/scsi/sg.c +399 -359
1,417 lines not on this page · raw message
drivers/usb/core/message.c +28 -25
53 lines not on this page · raw message
fs/ext4/block_validity.c +57 -0
57 lines not on this page · raw message
security/selinux/hooks.c +46 -24
70 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.