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 -----
  • July
  • June
  • 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

  • 54 participants
  • 19162 discussions
[PATCH OLK-6.6] sched/fair: Avoid flase sharing in struct task_group
by Li Zetao 17 Jun '24

17 Jun '24
hulk inclusion category: performance bugzilla: https://gitee.com/openeuler/kernel/issues/IA63KX?from=project-issue -------------------------------- When running the context1 test case in the unixbench test suite, the tool reports the presence of flase sharing in task_group: Cache Line PA PC Function Count Percent 2099e66900 56345 24.2% 2099e66918 ffd584306f7690 calc_group_shares+0x10 2099e66940 ffd584306f7730 calc_group_shares+0xb0 2099e66910 ffd584306e94b0 set_task_cpu+0xc8 2099e66950 ffd584306e94f0 set_task_cpu+0x108 2099e66908 ffd584306e94d8 set_task_cpu+0xf0 After analysis, it was found that some members of the struct task_group share LLC cacheline, such as members se and load_avg. load_avg is modified frequently, resulting in frequent updates of the LLC cacheline, affecting the read efficiency of other members. Here provide the UnixBench test result as below: 1) Run the command of "perf stat -d -d -d -- ./Run -c `nproc` -i 10 context1" 10 times and take the average. Performance counter stats for './Run -c 128 -i 10 context1': Without Patch With Patch Diff TopDownL1 # retiring 0.08 0.18 125% # backend_bound 0.67 0.39 -41% L1-dcache-loads # 257.714 M/s 594.973 M/s 130% L1-dcache-load-misses # 0.86% 0.38% 55% System Benchmarks Partial Index INDEX INDEX System Benchmarks Index Score (Partial Only) 10141.8 28338.5 179% 2) Run the command of "./Run -c `nproc` -i 10" 10 times and take the average. Without Patch With Patch Diff Dhrystone 2 using register variables 477300.9 477476.9 0.03% Double-Precision Whetstone 102026.2 102025.3 -0.08% Execl Throughput 6457.9 6369.6 -1.37% File Copy 1024 bufsize 2000 maxblocks 1260.4 1274.7 1.13% File Copy 256 bufsize 500 maxblocks 827.9 811.5 -1.98% File Copy 4096 bufsize 8000 maxblocks 2669.8 2427.0 -9.09% Pipe Throughput 77295.8 68384.2 -11.5% Pipe-based Context Switching 6733.1 21636.8 221% Process Creation 5466.4 5495.0 0.05% Shell Scripts (1 concurrent) 25669.0 25649.9 -0.07% Shell Scripts (8 concurrent) 24760.7 24544.6 -0.87% System Call Overhead 1735.4 1747.2 0.68% ======== ======== System Benchmarks Index Score 10879.3 11755.8 8.06% Signed-off-by: Li Zetao <lizetao1(a)huawei.com> --- kernel/sched/sched.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 9de2bac6444f0..1d19f4a9fd1d7 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -419,6 +419,11 @@ struct task_group { int idle; #ifdef CONFIG_SMP +#ifdef CONFIG_ARCH_LLC_128_LINE_SIZE + /* load_avg is modified frequently, put it in a separate LLC cacheline. */ + CACHELINE_PADDING(_pad1_); + u8 padding[1]; +#endif /* * load_avg can be heavily contended at clock tick time, so put * it in its own cacheline separated from the fields above which -- 2.34.1
2 1
0 0
[PATCH openEuler-1.0-LTS] batman-adv: Avoid WARN_ON timing related checks
by h00567597 17 Jun '24

