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 -----
  • September
  • August
  • 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

  • 24 participants
  • 20256 discussions
[PATCH openEuler-1.0-LTS] nilfs2: fix potential use after free in nilfs_gccache_submit_read_data()
by ZhaoLong Wang 06 Mar '24

06 Mar '24
From: Pan Bian <bianpan2016(a)163.com> stable inclusion from stable-v4.19.296 commit bb61224f6abc8e71bfdf06d7c984e23460875f5b category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I95AT5 CVE: CVE-2023-52566 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- commit 7ee29facd8a9c5a26079148e36bcf07141b3a6bc upstream. In nilfs_gccache_submit_read_data(), brelse(bh) is called to drop the reference count of bh when the call to nilfs_dat_translate() fails. If the reference count hits 0 and its owner page gets unlocked, bh may be freed. However, bh->b_page is dereferenced to put the page after that, which may result in a use-after-free bug. This patch moves the release operation after unlocking and putting the page. NOTE: The function in question is only called in GC, and in combination with current userland tools, address translation using DAT does not occur in that function, so the code path that causes this issue will not be executed. However, it is possible to run that code path by intentionally modifying the userland GC library or by calling the GC ioctl directly. [konishi.ryusuke(a)gmail.com: NOTE added to the commit log] Link: https://lkml.kernel.org/r/1543201709-53191-1-git-send-email-bianpan2016@163… Link: https://lkml.kernel.org/r/20230921141731.10073-1-konishi.ryusuke@gmail.com Fixes: a3d93f709e89 ("nilfs2: block cache for garbage collection") Signed-off-by: Pan Bian <bianpan2016(a)163.com> Reported-by: Ferry Meng <mengferry(a)linux.alibaba.com> Closes: https://lkml.kernel.org/r/20230818092022.111054-1-mengferry@linux.alibaba.c… Signed-off-by: Ryusuke Konishi <konishi.ryusuke(a)gmail.com> Tested-by: Ryusuke Konishi <konishi.ryusuke(a)gmail.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: ZhaoLong Wang <wangzhaolong1(a)huawei.com> --- fs/nilfs2/gcinode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/nilfs2/gcinode.c b/fs/nilfs2/gcinode.c index aa3c328ee189..719fcc67b93d 100644 --- a/fs/nilfs2/gcinode.c +++ b/fs/nilfs2/gcinode.c @@ -73,10 +73,8 @@ int nilfs_gccache_submit_read_data(struct inode *inode, sector_t blkoff, struct the_nilfs *nilfs = inode->i_sb->s_fs_info; err = nilfs_dat_translate(nilfs->ns_dat, vbn, &pbn); - if (unlikely(err)) { /* -EIO, -ENOMEM, -ENOENT */ - brelse(bh); + if (unlikely(err)) /* -EIO, -ENOMEM, -ENOENT */ goto failed; - } } lock_buffer(bh); @@ -102,6 +100,8 @@ int nilfs_gccache_submit_read_data(struct inode *inode, sector_t blkoff, failed: unlock_page(bh->b_page); put_page(bh->b_page); + if (unlikely(err)) + brelse(bh); return err; } -- 2.39.2
2 1
0 0
[PATCH openEuler-1.0-LTS 0/6] Some optimision and bugfix for dynamic affinity
by Hui Tang 06 Mar '24

06 Mar '24
Some optimision, feature and bugfix for dynamic affinity as follows: Hui Tang (6): sched: Reorganize the code of dynamic affnity and smart grid sched: Add 'affinity_preferred_nodes' for smart grid sched: Add 'affinity_util_low_pct' for task group sched: fix ping-pang for domain level adjust sched: Check preferred_nmask is valid sched: fix mem_preferred_node_mask not update fs/proc/array.c | 10 - include/linux/sched.h | 34 +- include/linux/sched/dynamic_affinity.h | 38 ++ kernel/sched/core.c | 166 +----- kernel/sched/dynamic_affinity.c | 775 +++++++++++++++++++++++++ kernel/sched/dynamic_affinity.h | 53 ++ kernel/sched/fair.c | 584 +------------------ kernel/sched/grid/qos.c | 6 +- kernel/sched/sched.h | 47 +- kernel/sysctl.c | 7 + mm/mempolicy.c | 6 + 11 files changed, 915 insertions(+), 811 deletions(-) create mode 100644 include/linux/sched/dynamic_affinity.h create mode 100644 kernel/sched/dynamic_affinity.c create mode 100644 kernel/sched/dynamic_affinity.h -- 2.34.1
2 7
0 0
[PATCH openEuler-1.0-LTS] nilfs2: fix potential use after free in nilfs_gccache_submit_read_data()
by ZhaoLong Wang 06 Mar '24

