1. 16 Jul, 2020 34 commits
  2. 09 Jul, 2020 6 commits
    • Greg Kroah-Hartman's avatar
      Linux 4.19.132 · dce0f886
      Greg Kroah-Hartman authored
      dce0f886
    • Peter Jones's avatar
      efi: Make it possible to disable efivar_ssdt entirely · f1b17512
      Peter Jones authored
      commit 435d1a47 upstream.
      
      In most cases, such as CONFIG_ACPI_CUSTOM_DSDT and
      CONFIG_ACPI_TABLE_UPGRADE, boot-time modifications to firmware tables
      are tied to specific Kconfig options.  Currently this is not the case
      for modifying the ACPI SSDT via the efivar_ssdt kernel command line
      option and associated EFI variable.
      
      This patch adds CONFIG_EFI_CUSTOM_SSDT_OVERLAYS, which defaults
      disabled, in order to allow enabling or disabling that feature during
      the build.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarPeter Jones <pjones@redhat.com>
      Link: https://lore.kernel.org/r/20200615202408.2242614-1-pjones@redhat.comSigned-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f1b17512
    • Hou Tao's avatar
      dm zoned: assign max_io_len correctly · de07529a
      Hou Tao authored
      commit 7b237748 upstream.
      
      The unit of max_io_len is sector instead of byte (spotted through
      code review), so fix it.
      
      Fixes: 3b1a94c8 ("dm zoned: drive-managed zoned block device target")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarHou Tao <houtao1@huawei.com>
      Reviewed-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      de07529a
    • Marc Zyngier's avatar
      irqchip/gic: Atomically update affinity · 3cc6b87d
      Marc Zyngier authored
      commit 005c34ae upstream.
      
      The GIC driver uses a RMW sequence to update the affinity, and
      relies on the gic_lock_irqsave/gic_unlock_irqrestore sequences
      to update it atomically.
      
      But these sequences only expand into anything meaningful if
      the BL_SWITCHER option is selected, which almost never happens.
      
      It also turns out that using a RMW and locks is just as silly,
      as the GIC distributor supports byte accesses for the GICD_TARGETRn
      registers, which when used make the update atomic by definition.
      
      Drop the terminally broken code and replace it by a byte write.
      
      Fixes: 04c8b0f8 ("irqchip/gic: Make locking a BL_SWITCHER only feature")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3cc6b87d
    • Hauke Mehrtens's avatar
      MIPS: Add missing EHB in mtc0 -> mfc0 sequence for DSPen · 30ed723d
      Hauke Mehrtens authored
      commit fcec538e upstream.
      
      This resolves the hazard between the mtc0 in the change_c0_status() and
      the mfc0 in configure_exception_vector(). Without resolving this hazard
      configure_exception_vector() could read an old value and would restore
      this old value again. This would revert the changes change_c0_status()
      did. I checked this by printing out the read_c0_status() at the end of
      per_cpu_trap_init() and the ST0_MX is not set without this patch.
      
      The hazard is documented in the MIPS Architecture Reference Manual Vol.
      III: MIPS32/microMIPS32 Privileged Resource Architecture (MD00088), rev
      6.03 table 8.1 which includes:
      
         Producer | Consumer | Hazard
        ----------|----------|----------------------------
         mtc0     | mfc0     | any coprocessor 0 register
      
      I saw this hazard on an Atheros AR9344 rev 2 SoC with a MIPS 74Kc CPU.
      There the change_c0_status() function would activate the DSPen by
      setting ST0_MX in the c0_status register. This was reverted and then the
      system got a DSP exception when the DSP registers were saved in
      save_dsp() in the first process switch. The crash looks like this:
      
      [    0.089999] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
      [    0.097796] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
      [    0.107070] Kernel panic - not syncing: Unexpected DSP exception
      [    0.113470] Rebooting in 1 seconds..
      
      We saw this problem in OpenWrt only on the MIPS 74Kc based Atheros SoCs,
      not on the 24Kc based SoCs. We only saw it with kernel 5.4 not with
      kernel 4.19, in addition we had to use GCC 8.4 or 9.X, with GCC 8.3 it
      did not happen.
      
      In the kernel I bisected this problem to commit 9012d011 ("compiler:
      allow all arches to enable CONFIG_OPTIMIZE_INLINING"), but when this was
      reverted it also happened after commit 172dcd93 ("MIPS: Always
      allocate exception vector for MIPSr2+").
      
      Commit 0b24cae4 ("MIPS: Add missing EHB in mtc0 -> mfc0 sequence.")
      does similar changes to a different file. I am not sure if there are
      more places affected by this problem.
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      30ed723d
    • Zhang Xiaoxu's avatar
      cifs: Fix the target file was deleted when rename failed. · e1afc2c1
      Zhang Xiaoxu authored
      commit 9ffad926 upstream.
      
      When xfstest generic/035, we found the target file was deleted
      if the rename return -EACESS.
      
      In cifs_rename2, we unlink the positive target dentry if rename
      failed with EACESS or EEXIST, even if the target dentry is positived
      before rename. Then the existing file was deleted.
      
      We should just delete the target file which created during the
      rename.
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarZhang Xiaoxu <zhangxiaoxu5@huawei.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      Reviewed-by: default avatarAurelien Aptel <aaptel@suse.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e1afc2c1