mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Kernel

Threads by month
  • ----- 2025 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
kernel@openeuler.org

  • 43 participants
  • 18188 discussions
[PATCH v3 OLK-5.10] arm64: mm: Stop use spinlock during pbha early init
by Wupeng Ma 29 Nov '24

29 Nov '24
From: Ma Wupeng <mawupeng1(a)huawei.com> hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I96IZH -------------------------------- During early_pbha_init() in __primary_switched(), debug spinlock related function is not fully initialized. This will lead to kernel unable to boot with CONFIG_LOCK_STAT=y or related configs. Since kernel is running with only one cpu during startup, there is no need to use lock. Fix it by removing the spinlock. Fixes: f43933b3f947 ("arm64: cpufeature: Enable PBHA for stage1 early via FDT") Signed-off-by: Ma Wupeng <mawupeng1(a)huawei.com> --- Changelog since v1: - goto found if exists in chosen node --- arch/arm64/kernel/cpufeature.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 36a426b0def2..dee049d27c74 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -1796,16 +1796,14 @@ void __init early_pbha_init(void) const u8 *prop; int size; - spin_lock(&pbha_dt_lock); - fdt = get_early_fdt_ptr(); if (!fdt) - goto unlock; + return; /* arm,pbha-performance-only may exist in both chosen and cpus node */ node = fdt_path_offset(fdt, "/chosen"); if (node < 0) - goto unlock; + return; prop = fdt_getprop(fdt, node, "arm,pbha-performance-only", &size); if (prop) @@ -1813,15 +1811,15 @@ void __init early_pbha_init(void) node = fdt_path_offset(fdt, "/cpus"); if (node < 0) - goto unlock; + return; prop = fdt_getprop(fdt, node, "arm,pbha-performance-only", &size); if (prop) - goto unlock; + return; found: if (!cpu_has_pbha()) - goto unlock; + return; update_pbha_perf_only_bit(prop, size); enable_pbha_inner(); @@ -1829,9 +1827,6 @@ void __init early_pbha_init(void) pbha_enabled = true; early_pbha_bit0_init(); - -unlock: - spin_unlock(&pbha_dt_lock); } /* -- 2.25.1
2 1
0 0
[PATCH OLK-6.6 0/4] LoongArch: backport patches from upstream
by Hongchen Zhang 29 Nov '24

29 Nov '24
Bibo Mao (1): LoongArch: Set initial pte entry with PAGE_GLOBAL for kernel space Huacai Chen (3): LoongArch: Use accessors to page table entries instead of direct dereference LoongArch: Remove superfluous flush_dcache_page() definition LoongArch: Improve hardware page table walker arch/loongarch/include/asm/atomic.h | 2 + arch/loongarch/include/asm/cacheflush.h | 3 - arch/loongarch/include/asm/hugetlb.h | 4 +- arch/loongarch/include/asm/kfence.h | 6 +- arch/loongarch/include/asm/mmu_context.h | 35 +++++++--- arch/loongarch/include/asm/pgalloc.h | 11 ++++ arch/loongarch/include/asm/pgtable.h | 83 ++++++++++-------------- arch/loongarch/kvm/mmu.c | 8 +-- arch/loongarch/mm/fault.c | 41 ++++++++++++ arch/loongarch/mm/hugetlbpage.c | 6 +- arch/loongarch/mm/init.c | 12 ++-- arch/loongarch/mm/kasan_init.c | 10 +-- arch/loongarch/mm/pgtable.c | 22 ++++++- include/linux/mm.h | 3 +- mm/kasan/init.c | 8 ++- mm/sparse-vmemmap.c | 5 ++ 16 files changed, 173 insertions(+), 86 deletions(-) -- 2.33.0
2 5
0 0
[PATCH v2 OLK-5.10] arm64: mm: Stop use spinlock during pbha early init
by Wupeng Ma 29 Nov '24

29 Nov '24
From: Ma Wupeng <mawupeng1(a)huawei.com> hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I96IZH -------------------------------- During early_pbha_init() in __primary_switched(), debug spinlock related function is not fully initialized. This will lead to kernel unable to boot with CONFIG_LOCK_STAT=y or related configs. Since kernel is running with only one cpu during startup, there is no need to use lock. Fix it by removing the spinlock. Fixes: f43933b3f947 ("arm64: cpufeature: Enable PBHA for stage1 early via FDT") Signed-off-by: Ma Wupeng <mawupeng1(a)huawei.com> --- arch/arm64/kernel/cpufeature.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 36a426b0def2..5ed44ff91e92 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -1796,32 +1796,29 @@ void __init early_pbha_init(void) const u8 *prop; int size; - spin_lock(&pbha_dt_lock); - fdt = get_early_fdt_ptr(); if (!fdt) - goto unlock; + return; /* arm,pbha-performance-only may exist in both chosen and cpus node */ node = fdt_path_offset(fdt, "/chosen"); if (node < 0) - goto unlock; + return; prop = fdt_getprop(fdt, node, "arm,pbha-performance-only", &size); if (prop) - goto found; + return; node = fdt_path_offset(fdt, "/cpus"); if (node < 0) - goto unlock; + return; prop = fdt_getprop(fdt, node, "arm,pbha-performance-only", &size); if (prop) - goto unlock; + return; -found: if (!cpu_has_pbha()) - goto unlock; + return; update_pbha_perf_only_bit(prop, size); enable_pbha_inner(); @@ -1829,9 +1826,6 @@ void __init early_pbha_init(void) pbha_enabled = true; early_pbha_bit0_init(); - -unlock: - spin_unlock(&pbha_dt_lock); } /* -- 2.25.1
2 1
0 0
[PATCH OLK-6.6] [Backport] ext4: avoid remount errors with 'abort' mount option
by Yongjian Sun 29 Nov '24

29 Nov '24
From: Jan Kara <jack(a)suse.cz> mainline inclusion from mainline-v6.12-rc3 commit 76486b104168ae59703190566e372badf433314b category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IB2YWS CVE: CVE-2024-50191 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- When we remount filesystem with 'abort' mount option while changing other mount options as well (as is LTP test doing), we can return error from the system call after commit d3476f3dad4a ("ext4: don't set SB_RDONLY after filesystem errors") because the application of mount option changes detects shutdown filesystem and refuses to do anything. The behavior of application of other mount options in presence of 'abort' mount option is currently rather arbitary as some mount option changes are handled before 'abort' and some after it. Move aborting of the filesystem to the end of remount handling so all requested changes are properly applied before the filesystem is shutdown to have a reasonably consistent behavior. Fixes: d3476f3dad4a ("ext4: don't set SB_RDONLY after filesystem errors") Reported-by: Jan Stancek <jstancek(a)redhat.com> Link: https://lore.kernel.org/all/Zvp6L+oFnfASaoHl@t14s Signed-off-by: Jan Kara <jack(a)suse.cz> Tested-by: Jan Stancek <jstancek(a)redhat.com> Link: https://patch.msgid.link/20241004221556.19222-1-jack@suse.cz Signed-off-by: Theodore Ts'o <tytso(a)mit.edu> Signed-off-by: Yongjian Sun <sunyongjian1(a)huawei.com> --- fs/ext4/super.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 367fa50be4d6..5c52881160e5 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -6662,9 +6662,6 @@ static int __ext4_remount(struct fs_context *fc, struct super_block *sb) goto restore_opts; } - if (test_opt2(sb, ABORT)) - ext4_abort(sb, ESHUTDOWN, "Abort forced by user"); - sb->s_flags = (sb->s_flags & ~SB_POSIXACL) | (test_opt(sb, POSIX_ACL) ? SB_POSIXACL : 0); @@ -6833,6 +6830,14 @@ static int __ext4_remount(struct fs_context *fc, struct super_block *sb) if (!ext4_has_feature_mmp(sb) || sb_rdonly(sb)) ext4_stop_mmpd(sbi); + /* + * Handle aborting the filesystem as the last thing during remount to + * avoid obsure errors during remount when some option changes fail to + * apply due to shutdown filesystem. + */ + if (test_opt2(sb, ABORT)) + ext4_abort(sb, ESHUTDOWN, "Abort forced by user"); + return 0; restore_opts: -- 2.39.2
2 1
0 0
[PATCH openEuler-1.0-LTS] [Backport] fs: Fix uninitialized value issue in from_kuid and from_kgid
by Yongjian Sun 29 Nov '24

