1. 14 Sep, 2020 4 commits
    • Amit Daniel Kachhap's avatar
      arm64: cpufeature: Modify address authentication cpufeature to exact · ba9d1d3e
      Amit Daniel Kachhap authored
      The current address authentication cpufeature levels are set as LOWER_SAFE
      which is not compatible with the different configurations added for Armv8.3
      ptrauth enhancements as the different levels have different behaviour and
      there is no tunable to enable the lower safe versions. This is rectified
      by setting those cpufeature type as EXACT.
      
      The current cpufeature framework also does not interfere in the booting of
      non-exact secondary cpus but rather marks them as tainted. As a workaround
      this is fixed by replacing the generic match handler with a new handler
      specific to ptrauth.
      
      After this change, if there is any variation in ptrauth configurations in
      secondary cpus from boot cpu then those mismatched cpus are parked in an
      infinite loop.
      
      Following ptrauth crash log is observed in Arm fastmodel with simulated
      mismatched cpus without this fix,
      
       CPU features: SANITY CHECK: Unexpected variation in SYS_ID_AA64ISAR1_EL1. Boot CPU: 0x11111110211402, CPU4: 0x11111110211102
       CPU features: Unsupported CPU feature variation detected.
       GICv3: CPU4: found redistributor 100 region 0:0x000000002f180000
       CPU4: Booted secondary processor 0x0000000100 [0x410fd0f0]
       Unable to handle kernel paging request at virtual address bfff800010dadf3c
       Mem abort info:
         ESR = 0x86000004
         EC = 0x21: IABT (current EL), IL = 32 bits
         SET = 0, FnV = 0
         EA = 0, S1PTW = 0
       [bfff800010dadf3c] address between user and kernel address ranges
       Internal error: Oops: 86000004 [#1] PREEMPT SMP
       Modules linked in:
       CPU: 4 PID: 29 Comm: migration/4 Tainted: G S                5.8.0-rc4-00005-ge658591d66d1-dirty #158
       Hardware name: Foundation-v8A (DT)
       pstate: 60000089 (nZCv daIf -PAN -UAO BTYPE=--)
       pc : 0xbfff800010dadf3c
       lr : __schedule+0x2b4/0x5a8
       sp : ffff800012043d70
       x29: ffff800012043d70 x28: 0080000000000000
       x27: ffff800011cbe000 x26: ffff00087ad37580
       x25: ffff00087ad37000 x24: ffff800010de7d50
       x23: ffff800011674018 x22: 0784800010dae2a8
       x21: ffff00087ad37000 x20: ffff00087acb8000
       x19: ffff00087f742100 x18: 0000000000000030
       x17: 0000000000000000 x16: 0000000000000000
       x15: ffff800011ac1000 x14: 00000000000001bd
       x13: 0000000000000000 x12: 0000000000000000
       x11: 0000000000000000 x10: 71519a147ddfeb82
       x9 : 825d5ec0fb246314 x8 : ffff00087ad37dd8
       x7 : 0000000000000000 x6 : 00000000fffedb0e
       x5 : 00000000ffffffff x4 : 0000000000000000
       x3 : 0000000000000028 x2 : ffff80086e11e000
       x1 : ffff00087ad37000 x0 : ffff00087acdc600
       Call trace:
        0xbfff800010dadf3c
        schedule+0x78/0x110
        schedule_preempt_disabled+0x24/0x40
        __kthread_parkme+0x68/0xd0
        kthread+0x138/0x160
        ret_from_fork+0x10/0x34
       Code: bad PC value
      
      After this fix, the mismatched CPU4 is parked as,
       CPU features: CPU4: Detected conflict for capability 39 (Address authentication (IMP DEF algorithm)), System: 1, CPU: 0
       CPU4: will not boot
       CPU4: failed to come online
       CPU4: died during early boot
      
      [Suzuki: Introduce new matching function for address authentication]
      Suggested-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: default avatarAmit Daniel Kachhap <amit.kachhap@arm.com>
      Reviewed-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Link: https://lore.kernel.org/r/20200914083656.21428-5-amit.kachhap@arm.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
      ba9d1d3e
    • Amit Daniel Kachhap's avatar
      arm64: ptrauth: Introduce Armv8.3 pointer authentication enhancements · e16aeb07
      Amit Daniel Kachhap authored
      Some Armv8.3 Pointer Authentication enhancements have been introduced
      which are mandatory for Armv8.6 and optional for Armv8.3. These features
      are,
      
      * ARMv8.3-PAuth2 - An enhanced PAC generation logic is added which hardens
        finding the correct PAC value of the authenticated pointer.
      
      * ARMv8.3-FPAC - Fault is generated now when the ptrauth authentication
        instruction fails in authenticating the PAC present in the address.
        This is different from earlier case when such failures just adds an
        error code in the top byte and waits for subsequent load/store to abort.
        The ptrauth instructions which may cause this fault are autiasp, retaa
        etc.
      
      The above features are now represented by additional configurations
      for the Address Authentication cpufeature and a new ESR exception class.
      
      The userspace fault received in the kernel due to ARMv8.3-FPAC is treated
      as Illegal instruction and hence signal SIGILL is injected with ILL_ILLOPN
      as the signal code. Note that this is different from earlier ARMv8.3
      ptrauth where signal SIGSEGV is issued due to Pointer authentication
      failures. The in-kernel PAC fault causes kernel to crash.
      Signed-off-by: default avatarAmit Daniel Kachhap <amit.kachhap@arm.com>
      Reviewed-by: default avatarDave Martin <Dave.Martin@arm.com>
      Link: https://lore.kernel.org/r/20200914083656.21428-4-amit.kachhap@arm.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
      e16aeb07
    • Amit Daniel Kachhap's avatar
      arm64: traps: Allow force_signal_inject to pass esr error code · 4ef333b2
      Amit Daniel Kachhap authored
      Some error signal need to pass proper ARM esr error code to userspace to
      better identify the cause of the signal. So the function
      force_signal_inject is extended to pass this as a parameter. The
      existing code is not affected by this change.
      Signed-off-by: default avatarAmit Daniel Kachhap <amit.kachhap@arm.com>
      Reviewed-by: default avatarDave Martin <Dave.Martin@arm.com>
      Link: https://lore.kernel.org/r/20200914083656.21428-3-amit.kachhap@arm.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
      4ef333b2
    • Amit Daniel Kachhap's avatar
      arm64: kprobe: add checks for ARMv8.3-PAuth combined instructions · 93396936
      Amit Daniel Kachhap authored
      Currently the ARMv8.3-PAuth combined branch instructions (braa, retaa
      etc.) are not simulated for out-of-line execution with a handler. Hence the
      uprobe of such instructions leads to kernel warnings in a loop as they are
      not explicitly checked and fall into INSN_GOOD categories. Other combined
      instructions like LDRAA and LDRBB can be probed.
      
      The issue of the combined branch instructions is fixed by adding
      group definitions of all such instructions and rejecting their probes.
      The instruction groups added are br_auth(braa, brab, braaz and brabz),
      blr_auth(blraa, blrab, blraaz and blrabz), ret_auth(retaa and retab) and
      eret_auth(eretaa and eretab).
      
      Warning log:
       WARNING: CPU: 0 PID: 156 at arch/arm64/kernel/probes/uprobes.c:182 uprobe_single_step_handler+0x34/0x50
       Modules linked in:
       CPU: 0 PID: 156 Comm: func Not tainted 5.9.0-rc3 #188
       Hardware name: Foundation-v8A (DT)
       pstate: 804003c9 (Nzcv DAIF +PAN -UAO BTYPE=--)
       pc : uprobe_single_step_handler+0x34/0x50
       lr : single_step_handler+0x70/0xf8
       sp : ffff800012af3e30
       x29: ffff800012af3e30 x28: ffff000878723b00
       x27: 0000000000000000 x26: 0000000000000000
       x25: 0000000000000000 x24: 0000000000000000
       x23: 0000000060001000 x22: 00000000cb000022
       x21: ffff800012065ce8 x20: ffff800012af3ec0
       x19: ffff800012068d50 x18: 0000000000000000
       x17: 0000000000000000 x16: 0000000000000000
       x15: 0000000000000000 x14: 0000000000000000
       x13: 0000000000000000 x12: 0000000000000000
       x11: 0000000000000000 x10: 0000000000000000
       x9 : ffff800010085c90 x8 : 0000000000000000
       x7 : 0000000000000000 x6 : ffff80001205a9c8
       x5 : ffff80001205a000 x4 : ffff80001233db80
       x3 : ffff8000100a7a60 x2 : 0020000000000003
       x1 : 0000fffffffff008 x0 : ffff800012af3ec0
       Call trace:
        uprobe_single_step_handler+0x34/0x50
        single_step_handler+0x70/0xf8
        do_debug_exception+0xb8/0x130
        el0_sync_handler+0x138/0x1b8
        el0_sync+0x158/0x180
      
      Fixes: 74afda40 ("arm64: compile the kernel with ptrauth return address signing")
      Fixes: 04ca3204 ("arm64: enable pointer authentication")
      Signed-off-by: default avatarAmit Daniel Kachhap <amit.kachhap@arm.com>
      Reviewed-by: default avatarDave Martin <Dave.Martin@arm.com>
      Link: https://lore.kernel.org/r/20200914083656.21428-2-amit.kachhap@arm.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
      93396936
  2. 30 Aug, 2020 12 commits
    • Linus Torvalds's avatar
      Linux 5.9-rc3 · f75aef39
      Linus Torvalds authored
      f75aef39
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · e43327c7
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
      
       - fix regression in af_alg that affects iwd
      
       - restore polling delay in qat
      
       - fix double free in ingenic on error path
      
       - fix potential build failure in sa2ul due to missing Kconfig dependency
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: af_alg - Work around empty control messages without MSG_MORE
        crypto: sa2ul - add Kconfig selects to fix build error
        crypto: ingenic - Drop kfree for memory allocated with devm_kzalloc
        crypto: qat - add delay before polling mailbox
      e43327c7
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2020-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · dcc5c6f0
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "Three interrupt related fixes for X86:
      
         - Move disabling of the local APIC after invoking fixup_irqs() to
           ensure that interrupts which are incoming are noted in the IRR and
           not ignored.
      
         - Unbreak affinity setting.
      
           The rework of the entry code reused the regular exception entry
           code for device interrupts. The vector number is pushed into the
           errorcode slot on the stack which is then lifted into an argument
           and set to -1 because that's regs->orig_ax which is used in quite
           some places to check whether the entry came from a syscall.
      
           But it was overlooked that orig_ax is used in the affinity cleanup
           code to validate whether the interrupt has arrived on the new
           target. It turned out that this vector check is pointless because
           interrupts are never moved from one vector to another on the same
           CPU. That check is a historical leftover from the time where x86
           supported multi-CPU affinities, but not longer needed with the now
           strict single CPU affinity. Famous last words ...
      
         - Add a missing check for an empty cpumask into the matrix allocator.
      
           The affinity change added a warning to catch the case where an
           interrupt is moved on the same CPU to a different vector. This
           triggers because a condition with an empty cpumask returns an
           assignment from the allocator as the allocator uses for_each_cpu()
           without checking the cpumask for being empty. The historical
           inconsistent for_each_cpu() behaviour of ignoring the cpumask and
           unconditionally claiming that CPU0 is in the mask struck again.
           Sigh.
      
        plus a new entry into the MAINTAINER file for the HPE/UV platform"
      
      * tag 'x86-urgent-2020-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq/matrix: Deal with the sillyness of for_each_cpu() on UP
        x86/irq: Unbreak interrupt affinity setting
        x86/hotplug: Silence APIC only after all interrupts are migrated
        MAINTAINERS: Add entry for HPE Superdome Flex (UV) maintainers
      dcc5c6f0
    • Linus Torvalds's avatar
      Merge tag 'irq-urgent-2020-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d2283cdc
      Linus Torvalds authored
      Pull irq fixes from Thomas Gleixner:
       "A set of fixes for interrupt chip drivers:
      
         - Revert the platform driver conversion of interrupt chip drivers as
           it turned out to create more problems than it solves.
      
         - Fix a trivial typo in the new module helpers which made probing
           reliably fail.
      
         - Small fixes in the STM32 and MIPS Ingenic drivers
      
         - The TI firmware rework which had badly managed dependencies and had
           to wait post rc1"
      
      * tag 'irq-urgent-2020-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/ingenic: Leave parent IRQ unmasked on suspend
        irqchip/stm32-exti: Avoid losing interrupts due to clearing pending bits by mistake
        irqchip: Revert modular support for drivers using IRQCHIP_PLATFORM_DRIVER helperse
        irqchip: Fix probing deferal when using IRQCHIP_PLATFORM_DRIVER helpers
        arm64: dts: k3-am65: Update the RM resource types
        arm64: dts: k3-am65: ti-sci-inta/intr: Update to latest bindings
        arm64: dts: k3-j721e: ti-sci-inta/intr: Update to latest bindings
        irqchip/ti-sci-inta: Add support for INTA directly connecting to GIC
        irqchip/ti-sci-inta: Do not store TISCI device id in platform device id field
        dt-bindings: irqchip: Convert ti, sci-inta bindings to yaml
        dt-bindings: irqchip: ti, sci-inta: Update docs to support different parent.
        irqchip/ti-sci-intr: Add support for INTR being a parent to INTR
        dt-bindings: irqchip: Convert ti, sci-intr bindings to yaml
        dt-bindings: irqchip: ti, sci-intr: Update bindings to drop the usage of gic as parent
        firmware: ti_sci: Add support for getting resource with subtype
        firmware: ti_sci: Drop unused structure ti_sci_rm_type_map
        firmware: ti_sci: Drop the device id to resource type translation
      d2283cdc
    • Linus Torvalds's avatar
      Merge tag 'sched-urgent-2020-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0063a82d
      Linus Torvalds authored
      Pull scheduler fix from Thomas Gleixner:
       "A single fix for the scheduler:
      
         - Make is_idle_task() __always_inline to prevent the compiler from
           putting it out of line into the wrong section because it's used
           inside noinstr sections"
      
      * tag 'sched-urgent-2020-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched: Use __always_inline on is_idle_task()
      0063a82d
    • Linus Torvalds's avatar
      Merge tag 'locking-urgent-2020-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · b69bea8a
      Linus Torvalds authored
      Pull locking fixes from Thomas Gleixner:
       "A set of fixes for lockdep, tracing and RCU:
      
         - Prevent recursion by using raw_cpu_* operations
      
         - Fixup the interrupt state in the cpu idle code to be consistent
      
         - Push rcu_idle_enter/exit() invocations deeper into the idle path so
           that the lock operations are inside the RCU watching sections
      
         - Move trace_cpu_idle() into generic code so it's called before RCU
           goes idle.
      
         - Handle raw_local_irq* vs. local_irq* operations correctly
      
         - Move the tracepoints out from under the lockdep recursion handling
           which turned out to be fragile and inconsistent"
      
      * tag 'locking-urgent-2020-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        lockdep,trace: Expose tracepoints
        lockdep: Only trace IRQ edges
        mips: Implement arch_irqs_disabled()
        arm64: Implement arch_irqs_disabled()
        nds32: Implement arch_irqs_disabled()
        locking/lockdep: Cleanup
        x86/entry: Remove unused THUNKs
        cpuidle: Move trace_cpu_idle() into generic code
        cpuidle: Make CPUIDLE_FLAG_TLB_FLUSHED generic
        sched,idle,rcu: Push rcu_idle deeper into the idle path
        cpuidle: Fixup IRQ state
        lockdep: Use raw_cpu_*() for per-cpu variables
      b69bea8a
    • Linus Torvalds's avatar
      Merge tag '5.9-rc2-smb-fix' of git://git.samba.org/sfrench/cifs-2.6 · 3edd8db2
      Linus Torvalds authored
      Pull cfis fix from Steve French:
       "DFS fix for referral problem when using SMB1"
      
      * tag '5.9-rc2-smb-fix' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: fix check of tcon dfs in smb1
      3edd8db2
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.9-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 8bb5021c
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - Revert our removal of PROT_SAO, at least one user expressed an
         interest in using it on Power9. Instead don't allow it to be used in
         guests unless enabled explicitly at compile time.
      
       - A fix for a crash introduced by a recent change to FP handling.
      
       - Revert a change to our idle code that left Power10 with no idle
         support.
      
       - One minor fix for the new scv system call path to set PPR.
      
       - Fix a crash in our "generic" PMU if branch stack events were enabled.
      
       - A fix for the IMC PMU, to correctly identify host kernel samples.
      
       - The ADB_PMU powermac code was found to be incompatible with
         VMAP_STACK, so make them incompatible in Kconfig until the code can
         be fixed.
      
       - A build fix in drivers/video/fbdev/controlfb.c, and a documentation
         fix.
      
      Thanks to Alexey Kardashevskiy, Athira Rajeev, Christophe Leroy,
      Giuseppe Sacco, Madhavan Srinivasan, Milton Miller, Nicholas Piggin,
      Pratik Rajesh Sampat, Randy Dunlap, Shawn Anastasio, Vaidyanathan
      Srinivasan.
      
      * tag 'powerpc-5.9-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/32s: Disable VMAP stack which CONFIG_ADB_PMU
        Revert "powerpc/powernv/idle: Replace CPU feature check with PVR check"
        powerpc/perf: Fix reading of MSR[HV/PR] bits in trace-imc
        powerpc/perf: Fix crashes with generic_compat_pmu & BHRB
        powerpc/64s: Fix crash in load_fp_state() due to fpexc_mode
        powerpc/64s: scv entry should set PPR
        Documentation/powerpc: fix malformed table in syscall64-abi
        video: fbdev: controlfb: Fix build for COMPILE_TEST=y && PPC_PMAC=n
        selftests/powerpc: Update PROT_SAO test to skip ISA 3.1
        powerpc/64s: Disallow PROT_SAO in LPARs by default
        Revert "powerpc/64s: Remove PROT_SAO support"
      8bb5021c
    • Linus Torvalds's avatar
      Merge tag 'usb-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 6f0306d1
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Let's try this again...  Here are some USB fixes for 5.9-rc3.
      
        This differs from the previous pull request for this release in that
        the usb gadget patch now does not break some systems, and actually
        does what it was intended to do. Many thanks to Marek Szyprowski for
        quickly noticing and testing the patch from Andy Shevchenko to resolve
        this issue.
      
        Additionally, some more new USB quirks have been added to get some new
        devices to work properly based on user reports.
      
        Other than that, the patches are all here, and they contain:
      
         - usb gadget driver fixes
      
         - xhci driver fixes
      
         - typec fixes
      
         - new quirks and ids
      
         - fixes for USB patches that went into 5.9-rc1.
      
        All of these have been tested in linux-next with no reported issues"
      
      * tag 'usb-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (33 commits)
        usb: storage: Add unusual_uas entry for Sony PSZ drives
        USB: Ignore UAS for JMicron JMS567 ATA/ATAPI Bridge
        usb: host: ohci-exynos: Fix error handling in exynos_ohci_probe()
        USB: gadget: u_f: Unbreak offset calculation in VLAs
        USB: quirks: Ignore duplicate endpoint on Sound Devices MixPre-D
        usb: typec: tcpm: Fix Fix source hard reset response for TDA 2.3.1.1 and TDA 2.3.1.2 failures
        USB: PHY: JZ4770: Fix static checker warning.
        USB: gadget: f_ncm: add bounds checks to ncm_unwrap_ntb()
        USB: gadget: u_f: add overflow checks to VLA macros
        xhci: Always restore EP_SOFT_CLEAR_TOGGLE even if ep reset failed
        xhci: Do warm-reset when both CAS and XDEV_RESUME are set
        usb: host: xhci: fix ep context print mismatch in debugfs
        usb: uas: Add quirk for PNY Pro Elite
        tools: usb: move to tools buildsystem
        USB: Fix device driver race
        USB: Also match device drivers using the ->match vfunc
        usb: host: xhci-tegra: fix tegra_xusb_get_phy()
        usb: host: xhci-tegra: otg usb2/usb3 port init
        usb: hcd: Fix use after free in usb_hcd_pci_remove()
        usb: typec: ucsi: Hold con->lock for the entire duration of ucsi_register_port()
        ...
      6f0306d1
    • Linus Torvalds's avatar
      Merge tag 'edac_urgent_for_v5.9_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras · 42df60fc
      Linus Torvalds authored
      Pull EDAC fix from Borislav Petkov:
       "A fix to properly clear ghes_edac driver state on driver remove so
        that a subsequent load can probe the system properly (Shiju Jose)"
      
      * tag 'edac_urgent_for_v5.9_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
        EDAC/ghes: Fix NULL pointer dereference in ghes_edac_register()
      42df60fc
    • Linus Torvalds's avatar
      Merge tag 'dma-mapping-5.9-2' of git://git.infradead.org/users/hch/dma-mapping · c4011283
      Linus Torvalds authored
      Pull dma-mapping fix from Christoph Hellwig:
       "Fix a possibly uninitialized variable (Dan Carpenter)"
      
      * tag 'dma-mapping-5.9-2' of git://git.infradead.org/users/hch/dma-mapping:
        dma-pool: Fix an uninitialized variable bug in atomic_pool_expand()
      c4011283
    • Thomas Gleixner's avatar
      genirq/matrix: Deal with the sillyness of for_each_cpu() on UP · 784a0830
      Thomas Gleixner authored
      Most of the CPU mask operations behave the same way, but for_each_cpu() and
      it's variants ignore the cpumask argument and claim that CPU0 is always in
      the mask. This is historical, inconsistent and annoying behaviour.
      
      The matrix allocator uses for_each_cpu() and can be called on UP with an
      empty cpumask. The calling code does not expect that this succeeds but
      until commit e027ffff ("x86/irq: Unbreak interrupt affinity setting")
      this went unnoticed. That commit added a WARN_ON() to catch cases which
      move an interrupt from one vector to another on the same CPU. The warning
      triggers on UP.
      
      Add a check for the cpumask being empty to prevent this.
      
      Fixes: 2f75d9e1 ("genirq: Implement bitmap matrix allocator")
      Reported-by: default avatarkernel test robot <rong.a.chen@intel.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: stable@vger.kernel.org
      784a0830
  3. 29 Aug, 2020 6 commits
  4. 28 Aug, 2020 18 commits
    • Linus Torvalds's avatar
      Merge tag 'block-5.9-2020-08-28' of git://git.kernel.dk/linux-block · 4d41ead6
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - nbd timeout fix (Hou)
      
       - device size fix for loop LOOP_CONFIGURE (Martijn)
      
       - MD pull from Song with raid5 stripe size fix (Yufen)
      
      * tag 'block-5.9-2020-08-28' of git://git.kernel.dk/linux-block:
        md/raid5: make sure stripe_size as power of two
        loop: Set correct device size when using LOOP_CONFIGURE
        nbd: restore default timeout when setting it to zero
      4d41ead6
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.9-2020-08-28' of git://git.kernel.dk/linux-block · 24148d86
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "A few fixes in here, all based on reports and test cases from folks
        using it. Most of it is stable material as well:
      
         - Hashed work cancelation fix (Pavel)
      
         - poll wakeup signalfd fix
      
         - memlock accounting fix
      
         - nonblocking poll retry fix
      
         - ensure we never return -ERESTARTSYS for reads
      
         - ensure offset == -1 is consistent with preadv2() as documented
      
         - IOPOLL -EAGAIN handling fixes
      
         - remove useless task_work bounce for block based -EAGAIN retry"
      
      * tag 'io_uring-5.9-2020-08-28' of git://git.kernel.dk/linux-block:
        io_uring: don't bounce block based -EAGAIN retry off task_work
        io_uring: fix IOPOLL -EAGAIN retries
        io_uring: clear req->result on IOPOLL re-issue
        io_uring: make offset == -1 consistent with preadv2/pwritev2
        io_uring: ensure read requests go through -ERESTART* transformation
        io_uring: don't use poll handler if file can't be nonblocking read/written
        io_uring: fix imbalanced sqo_mm accounting
        io_uring: revert consumed iov_iter bytes on error
        io-wq: fix hang after cancelling pending hashed work
        io_uring: don't recurse on tsk->sighand->siglock with signalfd
      24148d86
    • Linus Torvalds's avatar
      Merge tag 'devprop-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 005c5344
      Linus Torvalds authored
      Pull device properties framework fix from Rafael Wysocki:
       "Prevent the promotion of the secondary firmware node of a device to
        the primary one from leaking a pointer (Heikki Krogerus)"
      
      * tag 'devprop-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        device property: Fix the secondary firmware node handling in set_primary_fwnode()
      005c5344
    • Linus Torvalds's avatar
      Merge tag 'acpi-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 0b2f18e7
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "These fix two recent issues in the ACPI memory mappings management
        code and tighten up error handling in the ACPI driver for AMD SoCs
        (APD).
      
        Specifics:
      
         - Avoid redundant rounding to the page size in acpi_os_map_iomem() to
           address a recently introduced issue with the EFI memory map
           permission check on ARM64 (Ard Biesheuvel).
      
         - Fix acpi_release_memory() to wait until the memory mappings
           released by it have been really unmapped (Rafael Wysocki).
      
         - Make the ACPI driver for AMD SoCs (APD) check the return value of
           acpi_dev_get_property() to avoid failures in the cases when the
           device property under inspection is missing (Furquan Shaikh)"
      
      * tag 'acpi-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: OSL: Prevent acpi_release_memory() from returning too early
        ACPI: ioremap: avoid redundant rounding to OS page size
        ACPI: SoC: APD: Check return value of acpi_dev_get_property()
      0b2f18e7
    • Linus Torvalds's avatar
      Merge tag 'pm-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 326e311b
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "These fix the recently added Tegra194 cpufreq driver and the handling
        of devices using runtime PM during system-wide suspend, improve the
        intel_pstate driver documentation and clean up the cpufreq core.
      
        Specifics:
      
         - Make the recently added Tegra194 cpufreq driver use
           read_cpuid_mpir() instead of cpu_logical_map() to avoid exporting
           logical_cpu_map (Sumit Gupta).
      
         - Drop the automatic system wakeup event reporting for devices with
           pending runtime-resume requests during system-wide suspend to avoid
           spurious aborts of the suspend flow (Rafael Wysocki).
      
         - Fix build warning in the intel_pstate driver documentation and
           improve the wording in there (Randy Dunlap).
      
         - Clean up two pieces of code in the cpufreq core (Viresh Kumar)"
      
      * tag 'pm-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq: Use WARN_ON_ONCE() for invalid relation
        cpufreq: No need to verify cpufreq_driver in show_scaling_cur_freq()
        PM: sleep: core: Fix the handling of pending runtime resume requests
        Documentation: fix pm/intel_pstate build warning and wording
        cpufreq: replace cpu_logical_map() with read_cpuid_mpir()
      326e311b
    • Rafael J. Wysocki's avatar
      Merge branch 'acpi-mm' · 4f31d53c
      Rafael J. Wysocki authored
      * acpi-mm:
        ACPI: OSL: Prevent acpi_release_memory() from returning too early
        ACPI: ioremap: avoid redundant rounding to OS page size
      4f31d53c
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpufreq' · ef7d9604
      Rafael J. Wysocki authored
      * pm-cpufreq:
        cpufreq: Use WARN_ON_ONCE() for invalid relation
        cpufreq: No need to verify cpufreq_driver in show_scaling_cur_freq()
        Documentation: fix pm/intel_pstate build warning and wording
        cpufreq: replace cpu_logical_map() with read_cpuid_mpir()
      ef7d9604
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 96d454cd
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
      
       - Fix kernel build with the integrated LLVM assembler which doesn't see
         the -Wa,-march option.
      
       - Fix "make vdso_install" when COMPAT_VDSO is disabled.
      
       - Make KVM more robust if the AT S1E1R instruction triggers an
         exception (architecture corner cases).
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        KVM: arm64: Set HCR_EL2.PTW to prevent AT taking synchronous exception
        KVM: arm64: Survive synchronous exceptions caused by AT instructions
        KVM: arm64: Add kvm_extable for vaxorcism code
        arm64: vdso32: make vdso32 install conditional
        arm64: use a common .arch preamble for inline assembly
      96d454cd
    • Herbert Xu's avatar
      kernel.h: Silence sparse warning in lower_32_bits · ef91bb19
      Herbert Xu authored
      I keep getting sparse warnings in crypto such as:
      
        CHECK   drivers/crypto/ccree/cc_hash.c
         drivers/crypto/ccree/cc_hash.c:49:9: warning: cast truncates bits from constant value (47b5481dbefa4fa4 becomes befa4fa4)
         drivers/crypto/ccree/cc_hash.c:49:26: warning: cast truncates bits from constant value (db0c2e0d64f98fa7 becomes 64f98fa7)
         [.. many more ..]
      
      This patch removes the warning by adding a mask to keep sparse
      happy.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ef91bb19
    • Linus Torvalds's avatar
      Merge tag 'writeback_for_v5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · e3094285
      Linus Torvalds authored
      Pull writeback fixes from Jan Kara:
       "Fixes for writeback code occasionally skipping writeback of some
        inodes or livelocking sync(2)"
      
      * tag 'writeback_for_v5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        writeback: Drop I_DIRTY_TIME_EXPIRE
        writeback: Fix sync livelock due to b_dirty_time processing
        writeback: Avoid skipping inode writeback
        writeback: Protect inode->i_io_list with inode->i_lock
      e3094285
    • Linus Torvalds's avatar
      Merge tag 'gfs2-v5.9-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · 40129b8c
      Linus Torvalds authored
      Pull gfs2 fix from Andreas Gruenbacher:
       "Fix a memory leak on filesystem withdraw.
      
        We didn't detect this bug because we have slab merging on by default
        (CONFIG_SLAB_MERGE_DEFAULT). Adding 'slub_nomerge' to the kernel
        command line exposed the problem"
      
      * tag 'gfs2-v5.9-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
        gfs2: add some much needed cleanup for log flushes that fail
      40129b8c
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-5.9-rc3' of git://github.com/ceph/ceph-client · b0bfd5ec
      Linus Torvalds authored
      Pull ceph fixes from Ilya Dryomov:
       "We have an inode number handling change, prompted by s390x which is a
        64-bit architecture with a 32-bit ino_t, a patch to disallow leases to
        avoid potential data integrity issues when CephFS is re-exported via
        NFS or CIFS and a fix for the bulk of W=1 compilation warnings"
      
      * tag 'ceph-for-5.9-rc3' of git://github.com/ceph/ceph-client:
        ceph: don't allow setlease on cephfs
        ceph: fix inode number handling on arches with 32-bit ino_t
        libceph: add __maybe_unused to DEFINE_CEPH_FEATURE
      b0bfd5ec
    • Paulo Alcantara's avatar
      cifs: fix check of tcon dfs in smb1 · e183785f
      Paulo Alcantara authored
      For SMB1, the DFS flag should be checked against tcon->Flags rather
      than tcon->share_flags.  While at it, add an is_tcon_dfs() helper to
      check for DFS capability in a more generic way.
      Signed-off-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      Reviewed-by: default avatarShyam Prasad N <nspmangalore@gmail.com>
      e183785f
    • Linus Torvalds's avatar
      Merge tag 'mfd-fixes-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd · 3a7c3277
      Linus Torvalds authored
      Pull MFD fixes from Lee Jones:
      
       - fix double free
      
       - handle devicetree disabled devices gracefully
      
      * tag 'mfd-fixes-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd:
        mfd: mfd-core: Ensure disabled devices are ignored without error
        mfd: core: Fix double-free in mfd_remove_devices_fn()
      3a7c3277
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2020-08-28' of git://anongit.freedesktop.org/drm/drm · 5ec06b5c
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "As expected a bit of an rc3 uptick, amdgpu and msm are the main ones,
        one msm patch was from the merge window, but had dependencies and we
        dropped it until the other tree had landed. Otherwise it's a couple of
        fixes for core, and etnaviv, and single i915, exynos, omap fixes.
      
        I'm still tracking the Sandybridge gpu relocations issue, if we don't
        see much movement I might just queue up the reverts. I'll talk to
        Daniel next week once he's back from holidays.
      
        core:
         - Take modeset bkl for legacy drivers
      
        dp_mst:
         - Allow null crtc in dp_mst
      
        i915:
         - Fix command parser desc matching with masks
      
        amdgpu:
         - Misc display fixes
         - Backlight fixes
         - MPO fix for DCN1
         - Fixes for Sienna Cichlid
         - Fixes for Navy Flounder
         - Vega SW CTF fixes
         - SMU fix for Raven
         - Fix a possible overflow in INFO ioctl
         - Gfx10 clockgating fix
      
        msm:
         - opp/bw scaling patch followup
         - frequency restoring fux
         - vblank in atomic commit fix
         - dpu modesetting fixes
         - fencing fix
      
        etnaviv:
         - scheduler interaction fix
         - gpu init regression fix
      
        exynos:
         - Just drop __iommu annotation to fix sparse warning
      
        omap:
         - locking state fix"
      
      * tag 'drm-fixes-2020-08-28' of git://anongit.freedesktop.org/drm/drm: (41 commits)
        drm/amd/display: Fix memleak in amdgpu_dm_mode_config_init
        drm/amdgpu: disable runtime pm for navy_flounder
        drm/amd/display: Retry AUX write when fail occurs
        drm/amdgpu: Fix buffer overflow in INFO ioctl
        drm/amd/powerplay: Fix hardmins not being sent to SMU for RV
        drm/amdgpu: use MODE1 reset for navy_flounder by default
        drm/amd/pm: correct the thermal alert temperature limit settings
        drm/amdgpu: add asd fw check before loading asd
        drm/amd/display: Keep current gain when ABM disable immediately
        drm/amd/display: Fix passive dongle mistaken as active dongle in EDID emulation
        drm/amd/display: Revert HDCP disable sequence change
        drm/amd/display: Send DISPLAY_OFF after power down on boot
        drm/amdgpu/gfx10: refine mgcg setting
        drm/amd/pm: correct Vega20 swctf limit setting
        drm/amd/pm: correct Vega12 swctf limit setting
        drm/amd/pm: correct Vega10 swctf limit setting
        drm/amd/pm: set VCN pg per instances
        drm/amd/pm: enable run_btc callback for sienna_cichlid
        drivers: gpu: amd: Initialize amdgpu_dm_backlight_caps object to 0 in amdgpu_dm_update_backlight_caps
        drm/amd/display: Reject overlay plane configurations in multi-display scenarios
        ...
      5ec06b5c
    • James Morse's avatar
      KVM: arm64: Set HCR_EL2.PTW to prevent AT taking synchronous exception · 71a7f8cb
      James Morse authored
      AT instructions do a translation table walk and return the result, or
      the fault in PAR_EL1. KVM uses these to find the IPA when the value is
      not provided by the CPU in HPFAR_EL1.
      
      If a translation table walk causes an external abort it is taken as an
      exception, even if it was due to an AT instruction. (DDI0487F.a's D5.2.11
      "Synchronous faults generated by address translation instructions")
      
      While we previously made KVM resilient to exceptions taken due to AT
      instructions, the device access causes mismatched attributes, and may
      occur speculatively. Prevent this, by forbidding a walk through memory
      described as device at stage2. Now such AT instructions will report a
      stage2 fault.
      
      Such a fault will cause KVM to restart the guest. If the AT instructions
      always walk the page tables, but guest execution uses the translation cached
      in the TLB, the guest can't make forward progress until the TLB entry is
      evicted. This isn't a problem, as since commit 5dcd0fdb ("KVM: arm64:
      Defer guest entry when an asynchronous exception is pending"), KVM will
      return to the host to process IRQs allowing the rest of the system to keep
      running.
      
      Cc: stable@vger.kernel.org # <v5.3: 5dcd0fdb ("KVM: arm64: Defer guest entry when an asynchronous exception is pending")
      Signed-off-by: default avatarJames Morse <james.morse@arm.com>
      Reviewed-by: default avatarMarc Zyngier <maz@kernel.org>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      71a7f8cb
    • James Morse's avatar
      KVM: arm64: Survive synchronous exceptions caused by AT instructions · 88a84ccc
      James Morse authored
      KVM doesn't expect any synchronous exceptions when executing, any such
      exception leads to a panic(). AT instructions access the guest page
      tables, and can cause a synchronous external abort to be taken.
      
      The arm-arm is unclear on what should happen if the guest has configured
      the hardware update of the access-flag, and a memory type in TCR_EL1 that
      does not support atomic operations. B2.2.6 "Possible implementation
      restrictions on using atomic instructions" from DDI0487F.a lists
      synchronous external abort as a possible behaviour of atomic instructions
      that target memory that isn't writeback cacheable, but the page table
      walker may behave differently.
      
      Make KVM robust to synchronous exceptions caused by AT instructions.
      Add a get_user() style helper for AT instructions that returns -EFAULT
      if an exception was generated.
      
      While KVM's version of the exception table mixes synchronous and
      asynchronous exceptions, only one of these can occur at each location.
      
      Re-enter the guest when the AT instructions take an exception on the
      assumption the guest will take the same exception. This isn't guaranteed
      to make forward progress, as the AT instructions may always walk the page
      tables, but guest execution may use the translation cached in the TLB.
      
      This isn't a problem, as since commit 5dcd0fdb ("KVM: arm64: Defer guest
      entry when an asynchronous exception is pending"), KVM will return to the
      host to process IRQs allowing the rest of the system to keep running.
      
      Cc: stable@vger.kernel.org # <v5.3: 5dcd0fdb ("KVM: arm64: Defer guest entry when an asynchronous exception is pending")
      Signed-off-by: default avatarJames Morse <james.morse@arm.com>
      Reviewed-by: default avatarMarc Zyngier <maz@kernel.org>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      88a84ccc
    • James Morse's avatar
      KVM: arm64: Add kvm_extable for vaxorcism code · e9ee186b
      James Morse authored
      KVM has a one instruction window where it will allow an SError exception
      to be consumed by the hypervisor without treating it as a hypervisor bug.
      This is used to consume asynchronous external abort that were caused by
      the guest.
      
      As we are about to add another location that survives unexpected exceptions,
      generalise this code to make it behave like the host's extable.
      
      KVM's version has to be mapped to EL2 to be accessible on nVHE systems.
      
      The SError vaxorcism code is a one instruction window, so has two entries
      in the extable. Because the KVM code is copied for VHE and nVHE, we end up
      with four entries, half of which correspond with code that isn't mapped.
      Signed-off-by: default avatarJames Morse <james.morse@arm.com>
      Reviewed-by: default avatarMarc Zyngier <maz@kernel.org>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      e9ee186b