Skip to contentSkip to conversation

6.0.18-rc1 review

PATCH In review Greg Kroah-Hartman 12 participants 191 messages Jan 4, 2023 – Jan 7, 2023 Page 2 of 2

Subsystems (3)
lore
Share & tools
lore
author maintainer
#162 lore raw

PATCH 162/177 ext4: fix deadlock due to mbcache entry corruption

In reply to Greg Kroah-Hartman

From: Jan Kara <[email protected]>

commit a44e84a9b7764c72896f7241a0ec9ac7e7ef38dd upstream.

When manipulating xattr blocks, we can deadlock infinitely looping inside ext4_xattr_block_set() where we constantly keep finding xattr block for reuse in mbcache but we are unable to reuse it because its reference count is too big. This happens because cache entry for the xattr block is marked as reusable (e_reusable set) although its reference count is too big. When this inconsistency happens, this inconsistent state is kept indefinitely and so ext4_xattr_block_set() keeps retrying indefinitely.

The inconsistent state is caused by non-atomic update of e_reusable bit. e_reusable is part of a bitfield and e_reusable update can race with update of e_referenced bit in the same bitfield resulting in loss of one of the updates. Fix the problem by using atomic bitops instead.

This bug has been around for many years, but it became *much* easier to hit after commit 65f8b80053a1 ("ext4: fix race when reusing xattr blocks").

Fixes 6048c64b2609 ("mbcache: add reusable flag to cache entries")
Fixes 65f8b80053a1 ("ext4: fix race when reusing xattr blocks")
---
 fs/ext4/xattr.c         |    4 ++--
 fs/mbcache.c            |   14 ++++++++------
 include/linux/mbcache.h |    9 +++++++--
 3 files changed, 17 insertions(+), 10 deletions(-)
fs/ext4/xattr.c +2 -2
@@ -1281,7 +1281,7 @@ retry_ref:
 				ce = mb_cache_entry_get(ea_block_cache, hash,
 							bh->b_blocknr);
 				if (ce) {
-					ce->e_reusable = 1;
+					set_bit(MBE_REUSABLE_B, &ce->e_flags);
 					mb_cache_entry_put(ea_block_cache, ce);
 				}
 			}
@@ -2042,7 +2042,7 @@ inserted:
 				}
 				BHDR(new_bh)->h_refcount = cpu_to_le32(ref);
 				if (ref == EXT4_XATTR_REFCOUNT_MAX)
-					ce->e_reusable = 0;
+					clear_bit(MBE_REUSABLE_B, &ce->e_flags);
 				ea_bdebug(new_bh, "reusing; refcount now=%d",
 					  ref);
 				ext4_xattr_block_csum_set(inode, new_bh);
