1. 05 Jun, 2023 6 commits
  2. 24 May, 2023 1 commit
  3. 19 May, 2023 1 commit
    • Kent Overstreet's avatar
      lockdep: Add lock_set_cmp_fn() annotation · eb1cfd09
      Kent Overstreet authored
      This implements a new interface to lockdep, lock_set_cmp_fn(), for
      defining a custom ordering when taking multiple locks of the same
      class.
      
      This is an alternative to subclasses, but can not fully replace them
      since subclasses allow lock hierarchies with other clasees
      inter-twined, while this relies on pure class nesting.
      
      Specifically, if A is our nesting class then:
      
        A/0 <- B <- A/1
      
      Would be a valid lock order with subclasses (each subclass really is a
      full class from the validation PoV) but not with this annotation,
      which requires all nesting to be consecutive.
      
      Example output:
      
      | ============================================
      | WARNING: possible recursive locking detected
      | 6.2.0-rc8-00003-g7d81e591ca6a-dirty #15 Not tainted
      | --------------------------------------------
      | kworker/14:3/938 is trying to acquire lock:
      | ffff8880143218c8 (&b->lock l=0 0:2803368){++++}-{3:3}, at: bch_btree_node_get.part.0+0x81/0x2b0
      |
      | but task is already holding lock:
      | ffff8880143de8c8 (&b->lock l=1 1048575:9223372036854775807){++++}-{3:3}, at: __bch_btree_map_nodes+0xea/0x1e0
      | and the lock comparison function returns 1:
      |
      | other info that might help us debug this:
      |  Possible unsafe locking scenario:
      |
      |        CPU0
      |        ----
      |   lock(&b->lock l=1 1048575:9223372036854775807);
      |   lock(&b->lock l=0 0:2803368);
      |
      |  *** DEADLOCK ***
      |
      |  May be due to missing lock nesting notation
      |
      | 3 locks held by kworker/14:3/938:
      |  #0: ffff888005ea9d38 ((wq_completion)bcache){+.+.}-{0:0}, at: process_one_work+0x1ec/0x530
      |  #1: ffff8880098c3e70 ((work_completion)(&cl->work)#3){+.+.}-{0:0}, at: process_one_work+0x1ec/0x530
      |  #2: ffff8880143de8c8 (&b->lock l=1 1048575:9223372036854775807){++++}-{3:3}, at: __bch_btree_map_nodes+0xea/0x1e0
      
      [peterz: extended changelog]
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Link: https://lkml.kernel.org/r/20230509195847.1745548-1-kent.overstreet@linux.dev
      eb1cfd09
  4. 14 May, 2023 13 commits
  5. 13 May, 2023 17 commits
  6. 12 May, 2023 2 commits
    • Borislav Petkov (AMD)'s avatar
      x86/retbleed: Fix return thunk alignment · 9a48d604
      Borislav Petkov (AMD) authored
      SYM_FUNC_START_LOCAL_NOALIGN() adds an endbr leading to this layout
      (leaving only the last 2 bytes of the address):
      
        3bff <zen_untrain_ret>:
        3bff:       f3 0f 1e fa             endbr64
        3c03:       f6                      test   $0xcc,%bl
      
        3c04 <__x86_return_thunk>:
        3c04:       c3                      ret
        3c05:       cc                      int3
        3c06:       0f ae e8                lfence
      
      However, "the RET at __x86_return_thunk must be on a 64 byte boundary,
      for alignment within the BTB."
      
      Use SYM_START instead.
      Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9a48d604
    • Linus Torvalds's avatar
      Merge tag 'for-6.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 76c7f887
      Linus Torvalds authored
      Pull more btrfs fixes from David Sterba:
      
       - fix incorrect number of bitmap entries for space cache if loading is
         interrupted by some error
      
       - fix backref walking, this breaks a mode of LOGICAL_INO_V2 ioctl that
         is used in deduplication tools
      
       - zoned mode fixes:
            - properly finish zone reserved for relocation
            - correctly calculate super block zone end on ZNS
            - properly initialize new extent buffer for redirty
      
       - make mount option clear_cache work with block-group-tree, to rebuild
         free-space-tree instead of temporarily disabling it that would lead
         to a forced read-only mount
      
       - fix alignment check for offset when printing extent item
      
      * tag 'for-6.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: make clear_cache mount option to rebuild FST without disabling it
        btrfs: zero the buffer before marking it dirty in btrfs_redirty_list_add
        btrfs: zoned: fix full zone super block reading on ZNS
        btrfs: zoned: zone finish data relocation BG with last IO
        btrfs: fix backref walking not returning all inode refs
        btrfs: fix space cache inconsistency after error loading it from disk
        btrfs: print-tree: parent bytenr must be aligned to sector size
      76c7f887