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

  • 52 participants
  • 18277 discussions
[PATCH OLK-5.10] nvme-pci: clear the prp2 field when not used
by Yong Hu 03 Aug '23

03 Aug '23
From: Lei Rao <lei.rao(a)intel.com> stable inclusion from stable-v5.10.188 commit 74b139c63f0775cf79266e9d9546c62b73fb3385 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7PZZC CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit a56ea6147facce4ac1fc38675455f9733d96232b ] If the prp2 field is not filled in nvme_setup_prp_simple(), the prp2 field is garbage data. According to nvme spec, the prp2 is reserved if the data transfer does not cross a memory page boundary, so clear it to zero if it is not used. Signed-off-by: Lei Rao <lei.rao(a)intel.com> Signed-off-by: Christoph Hellwig <hch(a)lst.de> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Yong Hu <yong.hu(a)windriver.com> --- drivers/nvme/host/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index c30ab2cf2533..8965ea20f5ef 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -817,6 +817,8 @@ static blk_status_t nvme_setup_prp_simple(struct nvme_dev *dev, cmnd->dptr.prp1 = cpu_to_le64(iod->first_dma); if (bv->bv_len > first_prp_len) cmnd->dptr.prp2 = cpu_to_le64(iod->first_dma + first_prp_len); + else + cmnd->dptr.prp2 = 0; return BLK_STS_OK; } -- 2.33.0
2 1
0 0
[PATCH OLK-5.10] sched: Add feature 'UTIL_TASKGROUP' for dynamic affinity
by Hui Tang 03 Aug '23

03 Aug '23
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I526XC -------------------------------- If the feature enabled, util_avg of bottom-level tg is used, otherwise, util_avg of rq's cfs_rq is used. Signed-off-by: Hui Tang <tanghui20(a)huawei.com> --- kernel/sched/fair.c | 19 ++++++++++++++----- kernel/sched/features.h | 7 +++++++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 5c8b48150862..f6068f1c28bc 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7097,6 +7097,17 @@ static inline bool prefer_cpus_valid(struct task_struct *p) cpumask_subset(p->prefer_cpus, p->cpus_ptr); } +static inline unsigned long taskgroup_cpu_util(struct task_group *tg, + int cpu) +{ +#ifdef CONFIG_FAIR_GROUP_SCHED + if (tg->se[cpu] && sched_feat(DA_UTIL_TASKGROUP)) + return tg->se[cpu]->avg.util_avg; +#endif + + return cpu_util(cpu); +} + /* * set_task_select_cpus: select the cpu range for task * @p: the task whose available cpu range will to set @@ -7127,13 +7138,11 @@ static void set_task_select_cpus(struct task_struct *p, int *idlest_cpu, rcu_read_lock(); tg = task_group(p); for_each_cpu(cpu, p->prefer_cpus) { - if (unlikely(!tg->se[cpu])) - continue; - if (idlest_cpu && available_idle_cpu(cpu)) { *idlest_cpu = cpu; } else if (idlest_cpu) { - spare = (long)(capacity_of(cpu) - tg->se[cpu]->avg.util_avg); + spare = (long)(capacity_of(cpu) - + taskgroup_cpu_util(tg, cpu)); if (spare > min_util) { min_util = spare; *idlest_cpu = cpu; @@ -7148,7 +7157,7 @@ static void set_task_select_cpus(struct task_struct *p, int *idlest_cpu, return; } - util_avg_sum += tg->se[cpu]->avg.util_avg; + util_avg_sum += taskgroup_cpu_util(tg, cpu); tg_capacity += capacity_of(cpu); } rcu_read_unlock(); diff --git a/kernel/sched/features.h b/kernel/sched/features.h index fef48f5be2fa..76fade025c4b 100644 --- a/kernel/sched/features.h +++ b/kernel/sched/features.h @@ -106,3 +106,10 @@ SCHED_FEAT(UTIL_EST_FASTUP, true) SCHED_FEAT(ALT_PERIOD, true) SCHED_FEAT(BASE_SLICE, true) + +#ifdef CONFIG_QOS_SCHED_DYNAMIC_AFFINITY +/* + * Use util_avg of bottom-Level taskgroup + */ +SCHED_FEAT(DA_UTIL_TASKGROUP, true) +#endif -- 2.17.1
2 1
0 0
[PATCH openEuler-1.0-LTS 0/2] can: raw: fix receiver memory leak
by Ziyang Xuan 03 Aug '23