fs/mbcache.c +8 -6
@@ -100,8 +100,9 @@ int mb_cache_entry_create(struct mb_cach
 	atomic_set(&entry->e_refcnt, 2);
 	entry->e_key = key;
 	entry->e_value = value;
-	entry->e_reusable = reusable;
-	entry->e_referenced = 0;
+	entry->e_flags = 0;
+	if (reusable)
+		set_bit(MBE_REUSABLE_B, &entry->e_flags);
 	head = mb_cache_entry_head(cache, key);
 	hlist_bl_lock(head);
 	hlist_bl_for_each_entry(dup, dup_node, head, e_hash_list) {
@@ -165,7 +166,8 @@ static struct mb_cache_entry *__entry_fi
 	while (node) {
 		entry = hlist_bl_entry(node, struct mb_cache_entry,
 				       e_hash_list);
-		if (entry->e_key == key && entry->e_reusable &&
+		if (entry->e_key == key &&
+		    test_bit(MBE_REUSABLE_B, &entry->e_flags) &&
 		    atomic_inc_not_zero(&entry->e_refcnt))
 			goto out;
 		node = node->next;
@@ -284,7 +286,7 @@ EXPORT_SYMBOL(mb_cache_entry_delete_or_g
 void mb_cache_entry_touch(struct mb_cache *cache,
 			  struct mb_cache_entry *entry)
 {
-	entry->e_referenced = 1;
+	set_bit(MBE_REFERENCED_B, &entry->e_flags);
 }
 EXPORT_SYMBOL(mb_cache_entry_touch);
 
@@ -309,9 +311,9 @@ static unsigned long mb_cache_shrink(str
 		entry = list_first_entry(&cache->c_list,
 					 struct mb_cache_entry, e_list);
 		/* Drop initial hash reference if there is no user */
-		if (entry->e_referenced ||
+		if (test_bit(MBE_REFERENCED_B, &entry->e_flags) ||
 		    atomic_cmpxchg(&entry->e_refcnt, 1, 0) != 1) {
-			entry->e_referenced = 0;
+			clear_bit(MBE_REFERENCED_B, &entry->e_flags);
 			list_move_tail(&entry->e_list, &cache->c_list);
 			continue;
 		}
include/linux/mbcache.h +7 -2
@@ -10,6 +10,12 @@
 
 struct mb_cache;
 
+/* Cache entry flags */
+enum {
+	MBE_REFERENCED_B = 0,
+	MBE_REUSABLE_B
+};
+
 struct mb_cache_entry {
 	/* List of entries in cache - protected by cache->c_list_lock */
 	struct list_head	e_list;
@@ -26,8 +32,7 @@ struct mb_cache_entry {
 	atomic_t		e_refcnt;
 	/* Key in hash - stable during lifetime of the entry */
 	u32			e_key;
-	u32			e_referenced:1;
-	u32			e_reusable:1;
+	unsigned long		e_flags;
 	/* User provided value - stable during lifetime of the entry */
 	u64			e_value;
 };
author maintainer
#163 lore raw

PATCH 163/177 ext4: fix kernel BUG in ext4_write_inline_data_end()

In reply to Greg Kroah-Hartman

From: Ye Bin <[email protected]>

commit 5c099c4fdc438014d5893629e70a8ba934433ee8 upstream.

Syzbot report follow issue:

------------[ cut here ]------------
kernel BUG at fs/ext4/inline.c:227!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 3629 Comm: syz-executor212 Not tainted 6.1.0-rc5-syzkaller-00018-g59d0d52c30d4 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:ext4_write_inline_data+0x344/0x3e0 fs/ext4/inline.c:227
RSP: 0018:ffffc90003b3f368 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff8880704e16c0 RCX: 0000000000000000
RDX: ffff888021763a80 RSI: ffffffff821e31a4 RDI: 0000000000000006
RBP: 000000000006818e R08: 0000000000000006 R09: 0000000000068199
R10: 0000000000000079 R11: 0000000000000000 R12: 000000000000000b
R13: 0000000000068199 R14: ffffc90003b3f408 R15: ffff8880704e1c82
FS:  000055555723e3c0(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fffe8ac9080 CR3: 0000000079f81000 CR4: 0000000000350ee0
Call Trace:
 <TASK>
 ext4_write_inline_data_end+0x2a3/0x12f0 fs/ext4/inline.c:768
 ext4_write_end+0x242/0xdd0 fs/ext4/inode.c:1313
 ext4_da_write_end+0x3ed/0xa30 fs/ext4/inode.c:3063
 generic_perform_write+0x316/0x570 mm/filemap.c:3764
 ext4_buffered_write_iter+0x15b/0x460 fs/ext4/file.c:285
 ext4_file_write_iter+0x8bc/0x16e0 fs/ext4/file.c:700
 call_write_iter include/linux/fs.h:2191 [inline]
 do_iter_readv_writev+0x20b/0x3b0 fs/read_write.c:735
 do_iter_write+0x182/0x700 fs/read_write.c:861
 vfs_iter_write+0x74/0xa0 fs/read_write.c:902
 iter_file_splice_write+0x745/0xc90 fs/splice.c:686
 do_splice_from fs/splice.c:764 [inline]
 direct_splice_actor+0x114/0x180 fs/splice.c:931
 splice_direct_to_actor+0x335/0x8a0 fs/splice.c:886
 do_splice_direct+0x1ab/0x280 fs/splice.c:974
 do_sendfile+0xb19/0x1270 fs/read_write.c:1255
 __do_sys_sendfile64 fs/read_write.c:1323 [inline]
 __se_sys_sendfile64 fs/read_write.c:1309 [inline]
 __x64_sys_sendfile64+0x1d0/0x210 fs/read_write.c:1309
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
---[ end trace 0000000000000000 ]---

Above issue may happens as follows:
ext4_da_write_begin
ext4_da_write_inline_data_begin

    ext4_da_convert_inline_data_to_extent
      ext4_clear_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA);

ext4_da_write_end

ext4_run_li_request
ext4_mb_prefetch

    ext4_read_block_bitmap_nowait
      ext4_validate_block_bitmap
        ext4_mark_group_bitmap_corrupted(sb, block_group, EXT4_GROUP_INFO_BBITMAP_CORRUPT)
	 percpu_counter_sub(&sbi->s_freeclusters_counter,grp->bb_free);
	  -> sbi->s_freeclusters_counter become zero
ext4_da_write_begin
  if (ext4_nonda_switch(inode->i_sb)) -> As freeclusters_counter is zero will return true
    *fsdata = (void *)FALL_BACK_TO_NONDELALLOC;
    ext4_write_begin
ext4_da_write_end
  if (write_mode == FALL_BACK_TO_NONDELALLOC)
    ext4_write_end
      if (inline_data)
        ext4_write_inline_data_end
	  ext4_write_inline_data
	    BUG_ON(pos + len > EXT4_I(inode)->i_inline_size);
           -> As inode is already convert to extent, so 'pos + len' > inline_size
	   -> then trigger BUG.

To solve this issue, instead of checking ext4_has_inline_data() which is only cleared after data has been written back, check the EXT4_STATE_MAY_INLINE_DATA flag in ext4_write_end().

---
 fs/ext4/inode.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/ext4/inode.c +2 -1
@@ -1315,7 +1315,8 @@ static int ext4_write_end(struct file *f
 
 	trace_ext4_write_end(inode, pos, len, copied);
 
-	if (ext4_has_inline_data(inode))
+	if (ext4_has_inline_data(inode) &&
+	    ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA))
 		return ext4_write_inline_data_end(inode, pos, len, copied, page);
 
 	copied = block_write_end(file, mapping, pos, len, copied, page, fsdata);
author maintainer
#164 lore raw

PATCH 164/177 ext4: fix inode leak in ext4_xattr_inode_create() on an error path

In reply to Greg Kroah-Hartman

From: Ye Bin <[email protected]>

commit e4db04f7d3dbbe16680e0ded27ea2a65b10f766a upstream.

There is issue as follows when do setxattr with inject fault:

[localhost]# fsck.ext4 -fn /dev/sda
e2fsck 1.46.6-rc1 (12-Sep-2022)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Unattached zero-length inode 15. Clear? no

Unattached inode 15
Connect to /lost+found? no

Pass 5: Checking group summary information

/dev/sda: ********** WARNING: Filesystem still has errors **********

/dev/sda: 15/655360 files (0.0% non-contiguous), 66755/2621440 blocks

This occurs in 'ext4_xattr_inode_create()'. If 'ext4_mark_inode_dirty()' fails, dropping i_nlink of the inode is needed. Or will lead to inode leak.

---
 fs/ext4/xattr.c |    3 +++
 1 file changed, 3 insertions(+)
fs/ext4/xattr.c +3 -0
@@ -1441,6 +1441,9 @@ static struct inode *ext4_xattr_inode_cr
 		if (!err)
 			err = ext4_inode_attach_jinode(ea_inode);
 		if (err) {
+			if (ext4_xattr_inode_dec_ref(handle, ea_inode))
+				ext4_warning_inode(ea_inode,
+					"cleanup dec ref error %d", err);
 			iput(ea_inode);
 			return ERR_PTR(err);
 		}
author maintainer
#165 lore raw

PATCH 165/177 ext4: initialize quota before expanding inode in setproject ioctl

In reply to Greg Kroah-Hartman

From: Jan Kara <[email protected]>

commit 1485f726c6dec1a1f85438f2962feaa3d585526f upstream.

Make sure we initialize quotas before possibly expanding inode space (and thus maybe needing to allocate external xattr block) in ext4_ioctl_setproject(). This prevents not accounting the necessary block allocation.

---
 fs/ext4/ioctl.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
fs/ext4/ioctl.c +4 -4
@@ -732,6 +732,10 @@ static int ext4_ioctl_setproject(struct
 	if (ext4_is_quota_file(inode))
 		return err;
 
+	err = dquot_initialize(inode);
+	if (err)
+		return err;
+
 	err = ext4_get_inode_loc(inode, &iloc);
 	if (err)
 		return err;
@@ -747,10 +751,6 @@ static int ext4_ioctl_setproject(struct
 		brelse(iloc.bh);
 	}
 
-	err = dquot_initialize(inode);
-	if (err)
-		return err;
-
 	handle = ext4_journal_start(inode, EXT4_HT_QUOTA,
 		EXT4_QUOTA_INIT_BLOCKS(sb) +
 		EXT4_QUOTA_DEL_BLOCKS(sb) + 3);
author maintainer
#166 lore raw

PATCH 166/177 ext4: avoid unaccounted block allocation when expanding inode

In reply to Greg Kroah-Hartman

From: Jan Kara <[email protected]>

commit 8994d11395f8165b3deca1971946f549f0822630 upstream.

When expanding inode space in ext4_expand_extra_isize_ea() we may need to allocate external xattr block. If quota is not initialized for the inode, the block allocation will not be accounted into quota usage. Make sure the quota is initialized before we try to expand inode space.

---
 fs/ext4/inode.c |    8 ++++++++
 1 file changed, 8 insertions(+)
fs/ext4/inode.c +8 -0
@@ -5838,6 +5838,14 @@ static int __ext4_expand_extra_isize(str
 		return 0;
 	}
 
+	/*
+	 * We may need to allocate external xattr block so we need quotas
+	 * initialized. Here we can be called with various locks held so we
+	 * cannot affort to initialize quotas ourselves. So just bail.
+	 */
+	if (dquot_initialize_needed(inode))
+		return -EAGAIN;
+
 	/* try to expand with EAs present */
 	error = ext4_expand_extra_isize_ea(inode, new_extra_isize,
 					   raw_inode, handle);
author maintainer
#167 lore raw

PATCH 167/177 ext4: allocate extended attribute value in vmalloc area

In reply to Greg Kroah-Hartman

From: Ye Bin <[email protected]>

commit cc12a6f25e07ed05d5825a1664b67a970842b2ca upstream.

Now, extended attribute value maximum length is 64K. The memory requested here does not need continuous physical addresses, so it is appropriate to use kvmalloc to request memory. At the same time, it can also cope with the situation that the extended attribute will become longer in the future.

---
 fs/ext4/xattr.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/ext4/xattr.c +2 -2
@@ -2550,7 +2550,7 @@ static int ext4_xattr_move_to_block(hand
 
 	is = kzalloc(sizeof(struct ext4_xattr_ibody_find), GFP_NOFS);
 	bs = kzalloc(sizeof(struct ext4_xattr_block_find), GFP_NOFS);
-	buffer = kmalloc(value_size, GFP_NOFS);
+	buffer = kvmalloc(value_size, GFP_NOFS);
 	b_entry_name = kmalloc(entry->e_name_len + 1, GFP_NOFS);
 	if (!is || !bs || !buffer || !b_entry_name) {
 		error = -ENOMEM;
@@ -2602,7 +2602,7 @@ static int ext4_xattr_move_to_block(hand
 	error = 0;
 out:
 	kfree(b_entry_name);
-	kfree(buffer);
+	kvfree(buffer);
 	if (is)
 		brelse(is->iloc.bh);
 	if (bs)
author maintainer
#168 lore raw

PATCH 168/177 drm/i915/ttm: consider CCS for backup objects

In reply to Greg Kroah-Hartman

From: Matthew Auld <[email protected]>

commit ad0fca2dceeab8fdd8e1135f4b4ef2dc46c2ead9 upstream.

It seems we can have one or more framebuffers that are still pinned when suspending lmem, in such a case we end up creating a shmem backup object, instead of evicting the object directly, but this will skip copying the CCS aux state, since we don't allocate the extra storage for the CCS pages as part of the ttm_tt construction. Since we can already deal with pinned objects just fine, it doesn't seem too nasty to just extend to support dealing with the CCS aux state, if the object is a pinned framebuffer. This fixes display corruption (like in gnome-shell) seen on DG2 when returning from suspend.

Fixes da0595ae91da ("drm/i915/migrate: Evict and restore the flatccs capable lmem obj")
Cc Ville Syrjälä <[email protected]>
Cc Nirmoy Das <[email protected]>
Cc Andrzej Hajda <[email protected]>
Cc Shuicheng Lin <[email protected]>
Cc <[email protected]> # v5.19+
(cherry picked from commit 95df9cc24bee8a09d39c62bcef4319b984814e18)
---
 drivers/gpu/drm/i915/gem/i915_gem_object.c       |    3 +++
 drivers/gpu/drm/i915/gem/i915_gem_object_types.h |   10 ++++++----
 drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c       |   18 +++++++++++++++++-
 3 files changed, 26 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_object.c +3 -0
@@ -726,6 +726,9 @@ bool i915_gem_object_needs_ccs_pages(str
 	if (!HAS_FLAT_CCS(to_i915(obj->base.dev)))
 		return false;
 
+	if (obj->flags & I915_BO_ALLOC_CCS_AUX)
+		return true;
+
 	for (i = 0; i < obj->mm.n_placements; i++) {
 		/* Compression is not allowed for the objects with smem placement */
 		if (obj->mm.placements[i]->type == INTEL_MEMORY_SYSTEM)
drivers/gpu/drm/i915/gem/i915_gem_object_types.h +6 -4
@@ -325,16 +325,18 @@ struct drm_i915_gem_object {
  * dealing with userspace objects the CPU fault handler is free to ignore this.
  */
 #define I915_BO_ALLOC_GPU_ONLY	  BIT(6)
+#define I915_BO_ALLOC_CCS_AUX	  BIT(7)
 #define I915_BO_ALLOC_FLAGS (I915_BO_ALLOC_CONTIGUOUS | \
 			     I915_BO_ALLOC_VOLATILE | \
 			     I915_BO_ALLOC_CPU_CLEAR | \
 			     I915_BO_ALLOC_USER | \
 			     I915_BO_ALLOC_PM_VOLATILE | \
 			     I915_BO_ALLOC_PM_EARLY | \
-			     I915_BO_ALLOC_GPU_ONLY)
-#define I915_BO_READONLY          BIT(7)
-#define I915_TILING_QUIRK_BIT     8 /* unknown swizzling; do not release! */
-#define I915_BO_PROTECTED         BIT(9)
+			     I915_BO_ALLOC_GPU_ONLY | \
+			     I915_BO_ALLOC_CCS_AUX)
+#define I915_BO_READONLY          BIT(8)
+#define I915_TILING_QUIRK_BIT     9 /* unknown swizzling; do not release! */
+#define I915_BO_PROTECTED         BIT(10)
 	/**
 	 * @mem_flags - Mutable placement-related flags
 	 *
drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c +17 -1
@@ -50,6 +50,7 @@ static int i915_ttm_backup(struct i915_g
 		container_of(bo->bdev, typeof(*i915), bdev);
 	struct drm_i915_gem_object *backup;
 	struct ttm_operation_ctx ctx = {};
+	unsigned int flags;
 	int err = 0;
 
 	if (bo->resource->mem_type == I915_PL_SYSTEM || obj->ttm.backup)
@@ -65,7 +66,22 @@ static int i915_ttm_backup(struct i915_g
 	if (obj->flags & I915_BO_ALLOC_PM_VOLATILE)
 		return 0;
 
-	backup = i915_gem_object_create_shmem(i915, obj->base.size);
+	/*
+	 * It seems that we might have some framebuffers still pinned at this
+	 * stage, but for such objects we might also need to deal with the CCS
+	 * aux state. Make sure we force the save/restore of the CCS state,
+	 * otherwise we might observe display corruption, when returning from
+	 * suspend.
+	 */
+	flags = 0;
+	if (i915_gem_object_needs_ccs_pages(obj)) {
+		WARN_ON_ONCE(!i915_gem_object_is_framebuffer(obj));
+		WARN_ON_ONCE(!pm_apply->allow_gpu);
+
+		flags = I915_BO_ALLOC_CCS_AUX;
+	}
+	backup = i915_gem_object_create_region(i915->mm.regions[INTEL_REGION_SMEM],
+					       obj->base.size, 0, flags);
 	if (IS_ERR(backup))
 		return PTR_ERR(backup);
 
author maintainer
#169 lore raw

PATCH 169/177 drm/amd/display: Add DCN314 display SG Support

In reply to Greg Kroah-Hartman

From: Yifan Zhang <[email protected]>

commit fe6872adb05e85bde38f2cdec01a0f4cfb826998 upstream.

Add display SG support for DCN 3.1.4.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |    1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -0
@@ -1511,6 +1511,7 @@ static int amdgpu_dm_init(struct amdgpu_
 		case IP_VERSION(3, 0, 1):
 		case IP_VERSION(3, 1, 2):
 		case IP_VERSION(3, 1, 3):
+		case IP_VERSION(3, 1, 4):
 		case IP_VERSION(3, 1, 5):
 		case IP_VERSION(3, 1, 6):
 			init_data.flags.gpu_vm_support = true;
author maintainer
#170 lore raw

PATCH 170/177 drm/amdgpu: handle polaris10/11 overlap asics (v2)

In reply to Greg Kroah-Hartman

From: Alex Deucher <[email protected]>

commit 1d4624cd72b912b2680c08d0be48338a1629a858 upstream.

Some special polaris 10 chips overlap with the polaris11 DID range. Handle this properly in the driver.

v2: use local flags for other function calls.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +11 -2
@@ -2025,6 +2025,15 @@ static int amdgpu_pci_probe(struct pci_d
 			 "See modparam exp_hw_support\n");
 		return -ENODEV;
 	}
+	/* differentiate between P10 and P11 asics with the same DID */
+	if (pdev->device == 0x67FF &&
+	    (pdev->revision == 0xE3 ||
+	     pdev->revision == 0xE7 ||
+	     pdev->revision == 0xF3 ||
+	     pdev->revision == 0xF7)) {
+		flags &= ~AMD_ASIC_MASK;
+		flags |= CHIP_POLARIS10;
+	}
 
 	/* Due to hardware bugs, S/G Display on raven requires a 1:1 IOMMU mapping,
 	 * however, SME requires an indirect IOMMU mapping because the encryption
@@ -2094,12 +2103,12 @@ static int amdgpu_pci_probe(struct pci_d
 
 	pci_set_drvdata(pdev, ddev);
 
-	ret = amdgpu_driver_load_kms(adev, ent->driver_data);
+	ret = amdgpu_driver_load_kms(adev, flags);
 	if (ret)
 		goto err_pci;
 
 retry_init:
-	ret = drm_dev_register(ddev, ent->driver_data);
+	ret = drm_dev_register(ddev, flags);
 	if (ret == -EAGAIN && ++retry <= 3) {
 		DRM_INFO("retry init %d\n", retry);
 		/* Don't request EX mode too frequently which is attacking */
author maintainer
#171 lore raw

PATCH 171/177 drm/amdgpu: make display pinning more flexible (v2)

In reply to Greg Kroah-Hartman

From: Alex Deucher <[email protected]>

commit 81d0bcf9900932633d270d5bc4a54ff599c6ebdb upstream.

Only apply the static threshold for Stoney and Carrizo. This hardware has certain requirements that don't allow mixing of GTT and VRAM. Newer asics do not have these requirements so we should be able to be more flexible with where buffers end up.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +2 -1
@@ -1506,7 +1506,8 @@ u64 amdgpu_bo_gpu_offset_no_check(struct
 uint32_t amdgpu_bo_get_preferred_domain(struct amdgpu_device *adev,
 					    uint32_t domain)
 {
-	if (domain == (AMDGPU_GEM_DOMAIN_VRAM | AMDGPU_GEM_DOMAIN_GTT)) {
+	if ((domain == (AMDGPU_GEM_DOMAIN_VRAM | AMDGPU_GEM_DOMAIN_GTT)) &&
+	    ((adev->asic_type == CHIP_CARRIZO) || (adev->asic_type == CHIP_STONEY))) {
 		domain = AMDGPU_GEM_DOMAIN_VRAM;
 		if (adev->gmc.real_vram_size <= AMDGPU_SG_THRESHOLD)
 			domain = AMDGPU_GEM_DOMAIN_GTT;
author maintainer
#172 lore raw

PATCH 172/177 drm/i915: improve the catch-all evict to handle lock contention

In reply to Greg Kroah-Hartman

From: Matthew Auld <[email protected]>

commit 3f882f2d4f689627c1566c2c92087bc3ff734953 upstream.

The catch-all evict can fail due to object lock contention, since it only goes as far as trylocking the object, due to us already holding the vm->mutex. Doing a full object lock here can deadlock, since the vm->mutex is always our inner lock. Add another execbuf pass which drops the vm->mutex and then tries to grab the object will the full lock, before then retrying the eviction. This should be good enough for now to fix the immediate regression with userspace seeing -ENOSPC from execbuf due to contended object locks during GTT eviction.

v2 (Mani)
- Also revamp the docs for the different passes.

Testcase: igt@gem_ppgtt@shrink-vs-evict-*

Fixes 7e00897be8bf ("drm/i915: Add object locking to i915_gem_evict_for_node and i915_gem_evict_something, v2.")
Cc Maarten Lankhorst <[email protected]>
Cc Thomas Hellström <[email protected]>
Cc Tvrtko Ursulin <[email protected]>
Cc Andrzej Hajda <[email protected]>
Cc Mani Milani <[email protected]>
Cc <[email protected]> # v5.18+
(cherry picked from commit 801fa7a81f6da533cc5442fc40e32c72b76cd42a)
---
 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c  |   59 +++++++++++++++++++-----
 drivers/gpu/drm/i915/gem/i915_gem_mman.c        |    2 
 drivers/gpu/drm/i915/i915_gem_evict.c           |   37 ++++++++++-----
 drivers/gpu/drm/i915/i915_gem_evict.h           |    4 +
 drivers/gpu/drm/i915/i915_vma.c                 |    2 
 drivers/gpu/drm/i915/selftests/i915_gem_evict.c |    4 -
 6 files changed, 82 insertions(+), 26 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +48 -11
@@ -729,32 +729,69 @@ static int eb_reserve(struct i915_execbu
 	bool unpinned;
 
 	/*
-	 * Attempt to pin all of the buffers into the GTT.
-	 * This is done in 2 phases:
+	 * We have one more buffers that we couldn't bind, which could be due to
+	 * various reasons. To resolve this we have 4 passes, with every next
+	 * level turning the screws tighter:
 	 *
-	 * 1. Unbind all objects that do not match the GTT constraints for
-	 *    the execbuffer (fenceable, mappable, alignment etc).
-	 * 2. Bind new objects.
+	 * 0. Unbind all objects that do not match the GTT constraints for the
+	 * execbuffer (fenceable, mappable, alignment etc). Bind all new
+	 * objects.  This avoids unnecessary unbinding of later objects in order
+	 * to make room for the earlier objects *unless* we need to defragment.
 	 *
-	 * This avoid unnecessary unbinding of later objects in order to make
-	 * room for the earlier objects *unless* we need to defragment.
+	 * 1. Reorder the buffers, where objects with the most restrictive
+	 * placement requirements go first (ignoring fixed location buffers for
+	 * now).  For example, objects needing the mappable aperture (the first
+	 * 256M of GTT), should go first vs objects that can be placed just
+	 * about anywhere. Repeat the previous pass.
 	 *
-	 * Defragmenting is skipped if all objects are pinned at a fixed location.
+	 * 2. Consider buffers that are pinned at a fixed location. Also try to
+	 * evict the entire VM this time, leaving only objects that we were
+	 * unable to lock. Try again to bind the buffers. (still using the new
+	 * buffer order).
+	 *
+	 * 3. We likely have object lock contention for one or more stubborn
+	 * objects in the VM, for which we need to evict to make forward
+	 * progress (perhaps we are fighting the shrinker?). When evicting the
+	 * VM this time around, anything that we can't lock we now track using
+	 * the busy_bo, using the full lock (after dropping the vm->mutex to
+	 * prevent deadlocks), instead of trylock. We then continue to evict the
+	 * VM, this time with the stubborn object locked, which we can now
+	 * hopefully unbind (if still bound in the VM). Repeat until the VM is
+	 * evicted. Finally we should be able bind everything.
 	 */
-	for (pass = 0; pass <= 2; pass++) {
+	for (pass = 0; pass <= 3; pass++) {
 		int pin_flags = PIN_USER | PIN_VALIDATE;
 
 		if (pass == 0)
 			pin_flags |= PIN_NONBLOCK;
 
 		if (pass >= 1)
-			unpinned = eb_unbind(eb, pass == 2);
+			unpinned = eb_unbind(eb, pass >= 2);
 
 		if (pass == 2) {
 			err = mutex_lock_interruptible(&eb->context->vm->mutex);
 			if (!err) {
-				err = i915_gem_evict_vm(eb->context->vm, &eb->ww);
+				err = i915_gem_evict_vm(eb->context->vm, &eb->ww, NULL);
+				mutex_unlock(&eb->context->vm->mutex);
+			}
+			if (err)
+				return err;
+		}
+
+		if (pass == 3) {
+retry:
+			err = mutex_lock_interruptible(&eb->context->vm->mutex);
+			if (!err) {
+				struct drm_i915_gem_object *busy_bo = NULL;
+
+				err = i915_gem_evict_vm(eb->context->vm, &eb->ww, &busy_bo);
 				mutex_unlock(&eb->context->vm->mutex);
+				if (err && busy_bo) {
+					err = i915_gem_object_lock(busy_bo, &eb->ww);
+					i915_gem_object_put(busy_bo);
+					if (!err)
+						goto retry;
+				}
 			}
 			if (err)
 				return err;
drivers/gpu/drm/i915/gem/i915_gem_mman.c +1 -1
@@ -369,7 +369,7 @@ retry:
 		if (vma == ERR_PTR(-ENOSPC)) {
 			ret = mutex_lock_interruptible(&ggtt->vm.mutex);
 			if (!ret) {
-				ret = i915_gem_evict_vm(&ggtt->vm, &ww);
+				ret = i915_gem_evict_vm(&ggtt->vm, &ww, NULL);
 				mutex_unlock(&ggtt->vm.mutex);
 			}
 			if (ret)
drivers/gpu/drm/i915/i915_gem_evict.c +27 -10
@@ -416,6 +416,11 @@ int i915_gem_evict_for_node(struct i915_
  * @vm: Address space to cleanse
  * @ww: An optional struct i915_gem_ww_ctx. If not NULL, i915_gem_evict_vm
  * will be able to evict vma's locked by the ww as well.
+ * @busy_bo: Optional pointer to struct drm_i915_gem_object. If not NULL, then
+ * in the event i915_gem_evict_vm() is unable to trylock an object for eviction,
+ * then @busy_bo will point to it. -EBUSY is also returned. The caller must drop
+ * the vm->mutex, before trying again to acquire the contended lock. The caller
+ * also owns a reference to the object.
  *
  * This function evicts all vmas from a vm.
  *
@@ -425,7 +430,8 @@ int i915_gem_evict_for_node(struct i915_
  * To clarify: This is for freeing up virtual address space, not for freeing
  * memory in e.g. the shrinker.
  */
-int i915_gem_evict_vm(struct i915_address_space *vm, struct i915_gem_ww_ctx *ww)
+int i915_gem_evict_vm(struct i915_address_space *vm, struct i915_gem_ww_ctx *ww,
+		      struct drm_i915_gem_object **busy_bo)
 {
 	int ret = 0;
 
@@ -457,15 +463,22 @@ int i915_gem_evict_vm(struct i915_addres
 			 * the resv is shared among multiple objects, we still
 			 * need the object ref.
 			 */
-			if (dying_vma(vma) ||
+			if (!i915_gem_object_get_rcu(vma->obj) ||
 			    (ww && (dma_resv_locking_ctx(vma->obj->base.resv) == &ww->ctx))) {
 				__i915_vma_pin(vma);
 				list_add(&vma->evict_link, &locked_eviction_list);
 				continue;
 			}
 
-			if (!i915_gem_object_trylock(vma->obj, ww))
+			if (!i915_gem_object_trylock(vma->obj, ww)) {
+				if (busy_bo) {
+					*busy_bo = vma->obj; /* holds ref */
+					ret = -EBUSY;
+					break;
+				}
+				i915_gem_object_put(vma->obj);
 				continue;
+			}
 
 			__i915_vma_pin(vma);
 			list_add(&vma->evict_link, &eviction_list);
@@ -473,25 +486,29 @@ int i915_gem_evict_vm(struct i915_addres
 		if (list_empty(&eviction_list) && list_empty(&locked_eviction_list))
 			break;
 
-		ret = 0;
 		/* Unbind locked objects first, before unlocking the eviction_list */
 		list_for_each_entry_safe(vma, vn, &locked_eviction_list, evict_link) {
 			__i915_vma_unpin(vma);
 
-			if (ret == 0)
+			if (ret == 0) {
 				ret = __i915_vma_unbind(vma);
-			if (ret != -EINTR) /* "Get me out of here!" */
-				ret = 0;
+				if (ret != -EINTR) /* "Get me out of here!" */
+					ret = 0;
+			}
+			if (!dying_vma(vma))
+				i915_gem_object_put(vma->obj);
 		}
 
 		list_for_each_entry_safe(vma, vn, &eviction_list, evict_link) {
 			__i915_vma_unpin(vma);
-			if (ret == 0)
+			if (ret == 0) {
 				ret = __i915_vma_unbind(vma);
-			if (ret != -EINTR) /* "Get me out of here!" */
-				ret = 0;
+				if (ret != -EINTR) /* "Get me out of here!" */
+					ret = 0;
+			}
 
 			i915_gem_object_unlock(vma->obj);
+			i915_gem_object_put(vma->obj);
 		}
 	} while (ret == 0);
 
drivers/gpu/drm/i915/i915_gem_evict.h +3 -1
@@ -11,6 +11,7 @@
 struct drm_mm_node;
 struct i915_address_space;
 struct i915_gem_ww_ctx;
+struct drm_i915_gem_object;
 
 int __must_check i915_gem_evict_something(struct i915_address_space *vm,
 					  struct i915_gem_ww_ctx *ww,
@@ -23,6 +24,7 @@ int __must_check i915_gem_evict_for_node
 					 struct drm_mm_node *node,
 					 unsigned int flags);
 int i915_gem_evict_vm(struct i915_address_space *vm,
-		      struct i915_gem_ww_ctx *ww);
+		      struct i915_gem_ww_ctx *ww,
+		      struct drm_i915_gem_object **busy_bo);
 
 #endif /* __I915_GEM_EVICT_H__ */
drivers/gpu/drm/i915/i915_vma.c +1 -1
@@ -1569,7 +1569,7 @@ static int __i915_ggtt_pin(struct i915_v
 			 * locked objects when called from execbuf when pinning
 			 * is removed. This would probably regress badly.
 			 */
-			i915_gem_evict_vm(vm, NULL);
+			i915_gem_evict_vm(vm, NULL, NULL);
 			mutex_unlock(&vm->mutex);
 		}
 	} while (1);
drivers/gpu/drm/i915/selftests/i915_gem_evict.c +2 -2
@@ -344,7 +344,7 @@ static int igt_evict_vm(void *arg)
 
 	/* Everything is pinned, nothing should happen */
 	mutex_lock(&ggtt->vm.mutex);
-	err = i915_gem_evict_vm(&ggtt->vm, NULL);
+	err = i915_gem_evict_vm(&ggtt->vm, NULL, NULL);
 	mutex_unlock(&ggtt->vm.mutex);
 	if (err) {
 		pr_err("i915_gem_evict_vm on a full GGTT returned err=%d]\n",
@@ -356,7 +356,7 @@ static int igt_evict_vm(void *arg)
 
 	for_i915_gem_ww(&ww, err, false) {
 		mutex_lock(&ggtt->vm.mutex);
-		err = i915_gem_evict_vm(&ggtt->vm, &ww);
+		err = i915_gem_evict_vm(&ggtt->vm, &ww, NULL);
 		mutex_unlock(&ggtt->vm.mutex);
 	}
 
author maintainer
#173 lore raw

PATCH 173/177 drm/i915/migrate: Account for the reserved_space

In reply to Greg Kroah-Hartman

From: Chris Wilson <[email protected]>

commit 31a2e6cbe8a4eb0d1650fff4b77872b744e14a62 upstream.

If the ring is nearly full when calling into emit_pte(), we might incorrectly trample the reserved_space when constructing the packet to emit the PTEs. This then triggers the GEM_BUG_ON(rq->reserved_space > ring->space) when later submitting the request, since the request itself doesn't have enough space left in the ring to emit things like workarounds, breadcrumbs etc.

v2: Fix the whitespace errors

Testcase: igt@i915_selftests@live_emit_pte_full_ring

---
 drivers/gpu/drm/i915/gt/intel_migrate.c |   16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/gt/intel_migrate.c +12 -4
@@ -341,6 +341,16 @@ static int emit_no_arbitration(struct i9
 	return 0;
 }
 
+static int max_pte_pkt_size(struct i915_request *rq, int pkt)
+{
+	struct intel_ring *ring = rq->ring;
+
+	pkt = min_t(int, pkt, (ring->space - rq->reserved_space) / sizeof(u32) + 5);
+	pkt = min_t(int, pkt, (ring->size - ring->emit) / sizeof(u32) + 5);
+
+	return pkt;
+}
+
 static int emit_pte(struct i915_request *rq,
 		    struct sgt_dma *it,
 		    enum i915_cache_level cache_level,
@@ -387,8 +397,7 @@ static int emit_pte(struct i915_request
 		return PTR_ERR(cs);
 
 	/* Pack as many PTE updates as possible into a single MI command */
-	pkt = min_t(int, dword_length, ring->space / sizeof(u32) + 5);
-	pkt = min_t(int, pkt, (ring->size - ring->emit) / sizeof(u32) + 5);
+	pkt = max_pte_pkt_size(rq, dword_length);
 
 	hdr = cs;
 	*cs++ = MI_STORE_DATA_IMM | REG_BIT(21); /* as qword elements */
@@ -421,8 +430,7 @@ static int emit_pte(struct i915_request
 				}
 			}
 
-			pkt = min_t(int, dword_rem, ring->space / sizeof(u32) + 5);
-			pkt = min_t(int, pkt, (ring->size - ring->emit) / sizeof(u32) + 5);
+			pkt = max_pte_pkt_size(rq, dword_rem);
 
 			hdr = cs;
 			*cs++ = MI_STORE_DATA_IMM | REG_BIT(21);
author maintainer
#174 lore raw

PATCH 174/177 drm/amd/pm: add missing SMU13.0.0 mm_dpm feature mapping

In reply to Greg Kroah-Hartman

From: Evan Quan <[email protected]>

commit 592cd24a08763975c75be850a7d4e461bfd353bf upstream.

Without this, the pp_dpm_vclk and pp_dpm_dclk outputs are not with correct data.

---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +2 -0
@@ -187,6 +187,8 @@ static struct cmn2asic_mapping smu_v13_0
 	FEA_MAP(MEM_TEMP_READ),
 	FEA_MAP(ATHUB_MMHUB_PG),
 	FEA_MAP(SOC_PCC),
+	[SMU_FEATURE_DPM_VCLK_BIT] = {1, FEATURE_MM_DPM_BIT},
+	[SMU_FEATURE_DPM_DCLK_BIT] = {1, FEATURE_MM_DPM_BIT},
 };
 
 static struct cmn2asic_mapping smu_v13_0_0_table_map[SMU_TABLE_COUNT] = {
author maintainer
#175 lore raw

PATCH 175/177 drm/amd/pm: add missing SMU13.0.7 mm_dpm feature mapping

In reply to Greg Kroah-Hartman

From: Evan Quan <[email protected]>

commit e0607c10ebf551a654c3577fc74b4bf5533e1cea upstream.

Without this, the pp_dpm_vclk and pp_dpm_dclk outputs are not with correct data.

---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +2 -0
@@ -189,6 +189,8 @@ static struct cmn2asic_mapping smu_v13_0
 	FEA_MAP(MEM_TEMP_READ),
 	FEA_MAP(ATHUB_MMHUB_PG),
 	FEA_MAP(SOC_PCC),
+	[SMU_FEATURE_DPM_VCLK_BIT] = {1, FEATURE_MM_DPM_BIT},
+	[SMU_FEATURE_DPM_DCLK_BIT] = {1, FEATURE_MM_DPM_BIT},
 };
 
 static struct cmn2asic_mapping smu_v13_0_7_table_map[SMU_TABLE_COUNT] = {
author maintainer
#176 lore raw

PATCH 176/177 drm/amd/pm: bump SMU13.0.0 driver_if header to version 0x34

In reply to Greg Kroah-Hartman

From: Evan Quan <[email protected]>

commit 272b981416f8be0180c4d8066f90635fa7c1c501 upstream.

To fit the latest PMFW and suppress the warning emerged on driver loading.

---
 drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h |    2 +-
 drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h                       |    1 +
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c                     |    2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h +1 -1
@@ -522,9 +522,9 @@ typedef enum  {
   TEMP_HOTSPOT_M,
   TEMP_MEM,
   TEMP_VR_GFX,
+  TEMP_VR_SOC,
   TEMP_VR_MEM0,
   TEMP_VR_MEM1,
-  TEMP_VR_SOC,
   TEMP_VR_U,
   TEMP_LIQUID0,
   TEMP_LIQUID1,
drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h +1 -0
@@ -28,6 +28,7 @@
 #define SMU13_DRIVER_IF_VERSION_INV 0xFFFFFFFF
 #define SMU13_DRIVER_IF_VERSION_YELLOW_CARP 0x04
 #define SMU13_DRIVER_IF_VERSION_ALDE 0x08
+#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_0_0 0x34
 #define SMU13_DRIVER_IF_VERSION_SMU_V13_0_4 0x07
 #define SMU13_DRIVER_IF_VERSION_SMU_V13_0_5 0x04
 #define SMU13_DRIVER_IF_VERSION_SMU_V13_0_0_10 0x32
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +2 -0
@@ -288,6 +288,8 @@ int smu_v13_0_check_fw_version(struct sm
 		smu->smc_driver_if_version = SMU13_DRIVER_IF_VERSION_ALDE;
 		break;
 	case IP_VERSION(13, 0, 0):
+		smu->smc_driver_if_version = SMU13_DRIVER_IF_VERSION_SMU_V13_0_0_0;
+		break;
 	case IP_VERSION(13, 0, 10):
 		smu->smc_driver_if_version = SMU13_DRIVER_IF_VERSION_SMU_V13_0_0_10;
 		break;
author maintainer
#177 lore raw

PATCH 177/177 drm/amd/pm: correct the fan speed retrieving in PWM for some SMU13 asics

In reply to Greg Kroah-Hartman

From: Evan Quan <[email protected]>

commit e73fc71e8f015d61f3adca7659cb209fd5117aa5 upstream.

For SMU 13.0.0 and 13.0.7, the output from PMFW is in percent. Driver need to convert that into correct PMW(255) based.

---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c |   17 ++++++++++++++---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c |   17 ++++++++++++++---
 2 files changed, 28 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +14 -3
@@ -1417,12 +1417,23 @@ out:
 static int smu_v13_0_0_get_fan_speed_pwm(struct smu_context *smu,
 					 uint32_t *speed)
 {
+	int ret;
+
 	if (!speed)
 		return -EINVAL;
 
-	return smu_v13_0_0_get_smu_metrics_data(smu,
-						METRICS_CURR_FANPWM,
-						speed);
+	ret = smu_v13_0_0_get_smu_metrics_data(smu,
+					       METRICS_CURR_FANPWM,
+					       speed);
+	if (ret) {
+		dev_err(smu->adev->dev, "Failed to get fan speed(PWM)!");
+		return ret;
+	}
+
+	/* Convert the PMFW output which is in percent to pwm(255) based */
+	*speed = MIN(*speed * 255 / 100, 255);
+
+	return 0;
 }
 
 static int smu_v13_0_0_get_fan_speed_rpm(struct smu_context *smu,
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +14 -3
@@ -1361,12 +1361,23 @@ static int smu_v13_0_7_populate_umd_stat
 static int smu_v13_0_7_get_fan_speed_pwm(struct smu_context *smu,
 					 uint32_t *speed)
 {
+	int ret;
+
 	if (!speed)
 		return -EINVAL;
 
-	return smu_v13_0_7_get_smu_metrics_data(smu,
-						METRICS_CURR_FANPWM,
-						speed);
+	ret = smu_v13_0_7_get_smu_metrics_data(smu,
+					       METRICS_CURR_FANPWM,
+					       speed);
+	if (ret) {
+		dev_err(smu->adev->dev, "Failed to get fan speed(PWM)!");
+		return ret;
+	}
+
+	/* Convert the PMFW output which is in percent to pwm(255) based */
+	*speed = MIN(*speed * 255 / 100, 255);
+
+	return 0;
 }
 
 static int smu_v13_0_7_get_fan_speed_rpm(struct smu_context *smu,
Tested-by on the v1 series
#178 lore raw
In reply to Greg Kroah-Hartman
Quoted 9 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.0.18 release. There are 177 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 06 Jan 2023 16:04:29 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

Quoted 8 lines
	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.0.18-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.0.y
and the diffstat can be found below.

thanks,

greg k-h

On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on BMIPS_GENERIC:

Signature · 1 line
Florian
Tested-by on the v1 series
#179 lore raw
In reply to Greg Kroah-Hartman
Quoted 9 lines

This is the start of the stable review cycle for the 6.0.18 release. There are 177 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 06 Jan 2023 16:04:29 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

Quoted 9 lines
        https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.0.18-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.0.y
and the diffstat can be found below.

thanks,

greg k-h

Compiled and booted on my x86_64 and ARM64 test systems. No errors or regressions.

Thanks.

Tested-by on the v1 series
#180 lore raw
In reply to Greg Kroah-Hartman
Quoted 9 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.0.18 release. There are 177 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 06 Jan 2023 16:04:29 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

Quoted 9 lines
	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.0.18-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.0.y
and the diffstat can be found below.

thanks,

greg k-h

Compiled and booted on my test system. No dmesg regressions.

thanks,
-- Shuah

Tested-by on the v1 series
#181 lore raw
In reply to Greg Kroah-Hartman
Quoted 8 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.0.18 release. There are 177 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 06 Jan 2023 16:04:29 +0000. Anything received after that time might be too late.

Build results:

	total: 155 pass: 155 fail: 0
Qemu test results:
	total: 500 pass: 500 fail: 0

Guenter

maintainer Tested-by on the v1 series
#182 lore raw
In reply to Greg Kroah-Hartman
Quoted 9 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.0.18 release. There are 177 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 06 Jan 2023 16:04:29 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

Quoted 8 lines
	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.0.18-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.0.y
and the diffstat can be found below.

thanks,

greg k-h

All tests passing for Tegra ...

Test results for stable-v6.0:

    11 builds:	11 pass, 0 fail
    28 boots:	28 pass, 0 fail
    130 tests:	130 pass, 0 fail

Linux version: 6.0.18-rc1-g84ff81fcb901
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,

                tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
                tegra20-ventana, tegra210-p2371-2180,
                tegra210-p3450-0000, tegra30-cardhu-a04

Jon

Tested-by on the v1 series
#183 lore raw
In reply to Greg Kroah-Hartman
Quoted 5 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.0.18 release. There are 177 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Successfully cross-compiled for arm64 (bcm2711_defconfig, GCC 10.2.0) and powerpc (ps3_defconfig, GCC 12.2.0).

Signature · 1 line
An old man doll... just what I always wanted! - Clara
Tested-by Linux Kernel Functional Testing on the v1 series
#184 lore raw
In reply to Greg Kroah-Hartman
Quoted 10 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.0.18 release. There are 177 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 06 Jan 2023 16:04:29 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

Quoted 8 lines
        https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.0.18-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.0.y
and the diffstat can be found below.

thanks,

greg k-h

Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.

## Build
* kernel: 6.0.18-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-6.0.y
* git commit: 84ff81fcb901cffd40f9a2e3855625dfe6de40a0
* git describe: v6.0.17-178-g84ff81fcb901
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.0.y/build/v6.0.17-178-g84ff81fcb901

## Test Regressions (compared to v6.0.17)

## Metric Regressions (compared to v6.0.17)

## Test Fixes (compared to v6.0.17)

## Metric Fixes (compared to v6.0.17)

## Test result summary
total: 160249, pass: 133003, fail: 4216, skip: 22687, xfail: 343

## Build Summary
* arc: 5 total, 5 passed, 0 failed
* arm: 151 total, 148 passed, 3 failed
* arm64: 49 total, 49 passed, 0 failed
* i386: 39 total, 36 passed, 3 failed
* mips: 30 total, 28 passed, 2 failed
* parisc: 8 total, 8 passed, 0 failed
* powerpc: 38 total, 32 passed, 6 failed
* riscv: 16 total, 16 passed, 0 failed
* s390: 16 total, 16 passed, 0 failed
* sh: 14 total, 12 passed, 2 failed
* sparc: 8 total, 8 passed, 0 failed
* x86_64: 42 total, 41 passed, 1 failed

## Test suites summary
* boot
* fwts
* igt-gpu-tools
* kselftest-android
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-drivers-dma-buf
* kselftest-efivarfs
* kselftest-filesystems
* kselftest-filesystems-binderfs
* kselftest-firmware
* kselftest-fpu
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-ir
* kselftest-kcmp
* kselftest-kexec
* kselftest-kvm
* kselftest-lib
* kselftest-livepatch
* kselftest-membarrier
* kselftest-memfd
* kselftest-memory-hotplug
* kselftest-mincore
* kselftest-mount
* kselftest-mqueue
* kselftest-net
* kselftest-net-forwarding
* kselftest-net-mptcp
* kselftest-netfilter
* kselftest-nsfs
* kselftest-openat2
* kselftest-pid_namespace
* kselftest-pidfd
* kselftest-proc
* kselftest-pstore
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-splice
* kselftest-static_keys
* kselftest-sync
* kselftest-sysctl
* kselftest-tc-testing
* kselftest-timens
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user
* kselftest-vm
* kselftest-x86
* kselftest-zram
* kunit
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-test
* ltp-cap_bounds
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-filecaps
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-fsx
* ltp-hugetlb
* ltp-io
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-open-posix-tests
* ltp-pty
* ltp-sched
* ltp-securebits
* ltp-smoke
* ltp-syscalls
* ltp-tracing
* network-basic-tests
* packetdrill
* perf
* rcutorture
* v4l2-compliance
* vdso

--
Linaro LKFT
https://lkft.linaro.org

Tested-by Sudip Mukherjee on the v1 series
#185 lore raw
In reply to Greg Kroah-Hartman

Hi Greg,

Quoted 7 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.0.18 release. There are 177 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 06 Jan 2023 16:04:29 +0000. Anything received after that time might be too late.

Build test (gcc version 12.2.1 20221127):
mips: 52 configs -> no failure
arm: 100 configs -> no failure
arm64: 3 configs -> no failure
x86_64: 4 configs -> no failure alpha allmodconfig -> no failure csky allmodconfig -> no failure powerpc allmodconfig -> no failure riscv allmodconfig -> no failure s390 allmodconfig -> no failure xtensa allmodconfig -> no failure

Boot test:
x86_64: Booted on my test laptop. No regression.
x86_64: Booted on qemu. No regression. [1]
arm64: Booted on rpi4b (4GB model). No regression. [2]

[1]. https://openqa.qa.codethink.co.uk/tests/2559
[2]. https://openqa.qa.codethink.co.uk/tests/2571

Signature · 2 lines
Regards
Sudip
Tested-by on the v1 series
#186 lore raw
In reply to Greg Kroah-Hartman
Quoted 9 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.0.18 release. There are 177 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 06 Jan 2023 16:04:29 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

Quoted 8 lines
	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.0.18-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.0.y
and the diffstat can be found below.

thanks,

greg k-h

Tested rc1 against the Fedora build system (aarch64, armv7, ppc64le, s390x, x86_64), and boot tested x86_64. No regressions noted.

Tested-by on the v1 series
#187 lore raw
In reply to Greg Kroah-Hartman
Quoted 9 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.0.18 release. There are 177 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 06 Jan 2023 16:04:29 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

Quoted 8 lines
	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.0.18-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.0.y
and the diffstat can be found below.

thanks,

greg k-h

Built and booted successfully on RISC-V RV64 (HiFive Unmatched).

#188 lore raw
In reply to Greg Kroah-Hartman

Hi Greg,

Am 04.01.23 um 17:04 schrieb Greg Kroah-Hartman:

Quoted 7 lines

This is the start of the stable review cycle for the 6.0.18 release. There are 177 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 06 Jan 2023 16:04:29 +0000. Anything received after that time might be too late.

There is an easy-to-trigger kernel panic in cifs which was introduced in 6.0.16 and could be fixed by backporting the following commit:

9ee2afe5207b ("cifs: prevent copying past input buffer boundaries")

Please see https://bugzilla.kernel.org/show_bug.cgi?id=216895 for the details

Could this commit be added as well to 6.0.18?

Quoted 717 lines

The whole patch series can be found in one patch at:

	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.0.18-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.0.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <[email protected]>

     Linux 6.0.18-rc1

Evan Quan <[email protected]>
drm/amd/pm: correct the fan speed retrieving in PWM for some SMU13 asics

Evan Quan <[email protected]>

     drm/amd/pm: bump SMU13.0.0 driver_if header to version 0x34

Evan Quan <[email protected]>
drm/amd/pm: add missing SMU13.0.7 mm_dpm feature mapping

Evan Quan <[email protected]>
drm/amd/pm: add missing SMU13.0.0 mm_dpm feature mapping

Chris Wilson <[email protected]>
drm/i915/migrate: Account for the reserved_space

Matthew Auld <[email protected]>
drm/i915: improve the catch-all evict to handle lock contention

Alex Deucher <[email protected]>
drm/amdgpu: make display pinning more flexible (v2)

Alex Deucher <[email protected]>
drm/amdgpu: handle polaris10/11 overlap asics (v2)

Yifan Zhang <[email protected]>
drm/amd/display: Add DCN314 display SG Support

Matthew Auld <[email protected]>
drm/i915/ttm: consider CCS for backup objects

Ye Bin <[email protected]>
ext4: allocate extended attribute value in vmalloc area

Jan Kara <[email protected]>
ext4: avoid unaccounted block allocation when expanding inode

Jan Kara <[email protected]>
ext4: initialize quota before expanding inode in setproject ioctl

Ye Bin <[email protected]>
ext4: fix inode leak in ext4_xattr_inode_create() on an error path

Ye Bin <[email protected]>
ext4: fix kernel BUG in 'ext4_write_inline_data_end()'

Jan Kara <[email protected]>
ext4: fix deadlock due to mbcache entry corruption

Jan Kara <[email protected]>
ext4: avoid BUG_ON when creating xattrs

Baokun Li <[email protected]>
ext4: fix corrupt backup group descriptors after online resize

Darrick J. Wong <[email protected]>
ext4: dont return EINVAL from GETFSUUID when reporting UUID length

Baokun Li <[email protected]>
ext4: fix bad checksum after online resize

Luís Henriques <[email protected]>
ext4: fix error code return to user-space in ext4_get_branch()

Baokun Li <[email protected]>
ext4: fix corruption when online resizing a 1K bigalloc fs

Eric Whitney <[email protected]>
ext4: fix delayed allocation bug in ext4_clu_mapped for bigalloc + inline

Darrick J. Wong <[email protected]>
ext4: don't fail GETFSUUID when the caller provides a long buffer

Ye Bin <[email protected]>
ext4: init quota for 'old.inode' in 'ext4_rename'

Ye Bin <[email protected]>
ext4: fix uninititialized value in 'ext4_evict_inode'

Eric Biggers <[email protected]>
ext4: fix off-by-one errors in fast-commit block filling

Eric Biggers <[email protected]>
ext4: fix unaligned memory access in ext4_fc_reserve_space()

Eric Biggers <[email protected]>
ext4: add missing validation of fast-commit record lengths

Eric Biggers <[email protected]>
ext4: don't set up encryption key during jbd2 transaction

Eric Biggers <[email protected]>
ext4: fix leaking uninitialized memory in fast-commit journal

Eric Biggers <[email protected]>
ext4: disable fast-commit of encrypted dir operations

Eric Biggers <[email protected]>
ext4: don't allow journal inode to have encrypt flag

Baokun Li <[email protected]>
ext4: fix bug_on in __es_tree_search caused by bad boot loader inode

Zhang Yi <[email protected]>
ext4: check and assert if marking an no_delete evicting inode dirty

Lukas Czerner <[email protected]>
ext4: journal_path mount options should follow links

Ye Bin <[email protected]>
ext4: fix reserved cluster accounting in __es_remove_extent()

Baokun Li <[email protected]>
ext4: fix bug_on in __es_tree_search caused by bad quota inode

Baokun Li <[email protected]>
ext4: add helper to check quota inums

Baokun Li <[email protected]>
ext4: add EXT4_IGET_BAD flag to prevent unexpected bad inode

Gaosheng Cui <[email protected]>
ext4: fix undefined behavior in bit shift for ext4_check_flag_values

Baokun Li <[email protected]>
ext4: fix use-after-free in ext4_orphan_cleanup

Alexander Potapenko <[email protected]>
fs: ext4: initialize fsdata in pagecache_write()

Luís Henriques <[email protected]>
ext4: remove trailing newline from ext4_msg() message

Baokun Li <[email protected]>
ext4: add inode table check in __ext4_get_inode_loc to aovid possible infinite loop

Zhang Yi <[email protected]>
ext4: silence the warning when evicting inode with dioread_nolock

Ard Biesheuvel <[email protected]>
arm64: efi: Execute runtime services from a dedicated stack

Lucas Stach <[email protected]>
drm/etnaviv: reap idle mapping if it doesn't match the softpin address

Yuan Can <[email protected]>
drm/ingenic: Fix missing platform_driver_unregister() call in ingenic_drm_init()

Mikko Kovanen <[email protected]>
drm/i915/dsi: fix VBT send packet port selection for dual link DSI

Lucas Stach <[email protected]>
drm/etnaviv: move idle mapping reaping into separate function

Zack Rusin <[email protected]>
drm/vmwgfx: Validate the box size for the snooped cursor

Simon Ser <[email protected]>
drm/connector: send hotplug uevent on connector cleanup

Wang Weiyang <[email protected]>
device_cgroup: Roll back to original exceptions after copy failure

Helge Deller <[email protected]>
parisc: Drop PMD_SHIFT from calculation in pgtable.h

Helge Deller <[email protected]>
parisc: Add missing FORCE prerequisites in Makefile

Helge Deller <[email protected]>
parisc: Fix locking in pdc_iodc_print() firmware call

Shang XiaoJing <[email protected]>
parisc: led: Fix potential null-ptr-deref in start_task()

Peng Fan <[email protected]>
remoteproc: imx_rproc: Correct i.MX93 DRAM mapping

Maria Yu <[email protected]>
remoteproc: core: Do pm_relax when in RPROC_OFFLINE state

Shengjiu Wang <[email protected]>
remoteproc: imx_dsp_rproc: Add mutex protection for workqueue

Li Hua <[email protected]>
test_kprobes: Fix implicit declaration error of test_kprobes

Kim Phillips <[email protected]>
iommu/amd: Fix ill-formed ivrs_ioapic, ivrs_hpet and ivrs_acpihid options

Kim Phillips <[email protected]>
iommu/amd: Fix ivrs_acpihid cmdline parsing code

Johan Hovold <[email protected]>

     phy: qcom-qmp-combo: fix sc8180x reset

Qiang Yu <[email protected]>
bus: mhi: host: Fix race between channel preparation and M0 event

Isaac J. Manjarres <[email protected]>
driver core: Fix bus_type.match() error handling in __driver_attach()

Mario Limonciello <[email protected]>

     crypto: ccp - Add support for TEE for PCI ID 0x14CA

Corentin Labbe <[email protected]>
crypto: n2 - add missing hash statesize

Sergey Matyukevich <[email protected]>
riscv: mm: notify remote harts about mmu cache updates

Guo Ren <[email protected]>
riscv: stacktrace: Fixup ftrace_graph_ret_addr retp argument

Li Huafei <[email protected]>
RISC-V: kexec: Fix memory leak of elf header buffer

Guo Ren <[email protected]>
riscv: Fixup compile error with !MMU

Li Huafei <[email protected]>
RISC-V: kexec: Fix memory leak of fdt buffer

Sascha Hauer <[email protected]>
PCI/sysfs: Fix double free in error path

Michael S. Tsirkin <[email protected]>
PCI: Fix pci_device_is_present() for VFs by checking PF

Tianjia Zhang <[email protected]>
crypto: ccree,hisilicon - Fix dependencies to correct algorithm

Roberto Sassu <[email protected]>
ima: Fix memory leak in __ima_inode_hash()

Yaliang Wang <[email protected]>

     mtd: spi-nor: gigadevice: gd25q256: replace gd25q256_default_init with gd25q256_post_bfpt

Dan Carpenter <[email protected]>
ipmi: fix use after free in _ipmi_destroy_user()

Huaxin Lu <[email protected]>
ima: Fix a potential NULL pointer access in ima_restore_measurement_list

Alexander Sverdlin <[email protected]>
mtd: spi-nor: Check for zero erase size in spi_nor_find_best_erase_type()

Zhang Yuchen <[email protected]>
ipmi: fix long wait in unload when IPMI disconnect

Maximilian Luz <[email protected]>
ipu3-imgu: Fix NULL pointer dereference in imgu_subdev_set_selection()

Aidan MacDonald <[email protected]>
ASoC: jz4740-i2s: Handle independent FIFO flush bits

Michael Walle <[email protected]>
wifi: wilc1000: sdio: fix module autoloading

Aditya Garg <[email protected]>
efi: Add iMac Pro 2017 to uefi skip cert quirk

Florian-Ewald Mueller <[email protected]>
md/bitmap: Fix bitmap chunk size overflow issues

Damien Le Moal <[email protected]>
block: mq-deadline: Do not break sequential write streams to zoned HDDs

Damien Le Moal <[email protected]>
block: mq-deadline: Fix dd_finish_request() for zoned devices

Yang Wang <[email protected]>
drm/amdgpu: fix mmhub register base coding error

Ian Abbott <[email protected]>
rtc: ds1347: fix value written to century register

Biju Das <[email protected]>
ravb: Fix "failed to switch device to config mode" message during unbind

Paulo Alcantara <[email protected]>
cifs: set correct status of tcon ipc when reconnecting

Paulo Alcantara <[email protected]>
cifs: set correct ipc status after initial tree connect

Paulo Alcantara <[email protected]>
cifs: set correct tcon status after initial tree connect

Steve French <[email protected]>
cifs: fix missing display of three mount options

Paulo Alcantara <[email protected]>
cifs: fix confusing debug message

Takashi Iwai <[email protected]>
media: dvb-core: Fix UAF due to refcount races at releasing

Keita Suzuki <[email protected]>
media: dvb-core: Fix double free in dvb_register_device()

Nick Desaulniers <[email protected]>
ARM: 9256/1: NWFPE: avoid compiler-generated __aeabi_uldivmod

Macpaul Lin <[email protected]>
arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon

Luca Ceresoli <[email protected]>
staging: media: tegra-video: fix device_node use after free

Luca Ceresoli <[email protected]>

     staging: media: tegra-video: fix chan->mipi value on error

Yang Jihong <[email protected]>
tracing: Fix infinite loop in tracing_read_pipe on overflowed print_trace_line

Zheng Yejian <[email protected]>
tracing: Fix issue of missing one synthetic field

Steven Rostedt (Google) <[email protected]>
tracing/probes: Handle system names with hyphens

Zheng Yejian <[email protected]>
tracing/hist: Fix wrong return value in parse_action_params()

Masami Hiramatsu (Google) <[email protected]>
tracing: Fix complicated dependency of CONFIG_TRACER_MAX_TRACE

Michael Jeanson <[email protected]>
powerpc/ftrace: fix syscall tracing on PPC64_ELF_ABI_V1

Steven Rostedt (Google) <[email protected]>
tracing: Fix race where eprobes can be called before the event

Masami Hiramatsu (Google) <[email protected]>
x86/kprobes: Fix optprobe optimization check with CONFIG_RETHUNK

Masami Hiramatsu (Google) <[email protected]>
x86/kprobes: Fix kprobes instruction boudary check with CONFIG_RETHUNK

Steven Rostedt (Google) <[email protected]>
ftrace/x86: Add back ftrace_expected for ftrace bug reports

Ashok Raj <[email protected]>
x86/microcode/intel: Do not retry microcode reloading on the APs

Sean Christopherson <[email protected]>
KVM: nVMX: Properly expose ENABLE_USR_WAIT_PAUSE control to L1

Yuan ZhaoXiong <[email protected]>
KVM: x86: fix APICv/x2AVIC disabled when vm reboot by itself

Sean Christopherson <[email protected]>
KVM: nVMX: Inject #GP, not #UD, if "generic" VMXON CR0/CR4 check fails

Sean Christopherson <[email protected]>
KVM: VMX: Resume guest immediately when injecting #GP on ECREATE

Tianjia Zhang <[email protected]>
ima: Fix hash dependency to correct algorithm

Rob Herring <[email protected]>
of/kexec: Fix reading 32-bit "linux,initrd-{start,end}" values

Max Filippov <[email protected]>
xtensa: add __umulsidi3 helper

Namhyung Kim <[email protected]>
perf/core: Call LSM hook after copying perf_event_attr

Zheng Yejian <[email protected]>
tracing/hist: Fix out-of-bound write on 'action_data.var_ref_idx'

Li Ming <[email protected]>
PCI/DOE: Fix maximum data object length miscalculation

Mike Snitzer <[email protected]>
dm cache: set needs_check flag after aborting metadata

Luo Meng <[email protected]>
dm cache: Fix UAF in destroy()

Luo Meng <[email protected]>
dm clone: Fix UAF in clone_dtr()

Luo Meng <[email protected]>
dm integrity: Fix UAF in dm_integrity_dtr()

Luo Meng <[email protected]>
dm thin: Fix UAF in run_timer_softirq()

Luo Meng <[email protected]>
dm thin: resume even if in FAIL mode

Zhihao Cheng <[email protected]>

     dm thin: Use last transaction's pmd->root when commit failed

Zhihao Cheng <[email protected]>
dm thin: Fix ABBA deadlock between shrink_slab and dm_pool_abort_metadata

Mike Snitzer <[email protected]>
dm cache: Fix ABBA deadlock between shrink_slab and dm_cache_metadata_abort

Matthieu Baerts <[email protected]>
mptcp: use proper req destructor for IPv6

Matthieu Baerts <[email protected]>
mptcp: dedicated request sock for subflow in v6

Matthieu Baerts <[email protected]>
mptcp: remove MPTCP 'ifdef' in TCP SYN cookies

Wei Yongjun <[email protected]>
mptcp: netlink: fix some error return code

Alexander Aring <[email protected]>
fs: dlm: retry accept() until -EAGAIN or error returns

Alexander Aring <[email protected]>
fs: dlm: fix sock release if listen fails

Chris Chiu <[email protected]>
ALSA: hda/realtek: Apply dual codec fixup for Dell Latitude laptops

Philipp Jungkamp <[email protected]>
ALSA: patch_realtek: Fix Dell Inspiron Plus 16

Toke Høiland-Jørgensen <[email protected]>
bpf: Resolve fext program type when checking map compatibility

Smitha T Murthy <[email protected]>
media: s5p-mfc: Fix in register read and write for H264

Smitha T Murthy <[email protected]>
media: s5p-mfc: Clear workbit to handle error condition

Smitha T Murthy <[email protected]>
media: s5p-mfc: Fix to handle reference queue during finishing

Al Viro <[email protected]>
ext2: unbugger ext2_empty_dir()

Yongqiang Liu <[email protected]>
cpufreq: Init completion before kobject_init_and_add()

Kant Fan <[email protected]>
PM/devfreq: governor: Add a private governor_data for governor

Yazen Ghannam <[email protected]>
x86/MCE/AMD: Clear DFR errors found in THR handler

Mickaël Salaün <[email protected]>
selftests: Use optional USERCFLAGS and USERLDFLAGS

Yazen Ghannam <[email protected]>
EDAC/mc_sysfs: Increase legacy channel support to 12

Dan Williams <[email protected]>
cxl/region: Fix missing probe failure

Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sdm850-lenovo-yoga-c630: correct I2C12 pins drive strength

Andrew Cooper <[email protected]>
x86/fpu/xstate: Fix XSTATE_WARN_ON() to emit relevant diagnostics

Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sdm850-samsung-w737: correct I2C12 pins drive strength

Jason A. Donenfeld <[email protected]>
ARM: ux500: do not directly dereference __iomem

Boris Burkov <[email protected]>
btrfs: fix resolving backrefs for inline extent followed by prealloc

void0red <[email protected]>
btrfs: fix extent map use-after-free when handling missing device in read_one_chunk

Evan Quan <[email protected]>
drm/amd/pm: correct SMU13.0.0 pstate profiling clock settings

Evan Quan <[email protected]>
drm/amd/pm: update SMU13.0.0 reported maximum shader clock

Johan Hovold <[email protected]>
phy: qcom-qmp-combo: fix out-of-bounds clock access

Wenchao Chen <[email protected]>
mmc: sdhci-sprd: Disable CLK_AUTO when the clock is less than 400K

Johan Hovold <[email protected]>

     arm64: dts: qcom: sc8280xp: fix UFS reference clocks

Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sdm845-db845c: correct SPI2 pins drive strength

Alexander Antonov <[email protected]>
perf/x86/intel/uncore: Clear attr_update properly

Alexander Antonov <[email protected]>
perf/x86/intel/uncore: Disable I/O stacks to PMU mapping on ICX-D

Bixuan Cui <[email protected]>
jbd2: use the correct print format

Steven Rostedt <[email protected]>
ktest.pl minconfig: Unset configs instead of just removing them

Steven Rostedt <[email protected]>
kest.pl: Fix grub2 menu handling for rebooting

Manivannan Sadhasivam <[email protected]>
soc: qcom: Select REMAP_MMIO for ICC_BWMON driver

Manivannan Sadhasivam <[email protected]>
soc: qcom: Select REMAP_MMIO for LLCC driver

Masami Hiramatsu (Google) <[email protected]>
arm64: Prohibit instrumentation on arch_stack_walk()

Johan Hovold <[email protected]>

     arm64: dts: qcom: sc8280xp: fix UFS DMA coherency

Fan Ni <[email protected]>
cxl/region: Fix memdev reuse check

Jason A. Donenfeld <[email protected]>
media: stv0288: use explicitly signed char

Alex Deucher <[email protected]>
drm/amdgpu: skip MES for S0ix as well since it's part of GFX

-------------

Diffstat:

  Documentation/admin-guide/kernel-parameters.txt    |  27 ++-
  Documentation/filesystems/mount_api.rst            |   1 +
  Makefile                                           |   4 +-
  arch/arm/nwfpe/Makefile                            |   6 +
  arch/arm64/boot/dts/mediatek/mt8195-demo.dts       |   4 +-
  arch/arm64/boot/dts/qcom/sc8280xp.dtsi             |  10 +-
  arch/arm64/boot/dts/qcom/sdm845-db845c.dts         |   5 +-
  .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts      |   6 +-
  arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts   |   6 +-
  arch/arm64/include/asm/efi.h                       |   3 +
  arch/arm64/kernel/efi-rt-wrapper.S                 |  13 +-
  arch/arm64/kernel/efi.c                            |  27 +++
  arch/arm64/kernel/stacktrace.c                     |  10 +-
  arch/parisc/include/asm/pgtable.h                  |   4 +-
  arch/parisc/kernel/firmware.c                      |  24 ++-
  arch/parisc/kernel/vdso32/Makefile                 |   4 +-
  arch/parisc/kernel/vdso64/Makefile                 |   4 +-
  arch/powerpc/include/asm/ftrace.h                  |  12 --
  arch/riscv/Kconfig                                 |   2 +-
  arch/riscv/include/asm/kexec.h                     |   5 +
  arch/riscv/include/asm/mmu.h                       |   2 +
  arch/riscv/include/asm/pgtable.h                   |   2 +-
  arch/riscv/include/asm/tlbflush.h                  |  18 ++
  arch/riscv/kernel/elf_kexec.c                      |  14 ++
  arch/riscv/kernel/stacktrace.c                     |   2 +-
  arch/riscv/mm/context.c                            |  10 +
  arch/riscv/mm/tlbflush.c                           |  28 +--
  arch/x86/events/intel/uncore.h                     |   1 +
  arch/x86/events/intel/uncore_snbep.c               |  22 +-
  arch/x86/kernel/cpu/mce/amd.c                      |  33 +--
  arch/x86/kernel/cpu/microcode/intel.c              |   8 +-
  arch/x86/kernel/fpu/xstate.c                       |  12 +-
  arch/x86/kernel/ftrace.c                           |   2 +
  arch/x86/kernel/kprobes/core.c                     |  10 +-
  arch/x86/kernel/kprobes/opt.c                      |  28 +--
  arch/x86/kvm/lapic.c                               |   5 +-
  arch/x86/kvm/vmx/nested.c                          |  47 +++--
  arch/x86/kvm/vmx/sgx.c                             |   4 +-
  arch/xtensa/kernel/xtensa_ksyms.c                  |   2 +
  arch/xtensa/lib/Makefile                           |   2 +-
  arch/xtensa/lib/umulsidi3.S                        | 230 +++++++++++++++++++++
  block/mq-deadline.c                                |  83 +++++++-
  drivers/base/dd.c                                  |   6 +-
  drivers/bus/mhi/host/pm.c                          |   3 +-
  drivers/char/ipmi/ipmi_msghandler.c                |   4 +-
  drivers/char/ipmi/ipmi_si_intf.c                   |  27 ++-
  drivers/cpufreq/cpufreq.c                          |   2 +-
  drivers/crypto/Kconfig                             |   4 +-
  drivers/crypto/ccp/sp-pci.c                        |  11 +-
  drivers/crypto/hisilicon/Kconfig                   |   2 +-
  drivers/crypto/n2_core.c                           |   6 +
  drivers/cxl/core/region.c                          |   5 +-
  drivers/devfreq/devfreq.c                          |   6 +-
  drivers/devfreq/governor_userspace.c               |  12 +-
  drivers/edac/edac_mc_sysfs.c                       |  24 +++
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c         |   5 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c            |  13 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_object.c         |   3 +-
  drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c            |   2 +-
  drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c            |   2 +-
  drivers/gpu/drm/amd/amdgpu/mmhub_v3_0.c            |   2 +-
  drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_1.c          |   2 +-
  drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_2.c          |   2 +-
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  |   1 +
  .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h |   2 +-
  drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h       |   1 +
  drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c     |   2 +
  .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c   | 111 +++++++++-
  .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c   |  19 +-
  drivers/gpu/drm/drm_connector.c                    |   3 +
  drivers/gpu/drm/etnaviv/etnaviv_gem.c              |   7 +-
  drivers/gpu/drm/etnaviv/etnaviv_mmu.c              |  23 ++-
  drivers/gpu/drm/etnaviv/etnaviv_mmu.h              |   1 +
  drivers/gpu/drm/i915/display/intel_dsi_vbt.c       |   4 +-
  drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c     |  59 +++++-
  drivers/gpu/drm/i915/gem/i915_gem_mman.c           |   2 +-
  drivers/gpu/drm/i915/gem/i915_gem_object.c         |   3 +
  drivers/gpu/drm/i915/gem/i915_gem_object_types.h   |  10 +-
  drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c         |  18 +-
  drivers/gpu/drm/i915/gt/intel_migrate.c            |  16 +-
  drivers/gpu/drm/i915/i915_gem_evict.c              |  37 +++-
  drivers/gpu/drm/i915/i915_gem_evict.h              |   4 +-
  drivers/gpu/drm/i915/i915_vma.c                    |   2 +-
  drivers/gpu/drm/i915/selftests/i915_gem_evict.c    |   4 +-
  drivers/gpu/drm/ingenic/ingenic-drm-drv.c          |   6 +-
  drivers/gpu/drm/vmwgfx/vmwgfx_kms.c                |   3 +-
  drivers/iommu/amd/init.c                           |  86 +++++---
  drivers/md/dm-cache-metadata.c                     |  54 ++++-
  drivers/md/dm-cache-target.c                       |  11 +-
  drivers/md/dm-clone-target.c                       |   1 +
  drivers/md/dm-integrity.c                          |   2 +
  drivers/md/dm-thin-metadata.c                      |  60 +++++-
  drivers/md/dm-thin.c                               |  18 +-
  drivers/md/md-bitmap.c                             |  20 +-
  drivers/media/dvb-core/dmxdev.c                    |   8 +
  drivers/media/dvb-core/dvbdev.c                    |   1 +
  drivers/media/dvb-frontends/stv0288.c              |   5 +-
  .../media/platform/samsung/s5p-mfc/s5p_mfc_ctrl.c  |   4 +-
  .../media/platform/samsung/s5p-mfc/s5p_mfc_enc.c   |  12 +-
  .../platform/samsung/s5p-mfc/s5p_mfc_opr_v6.c      |  14 +-
  drivers/mmc/host/sdhci-sprd.c                      |  16 +-
  drivers/mtd/spi-nor/core.c                         |   2 +
  drivers/mtd/spi-nor/gigadevice.c                   |  24 ++-
  drivers/net/ethernet/renesas/ravb_main.c           |   2 +-
  drivers/net/wireless/microchip/wilc1000/sdio.c     |   1 +
  drivers/of/kexec.c                                 |  10 +-
  drivers/parisc/led.c                               |   3 +
  drivers/pci/doe.c                                  |  20 +-
  drivers/pci/pci-sysfs.c                            |  13 +-
  drivers/pci/pci.c                                  |   2 +
  drivers/phy/qualcomm/phy-qcom-qmp-combo.c          |   8 +-
  drivers/remoteproc/imx_dsp_rproc.c                 |  12 +-
  drivers/remoteproc/imx_rproc.c                     |   4 +-
  drivers/remoteproc/remoteproc_core.c               |   9 +-
  drivers/rtc/rtc-ds1347.c                           |   2 +-
  drivers/soc/qcom/Kconfig                           |   2 +
  drivers/soc/ux500/ux500-soc-id.c                   |  10 +-
  drivers/staging/media/ipu3/ipu3-v4l2.c             |  57 ++---
  drivers/staging/media/tegra-video/csi.c            |   4 +-
  drivers/staging/media/tegra-video/csi.h            |   2 +-
  fs/btrfs/backref.c                                 |   4 +
  fs/btrfs/volumes.c                                 |   3 +-
  fs/cifs/cifsfs.c                                   |   8 +-
  fs/cifs/connect.c                                  |  16 +-
  fs/dlm/lowcomms.c                                  |   9 +-
  fs/ext2/dir.c                                      |   2 +-
  fs/ext4/ext4.h                                     |   9 +-
  fs/ext4/extents.c                                  |   8 +
  fs/ext4/extents_status.c                           |   3 +-
  fs/ext4/fast_commit.c                              | 171 ++++++++-------
  fs/ext4/fast_commit.h                              |   3 +-
  fs/ext4/indirect.c                                 |   9 +-
  fs/ext4/inode.c                                    |  48 ++++-
  fs/ext4/ioctl.c                                    |  24 ++-
  fs/ext4/namei.c                                    |  47 +++--
  fs/ext4/orphan.c                                   |   2 +-
  fs/ext4/resize.c                                   |  32 +--
  fs/ext4/super.c                                    |  33 ++-
  fs/ext4/verity.c                                   |   2 +-
  fs/ext4/xattr.c                                    |  19 +-
  fs/fs_parser.c                                     |   3 +-
  fs/mbcache.c                                       |  14 +-
  fs/quota/dquot.c                                   |   2 +
  include/linux/bpf_verifier.h                       |   2 +-
  include/linux/devfreq.h                            |   7 +-
  include/linux/fs_parser.h                          |   1 +
  include/linux/mbcache.h                            |   9 +-
  include/net/mptcp.h                                |  12 +-
  include/trace/events/ext4.h                        |   7 +-
  include/trace/events/jbd2.h                        |  44 ++--
  kernel/bpf/core.c                                  |   5 +-
  kernel/events/core.c                               |   6 +-
  kernel/trace/Kconfig                               |   2 +
  kernel/trace/trace.c                               |  38 +++-
  kernel/trace/trace.h                               |  27 ++-
  kernel/trace/trace_eprobe.c                        |   3 +
  kernel/trace/trace_events_hist.c                   |  11 +-
  kernel/trace/trace_events_synth.c                  |   2 +-
  kernel/trace/trace_probe.c                         |   2 +-
  lib/Kconfig.debug                                  |   1 +
  net/ipv4/syncookies.c                              |   7 +-
  net/mptcp/pm_userspace.c                           |   4 +
  net/mptcp/subflow.c                                |  61 +++++-
  security/device_cgroup.c                           |  33 ++-
  security/integrity/ima/Kconfig                     |   2 +-
Quoted 9 lines
  security/integrity/ima/ima_main.c                  |   7 +-
  security/integrity/ima/ima_template.c              |   5 +-
  security/integrity/platform_certs/load_uefi.c      |   1 +
  sound/pci/hda/patch_realtek.c                      |  50 +++++
  sound/soc/jz4740/jz4740-i2s.c                      |  39 +++-
  tools/testing/ktest/ktest.pl                       |  23 ++-
  tools/testing/selftests/lib.mk                     |   5 +
  172 files changed, 1961 insertions(+), 648 deletions(-)

Best regards, Georg

author maintainer
#189 lore raw
Quoted 11 lines · Georg Müller

Hi Greg,

Am 04.01.23 um 17:04 schrieb Greg Kroah-Hartman:

Quoted 7 lines

This is the start of the stable review cycle for the 6.0.18 release. There are 177 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 06 Jan 2023 16:04:29 +0000. Anything received after that time might be too late.

Quoted 7 lines

There is an easy-to-trigger kernel panic in cifs which was introduced in 6.0.16 and could be fixed by backporting the following commit:

9ee2afe5207b ("cifs: prevent copying past input buffer boundaries")

Please see https://bugzilla.kernel.org/show_bug.cgi?id=216895 for the details

Could this commit be added as well to 6.0.18?

It is too late for this release, we can add it to the next one. Or you can move to 6.1.y which you should be doing anyway as 6.0.y is about to go end-of-life in a few days.

thanks,

greg k-h

author maintainer
#190 lore raw
Quoted 16 lines · Greg Kroah-Hartman
Quoted 15 lines · Georg Müller

Hi Greg,

Am 04.01.23 um 17:04 schrieb Greg Kroah-Hartman:

Quoted 7 lines

This is the start of the stable review cycle for the 6.0.18 release. There are 177 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 06 Jan 2023 16:04:29 +0000. Anything received after that time might be too late.

There is an easy-to-trigger kernel panic in cifs which was introduced in 6.0.16 and could be fixed by backporting the following commit:

9ee2afe5207b ("cifs: prevent copying past input buffer boundaries")

Quoted 7 lines
Quoted 3 lines

Please see https://bugzilla.kernel.org/show_bug.cgi?id=216895 for the details

Could this commit be added as well to 6.0.18?

It is too late for this release, we can add it to the next one. Or you can move to 6.1.y which you should be doing anyway as 6.0.y is about to go end-of-life in a few days.

Ah, it seems simple enough, I've queued it up now all the way back to 5.4.y, is that correct?

And any specific reason why this commit was NOT marked as a fix or for a stable release?

thanks,

greg k-h