29 Nov '24
From: Alessandro Zanni <alessandro.zanni87(a)gmail.com> mainline inclusion from mainline-v6.12-rc3 commit 15f34347481648a567db67fb473c23befb796af5 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IB705C CVE: CVE-2024-53101 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- ocfs2_setattr() uses attr->ia_mode, attr->ia_uid and attr->ia_gid in a trace point even though ATTR_MODE, ATTR_UID and ATTR_GID aren't set. Initialize all fields of newattrs to avoid uninitialized variables, by checking if ATTR_MODE, ATTR_UID, ATTR_GID are initialized, otherwise 0. Reported-by: syzbot+6c55f725d1bdc8c52058(a)syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=6c55f725d1bdc8c52058 Signed-off-by: Alessandro Zanni <alessandro.zanni87(a)gmail.com> Link: https://lore.kernel.org/r/20241017120553.55331-1-alessandro.zanni87@gmail.c… Reviewed-by: Jan Kara <jack(a)suse.cz> Signed-off-by: Christian Brauner <brauner(a)kernel.org> Signed-off-by: Yongjian Sun <sunyongjian1(a)huawei.com> --- fs/ocfs2/file.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 8c0e300f0463..da209f81c9ee 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -1139,9 +1139,12 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr) trace_ocfs2_setattr(inode, dentry, (unsigned long long)OCFS2_I(inode)->ip_blkno, dentry->d_name.len, dentry->d_name.name, - attr->ia_valid, attr->ia_mode, - from_kuid(&init_user_ns, attr->ia_uid), - from_kgid(&init_user_ns, attr->ia_gid)); + attr->ia_valid, + attr->ia_valid & ATTR_MODE ? attr->ia_mode : 0, + attr->ia_valid & ATTR_UID ? + from_kuid(&init_user_ns, attr->ia_uid) : 0, + attr->ia_valid & ATTR_GID ? + from_kgid(&init_user_ns, attr->ia_gid) : 0); /* ensuring we don't even attempt to truncate a symlink */ if (S_ISLNK(inode->i_mode)) -- 2.39.2
2 1
0 0
[PATCH openEuler-22.03-LTS-SP1] [Backport] fs: Fix uninitialized value issue in from_kuid and from_kgid
by Yongjian Sun 29 Nov '24