03 Aug '23
Backport can/raw receiver memory leak fix commits. Eric Dumazet (1): can: raw: fix lockdep issue in raw_release() Ziyang Xuan (1): can: raw: fix receiver memory leak net/can/raw.c | 68 ++++++++++++++++++++++----------------------------- 1 file changed, 29 insertions(+), 39 deletions(-) -- 2.25.1
2 3
0 0
[PATCH openEuler-1.0-LTS v2 0/2] Fix host zero page refcount overflow caused by kvm
by Lei Chen 03 Aug '23

03 Aug '23
v2: 1. using full commit id instead of abbrevation 2. fix wrong mainline tag Sean Christopherson (1): KVM: Don't set Accessed/Dirty bits for ZERO_PAGE Zhuang Yanying (1): KVM: fix overflow of zero page refcount with ksm running virt/kvm/kvm_main.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) -- 2.34.1
2 3
0 0
[PATCH] coresight: etm4x: Don't bother the user with nonessential log message
by Tian Tao 03 Aug '23

03 Aug '23
Each cpu will print the following log when initializing ETM "coresight etm1: CPU1: etm v4.5 initialized", if there are a lot of cpus, e.g. 128. there will be a screen full of this log. replace dev_info with dev_dbg prints only when needed. Signed-off-by: Tian Tao <tiantao6(a)hisilicon.com> --- drivers/hwtracing/coresight/coresight-etm4x-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c index 7e307022303a..7b51e8594fd5 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c @@ -2033,7 +2033,7 @@ static int etm4_add_coresight_dev(struct etm4_init_arg *init_arg) etmdrvdata[drvdata->cpu] = drvdata; - dev_info(&drvdata->csdev->dev, "CPU%d: %s v%d.%d initialized\n", + dev_dbg(&drvdata->csdev->dev, "CPU%d: %s v%d.%d initialized\n", drvdata->cpu, type_name, major, minor); if (boot_enable) { -- 2.33.0
1 0
0 0
[PATCH] coresight: etm4x: Don't bother the user with nonessential log message
by Tian Tao 02 Aug '23

02 Aug '23
Each cpu will print the following log when initializing ETM "coresight etm1: CPU1: etm v4.5 initialized", if there are a lot of cpus, e.g. 128. there will be a screen full of this log. replace dev_dbg with dev _printf prints only when needed. Signed-off-by: Tian Tao <tiantao6(a)hisilicon.com> --- drivers/hwtracing/coresight/coresight-etm4x-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c index 7e307022303a..7b51e8594fd5 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c @@ -2033,7 +2033,7 @@ static int etm4_add_coresight_dev(struct etm4_init_arg *init_arg) etmdrvdata[drvdata->cpu] = drvdata; - dev_info(&drvdata->csdev->dev, "CPU%d: %s v%d.%d initialized\n", + dev_dbg(&drvdata->csdev->dev, "CPU%d: %s v%d.%d initialized\n", drvdata->cpu, type_name, major, minor); if (boot_enable) { -- 2.33.0
1 0
0 0
[PATCH OLK-5.10 v2] arm64/mpam: avoid hot-plug mpam_cpu_online() twice in mpam_enable()
by Wang ShaoBo 02 Aug '23

02 Aug '23
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7PN0A CVE: NA ------------------------------------------------- BUG reported when setuping MPAM driver: [Thu Jul 27 12:15:54 2023] BUG: sleeping function called from invalid context at include/linux/percpu-rwsem.h:49 [Thu Jul 27 12:15:54 2023] in_atomic(): 0, irqs_disabled(): 128, non_block: 0, pid: 593, name: kworker/72:1 [Thu Jul 27 12:15:54 2023] CPU: 72 PID: 593 Comm: kworker/72:1 Not tainted 5.10.0-03467-g02e1abb0f821-dirty #1 [Thu Jul 27 12:15:54 2023] Hardware name: Huawei TaiShan 2280 V2/BC82AMDDA, BIOS 1.79 08/21/2021 [Thu Jul 27 12:15:54 2023] Loaded X.509 cert 'Build time autogenerated kernel key: 9ae2dc86231d0b23cd114b5ed4089cac17566b0f' [Thu Jul 27 12:15:54 2023] Workqueue: events mpam_enable [Thu Jul 27 12:15:54 2023] Load PGP public keys [Thu Jul 27 12:15:54 2023] Call trace: [Thu Jul 27 12:15:54 2023] dump_backtrace+0x0/0x30c [Thu Jul 27 12:15:54 2023] show_stack+0x20/0x30 [Thu Jul 27 12:15:54 2023] dump_stack+0x11c/0x174 [Thu Jul 27 12:15:54 2023] ___might_sleep+0x15c/0x1a0 [Thu Jul 27 12:15:54 2023] __might_sleep+0x7c/0x100 [Thu Jul 27 12:15:54 2023] cpus_read_lock+0x3c/0x110 [Thu Jul 27 12:15:54 2023] __cpuhp_setup_state+0x3c/0x80 [Thu Jul 27 12:15:54 2023] mpam_enable+0x148/0x3a4 [Thu Jul 27 12:15:54 2023] process_one_work+0x3cc/0x984 [Thu Jul 27 12:15:54 2023] worker_thread+0x2b0/0x71c [Thu Jul 27 12:15:54 2023] kthread+0x1e0/0x220 [Thu Jul 27 12:15:54 2023] ret_from_fork+0x10/0x18 [Thu Jul 27 12:15:54 2023] kmemleak: Kernel memory leak detector initialized (mem pool available: 11650) [Thu Jul 27 12:15:54 2023] kmemleak: Automatic memory scanning thread started [Thu Jul 27 12:15:54 2023] cryptd: max_cpu_qlen set to 1000 [Thu Jul 27 12:15:54 2023] Key type encrypted registered [Thu Jul 27 12:15:54 2023] AppArmor: AppArmor sha1 policy hashing enabled [Thu Jul 27 12:15:54 2023] integrity: Loading X.509 certificate: UEFI:db Patch: bc9e3f9895ef2 ("arm64/mpam: Fix mpam corrupt when cpu online") has reported the 'Bad PC' BUG, concurrently calling cpuhp_remove_state() and cpuhp_setup_state() in mpam_enable is dangerous as we share the same state-=>mpam_cpuhp_state, which may be changed after the interrupt returns, Patch bc9e3f9895ef2 disable irqs but it didn't completely solve this problem, and trigger this BUG report, we can use lockless atomic_fetch_inc() function to avoid hot-plug mpam_cpu_online() twice in mpam_enable() instead. Fixes: bc9e3f9895ef2 ("arm64/mpam: Fix mpam corrupt when cpu online") Signed-off-by: Wang ShaoBo <bobo.shaobowang(a)huawei.com> --- arch/arm64/kernel/mpam/mpam_device.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm64/kernel/mpam/mpam_device.c b/arch/arm64/kernel/mpam/mpam_device.c index adf4bc034a51f..9ff8947a2ddf7 100644 --- a/arch/arm64/kernel/mpam/mpam_device.c +++ b/arch/arm64/kernel/mpam/mpam_device.c @@ -540,6 +540,7 @@ static void mpam_disable_irqs(void) static void mpam_enable(struct work_struct *work) { int err; + static atomic_t once; unsigned long flags; struct mpam_device *dev; bool all_devices_probed = true; @@ -557,7 +558,7 @@ static void mpam_enable(struct work_struct *work) } mutex_unlock(&mpam_devices_lock); - if (!all_devices_probed) + if (!all_devices_probed || atomic_fetch_inc(&once)) return; mutex_lock(&mpam_devices_lock); @@ -596,11 +597,9 @@ static void mpam_enable(struct work_struct *work) pr_err("Failed to setup/init resctrl\n"); mutex_unlock(&mpam_devices_lock); - local_irq_disable(); mpam_cpuhp_state = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "mpam:online", mpam_cpu_online, mpam_cpu_offline); - local_irq_enable(); if (mpam_cpuhp_state <= 0) pr_err("Failed to re-register 'dyn' cpuhp callbacks"); mutex_unlock(&mpam_cpuhp_lock); -- 2.25.1
1 0
0 0
[PATCH OLK-5.10 0/4] fix three CVEs by backport mainline patchs
by ZhaoLong Wang 02 Aug '23

02 Aug '23
mainline patch f5c779b7ddbda("ksmbd: fix racy issue from session setup and logoff") It fixes three CVEs: CVE-2023-32250 CVE-2023-32252 CVE-2023-32257 In order to successfully apply the patch, we chose to incorporate the related pre-installed bugfix patch. Colin Ian King (1): ksmbd: Fix spelling mistake "excceed" -> "exceeded" Dawei Li (1): ksmbd: Implements sess->ksmbd_chann_list as xarray Namjae Jeon (2): ksmbd: limit pdu length size according to connection status ksmbd: fix racy issue from session setup and logoff fs/ksmbd/connection.c | 27 +++++++--- fs/ksmbd/connection.h | 39 ++++++++------ fs/ksmbd/mgmt/user_session.c | 62 +++++++++------------ fs/ksmbd/mgmt/user_session.h | 4 +- fs/ksmbd/server.c | 3 +- fs/ksmbd/smb2pdu.c | 101 +++++++++++++++++------------------ fs/ksmbd/smb2pdu.h | 5 +- fs/ksmbd/transport_tcp.c | 2 +- 8 files changed, 123 insertions(+), 120 deletions(-) -- 2.34.3
2 5
0 0
[OLK-5.10 0/4] fix three CVEs by backport mainline patchs
by ZhaoLong Wang 02 Aug '23

02 Aug '23
mainline patch f5c779b7ddbda("ksmbd: fix racy issue from session setup and logoff") It fixes three CVEs: CVE-2023-32250 CVE-2023-32252 CVE-2023-32257 In order to successfully apply the patch, we chose to incorporate the related pre-installed bugfix patch. Colin Ian King (1): ksmbd: Fix spelling mistake "excceed" -> "exceeded" Dawei Li (1): ksmbd: Implements sess->ksmbd_chann_list as xarray Namjae Jeon (2): ksmbd: limit pdu length size according to connection status ksmbd: fix racy issue from session setup and logoff fs/ksmbd/connection.c | 27 +++++++--- fs/ksmbd/connection.h | 39 ++++++++------ fs/ksmbd/mgmt/user_session.c | 62 +++++++++------------ fs/ksmbd/mgmt/user_session.h | 4 +- fs/ksmbd/server.c | 3 +- fs/ksmbd/smb2pdu.c | 101 +++++++++++++++++------------------ fs/ksmbd/smb2pdu.h | 5 +- fs/ksmbd/transport_tcp.c | 2 +- 8 files changed, 123 insertions(+), 120 deletions(-) -- 2.34.3
1 4
0 0
[PATCH openEuler-1.0-LTS 0/2] Fix host zero page refcount overflow caused by kvm
by Lei Chen 02 Aug '23

02 Aug '23
Sean Christopherson (1): KVM: Don't set Accessed/Dirty bits for ZERO_PAGE Zhuang Yanying (1): KVM: fix overflow of zero page refcount with ksm running virt/kvm/kvm_main.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) -- 2.34.1
2 3
0 0
  • ← Newer
  • 1
  • ...
  • 1488
  • 1489
  • 1490
  • 1491
  • 1492
  • 1493
  • 1494
  • ...
  • 1828
  • Older →

HyperKitty Powered by HyperKitty