17 Jun '24
From: Sven Eckelmann <sven(a)narfation.org> mainline inclusion from mainline-v5.13-rc7 commit 9f460ae31c4435fd022c443a6029352217a16ac1 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9R4GZ CVE: CVE-2021-47252 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- The soft/batadv interface for a queued OGM can be changed during the time the OGM was queued for transmission and when the OGM is actually transmitted by the worker. But WARN_ON must be used to denote kernel bugs and not to print simple warnings. A warning can simply be printed using pr_warn. Reported-by: Tetsuo Handa <penguin-kernel(a)i-love.sakura.ne.jp> Reported-by: syzbot+c0b807de416427ff3dd1(a)syzkaller.appspotmail.com Fixes: ef0a937f7a14 ("batman-adv: consider outgoing interface in OGM sending") Signed-off-by: Sven Eckelmann <sven(a)narfation.org> Signed-off-by: Simon Wunderlich <sw(a)simonwunderlich.de> Signed-off-by: He Yujie <coka.heyujie(a)huawei.com> --- net/batman-adv/bat_iv_ogm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index f5941837c3ad..cf86438edb2e 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c @@ -594,8 +594,10 @@ static void batadv_iv_ogm_emit(struct batadv_forw_packet *forw_packet) if (WARN_ON(!forw_packet->if_outgoing)) return; - if (WARN_ON(forw_packet->if_outgoing->soft_iface != soft_iface)) + if (forw_packet->if_outgoing->soft_iface != soft_iface) { + pr_warn("%s: soft interface switch for queued OGM\n", __func__); return; + } if (forw_packet->if_incoming->if_status != BATADV_IF_ACTIVE) return; -- 2.34.1
2 1
0 0
[PATCH openEuler-1.0-LTS 0/2] IB/qib: Protect from buffer
by Zeng Heng 17 Jun '24

17 Jun '24
José Expósito (1): IB/qib: Fix memory leak in qib_user_sdma_queue_pkts() Mike Marciniszyn (1): IB/qib: Protect from buffer overflow in struct qib_user_sdma_pkt fields drivers/infiniband/hw/qib/qib_user_sdma.c | 32 ++++++++++++++++------- 1 file changed, 23 insertions(+), 9 deletions(-) -- 2.25.1
2 3
0 0
[PATCH OLK-5.10 0/8] Backport some optimizing patches for kunpeng920
by Zheng Zengkai 17 Jun '24

17 Jun '24
Backport some optimizing patches for kunpeng920 from upstream, including Five pre-patches from Mark to make some preparations before unmasking DAIF for arm64 syscall. One patch from Guo Hui for optimizing unixbench syscall. Two patches from Barry Song for optimizing test_idle_cores() and barrier handling in gic_ipi_send_mask(). Barry Song (2): sched/fair: Optimize test_idle_cores() for !SMT irqchip/gic-v3: Use dsb(ishst) to order writes with ICC_SGI1R_EL1 accesses Guo Hui (1): arm64: syscall: unmask DAIF for tracing status Mark Rutland (5): thread_info: Add helpers to snapshot thread flags x86: Snapshot thread flags entry: Snapshot thread flags sched: Snapshot thread flags arm64: Snapshot thread flags arch/arm64/kernel/ptrace.c | 4 ++-- arch/arm64/kernel/signal.c | 2 +- arch/arm64/kernel/syscall.c | 6 ++---- arch/x86/kernel/process.c | 8 ++++---- arch/x86/kernel/process.h | 4 ++-- arch/x86/mm/tlb.c | 2 +- drivers/irqchip/irq-gic-v3.c | 2 +- include/linux/entry-kvm.h | 2 +- include/linux/thread_info.h | 15 +++++++++++++++ kernel/entry/common.c | 4 ++-- kernel/entry/kvm.c | 4 ++-- kernel/sched/core.c | 2 +- kernel/sched/fair.c | 8 +++++--- 13 files changed, 39 insertions(+), 24 deletions(-) -- 2.20.1
2 9
0 0
[PATCH openEuler-1.0-LTS 0/2] IB/qib: Protect from buffer overflow
by Zeng Heng 17 Jun '24

17 Jun '24
José Expósito (1): IB/qib: Fix memory leak in qib_user_sdma_queue_pkts() Mike Marciniszyn (1): IB/qib: Protect from buffer overflow in struct qib_user_sdma_pkt fields drivers/infiniband/hw/qib/qib_user_sdma.c | 32 ++++++++++++++++------- 1 file changed, 23 insertions(+), 9 deletions(-) -- 2.25.1
2 3
0 0
[PATCH OLK-6.6] maple_tree: fix mas_empty_area_rev() null pointer dereference
by Zheng Yejian 17 Jun '24