29 Nov '24
From: Alessandro Zanni <alessandro.zanni87(a)gmail.com> mainline inclusion from mainline-v6.12-rc3 commit 15f34347481648a567db67fb473c23befb796af5 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IB705C CVE: CVE-2024-53101 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- ocfs2_setattr() uses attr->ia_mode, attr->ia_uid and attr->ia_gid in a trace point even though ATTR_MODE, ATTR_UID and ATTR_GID aren't set. Initialize all fields of newattrs to avoid uninitialized variables, by checking if ATTR_MODE, ATTR_UID, ATTR_GID are initialized, otherwise 0. Reported-by: syzbot+6c55f725d1bdc8c52058(a)syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=6c55f725d1bdc8c52058 Signed-off-by: Alessandro Zanni <alessandro.zanni87(a)gmail.com> Link: https://lore.kernel.org/r/20241017120553.55331-1-alessandro.zanni87@gmail.c… Reviewed-by: Jan Kara <jack(a)suse.cz> Signed-off-by: Christian Brauner <brauner(a)kernel.org> Signed-off-by: Yongjian Sun <sunyongjian1(a)huawei.com> --- fs/ocfs2/file.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index ffa258da6bac..a12f35d15032 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -1133,9 +1133,12 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr) trace_ocfs2_setattr(inode, dentry, (unsigned long long)OCFS2_I(inode)->ip_blkno, dentry->d_name.len, dentry->d_name.name, - attr->ia_valid, attr->ia_mode, - from_kuid(&init_user_ns, attr->ia_uid), - from_kgid(&init_user_ns, attr->ia_gid)); + attr->ia_valid, + attr->ia_valid & ATTR_MODE ? attr->ia_mode : 0, + attr->ia_valid & ATTR_UID ? + from_kuid(&init_user_ns, attr->ia_uid) : 0, + attr->ia_valid & ATTR_GID ? + from_kgid(&init_user_ns, attr->ia_gid) : 0); /* ensuring we don't even attempt to truncate a symlink */ if (S_ISLNK(inode->i_mode)) -- 2.39.2
2 1
0 0
[PATCH openEuler-22.03-LTS-SP1] [Backport] fs: Fix uninitialized value issue in from_kuid and from_kgid
by Yongjian Sun 29 Nov '24