06 Mar '24
From: Pan Bian <bianpan2016(a)163.com> stable inclusion from stable-v4.19.296 commit bb61224f6abc8e71bfdf06d7c984e23460875f5b category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I95AT5 CVE: CVE-2023-52566 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- commit 7ee29facd8a9c5a26079148e36bcf07141b3a6bc upstream. In nilfs_gccache_submit_read_data(), brelse(bh) is called to drop the reference count of bh when the call to nilfs_dat_translate() fails. If the reference count hits 0 and its owner page gets unlocked, bh may be freed. However, bh->b_page is dereferenced to put the page after that, which may result in a use-after-free bug. This patch moves the release operation after unlocking and putting the page. NOTE: The function in question is only called in GC, and in combination with current userland tools, address translation using DAT does not occur in that function, so the code path that causes this issue will not be executed. However, it is possible to run that code path by intentionally modifying the userland GC library or by calling the GC ioctl directly. [konishi.ryusuke(a)gmail.com: NOTE added to the commit log] Link: https://lkml.kernel.org/r/1543201709-53191-1-git-send-email-bianpan2016@163… Link: https://lkml.kernel.org/r/20230921141731.10073-1-konishi.ryusuke@gmail.com Fixes: a3d93f709e89 ("nilfs2: block cache for garbage collection") Signed-off-by: Pan Bian <bianpan2016(a)163.com> Reported-by: Ferry Meng <mengferry(a)linux.alibaba.com> Closes: https://lkml.kernel.org/r/20230818092022.111054-1-mengferry@linux.alibaba.c… Signed-off-by: Ryusuke Konishi <konishi.ryusuke(a)gmail.com> Tested-by: Ryusuke Konishi <konishi.ryusuke(a)gmail.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> --- fs/nilfs2/gcinode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/nilfs2/gcinode.c b/fs/nilfs2/gcinode.c index aa3c328ee189..719fcc67b93d 100644 --- a/fs/nilfs2/gcinode.c +++ b/fs/nilfs2/gcinode.c @@ -73,10 +73,8 @@ int nilfs_gccache_submit_read_data(struct inode *inode, sector_t blkoff, struct the_nilfs *nilfs = inode->i_sb->s_fs_info; err = nilfs_dat_translate(nilfs->ns_dat, vbn, &pbn); - if (unlikely(err)) { /* -EIO, -ENOMEM, -ENOENT */ - brelse(bh); + if (unlikely(err)) /* -EIO, -ENOMEM, -ENOENT */ goto failed; - } } lock_buffer(bh); @@ -102,6 +100,8 @@ int nilfs_gccache_submit_read_data(struct inode *inode, sector_t blkoff, failed: unlock_page(bh->b_page); put_page(bh->b_page); + if (unlikely(err)) + brelse(bh); return err; } -- 2.39.2
2 1
0 0
[openeuler:OLK-6.6 3780/3862] drivers/irqchip/irq-mbigen.c:136: warning: expecting prototype for Due to the existence of hyper(). Prototype was for GICR_LENGTH() instead
by kernel test robot 06 Mar '24

06 Mar '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: f44547cb66ee30ed552adb15046a912cd1409c1f commit: 3ce0ad7d0b4cb6538fe25fb20ca838c06e3cc516 [3780/3862] mbigen: vtimer mbigen driver support config: arm64-defconfig (https://download.01.org/0day-ci/archive/20240306/202403060608.GPZuZJMR-lkp@…) compiler: aarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240306/202403060608.GPZuZJMR-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202403060608.GPZuZJMR-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/irqchip/irq-mbigen.c:77: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * MBIX config register drivers/irqchip/irq-mbigen.c:127: warning: Function parameter or member 'vtimer_mbigen_chip' not described in 'mbigen_device' >> drivers/irqchip/irq-mbigen.c:136: warning: expecting prototype for Due to the existence of hyper(). Prototype was for GICR_LENGTH() instead vim +136 drivers/irqchip/irq-mbigen.c 131 132 /** 133 * Due to the existence of hyper-threading technology, We need to get the 134 * absolute offset of a cpu relative to the base cpu. 135 */ > 136 #define GICR_LENGTH 0x40000 137 static inline int get_abs_offset(int cpu, int cpu_base) 138 { 139 return ((get_gicr_paddr(cpu) - get_gicr_paddr(cpu_base)) / GICR_LENGTH); 140 } 141 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 3160/21720] drivers/acpi/arm64/iort.c:1370:73: sparse: sparse: Using plain integer as NULL pointer
by kernel test robot 06 Mar '24