17 Jun '24
From: "Liam R. Howlett" <Liam.Howlett(a)oracle.com> stable inclusion from stable-v6.6.31 commit 6c9c7c1e63b198a8b979ad963eb21410f10ccb00 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9TXID CVE: CVE-2024-36891 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- commit 955a923d2809803980ff574270f81510112be9cf upstream. Currently the code calls mas_start() followed by mas_data_end() if the maple state is MA_START, but mas_start() may return with the maple state node == NULL. This will lead to a null pointer dereference when checking information in the NULL node, which is done in mas_data_end(). Avoid setting the offset if there is no node by waiting until after the maple state is checked for an empty or single entry state. A user could trigger the events to cause a kernel oops by unmapping all vmas to produce an empty maple tree, then mapping a vma that would cause the scenario described above. Link: https://lkml.kernel.org/r/20240422203349.2418465-1-Liam.Howlett@oracle.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Liam R. Howlett <Liam.Howlett(a)oracle.com> Reported-by: Marius Fleischer <fleischermarius(a)gmail.com> Closes: https://lore.kernel.org/lkml/CAJg=8jyuSxDL6XvqEXY_66M20psRK2J53oBTP+fjV5xpW… Link: https://lore.kernel.org/lkml/CAJg=8jyuSxDL6XvqEXY_66M20psRK2J53oBTP+fjV5xpW… Tested-by: Marius Fleischer <fleischermarius(a)gmail.com> Tested-by: Sidhartha Kumar <sidhartha.kumar(a)oracle.com> Cc: <stable(a)vger.kernel.org> Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: Zheng Yejian <zhengyejian(a)huaweicloud.com> --- lib/maple_tree.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index da227397e4d8..1af83414877a 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -5108,18 +5108,18 @@ int mas_empty_area_rev(struct ma_state *mas, unsigned long min, if (size == 0 || max - min < size - 1) return -EINVAL; - if (mas_is_start(mas)) { + if (mas_is_start(mas)) mas_start(mas); - mas->offset = mas_data_end(mas); - } else if (mas->offset >= 2) { - mas->offset -= 2; - } else if (!mas_rewind_node(mas)) { + else if ((mas->offset < 2) && (!mas_rewind_node(mas))) return -EBUSY; - } - /* Empty set. */ - if (mas_is_none(mas) || mas_is_ptr(mas)) + if (unlikely(mas_is_none(mas) || mas_is_ptr(mas))) return mas_sparse_area(mas, min, max, size, false); + else if (mas->offset >= 2) + mas->offset -= 2; + else + mas->offset = mas_data_end(mas); + /* The start of the window can only be within these values. */ mas->index = min; -- 2.25.1
2 1
0 0
[PATCH openEuler-22.03-LTS-SP1] ksmbd: no response from compound read
by Cai Xinchen 17 Jun '24

17 Jun '24
From: Namjae Jeon <linkinjeon(a)kernel.org> mainline inclusion from mainline-v6.5-rc4 commit e202a1e8634b186da38cbbff85382ea2b9e297cf category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IA5YWA CVE: CVE-2023-39179 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- ksmbd doesn't support compound read. If client send read-read in compound to ksmbd, there can be memory leak from read buffer. Windows and linux clients doesn't send it to server yet. For now, No response from compound read. compound read will be supported soon. Reported-by: zdi-disclosures(a)trendmicro.com # ZDI-CAN-21587, ZDI-CAN-21588 Signed-off-by: Namjae Jeon <linkinjeon(a)kernel.org> Signed-off-by: Steve French <stfrench(a)microsoft.com> Conflicts: fs/smb/server/smb2pdu.c [smb2_read function is not move to fs/smb/server/smb2pdu.c.] Signed-off-by: Cai Xinchen <caixinchen1(a)huawei.com> --- fs/ksmbd/smb2pdu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c index 4df7108a886f..215ea7f83d09 100644 --- a/fs/ksmbd/smb2pdu.c +++ b/fs/ksmbd/smb2pdu.c @@ -6249,6 +6249,11 @@ int smb2_read(struct ksmbd_work *work) int err = 0; WORK_BUFFERS(work, req, rsp); + if (work->next_smb2_rcv_hdr_off) { + work->send_no_response = 1; + err = -EOPNOTSUPP; + goto out; + } if (test_share_config_flag(work->tcon->share_conf, KSMBD_SHARE_FLAG_PIPE)) { -- 2.34.1
2 1
0 0
[PATCH openEuler-1.0-LTS 0/2] IB/qib: Protect from buffer overflow
by Zeng Heng 17 Jun '24