29 Nov '24
From: Alessandro Zanni <alessandro.zanni87(a)gmail.com> mainline inclusion from mainline-v6.12-rc3 commit 15f34347481648a567db67fb473c23befb796af5 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IB705C CVE: CVE-2024-53101 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- ocfs2_setattr() uses attr->ia_mode, attr->ia_uid and attr->ia_gid in a trace point even though ATTR_MODE, ATTR_UID and ATTR_GID aren't set. Initialize all fields of newattrs to avoid uninitialized variables, by checking if ATTR_MODE, ATTR_UID, ATTR_GID are initialized, otherwise 0. Reported-by: syzbot+6c55f725d1bdc8c52058(a)syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=6c55f725d1bdc8c52058 Signed-off-by: Alessandro Zanni <alessandro.zanni87(a)gmail.com> Link: https://lore.kernel.org/r/20241017120553.55331-1-alessandro.zanni87@gmail.c… Reviewed-by: Jan Kara <jack(a)suse.cz> Signed-off-by: Christian Brauner <brauner(a)kernel.org> Signed-off-by: Yongjian Sun <sunyongjian1(a)huawei.com> --- fs/ocfs2/file.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index ffa258da6bac..a12f35d15032 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -1133,9 +1133,12 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr) trace_ocfs2_setattr(inode, dentry, (unsigned long long)OCFS2_I(inode)->ip_blkno, dentry->d_name.len, dentry->d_name.name, - attr->ia_valid, attr->ia_mode, - from_kuid(&init_user_ns, attr->ia_uid), - from_kgid(&init_user_ns, attr->ia_gid)); + attr->ia_valid, + attr->ia_valid & ATTR_MODE ? attr->ia_mode : 0, + attr->ia_valid & ATTR_UID ? + from_kuid(&init_user_ns, attr->ia_uid) : 0, + attr->ia_valid & ATTR_GID ? + from_kgid(&init_user_ns, attr->ia_gid) : 0); /* ensuring we don't even attempt to truncate a symlink */ if (S_ISLNK(inode->i_mode)) -- 2.39.2
2 1
0 0
[PATCH OLK-5.10] [Backport] fs: Fix uninitialized value issue in from_kuid and from_kgid
by Yongjian Sun 29 Nov '24