06 Mar '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: ba030414a07b34111e8786469740412351906964 commit: 68088650bec0647cef4d822b31f818a094f5eead [3160/21720] perf/smmuv3_pmu: Enable HiSilicon Erratum 162001800 quirk config: arm64-randconfig-r132-20240304 (https://download.01.org/0day-ci/archive/20240306/202403060427.t895UnKP-lkp@…) compiler: aarch64-linux-gcc (GCC) 13.2.0 reproduce: (https://download.01.org/0day-ci/archive/20240306/202403060427.t895UnKP-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202403060427.t895UnKP-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/acpi/arm64/iort.c:1370:73: sparse: sparse: Using plain integer as NULL pointer drivers/acpi/arm64/iort.c:61: warning: Function parameter or member 'iort_node' not described in 'iort_set_fwnode' drivers/acpi/arm64/iort.c:61: warning: Excess function parameter 'node' description in 'iort_set_fwnode' drivers/acpi/arm64/iort.c:980: warning: Function parameter or member 'dma_size' not described in 'iort_dma_setup' drivers/acpi/arm64/iort.c:980: warning: Excess function parameter 'size' description in 'iort_dma_setup' drivers/acpi/arm64/iort.c:1447: warning: Function parameter or member 'ops' not described in 'iort_add_platform_device' vim +1370 drivers/acpi/arm64/iort.c 1367 1368 static struct acpi_platform_list pmcg_plat_info[] __initdata = { 1369 /* HiSilicon Hip08 Platform */ > 1370 {"HISI ", "HIP08 ", 0, ACPI_SIG_IORT, greater_than_or_equal, 0, 1371 IORT_SMMU_V3_PMCG_HISI_HIP08}, 1372 { } 1373 }; 1374 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3166/3862] __kvm_nvhe_mem_protect.c:(.hyp.text+0x6ff8): dangerous relocation: unsupported relocation
by kernel test robot 06 Mar '24