17 Jun '24
José Expósito (1): IB/qib: Fix memory leak in qib_user_sdma_queue_pkts() Mike Marciniszyn (1): IB/qib: Protect from buffer overflow in struct qib_user_sdma_pkt fields drivers/infiniband/hw/qib/qib_user_sdma.c | 32 ++++++++++++++++------- 1 file changed, 23 insertions(+), 9 deletions(-) -- 2.25.1
2 3
0 0
[PATCH openEuler-22.03-LTS-sp1] ksmbd: no response from compound read
by Cai Xinchen 17 Jun '24

17 Jun '24
From: Namjae Jeon <linkinjeon(a)kernel.org> mainline inclusion from mainline-v6.5-rc4 commit e202a1e8634b186da38cbbff85382ea2b9e297cf category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IA5YWA CVE: CVE-2023-39179 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- ksmbd doesn't support compound read. If client send read-read in compound to ksmbd, there can be memory leak from read buffer. Windows and linux clients doesn't send it to server yet. For now, No response from compound read. compound read will be supported soon. Reported-by: zdi-disclosures(a)trendmicro.com # ZDI-CAN-21587, ZDI-CAN-21588 Signed-off-by: Namjae Jeon <linkinjeon(a)kernel.org> Signed-off-by: Steve French <stfrench(a)microsoft.com> Conflicts: fs/smb/server/smb2pdu.c [smb2_read function is not move to fs/smb/server/smb2pdu.c.] Signed-off-by: Cai Xinchen <caixinchen1(a)huawei.com> --- fs/ksmbd/smb2pdu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c index 4df7108a886f..215ea7f83d09 100644 --- a/fs/ksmbd/smb2pdu.c +++ b/fs/ksmbd/smb2pdu.c @@ -6249,6 +6249,11 @@ int smb2_read(struct ksmbd_work *work) int err = 0; WORK_BUFFERS(work, req, rsp); + if (work->next_smb2_rcv_hdr_off) { + work->send_no_response = 1; + err = -EOPNOTSUPP; + goto out; + } if (test_share_config_flag(work->tcon->share_conf, KSMBD_SHARE_FLAG_PIPE)) { -- 2.34.1
2 1
0 0
[PATCH OLK-5.10] ksmbd: no response from compound read
by Cai Xinchen 17 Jun '24

17 Jun '24
From: Namjae Jeon <linkinjeon(a)kernel.org> mainline inclusion from mainline-v6.5-rc4 commit e202a1e8634b186da38cbbff85382ea2b9e297cf category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IA5YWA CVE: CVE-2023-39179 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- ksmbd doesn't support compound read. If client send read-read in compound to ksmbd, there can be memory leak from read buffer. Windows and linux clients doesn't send it to server yet. For now, No response from compound read. compound read will be supported soon. Reported-by: zdi-disclosures(a)trendmicro.com # ZDI-CAN-21587, ZDI-CAN-21588 Signed-off-by: Namjae Jeon <linkinjeon(a)kernel.org> Signed-off-by: Steve French <stfrench(a)microsoft.com> Conflicts: fs/smb/server/smb2pdu.c [smb2_read function is not move to fs/smb/server/smb2pdu.c.] Signed-off-by: Cai Xinchen <caixinchen1(a)huawei.com> --- fs/ksmbd/smb2pdu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c index 4df7108a886f..215ea7f83d09 100644 --- a/fs/ksmbd/smb2pdu.c +++ b/fs/ksmbd/smb2pdu.c @@ -6249,6 +6249,11 @@ int smb2_read(struct ksmbd_work *work) int err = 0; WORK_BUFFERS(work, req, rsp); + if (work->next_smb2_rcv_hdr_off) { + work->send_no_response = 1; + err = -EOPNOTSUPP; + goto out; + } if (test_share_config_flag(work->tcon->share_conf, KSMBD_SHARE_FLAG_PIPE)) { -- 2.34.1
2 1
0 0
  • ← Newer
  • 1
  • ...
  • 926
  • 927
  • 928
  • 929
  • 930
  • 931
  • 932
  • ...
  • 1917
  • Older →

HyperKitty Powered by HyperKitty