- 27 12月, 2019 40 次提交
-
-
由 zhangwei 提交于
driver inclusion category: bugfix bugzilla: NA CVE: NA Feature or Bugfix:Bugfix Signed-off-by: NZhangwei <zhangwei375@huawei.com> Reviewed-by: Nhucheng.hu <hucheng.hu@huawei.com> Signed-off-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 lingmingqiang 提交于
driver inclusion category: bugfix bugzilla: NA CVE: NA Feature or Bugfix:Bugfix Signed-off-by: NZhangwei <zhangwei375@huawei.com> Reviewed-by: Nlingmingqiang <lingmingqiang@huawei.com> Signed-off-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 lingmingqiang 提交于
driver inclusion category: bugfix bugzilla: NA CVE: NA Feature or Bugfix:Feature Signed-off-by: Ntanghui20 <tanghui20@huawei.com> Reviewed-by: Nwangzhou <wangzhou1@hisilicon.com> Signed-off-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 zhangwei 提交于
driver inclusion category: bugfix bugzilla: NA CVE: NA Feature or Bugfix:Feature Signed-off-by: NZhangwei <zhangwei375@huawei.com> Reviewed-by: Nwangzhou <wangzhou1@hisilicon.com> Signed-off-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 liulongfang 提交于
driver inclusion category: bugfix bugzilla: NA CVE: NA After creating the acc's VF device and select the VF device ID. The acc's qm current_q num sync with the VF's queue num. The patch let it sync with the selected VF's queue num Feature or Bugfix:Bugfix Signed-off-by: Nliulongfang <liulongfang@huawei.com> Reviewed-by: Nwangzhou <wangzhou1@hisilicon.com> Signed-off-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 lingmingqiang 提交于
driver inclusion category: bugfix bugzilla: NA CVE: NA 1.change lockless -> nolock. 2.remove unlock twice. 3.add err print. 4.some tinyfix. and qp_dma clear except ds page. Feature or Bugfix:Bugfix Signed-off-by: NHao Fang <fanghao11@huawei.com> Reviewed-by: Nwangzhou <wangzhou1@hisilicon.com> Signed-off-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 lingmingqiang 提交于
driver inclusion category: bugfix bugzilla: NA CVE: NA Feature or Bugfix:Feature Signed-off-by: NZhangwei <zhangwei375@huawei.com> Reviewed-by: Nhucheng.hu <hucheng.hu@huawei.com> Signed-off-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Xue 提交于
driver inclusion category:bugfix bugzilla:4472 CVE:NA ----------------------------------------------------------------------- When the ip link set is configured with the vlan vlan for the first time, the default initial vlan id is 0. When the vlan is deleted, the new vlan id is 0. The non-zero judgment is made when the interface is invoked, resulting in the vlan id being 0. Returns an illegal value directly. This patch fix this bug. Reviewed-by: NGuan Xiaodong <guanxiaodong@huawei.com> Signed-off-by: NXue <xuechaojing@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 fengsheng 提交于
driver inclusion category: feature bugzilla: NA CVE: NA sysctl: 1. LPC renamed TDH 2. Add SATA RAS printing Signed-off-by: Nfengsheng <fengsheng5@huawei.com> Reviewed-by: Nzhangmu <zhangmu1@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 fengsheng 提交于
driver inclusion category: feature bugzilla: NA CVE: NA sfc: 1. chang driver name to hi-sfc.ko 2. kconfig remove dependence on lbc Signed-off-by: Nfengsheng <fengsheng5@huawei.com> Reviewed-by: Nzhangmu <zhangmu1@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Huazhong Tan 提交于
driver inclusion category: bugfix bugzilla: NA CVE: NA Since the mapping can be overwritten, when fail to get the chain between vector and ring, we should go on to deal with the remaining options. For debugging, this patch adds log info for this failure. Feature or Bugfix:Bugfix Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Reviewed-by: Nlinyunsheng <linyunsheng@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Huazhong Tan 提交于
driver inclusion category: bugfix bugzilla: NA CVE: NA MAC TNL interrupt is used to collect statistics info about link status changing suddenly when netdev running. But when stopping netdev, there also be a MAC TNL interrupt which is unnecessary, and may add some noise to the statistics info. So this patch disables it before stopping MAC. Fixes: a6345787 ("net: hns3: Add handling of MAC tunnel interruption") Feature or Bugfix:Bugfix Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Reviewed-by: Nlinyunsheng <linyunsheng@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 tanshukun 提交于
driver inclusion category: bugfix bugzilla: NA CVE: NA Feature or Bugfix:Bugfix Signed-off-by: Ntanshukun (A) <tanshukun1@huawei.com> Reviewed-by: Nwangzhou <wangzhou1@hisilicon.com> Signed-off-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Hao Fang 提交于
driver inclusion category: bugfix bugzilla: NA CVE: NA As VA unmap at user space, kernel va unmap in release q flow can lead dead_lock. [ 506.703275] ====================================================== [ 506.709426] WARNING: possible circular locking dependency detected [ 506.715580] 5.2.0-rc4-ge984cac-dirty #3 Tainted: G C O [ 506.721817] ------------------------------------------------------ [ 506.727968] wd_zip_test/1341 is trying to acquire lock: [ 506.733169] (____ptrval____) (&mm->mmap_sem){++++}, at: __vm_munmap+0x54/0xd0 [ 506.740278] [ 506.740278] but task is already holding lock: [ 506.746082] (____ptrval____) (uacce_qs_lock){+.+.}, at: uacce_fops_release+0x2c/0x220 [uacce] [ 506.754571] [ 506.754571] which lock already depends on the new lock. [ 506.754571] [ 506.762709] [ 506.762709] the existing dependency chain (in reverse order) is: [ 506.770155] [ 506.770155] -> #1 (uacce_qs_lock){+.+.}: [ 506.775533] down_write+0x50/0xc8 [ 506.779352] uacce_fops_mmap+0x3c/0x668 [uacce] [ 506.784380] mmap_region+0x3c0/0x580 [ 506.788456] do_mmap+0x34c/0x4e0 [ 506.792190] vm_mmap_pgoff+0xe4/0x110 [ 506.796353] ksys_mmap_pgoff+0xa8/0x240 [ 506.800690] __arm64_sys_mmap+0x28/0x38 [ 506.805028] el0_svc_common.constprop.0+0x74/0x170 [ 506.810314] el0_svc_handler+0x28/0x78 [ 506.814563] el0_svc+0x8/0xc [ 506.817948] [ 506.817948] -> #0 (&mm->mmap_sem){++++}: [ 506.823325] lock_acquire+0xe4/0x270 [ 506.827402] down_write_killable+0x50/0xe8 [ 506.831997] __vm_munmap+0x54/0xd0 [ 506.835901] vm_munmap+0x10/0x18 [ 506.839633] uacce_fops_release+0xc8/0x220 [uacce] [ 506.844921] __fput+0xac/0x1f0 [ 506.848478] ____fput+0xc/0x18 [ 506.852037] task_work_run+0x98/0xc8 [ 506.856114] do_notify_resume+0x314/0x388 [ 506.860623] work_pending+0x8/0x14 [ 506.864526] [ 506.864526] other info that might help us debug this: [ 506.864526] [ 506.872492] Possible unsafe locking scenario: [ 506.872492] [ 506.878382] CPU0 CPU1 [ 506.882890] ---- ---- [ 506.887399] lock(uacce_qs_lock); [ 506.890784] lock(&mm->mmap_sem); [ 506.896675] lock(uacce_qs_lock); [ 506.902565] lock(&mm->mmap_sem); [ 506.905951] [ 506.905951] *** DEADLOCK *** [ 506.905951] [ 506.911841] 1 lock held by wd_zip_test/1341: [ 506.916092] #0: (____ptrval____) (uacce_qs_lock){+.+.}, at: uacce_fops_release+0x2c/0x220 [uacce] [ 506.925009] [ 506.925009] stack backtrace: [ 506.929348] CPU: 6 PID: 1341 Comm: wd_zip_test Tainted: G C O 5.2.0-rc4-ge984cac-dirty #3 [ 506.938609] Hardware name: Huawei TaiShan 2280 V2/BC82AMDC, BIOS 2280-V2 CS V3.B010.01 06/21/2019 [ 506.947438] Call trace: [ 506.949875] dump_backtrace+0x0/0x148 [ 506.953521] show_stack+0x14/0x20 [ 506.956821] dump_stack+0xc8/0x114 [ 506.960207] print_circular_bug+0x1c8/0x2d8 [ 506.964370] __lock_acquire+0x1f38/0x23a8 [ 506.968360] lock_acquire+0xe4/0x270 [ 506.971918] down_write_killable+0x50/0xe8 [ 506.975994] __vm_munmap+0x54/0xd0 [ 506.979380] vm_munmap+0x10/0x18 [ 506.982593] uacce_fops_release+0xc8/0x220 [uacce] [ 506.987360] __fput+0xac/0x1f0 [ 506.990399] ____fput+0xc/0x18 [ 506.993439] task_work_run+0x98/0xc8 [ 506.996997] do_notify_resume+0x314/0x388 [ 507.000987] work_pending+0x8/0x14 Feature or Bugfix:Bugfix Signed-off-by: NHao Fang <fanghao11@huawei.com> Reviewed-by: Nwangzhou <wangzhou1@hisilicon.com> Signed-off-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 liulongfang 提交于
driver inclusion category: bugfix bugzilla: NA CVE: NA After the ZIP accelerator rmmoded,the values of some registers are not cleared. Therefore, we need to delete the values when initializing or unloading the ZIP accelerator Feature or Bugfix:Bugfix Signed-off-by: Nliulongfang <liulongfang@huawei.com> Reviewed-by: Nwangzhou <wangzhou1@hisilicon.com> Signed-off-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 lingmingqiang 提交于
driver inclusion category: bugfix bugzilla: NA CVE: NA Feature or Bugfix:Feature Signed-off-by: Ntanshukun (A) <tanshukun1@huawei.com> Reviewed-by: Nxuzaibo <xuzaibo@huawei.com> Signed-off-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 tanghui20 提交于
driver inclusion category: bugfix bugzilla: NA CVE: NA Using GFP_KERNEL when applying for memory may sleep, if this action may trigger a deadlock in the lock Feature or Bugfix:Bugfix Signed-off-by: Ntanghui20 <tanghui20@huawei.com> Reviewed-by: Nxuzaibo <xuzaibo@huawei.com> Signed-off-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 zhangwei 提交于
driver inclusion category: bugfix bugzilla: NA CVE: NA Feature or Bugfix:Feature Signed-off-by: NZhangwei <zhangwei375@huawei.com> Reviewed-by: Nhucheng.hu <hucheng.hu@huawei.com> Signed-off-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: Nlingmingqiang <lingmingqiang@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Jiaxing Luo 提交于
driver inclusion category: bugfix bugzilla: NA CVE: NA When calling sas_phy_reset(), we need to specify whether the reset type is hard reset or link reset. In the code we use two numbers: 0 and 1. In fact, we can't immediately determine whether these two numbers is a normal number or true/false. Therefore, we use true/false to replace 1/0. When set true, it mean we will run hardreset; When false, we don't run hardreset this time, which mean that we will run linkreset. Feature or Bugfix: Bugfix Signed-off-by: NJiaxing Luo <luojiaxing@huawei.com> Signed-off-by: NJohn Garry <john.garry@huawei.com> Signed-off-by: Nluojiaxing <luojiaxing@huawei.com> Reviewed-by: Nchenxiang <chenxiang66@hisilicon.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Lang Cheng 提交于
driver inclusion category: bugfix bugzilla: NA CVE: NA Correct sysfs print information. Feature or Bugfix:Bugfix Signed-off-by: NLang Cheng <chenglang@huawei.com> Reviewed-by: Noulijun <oulijun@huawei.com> Reviewed-by: Nliyangyang20 <liyangyang20@huawei.com> Reviewed-by: Nliuyixian <liuyixian@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Huazhong Tan 提交于
driver inclusion category: bugfix bugzilla: NA CVE: NA Before PF asserting function reset, it should make sure that all its VFs have been ready, otherwise, it will cause some hardware errors. Feature or Bugfix:Bugfix Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Reviewed-by: Nlinyunsheng <linyunsheng@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 YueHaibing 提交于
hulk inclusion category: bugfix bugzilla: 16589 CVE: NA ------------------------------------------------- As commit 30d8177e ("bonding: Always enable vlan tx offload") said, we should always enable bonding's vlan tx offload, pass the vlan packets to the slave devices with vlan tci, let them to handle vlan implementation. Now if encapsulation protocols like VXLAN is used, skb->encapsulation may be set, then the packet is passed to vlan device which based on bonding device. However in netif_skb_features(), the check of hw_enc_features: if (skb->encapsulation) features &= dev->hw_enc_features; clears NETIF_F_HW_VLAN_CTAG_TX/NETIF_F_HW_VLAN_STAG_TX. This results in same issue in commit 30d8177e like this: vlan_dev_hard_start_xmit -->dev_queue_xmit -->validate_xmit_skb -->netif_skb_features //NETIF_F_HW_VLAN_CTAG_TX is cleared -->validate_xmit_vlan -->__vlan_hwaccel_push_inside //skb->tci is cleared ... --> bond_start_xmit --> bond_xmit_hash //BOND_XMIT_POLICY_ENCAP34 --> __skb_flow_dissect // nhoff point to IP header --> case htons(ETH_P_8021Q) // skb_vlan_tag_present is false, so vlan = __skb_header_pointer(skb, nhoff, sizeof(_vlan), //vlan point to ip header wrongly Link: https://patchwork.ozlabs.org/patch/1143194/ Fixes: b2a103e6 ("bonding: convert to ndo_fix_features") Signed-off-by: NYueHaibing <yuehaibing@huawei.com> Acked-by: NJay Vosburgh <jay.vosburgh@canonical.com> Reviewed-by: NWei Yongjun <weiyongjun1@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yang Yingliang 提交于
hulk inclusion category: bugfix bugzilla: 16589 CVE: NA ------------------------------------------------- This reverts commit 703f67f815bc382034f72a0ac8b2e35fcd37688b. The patch has introduced a bug, revert it and use a new fix.
-
由 Greg Kroah-Hartman 提交于
Merge 82 patches from 4.19.65 stable branch (82 total) beside 0 already merged patches. Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Josh Poimboeuf 提交于
commit 4c920576 upstream Add documentation to the Spectre document about the new swapgs variant of Spectre v1. Signed-off-by: NJosh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Thomas Gleixner 提交于
commit f36cf386 upstream Intel provided the following information: On all current Atom processors, instructions that use a segment register value (e.g. a load or store) will not speculatively execute before the last writer of that segment retires. Thus they will not use a speculatively written segment value. That means on ATOMs there is no speculation through SWAPGS, so the SWAPGS entry paths can be excluded from the extra LFENCE if PTI is disabled. Create a separate bug flag for the through SWAPGS speculation and mark all out-of-order ATOMs and AMD/HYGON CPUs as not affected. The in-order ATOMs are excluded from the whole mitigation mess anyway. Reported-by: NAndrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Reviewed-by: NTyler Hicks <tyhicks@canonical.com> Reviewed-by: NJosh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Josh Poimboeuf 提交于
commit 64dbc122 upstream Somehow the swapgs mitigation entry code patch ended up with a JMPQ instruction instead of JMP, where only the short jump is needed. Some assembler versions apparently fail to optimize JMPQ into a two-byte JMP when possible, instead always using a 7-byte JMP with relocation. For some reason that makes the entry code explode with a #GP during boot. Change it back to "JMP" as originally intended. Fixes: 18ec54fd ("x86/speculation: Prepare entry code for Spectre v1 swapgs mitigations") Signed-off-by: NJosh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Josh Poimboeuf 提交于
commit a2059825 upstream The previous commit added macro calls in the entry code which mitigate the Spectre v1 swapgs issue if the X86_FEATURE_FENCE_SWAPGS_* features are enabled. Enable those features where applicable. The mitigations may be disabled with "nospectre_v1" or "mitigations=off". There are different features which can affect the risk of attack: - When FSGSBASE is enabled, unprivileged users are able to place any value in GS, using the wrgsbase instruction. This means they can write a GS value which points to any value in kernel space, which can be useful with the following gadget in an interrupt/exception/NMI handler: if (coming from user space) swapgs mov %gs:<percpu_offset>, %reg1 // dependent load or store based on the value of %reg // for example: mov %(reg1), %reg2 If an interrupt is coming from user space, and the entry code speculatively skips the swapgs (due to user branch mistraining), it may speculatively execute the GS-based load and a subsequent dependent load or store, exposing the kernel data to an L1 side channel leak. Note that, on Intel, a similar attack exists in the above gadget when coming from kernel space, if the swapgs gets speculatively executed to switch back to the user GS. On AMD, this variant isn't possible because swapgs is serializing with respect to future GS-based accesses. NOTE: The FSGSBASE patch set hasn't been merged yet, so the above case doesn't exist quite yet. - When FSGSBASE is disabled, the issue is mitigated somewhat because unprivileged users must use prctl(ARCH_SET_GS) to set GS, which restricts GS values to user space addresses only. That means the gadget would need an additional step, since the target kernel address needs to be read from user space first. Something like: if (coming from user space) swapgs mov %gs:<percpu_offset>, %reg1 mov (%reg1), %reg2 // dependent load or store based on the value of %reg2 // for example: mov %(reg2), %reg3 It's difficult to audit for this gadget in all the handlers, so while there are no known instances of it, it's entirely possible that it exists somewhere (or could be introduced in the future). Without tooling to analyze all such code paths, consider it vulnerable. Effects of SMAP on the !FSGSBASE case: - If SMAP is enabled, and the CPU reports RDCL_NO (i.e., not susceptible to Meltdown), the kernel is prevented from speculatively reading user space memory, even L1 cached values. This effectively disables the !FSGSBASE attack vector. - If SMAP is enabled, but the CPU *is* susceptible to Meltdown, SMAP still prevents the kernel from speculatively reading user space memory. But it does *not* prevent the kernel from reading the user value from L1, if it has already been cached. This is probably only a small hurdle for an attacker to overcome. Thanks to Dave Hansen for contributing the speculative_smap() function. Thanks to Andrew Cooper for providing the inside scoop on whether swapgs is serializing on AMD. [ tglx: Fixed the USER fence decision and polished the comment as suggested by Dave Hansen ] Signed-off-by: NJosh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Reviewed-by: NDave Hansen <dave.hansen@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Josh Poimboeuf 提交于
commit 18ec54fd upstream Spectre v1 isn't only about array bounds checks. It can affect any conditional checks. The kernel entry code interrupt, exception, and NMI handlers all have conditional swapgs checks. Those may be problematic in the context of Spectre v1, as kernel code can speculatively run with a user GS. For example: if (coming from user space) swapgs mov %gs:<percpu_offset>, %reg mov (%reg), %reg1 When coming from user space, the CPU can speculatively skip the swapgs, and then do a speculative percpu load using the user GS value. So the user can speculatively force a read of any kernel value. If a gadget exists which uses the percpu value as an address in another load/store, then the contents of the kernel value may become visible via an L1 side channel attack. A similar attack exists when coming from kernel space. The CPU can speculatively do the swapgs, causing the user GS to get used for the rest of the speculative window. The mitigation is similar to a traditional Spectre v1 mitigation, except: a) index masking isn't possible; because the index (percpu offset) isn't user-controlled; and b) an lfence is needed in both the "from user" swapgs path and the "from kernel" non-swapgs path (because of the two attacks described above). The user entry swapgs paths already have SWITCH_TO_KERNEL_CR3, which has a CR3 write when PTI is enabled. Since CR3 writes are serializing, the lfences can be skipped in those cases. On the other hand, the kernel entry swapgs paths don't depend on PTI. To avoid unnecessary lfences for the user entry case, create two separate features for alternative patching: X86_FEATURE_FENCE_SWAPGS_USER X86_FEATURE_FENCE_SWAPGS_KERNEL Use these features in entry code to patch in lfences where needed. The features aren't enabled yet, so there's no functional change. Signed-off-by: NJosh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Reviewed-by: NDave Hansen <dave.hansen@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Fenghua Yu 提交于
commit acec0ce0 upstream It's a waste for the four X86_FEATURE_CQM_* feature bits to occupy two whole feature bits words. To better utilize feature words, re-define word 11 to host scattered features and move the four X86_FEATURE_CQM_* features into Linux defined word 11. More scattered features can be added in word 11 in the future. Rename leaf 11 in cpuid_leafs to CPUID_LNX_4 to reflect it's a Linux-defined leaf. Rename leaf 12 as CPUID_DUMMY which will be replaced by a meaningful name in the next patch when CPUID.7.1:EAX occupies world 12. Maximum number of RMID and cache occupancy scale are retrieved from CPUID.0xf.1 after scattered CQM features are enumerated. Carve out the code into a separate function. KVM doesn't support resctrl now. So it's safe to move the X86_FEATURE_CQM_* features to scattered features word 11 for KVM. Signed-off-by: NFenghua Yu <fenghua.yu@intel.com> Signed-off-by: NBorislav Petkov <bp@suse.de> Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Aaron Lewis <aaronlewis@google.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Babu Moger <babu.moger@amd.com> Cc: "Chang S. Bae" <chang.seok.bae@intel.com> Cc: "Sean J Christopherson" <sean.j.christopherson@intel.com> Cc: Frederic Weisbecker <frederic@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jann Horn <jannh@google.com> Cc: Juergen Gross <jgross@suse.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: kvm ML <kvm@vger.kernel.org> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Nadav Amit <namit@vmware.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Pavel Tatashin <pasha.tatashin@oracle.com> Cc: Peter Feiner <pfeiner@google.com> Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org> Cc: "Radim Krčmář" <rkrcmar@redhat.com> Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> Cc: Ravi V Shankar <ravi.v.shankar@intel.com> Cc: Sherry Hurwitz <sherry.hurwitz@amd.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Thomas Lendacky <Thomas.Lendacky@amd.com> Cc: x86 <x86@kernel.org> Link: https://lkml.kernel.org/r/1560794416-217638-2-git-send-email-fenghua.yu@intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Borislav Petkov 提交于
commit 45fc56e6 upstream ... into a separate function for better readability. Split out from a patch from Fenghua Yu <fenghua.yu@intel.com> to keep the mechanical, sole code movement separate for easy review. No functional changes. Signed-off-by: NBorislav Petkov <bp@suse.de> Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: x86@kernel.org Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Suganath Prabu 提交于
commit df9a6061 upstream. Although SAS3 & SAS3.5 IT HBA controllers support 64-bit DMA addressing, as per hardware design, if DMA-able range contains all 64-bits set (0xFFFFFFFF-FFFFFFFF) then it results in a firmware fault. E.g. SGE's start address is 0xFFFFFFFF-FFFF000 and data length is 0x1000 bytes. when HBA tries to DMA the data at 0xFFFFFFFF-FFFFFFFF location then HBA will fault the firmware. Driver will set 63-bit DMA mask to ensure the above address will not be used. Cc: <stable@vger.kernel.org> # 4.19.63 Signed-off-by: NSuganath Prabu <suganath-prabu.subramani@broadcom.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Andy Lutomirski 提交于
commit ff17bbe0 upstream. GCC 5.5.0 sometimes cleverly hoists reads of the pvclock and/or hvclock pages before the vclock mode checks. This creates a path through vclock_gettime() in which no vclock is enabled at all (due to disabled TSC on old CPUs, for example) but the pvclock or hvclock page nevertheless read. This will segfault on bare metal. This fixes commit 459e3a21 ("gcc-9: properly declare the {pv,hv}clock_page storage") in the sense that, before that commit, GCC didn't seem to generate the offending code. There was nothing wrong with that commit per se, and -stable maintainers should backport this to all supported kernels regardless of whether the offending commit was present, since the same crash could just as easily be triggered by the phase of the moon. On GCC 9.1.1, this doesn't seem to affect the generated code at all, so I'm not too concerned about performance regressions from this fix. Cc: stable@vger.kernel.org Cc: x86@kernel.org Cc: Borislav Petkov <bp@alien8.de> Reported-by: NDuncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: NAndy Lutomirski <luto@kernel.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Linus Torvalds 提交于
commit 459e3a21 upstream. The pvlock_page and hvclock_page variables are (as the name implies) addresses to pages, created by the linker script. But we declared them as just "extern u8" variables, which _works_, but now that gcc does some more bounds checking, it causes warnings like warning: array subscript 1 is outside array bounds of ‘u8[1]’ when we then access more than one byte from those variables. Fix this by simply making the declaration of the variables match reality, which makes the compiler happy too. Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Josh Poimboeuf 提交于
commit bcb6fb5d upstream. Starting with GCC 8, a lot of unlikely code was moved out of line to "cold" subfunctions in .text.unlikely. For example, the unlikely bits of: irq_do_set_affinity() are moved out to the following subfunction: irq_do_set_affinity.cold.49() Starting with GCC 9, the numbered suffix has been removed. So in the above example, the cold subfunction is instead: irq_do_set_affinity.cold() Tweak the objtool subfunction detection logic so that it detects both GCC 8 and GCC 9 naming schemes. Reported-by: NPeter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: NJosh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Tested-by: NPeter Zijlstra (Intel) <peterz@infradead.org> Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/015e9544b1f188d36a7f02fa31e9e95629aa5f50.1541040800.git.jpoimboe@redhat.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Eugeniy Paltsev 提交于
commit 493a2f81 upstream. After reworking U-boot args handling code and adding paranoid arguments check we can eliminate CONFIG_ARC_UBOOT_SUPPORT and enable uboot support unconditionally. For JTAG case we can assume that core registers will come up reset value of 0 or in worst case we rely on user passing '-on=clear_regs' to Metaware debugger. Cc: stable@vger.kernel.org Tested-by: NCorentin LABBE <clabbe@baylibre.com> Signed-off-by: NEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: NVineet Gupta <vgupta@synopsys.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Jean Delvare 提交于
commit 25e5ef30 upstream. The integration of the at24 driver into the nvmem framework broke the world-readability of spd EEPROMs. Fix it. Signed-off-by: NJean Delvare <jdelvare@suse.de> Cc: stable@vger.kernel.org Fixes: 57d15550 ("eeprom: at24: extend driver to plug into the NVMEM framework") Cc: Andrew Lunn <andrew@lunn.ch> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Bartosz Golaszewski <brgl@bgdev.pl> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> [Bartosz: backported to v4.19.y] Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Xiaolin Zhang 提交于
commit 7366aeb7 upstream. GPU hang observed during the guest OCL conformance test which is caused by THP GTT feature used durning the test. It was observed the same GFN with different size (4K and 2M) requested from the guest in GVT. So during the guest page dma map stage, it is required to unmap first with orginal size and then remap again with requested size. Fixes: b901b252 ("drm/i915/gvt: Add 2M huge gtt support") Cc: stable@vger.kernel.org Reviewed-by: NZhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: NXiaolin Zhang <xiaolin.zhang@intel.com> Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 John Fleck 提交于
commit cd48a820 upstream. The call to alloc_rsm_map_table does not check if the kmalloc fails. Check for a NULL on alloc, and bail if it fails. Fixes: 372cc85a ("IB/hfi1: Extract RSM map table init from QOS") Link: https://lore.kernel.org/r/20190715164521.74174.27047.stgit@awfm-01.aw.intel.com Cc: <stable@vger.kernel.org> Reviewed-by: NMike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: NJohn Fleck <john.fleck@intel.com> Signed-off-by: NMike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-
由 Yishai Hadas 提交于
commit b7165bd0 upstream. The specification for the Toeplitz function doesn't require to set the key explicitly to be symmetric. In case a symmetric functionality is required a symmetric key can be simply used. Wrongly forcing the algorithm to symmetric causes the wrong packet distribution and a performance degradation. Link: https://lore.kernel.org/r/20190723065733.4899-7-leon@kernel.org Cc: <stable@vger.kernel.org> # 4.7 Fixes: 28d61370 ("IB/mlx5: Add RSS QP support") Signed-off-by: NYishai Hadas <yishaih@mellanox.com> Reviewed-by: NAlex Vainman <alexv@mellanox.com> Signed-off-by: NLeon Romanovsky <leonro@mellanox.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
-