06 Mar '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: f44547cb66ee30ed552adb15046a912cd1409c1f commit: 625086f87673687dc420e79c9fedff0c2d65cb49 [3166/3862] KVM: arm64: Add support for probing Hisi ncsnp capability config: arm64-randconfig-004-20240305 (https://download.01.org/0day-ci/archive/20240306/202403060152.uNHb0jNS-lkp@…) compiler: aarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240306/202403060152.uNHb0jNS-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202403060152.uNHb0jNS-lkp@intel.com/ All errors (new ones prefixed by >>): aarch64-linux-ld: arch/arm64/kvm/hyp/nvhe/kvm_nvhe.o: in function `__kvm_nvhe_clean_dcache_guest_page': __kvm_nvhe_mem_protect.c:(.hyp.text+0x6ff8): undefined reference to `__kvm_nvhe_kvm_ncsnp_support' aarch64-linux-ld: arch/arm64/kvm/hyp/nvhe/kvm_nvhe.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `__kvm_nvhe_kvm_ncsnp_support' which may bind externally can not be used when making a shared object; recompile with -fPIC >> __kvm_nvhe_mem_protect.c:(.hyp.text+0x6ff8): dangerous relocation: unsupported relocation aarch64-linux-ld: __kvm_nvhe_mem_protect.c:(.hyp.text+0x6ffc): undefined reference to `__kvm_nvhe_kvm_ncsnp_support' aarch64-linux-ld: arch/arm64/kvm/hyp/nvhe/kvm_nvhe.o: in function `__kvm_nvhe_kvm_pgtable_stage2_flush': >> (.hyp.text+0x122cc): undefined reference to `__kvm_nvhe_kvm_ncsnp_support' aarch64-linux-ld: arch/arm64/kvm/hyp/nvhe/kvm_nvhe.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `__kvm_nvhe_kvm_ncsnp_support' which may bind externally can not be used when making a shared object; recompile with -fPIC >> (.hyp.text+0x122cc): dangerous relocation: unsupported relocation aarch64-linux-ld: (.hyp.text+0x122d8): undefined reference to `__kvm_nvhe_kvm_ncsnp_support' -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2176/3862] kernel/sched/fair.c:9005:51: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot 06 Mar '24

06 Mar '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: f44547cb66ee30ed552adb15046a912cd1409c1f commit: c52c17a85f1fa9cde2bcb15359096634cfd9eb7c [2176/3862] sched: Add tracepoint for qos smt expeller config: arm64-randconfig-r111-20240227 (https://download.01.org/0day-ci/archive/20240306/202403060103.iGgJFgDP-lkp@…) compiler: aarch64-linux-gcc (GCC) 13.2.0 reproduce: (https://download.01.org/0day-ci/archive/20240306/202403060103.iGgJFgDP-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202403060103.iGgJFgDP-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) kernel/sched/fair.c:151:14: sparse: sparse: symbol 'sysctl_overload_detect_period' was not declared. Should it be static? kernel/sched/fair.c:152:14: sparse: sparse: symbol 'sysctl_offline_wait_interval' was not declared. Should it be static? kernel/sched/fair.c:1283:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sched_entity const *se @@ got struct sched_entity [noderef] __rcu * @@ kernel/sched/fair.c:1283:34: sparse: expected struct sched_entity const *se kernel/sched/fair.c:1283:34: sparse: got struct sched_entity [noderef] __rcu * kernel/sched/fair.c:13203:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:13203:9: sparse: expected struct sched_domain *[assigned] sd kernel/sched/fair.c:13203:9: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:6012:22: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/fair.c:6012:22: sparse: struct task_struct [noderef] __rcu * kernel/sched/fair.c:6012:22: sparse: struct task_struct * kernel/sched/fair.c:6754:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/fair.c:6754:38: sparse: expected struct task_struct *curr kernel/sched/fair.c:6754:38: sparse: got struct task_struct [noderef] __rcu *curr kernel/sched/fair.c:8121:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:8121:20: sparse: expected struct sched_domain *[assigned] sd kernel/sched/fair.c:8121:20: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:8436:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] tmp @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:8436:9: sparse: expected struct sched_domain *[assigned] tmp kernel/sched/fair.c:8436:9: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:8548:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/fair.c:8548:38: sparse: expected struct task_struct *curr kernel/sched/fair.c:8548:38: sparse: got struct task_struct [noderef] __rcu *curr kernel/sched/fair.c:8774:22: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/fair.c:8774:22: sparse: struct task_struct [noderef] __rcu * kernel/sched/fair.c:8774:22: sparse: struct task_struct * >> kernel/sched/fair.c:9005:51: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *sibling_p @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/fair.c:9005:51: sparse: expected struct task_struct *sibling_p kernel/sched/fair.c:9005:51: sparse: got struct task_struct [noderef] __rcu *curr kernel/sched/fair.c:9010:30: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/fair.c:9010:30: sparse: struct task_struct [noderef] __rcu * kernel/sched/fair.c:9010:30: sparse: struct task_struct * kernel/sched/fair.c:9084:48: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *p @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/fair.c:9332:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/fair.c:10403:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct sched_domain *child @@ got struct sched_domain [noderef] __rcu *child @@ kernel/sched/fair.c:11040:22: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/fair.c:11040:22: sparse: struct task_struct [noderef] __rcu * kernel/sched/fair.c:11040:22: sparse: struct task_struct * kernel/sched/fair.c:12481:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:12481:9: sparse: expected struct sched_domain *[assigned] sd kernel/sched/fair.c:12481:9: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:12138:44: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct sched_domain *sd_parent @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:12138:44: sparse: expected struct sched_domain *sd_parent kernel/sched/fair.c:12138:44: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:12577:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:12577:9: sparse: expected struct sched_domain *[assigned] sd kernel/sched/fair.c:12577:9: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c: note: in included file (through include/linux/rculist.h, include/linux/pid.h, include/linux/sched.h, ...): include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true kernel/sched/fair.c: note: in included file: kernel/sched/sched.h:2174:25: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2174:25: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2174:25: sparse: struct task_struct * kernel/sched/sched.h:2338:9: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2338:9: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2338:9: sparse: struct task_struct * kernel/sched/sched.h:2338:9: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2338:9: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2338:9: sparse: struct task_struct * kernel/sched/sched.h:2174:25: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2174:25: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2174:25: sparse: struct task_struct * kernel/sched/sched.h:2174:25: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2174:25: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2174:25: sparse: struct task_struct * vim +9005 kernel/sched/fair.c 8984 8985 static bool _qos_smt_check_need_resched(int this_cpu, struct rq *rq) 8986 { 8987 int cpu; 8988 8989 if (!sched_smt_active()) 8990 return false; 8991 8992 for_each_cpu(cpu, cpu_smt_mask(this_cpu)) { 8993 if (cpu == this_cpu) 8994 continue; 8995 8996 /* 8997 * There are two cases rely on the set need_resched to drive away 8998 * offline task: 8999 * a) The qos_smt_status of siblings cpu is online, the task of curr cpu is offline; 9000 * b) The qos_smt_status of siblings cpu is offline, the task of curr cpu is idle, 9001 * and current cpu only has SCHED_IDLE tasks enqueued. 9002 */ 9003 if (per_cpu(qos_smt_status, cpu) == QOS_LEVEL_ONLINE && 9004 task_group(current)->qos_level < QOS_LEVEL_ONLINE) { > 9005 trace_sched_qos_smt_expel(cpu_curr(cpu), per_cpu(qos_smt_status, cpu)); 9006 return true; 9007 } 9008 9009 if (per_cpu(qos_smt_status, cpu) == QOS_LEVEL_OFFLINE && 9010 rq->curr == rq->idle && sched_idle_cpu(this_cpu)) { 9011 trace_sched_qos_smt_expel(cpu_curr(cpu), per_cpu(qos_smt_status, cpu)); 9012 return true; 9013 } 9014 } 9015 9016 return false; 9017 } 9018 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH openEuler-1.0-LTS] arm64/mpam: support resctrl fs to show mounting option
by Zeng Heng 05 Mar '24

05 Mar '24
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I95IFL CVE: NA ---------------------------------------- Support to display MPAM mounting options: # mount -t resctrl resctrl /sys/fs/resctrl/ -o cdpl3,mbMin,mbMax,mbHdl,caPbm # mount | grep resctrl resctrl on /sys/fs/resctrl type resctrl (rw,relatime,cdpl3,caPbm,mbMax,mbMin,mbHdl) Fixes: 22da04612d3e ("arm64/mpam: Clean up header files and rearrange declarations") Signed-off-by: Zeng Heng <zengheng4(a)huawei.com> --- arch/arm64/include/asm/resctrl.h | 5 +--- arch/arm64/kernel/mpam/mpam_ctrlmon.c | 34 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/arch/arm64/include/asm/resctrl.h b/arch/arm64/include/asm/resctrl.h index 3fceaa482e5a..2865397740b4 100644 --- a/arch/arm64/include/asm/resctrl.h +++ b/arch/arm64/include/asm/resctrl.h @@ -415,10 +415,7 @@ void resctrl_resource_reset(void); int resctrl_group_init_alloc(struct rdtgroup *rdtgrp); -static inline int __resctrl_group_show_options(struct seq_file *seq) -{ - return 0; -} +int __resctrl_group_show_options(struct seq_file *seq); int resctrl_update_groups_config(struct rdtgroup *rdtgrp); diff --git a/arch/arm64/kernel/mpam/mpam_ctrlmon.c b/arch/arm64/kernel/mpam/mpam_ctrlmon.c index 4b8429ceddb6..9bf4f68fb2f5 100644 --- a/arch/arm64/kernel/mpam/mpam_ctrlmon.c +++ b/arch/arm64/kernel/mpam/mpam_ctrlmon.c @@ -1027,3 +1027,37 @@ int resctrl_update_groups_config(struct rdtgroup *rdtgrp) return ret; } + +int __resctrl_group_show_options(struct seq_file *seq) +{ + struct resctrl_resource *res; + struct raw_resctrl_resource *r; + + res = mpam_resctrl_get_resource(RDT_RESOURCE_L3); + if (res && res->cdp_enable) + seq_puts(seq, ",cdpl3"); + + res = mpam_resctrl_get_resource(RDT_RESOURCE_L2); + if (res && res->cdp_enable) + seq_puts(seq, ",cdpl2"); + + r = mpam_get_raw_resctrl_resource(RDT_RESOURCE_L3); + if (r && r->ctrl_features[SCHEMA_PBM].enabled) + seq_puts(seq, ",caPbm"); + if (r && r->ctrl_features[SCHEMA_MAX].enabled) + seq_puts(seq, ",caMax"); + if (r && r->ctrl_features[SCHEMA_PRI].enabled) + seq_puts(seq, ",caPrio"); + + r = mpam_get_raw_resctrl_resource(RDT_RESOURCE_MC); + if (r && r->ctrl_features[SCHEMA_MAX].enabled) + seq_puts(seq, ",mbMax"); + if (r && r->ctrl_features[SCHEMA_MIN].enabled) + seq_puts(seq, ",mbMin"); + if (r && r->ctrl_features[SCHEMA_HDL].enabled) + seq_puts(seq, ",mbHdl"); + if (r && r->ctrl_features[SCHEMA_PRI].enabled) + seq_puts(seq, ",mbPrio"); + + return 0; +} -- 2.25.1
2 1
0 0
[PATCH openEuler-1.0-LTS] arm64/mpam: set default feedback of last_cmd_status interface as null string
by Zeng Heng 05 Mar '24

05 Mar '24
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I95IFO CVE: NA ---------------------------------------- Set default feedback of last_cmd_status interface as null string, in case misunderstanding the execution result of the previous command. Fixes: 9b3a7fd0f5fb ("x86/intel_rdt: Add framework for better RDT UI diagnostics") Signed-off-by: Zeng Heng <zengheng4(a)huawei.com> --- arch/arm64/kernel/mpam/mpam_resctrl.c | 2 +- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/mpam/mpam_resctrl.c b/arch/arm64/kernel/mpam/mpam_resctrl.c index 60d3d8706a38..5901261d17fc 100644 --- a/arch/arm64/kernel/mpam/mpam_resctrl.c +++ b/arch/arm64/kernel/mpam/mpam_resctrl.c @@ -1749,7 +1749,7 @@ static int resctrl_last_cmd_status_show(struct kernfs_open_file *of, if (len) seq_printf(seq, "%.*s", len, last_cmd_status_buf); else - seq_puts(seq, "ok\n"); + seq_puts(seq, ""); mutex_unlock(&resctrl_group_mutex); return 0; } diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c index a2d7e6646cce..686f685c8c7e 100644 --- a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c +++ b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c @@ -743,7 +743,7 @@ static int rdt_last_cmd_status_show(struct kernfs_open_file *of, if (len) seq_printf(seq, "%.*s", len, last_cmd_status_buf); else - seq_puts(seq, "ok\n"); + seq_puts(seq, ""); mutex_unlock(&rdtgroup_mutex); return 0; } -- 2.25.1
2 1
0 0
[PATCH openEuler-1.0-LTS] arm64/mpam: Skip updates of unrelated ctrl type
by Zeng Heng 05 Mar '24

05 Mar '24
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I95IFB CVE: NA ---------------------------------------- Add ctrl_updated variable and only when ctrl_updated is true, the new control configuration needs to deliver. Fixes: 58e843d94efe ("arm64/mpam: resctrl: Support priority and hardlimit(Memory bandwidth) configuration") Signed-off-by: Zeng Heng <zengheng4(a)huawei.com> --- arch/arm64/include/asm/resctrl.h | 1 + arch/arm64/kernel/mpam/mpam_ctrlmon.c | 24 +++++++++++++++++------- arch/arm64/kernel/mpam/mpam_resctrl.c | 2 ++ 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/arch/arm64/include/asm/resctrl.h b/arch/arm64/include/asm/resctrl.h index 2865397740b4..d46b9ffe6c88 100644 --- a/arch/arm64/include/asm/resctrl.h +++ b/arch/arm64/include/asm/resctrl.h @@ -295,6 +295,7 @@ do { \ struct resctrl_staged_config { hw_closid_t hw_closid; u32 new_ctrl[SCHEMA_NUM_CTRL_TYPE]; + bool ctrl_updated[SCHEMA_NUM_CTRL_TYPE]; bool have_new_ctrl; enum resctrl_conf_type conf_type; enum resctrl_ctrl_type ctrl_type; diff --git a/arch/arm64/kernel/mpam/mpam_ctrlmon.c b/arch/arm64/kernel/mpam/mpam_ctrlmon.c index 9bf4f68fb2f5..7659b29e6fe3 100644 --- a/arch/arm64/kernel/mpam/mpam_ctrlmon.c +++ b/arch/arm64/kernel/mpam/mpam_ctrlmon.c @@ -265,7 +265,8 @@ static void resctrl_group_update_domain_ctrls(struct rdtgroup *rdtgrp, closid.intpartid = hw_closid_val(cfg[i].hw_closid); for_each_ctrl_type(type) { /* if ctrl group's config has changed, refresh it first. */ - if (dom->ctrl_val[closid.intpartid] != cfg[i].new_ctrl) { + if (dom->ctrl_val[type][closid.intpartid] != cfg[i].new_ctrl[type] && + cfg[i].ctrl_updated[type] == true) { /* * duplicate ctrl group's configuration indexed * by intpartid from domain ctrl_val array. @@ -400,6 +401,7 @@ ssize_t resctrl_group_schemata_write(struct kernfs_open_file *of, struct mpam_resctrl_res *res; enum resctrl_conf_type conf_type; struct resctrl_staged_config *cfg; + enum resctrl_ctrl_type t; char *tok, *resname; u32 closid; int ret = 0; @@ -422,13 +424,17 @@ ssize_t resctrl_group_schemata_write(struct kernfs_open_file *of, for_each_supported_resctrl_exports(res) { r = &res->resctrl_res; - if (r->alloc_enabled) { - list_for_each_entry(dom, &r->domains, list) { - dom->have_new_ctrl = false; - for_each_conf_type(conf_type) { - cfg = &dom->staged_cfg[conf_type]; - cfg->have_new_ctrl = false; + if (!r->alloc_enabled) + continue; + + list_for_each_entry(dom, &r->domains, list) { + dom->have_new_ctrl = false; + for_each_conf_type(conf_type) { + cfg = &dom->staged_cfg[conf_type]; + for_each_ctrl_type(t) { + cfg->ctrl_updated[t] = false; } + cfg->have_new_ctrl = false; } } } @@ -908,11 +914,13 @@ static void rdtgroup_init_mba(struct resctrl_schema *s, u32 closid) cfg = &d->staged_cfg[CDP_BOTH]; cfg->cdp_both_ctrl = s->cdp_mc_both; cfg->new_ctrl[SCHEMA_COMM] = rr->ctrl_features[SCHEMA_COMM].default_ctrl; + cfg->ctrl_updated[SCHEMA_COMM] = true; resctrl_cdp_mpamid_map(closid, CDP_BOTH, cfg->hw_closid); cfg->have_new_ctrl = true; /* Set extension ctrl default value, e.g. priority/hardlimit */ for_each_extend_ctrl_type(t) { cfg->new_ctrl[t] = rr->ctrl_features[t].default_ctrl; + cfg->ctrl_updated[t] = true; } } } @@ -965,6 +973,7 @@ static int rdtgroup_init_cat(struct resctrl_schema *s, u32 closid) } resctrl_cdp_mpamid_map(closid, conf_type, cfg->hw_closid); + cfg->ctrl_updated[SCHEMA_COMM] = true; cfg->have_new_ctrl = true; /* @@ -974,6 +983,7 @@ static int rdtgroup_init_cat(struct resctrl_schema *s, u32 closid) for_each_extend_ctrl_type(ctrl_type) { cfg->new_ctrl[ctrl_type] = rr->ctrl_features[ctrl_type].default_ctrl; + cfg->ctrl_updated[ctrl_type] = true; } } diff --git a/arch/arm64/kernel/mpam/mpam_resctrl.c b/arch/arm64/kernel/mpam/mpam_resctrl.c index 5901261d17fc..7dcb75accf86 100644 --- a/arch/arm64/kernel/mpam/mpam_resctrl.c +++ b/arch/arm64/kernel/mpam/mpam_resctrl.c @@ -322,6 +322,7 @@ parse_cache(char *buf, struct resctrl_resource *r, return -EINVAL; cfg->new_ctrl[type] = data; + cfg->ctrl_updated[type] = true; cfg->have_new_ctrl = true; return 0; @@ -364,6 +365,7 @@ parse_bw(char *buf, struct resctrl_resource *r, return -EINVAL; cfg->new_ctrl[type] = data; + cfg->ctrl_updated[type] = true; cfg->have_new_ctrl = true; return 0; -- 2.25.1
2 1
0 0
  • ← Newer
  • 1
  • ...
  • 1403
  • 1404
  • 1405
  • 1406
  • 1407
  • 1408
  • 1409
  • ...
  • 2026
  • Older →

HyperKitty Powered by HyperKitty