1. 07 Jun, 2021 2 commits
    • Mark Rutland's avatar
      arm64: entry: unmask IRQ+FIQ after EL0 handling · f7c706f0
      Mark Rutland authored
      For non-fatal exceptions taken from EL0, we expect that at some point
      during exception handling it is possible to return to a regular process
      context with all exceptions unmasked (e.g. as we do in
      do_notify_resume()), and we generally aim to unmask exceptions wherever
      possible.
      
      While handling SError and debug exceptions from EL0, we need to leave
      some exceptions masked during handling. Handling SError requires us to
      mask SError (which also requires masking IRQ+FIQ), and handing debug
      exceptions requires us to mask debug (which also requires masking
      SError+IRQ+FIQ).
      
      Once do_serror() or do_debug_exception() has returned, we no longer need
      to mask exceptions, and can unmask them all, which is what we did prior
      to commit:
      
        9034f625 ("arm64: Do not enable IRQs for ct_user_exit")
      
      ... where we had to mask IRQs as for context_tracking_user_exit()
      expected IRQs to be masked.
      
      Since then, we realised that our context tracking wasn't entirely
      correct, and reworked the entry code to fix this. As of commit:
      
        23529049 ("arm64: entry: fix non-NMI user<->kernel transitions")
      
      ... we replaced the call to context_tracking_user_exit() with a call to
      user_exit_irqoff() as part of enter_from_user_mode(), which occurs
      earlier, before we run the body of the handler and unmask exceptions in
      DAIF.
      
      When we return to userspace, we go via ret_to_user(), which masks
      exceptions in DAIF prior to calling user_enter_irqoff() as part of
      exit_to_user_mode().
      
      Thus, there's no longer a reason to leave IRQs or FIQs masked at the end
      of the EL0 debug or error handlers, as neither the user exit context
      tracking nor the user entry context tracking requires this. Let's bring
      these into line with other EL0 exception handlers and ensure that IRQ
      and FIQ are unmasked in DAIF at some point during the handler.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Acked-by: default avatarMarc Zyngier <maz@kernel.org>
      Reviewed-by: default avatarJoey Gouly <joey.gouly@arm.com>
      Cc: James Morse <james.morse@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Link: https://lore.kernel.org/r/20210607094624.34689-3-mark.rutland@arm.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
      f7c706f0
    • Mark Rutland's avatar
      arm64: remove redundant local_daif_mask() in bad_mode() · 382dcdd6
      Mark Rutland authored
      Upon taking an exception, the CPU sets all the DAIF bits. We never
      clear any of these bits prior to calling bad_mode(), and bad_mode()
      itself never clears any of these bits, so there's no need to call
      local_daif_mask().
      
      This patch removes the redundant call.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Acked-by: default avatarMarc Zyngier <maz@kernel.org>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Reviewed-by: default avatarJoey Gouly <joey.gouly@arm.com>
      Cc: James Morse <james.morse@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Link: https://lore.kernel.org/r/20210607094624.34689-2-mark.rutland@arm.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
      382dcdd6
  2. 23 May, 2021 18 commits
  3. 22 May, 2021 4 commits
    • Linus Torvalds's avatar
      Merge tag 'block-5.13-2021-05-22' of git://git.kernel.dk/linux-block · 4ff2473b
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - Fix BLKRRPART and deletion race (Gulam, Christoph)
      
       - NVMe pull request (Christoph):
            - nvme-tcp corruption and timeout fixes (Sagi Grimberg, Keith
              Busch)
            - nvme-fc teardown fix (James Smart)
            - nvmet/nvme-loop memory leak fixes (Wu Bo)"
      
      * tag 'block-5.13-2021-05-22' of git://git.kernel.dk/linux-block:
        block: fix a race between del_gendisk and BLKRRPART
        block: prevent block device lookups at the beginning of del_gendisk
        nvme-fc: clear q_live at beginning of association teardown
        nvme-tcp: rerun io_work if req_list is not empty
        nvme-tcp: fix possible use-after-completion
        nvme-loop: fix memory leak in nvme_loop_create_ctrl()
        nvmet: fix memory leak in nvmet_alloc_ctrl()
      4ff2473b
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.13-2021-05-22' of git://git.kernel.dk/linux-block · b9231dfb
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "One fix for a regression with poll in this merge window, and another
        just hardens the io-wq exit path a bit"
      
      * tag 'io_uring-5.13-2021-05-22' of git://git.kernel.dk/linux-block:
        io_uring: fortify tctx/io_wq cleanup
        io_uring: don't modify req->poll for rw
      b9231dfb
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.13b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 23d72926
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
      
       - a fix for a boot regression when running as PV guest on hardware
         without NX support
      
       - a small series fixing a bug in the Xen pciback driver when
         configuring a PCI card with multiple virtual functions
      
      * tag 'for-linus-5.13b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen-pciback: reconfigure also from backend watch handler
        xen-pciback: redo VF placement in the virtual topology
        x86/Xen: swap NX determination and GDT setup on BSP
      23d72926
    • Linus Torvalds's avatar
      Merge tag 'xfs-5.13-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · a3969ef4
      Linus Torvalds authored
      Pull xfs fixes from Darrick Wong:
      
       - Fix some math errors in the realtime allocator when extent size hints
         are applied.
      
       - Fix unnecessary short writes to realtime files when free space is
         fragmented.
      
       - Fix a crash when using scrub tracepoints.
      
       - Restore ioctl uapi definitions that were accidentally removed in
         5.13-rc1.
      
      * tag 'xfs-5.13-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: restore old ioctl definitions
        xfs: fix deadlock retry tracepoint arguments
        xfs: retry allocations when locality-based search fails
        xfs: adjust rt allocation minlen when extszhint > rtextsize
      a3969ef4
  4. 21 May, 2021 16 commits