29 Nov '24
From: Alessandro Zanni <alessandro.zanni87(a)gmail.com> mainline inclusion from mainline-v6.12-rc3 commit 15f34347481648a567db67fb473c23befb796af5 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IB705C CVE: CVE-2024-53101 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- ocfs2_setattr() uses attr->ia_mode, attr->ia_uid and attr->ia_gid in a trace point even though ATTR_MODE, ATTR_UID and ATTR_GID aren't set. Initialize all fields of newattrs to avoid uninitialized variables, by checking if ATTR_MODE, ATTR_UID, ATTR_GID are initialized, otherwise 0. Reported-by: syzbot+6c55f725d1bdc8c52058(a)syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=6c55f725d1bdc8c52058 Signed-off-by: Alessandro Zanni <alessandro.zanni87(a)gmail.com> Link: https://lore.kernel.org/r/20241017120553.55331-1-alessandro.zanni87@gmail.c… Reviewed-by: Jan Kara <jack(a)suse.cz> Signed-off-by: Christian Brauner <brauner(a)kernel.org> Signed-off-by: Yongjian Sun <sunyongjian1(a)huawei.com> --- fs/ocfs2/file.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index ec0e67e9a3ec..43ce41404e72 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -1133,9 +1133,12 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr) trace_ocfs2_setattr(inode, dentry, (unsigned long long)OCFS2_I(inode)->ip_blkno, dentry->d_name.len, dentry->d_name.name, - attr->ia_valid, attr->ia_mode, - from_kuid(&init_user_ns, attr->ia_uid), - from_kgid(&init_user_ns, attr->ia_gid)); + attr->ia_valid, + attr->ia_valid & ATTR_MODE ? attr->ia_mode : 0, + attr->ia_valid & ATTR_UID ? + from_kuid(&init_user_ns, attr->ia_uid) : 0, + attr->ia_valid & ATTR_GID ? + from_kgid(&init_user_ns, attr->ia_gid) : 0); /* ensuring we don't even attempt to truncate a symlink */ if (S_ISLNK(inode->i_mode)) -- 2.39.2
2 1
0 0
[PATCH OLK-6.6] drm/amd/display: Add missing NULL pointer check within dpcd_extend_address_range
by Zhang Zekun 29 Nov '24

29 Nov '24
From: Hersen Wu <hersenxs.wu(a)amd.com> mainline inclusion from mainline-v6.11-rc1 commit 5524fa301ba649f8cf00848f91468e0ba7e4f24c category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAU9OL CVE: CVE-2024-46808 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------------------------------------- [Why & How] ASSERT if return NULL from kcalloc. Reviewed-by: Alex Hung <alex.hung(a)amd.com> Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira(a)amd.com> Acked-by: Tom Chung <chiahsuan.chung(a)amd.com> Signed-off-by: Hersen Wu <hersenxs.wu(a)amd.com> Tested-by: Daniel Wheeler <daniel.wheeler(a)amd.com> Signed-off-by: Alex Deucher <alexander.deucher(a)amd.com> Signed-off-by: Zhang Zekun <zhangzekun11(a)huawei.com> --- drivers/gpu/drm/amd/display/dc/link/protocols/link_dpcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dpcd.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dpcd.c index fc50931c2aec..9d67b9a9c2d9 100644 --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dpcd.c +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dpcd.c @@ -165,6 +165,7 @@ static void dpcd_extend_address_range( *out_address = new_addr_range.start; *out_size = ADDRESS_RANGE_SIZE(new_addr_range.start, new_addr_range.end); *out_data = kzalloc(*out_size * sizeof(**out_data), GFP_KERNEL); + ASSERT(*out_data); } } -- 2.17.1
2 1
0 0
[PATCH OLK-6.6 0/2] ext4: fix potential memory exposure issues during truncate in iomap
by Yongjian Sun 29 Nov '24

29 Nov '24
*** BLURB HERE *** Yongjian Sun (2): ext4: do not always order data when partial zeroing out a block ext4: fix potential memory exposure issues during truncate in iomap mode. fs/ext4/inode.c | 75 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 59 insertions(+), 16 deletions(-) -- 2.39.2
2 3
0 0
  • ← Newer
  • 1
  • ...
  • 308
  • 309
  • 310
  • 311
  • 312
  • 313
  • 314
  • ...
  • 1819
  • Older →

HyperKitty Powered by HyperKitty