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 -----
  • December
  • November
  • October
  • 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

  • 49 participants
  • 22040 discussions
[openeuler:OLK-6.6] BUILD REGRESSION 10bfbd53c8aa4c81829876b20e654c4e7c4e7aa7
by kernel test robot 13 Jul '24

13 Jul '24
tree/branch: https://gitee.com/openeuler/kernel.git OLK-6.6 branch HEAD: 10bfbd53c8aa4c81829876b20e654c4e7c4e7aa7 !5261 [OLK-6.6]Hygon: Some enhancement and bugfixes for HYGON CSV/CSV2 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202407130439.z4HZgaFv-lkp@intel.com Error/Warning: (recently discovered and may have been fixed) include/linux/mmzone.h:1788:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE Error/Warning ids grouped by kconfigs: recent_errors |-- arm64-allmodconfig | `-- clang:warning:no-such-include-directory:drivers-infiniband-hw-hiroce3-include-mag |-- loongarch-allmodconfig | `-- arch-loongarch-kvm-..-..-..-virt-kvm-kvm_main.c:warning:kvmalloc_array-sizes-specified-with-sizeof-in-the-earlier-argument-and-not-in-the-later-argument |-- loongarch-randconfig-001-20240713 | |-- arch-loongarch-kvm-..-..-..-virt-kvm-kvm_main.c:warning:kvmalloc_array-sizes-specified-with-sizeof-in-the-earlier-argument-and-not-in-the-later-argument | `-- drivers-char-virtio_console.c:warning:u-directive-output-may-be-truncated-writing-between-and-bytes-into-a-region-of-size-between-and |-- loongarch-randconfig-002-20240713 | `-- include-linux-mmzone.h:error:error-Allocator-MAX_ORDER-exceeds-SECTION_SIZE `-- x86_64-allyesconfig `-- drivers-gpu-drm-amd-amdgpu-..-amdkfd-kfd_topology.c:warning:stack-frame-size-()-exceeds-limit-()-in-kfd_topology_add_device elapsed time: 725m configs tested: 14 configs skipped: 97 tested configs: arm64 allmodconfig clang-19 arm64 allnoconfig gcc-14.1.0 arm64 randconfig-001-20240713 gcc-14.1.0 arm64 randconfig-002-20240713 gcc-14.1.0 arm64 randconfig-003-20240713 clang-19 arm64 randconfig-004-20240713 gcc-14.1.0 loongarch allmodconfig gcc-14.1.0 loongarch allnoconfig gcc-14.1.0 loongarch randconfig-001-20240713 gcc-14.1.0 loongarch randconfig-002-20240713 gcc-14.1.0 x86_64 allnoconfig clang-18 x86_64 allyesconfig clang-18 x86_64 defconfig gcc-13 x86_64 rhel-8.3-rust clang-18 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3892/10681] include/linux/mmzone.h:1788:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE
by kernel test robot 13 Jul '24

13 Jul '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 10bfbd53c8aa4c81829876b20e654c4e7c4e7aa7 commit: c93eb12529e21dbb59796132f4fdf75fad4eddaf [3892/10681] LoongArch: Adapted SECTION_SIZE_BITS with page size config: loongarch-randconfig-002-20240713 (https://download.01.org/0day-ci/archive/20240713/202407130439.z4HZgaFv-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240713/202407130439.z4HZgaFv-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/202407130439.z4HZgaFv-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from include/linux/gfp.h:7, from include/linux/mm.h:7, from arch/loongarch/kernel/asm-offsets.c:9: >> include/linux/mmzone.h:1788:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE 1788 | #error Allocator MAX_ORDER exceeds SECTION_SIZE | ^~~~~ arch/loongarch/kernel/asm-offsets.c:18:6: warning: no previous prototype for 'output_ptreg_defines' [-Wmissing-prototypes] 18 | void output_ptreg_defines(void) | ^~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/asm-offsets.c:65:6: warning: no previous prototype for 'output_task_defines' [-Wmissing-prototypes] 65 | void output_task_defines(void) | ^~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/asm-offsets.c:80:6: warning: no previous prototype for 'output_thread_info_defines' [-Wmissing-prototypes] 80 | void output_thread_info_defines(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/asm-offsets.c:96:6: warning: no previous prototype for 'output_thread_defines' [-Wmissing-prototypes] 96 | void output_thread_defines(void) | ^~~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/asm-offsets.c:132:6: warning: no previous prototype for 'output_thread_fpu_defines' [-Wmissing-prototypes] 132 | void output_thread_fpu_defines(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/asm-offsets.c:173:6: warning: no previous prototype for 'output_thread_lbt_defines' [-Wmissing-prototypes] 173 | void output_thread_lbt_defines(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/asm-offsets.c:183:6: warning: no previous prototype for 'output_mm_defines' [-Wmissing-prototypes] 183 | void output_mm_defines(void) | ^~~~~~~~~~~~~~~~~ arch/loongarch/kernel/asm-offsets.c:215:6: warning: no previous prototype for 'output_sc_defines' [-Wmissing-prototypes] 215 | void output_sc_defines(void) | ^~~~~~~~~~~~~~~~~ arch/loongarch/kernel/asm-offsets.c:223:6: warning: no previous prototype for 'output_signal_defines' [-Wmissing-prototypes] 223 | void output_signal_defines(void) | ^~~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/asm-offsets.c:261:6: warning: no previous prototype for 'output_smpboot_defines' [-Wmissing-prototypes] 261 | void output_smpboot_defines(void) | ^~~~~~~~~~~~~~~~~~~~~~ arch/loongarch/kernel/asm-offsets.c:294:6: warning: no previous prototype for 'output_kvm_defines' [-Wmissing-prototypes] 294 | void output_kvm_defines(void) | ^~~~~~~~~~~~~~~~~~ make[3]: *** [scripts/Makefile.build:116: arch/loongarch/kernel/asm-offsets.s] Error 1 shuffle=784060646 make[3]: Target 'prepare' not remade because of errors. make[2]: *** [Makefile:1202: prepare0] Error 2 shuffle=784060646 make[2]: Target 'prepare' not remade because of errors. make[1]: *** [Makefile:234: __sub-make] Error 2 shuffle=784060646 make[1]: Target 'prepare' not remade because of errors. make: *** [Makefile:234: __sub-make] Error 2 shuffle=784060646 make: Target 'prepare' not remade because of errors. vim +1788 include/linux/mmzone.h d41dee369bff3b Andy Whitcroft 2005-06-23 1783 835c134ec4dd75 Mel Gorman 2007-10-16 1784 #define SECTION_BLOCKFLAGS_BITS \ d9c2340052278d Mel Gorman 2007-10-16 1785 ((1UL << (PFN_SECTION_SHIFT - pageblock_order)) * NR_PAGEBLOCK_BITS) 835c134ec4dd75 Mel Gorman 2007-10-16 1786 23baf831a32c04 Kirill A. Shutemov 2023-03-15 1787 #if (MAX_ORDER + PAGE_SHIFT) > SECTION_SIZE_BITS d41dee369bff3b Andy Whitcroft 2005-06-23 @1788 #error Allocator MAX_ORDER exceeds SECTION_SIZE d41dee369bff3b Andy Whitcroft 2005-06-23 1789 #endif d41dee369bff3b Andy Whitcroft 2005-06-23 1790 :::::: The code at line 1788 was first introduced by commit :::::: d41dee369bff3b9dcb6328d4d822926c28cc2594 [PATCH] sparsemem memory model :::::: TO: Andy Whitcroft <apw(a)shadowen.org> :::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS] BUILD REGRESSION 07c988f00903b4f0fbf9c31cea24351fbf885b1c
by kernel test robot 13 Jul '24

13 Jul '24
tree/branch: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS branch HEAD: 07c988f00903b4f0fbf9c31cea24351fbf885b1c !9492 netlabel: fix out-of-bounds memory accesses Error/Warning ids grouped by kconfigs: recent_errors `-- arm64-randconfig-001-20240712 `-- drivers-mmc-host-phytium-sdci.c:error:lvalue-required-as-unary-operand elapsed time: 727m configs tested: 31 configs skipped: 111 tested configs: arm64 allmodconfig gcc-14.1.0 arm64 allnoconfig gcc-14.1.0 arm64 randconfig-001-20240712 gcc-14.1.0 arm64 randconfig-002-20240712 gcc-14.1.0 arm64 randconfig-003-20240712 gcc-14.1.0 arm64 randconfig-004-20240712 gcc-14.1.0 x86_64 allnoconfig clang-18 x86_64 allyesconfig clang-18 x86_64 buildonly-randconfig-001-20240712 clang-18 x86_64 buildonly-randconfig-002-20240712 clang-18 x86_64 buildonly-randconfig-003-20240712 clang-18 x86_64 buildonly-randconfig-004-20240712 clang-18 x86_64 buildonly-randconfig-005-20240712 clang-18 x86_64 buildonly-randconfig-006-20240712 clang-18 x86_64 defconfig gcc-13 x86_64 randconfig-001-20240712 gcc-12 x86_64 randconfig-002-20240712 gcc-13 x86_64 randconfig-003-20240712 gcc-12 x86_64 randconfig-004-20240712 clang-18 x86_64 randconfig-005-20240712 gcc-13 x86_64 randconfig-006-20240712 clang-18 x86_64 randconfig-011-20240712 clang-18 x86_64 randconfig-012-20240712 clang-18 x86_64 randconfig-013-20240712 clang-18 x86_64 randconfig-014-20240712 gcc-13 x86_64 randconfig-015-20240712 clang-18 x86_64 randconfig-016-20240712 clang-18 x86_64 randconfig-071-20240712 gcc-13 x86_64 randconfig-072-20240712 gcc-11 x86_64 randconfig-073-20240712 clang-18 x86_64 rhel-8.3-rust clang-18 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 21349/23271] drivers/mmc/host/phytium-sdci.c:1483:23: error: lvalue required as unary '&' operand
by kernel test robot 13 Jul '24

13 Jul '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 07c988f00903b4f0fbf9c31cea24351fbf885b1c commit: d65622e6edee11f7fcbd295bdb5aef86e12dfef3 [21349/23271] mmc: add support for Phytium MMC config: arm64-randconfig-001-20240712 (https://download.01.org/0day-ci/archive/20240713/202407130055.5P1q7PDM-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240713/202407130055.5P1q7PDM-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/202407130055.5P1q7PDM-lkp@intel.com/ All errors (new ones prefixed by >>): drivers/mmc/host/phytium-sdci.c: In function 'phytium_sdci_start_data': drivers/mmc/host/phytium-sdci.c:271:14: warning: variable 'read' set but not used [-Wunused-but-set-variable] 271 | bool read, res; | ^~~~ drivers/mmc/host/phytium-sdci.c: In function 'phytium_sdci_dma_irq': drivers/mmc/host/phytium-sdci.c:1018:29: warning: variable 'cmd' set but not used [-Wunused-but-set-variable] 1018 | struct mmc_command *cmd; | ^~~ drivers/mmc/host/phytium-sdci.c: At top level: >> drivers/mmc/host/phytium-sdci.c:1483:23: error: lvalue required as unary '&' operand 1483 | .pm = &phytium_sdci_dev_pm_ops, | ^ vim +1483 drivers/mmc/host/phytium-sdci.c 1475 1476 static struct platform_driver phytium_sdci_driver = { 1477 .probe = phytium_sdci_probe, 1478 .remove = phytium_sdci_remove, 1479 .driver = { 1480 .name = "sdci-phytium", 1481 .of_match_table = phytium_sdci_of_ids, 1482 .acpi_match_table = phytium_sdci_acpi_ids, > 1483 .pm = &phytium_sdci_dev_pm_ops, 1484 }, 1485 }; 1486 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 10626/10665] drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1922:5: warning: stack frame size (2200) exceeds limit (2048) in 'kfd_topology_add_device'
by kernel test robot 12 Jul '24

12 Jul '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 57aa1dda67c88842ffde6304bf732c7d7c81c211 commit: 241ad43fe7e9c24d5ba4cdd1ec22e731cdd22d14 [10626/10665] Compiler: Add clang's PGO support for kernel. config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240712/202407122247.S82V5Eh3-lkp@…) compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240712/202407122247.S82V5Eh3-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/202407122247.S82V5Eh3-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1922:5: warning: stack frame size (2200) exceeds limit (2048) in 'kfd_topology_add_device' [-Wframe-larger-than] 1922 | int kfd_topology_add_device(struct kfd_node *gpu) | ^ 1 warning generated. vim +/kfd_topology_add_device +1922 drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c d230f1bfe7a197 Jonathan Kim 2022-03-25 1921 8dc1db3172ae2f Mukul Joshi 2022-09-14 @1922 int kfd_topology_add_device(struct kfd_node *gpu) f701acb6a4ed0a Felix Kuehling 2022-11-16 1923 { f701acb6a4ed0a Felix Kuehling 2022-11-16 1924 uint32_t gpu_id; f701acb6a4ed0a Felix Kuehling 2022-11-16 1925 struct kfd_topology_device *dev; f701acb6a4ed0a Felix Kuehling 2022-11-16 1926 struct kfd_cu_info cu_info; f701acb6a4ed0a Felix Kuehling 2022-11-16 1927 int res = 0; f701acb6a4ed0a Felix Kuehling 2022-11-16 1928 int i; f701acb6a4ed0a Felix Kuehling 2022-11-16 1929 const char *asic_name = amdgpu_asic_name[gpu->adev->asic_type]; f701acb6a4ed0a Felix Kuehling 2022-11-16 1930 f701acb6a4ed0a Felix Kuehling 2022-11-16 1931 gpu_id = kfd_generate_gpu_id(gpu); 400a39f1ec43d2 James Zhu 2023-08-09 1932 if (gpu->xcp && !gpu->xcp->ddev) { 400a39f1ec43d2 James Zhu 2023-08-09 1933 dev_warn(gpu->adev->dev, 400a39f1ec43d2 James Zhu 2023-08-09 1934 "Won't add GPU (ID: 0x%x) to topology since it has no drm node assigned.", 400a39f1ec43d2 James Zhu 2023-08-09 1935 gpu_id); 400a39f1ec43d2 James Zhu 2023-08-09 1936 return 0; 400a39f1ec43d2 James Zhu 2023-08-09 1937 } else { f701acb6a4ed0a Felix Kuehling 2022-11-16 1938 pr_debug("Adding new GPU (ID: 0x%x) to topology\n", gpu_id); 400a39f1ec43d2 James Zhu 2023-08-09 1939 } f701acb6a4ed0a Felix Kuehling 2022-11-16 1940 f701acb6a4ed0a Felix Kuehling 2022-11-16 1941 /* Check to see if this gpu device exists in the topology_device_list. f701acb6a4ed0a Felix Kuehling 2022-11-16 1942 * If so, assign the gpu to that device, f701acb6a4ed0a Felix Kuehling 2022-11-16 1943 * else create a Virtual CRAT for this gpu device and then parse that f701acb6a4ed0a Felix Kuehling 2022-11-16 1944 * CRAT to create a new topology device. Once created assign the gpu to f701acb6a4ed0a Felix Kuehling 2022-11-16 1945 * that topology device f701acb6a4ed0a Felix Kuehling 2022-11-16 1946 */ f701acb6a4ed0a Felix Kuehling 2022-11-16 1947 down_write(&topology_lock); f701acb6a4ed0a Felix Kuehling 2022-11-16 1948 dev = kfd_assign_gpu(gpu); f701acb6a4ed0a Felix Kuehling 2022-11-16 1949 if (!dev) f701acb6a4ed0a Felix Kuehling 2022-11-16 1950 res = kfd_topology_add_device_locked(gpu, gpu_id, &dev); c0cc999f3c32e6 Ma Jun 2022-11-02 1951 up_write(&topology_lock); f701acb6a4ed0a Felix Kuehling 2022-11-16 1952 if (res) f701acb6a4ed0a Felix Kuehling 2022-11-16 1953 return res; 5b5c4e40a37e85 Evgeny Pinchuk 2014-07-16 1954 5b5c4e40a37e85 Evgeny Pinchuk 2014-07-16 1955 dev->gpu_id = gpu_id; 5b5c4e40a37e85 Evgeny Pinchuk 2014-07-16 1956 gpu->id = gpu_id; 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 1957 0f28cca87e9afc Ramesh Errabolu 2022-05-26 1958 kfd_dev_create_p2p_links(); 0f28cca87e9afc Ramesh Errabolu 2022-05-26 1959 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 1960 /* TODO: Move the following lines to function 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 1961 * kfd_add_non_crat_information 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 1962 */ 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 1963 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 1964 /* Fill-in additional information that is not available in CRAT but 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 1965 * needed for the topology 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 1966 */ 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 1967 574c4183ef7511 Graham Sider 2021-10-19 1968 amdgpu_amdkfd_get_cu_info(dev->gpu->adev, &cu_info); c181159a5b1e1e Yong Zhao 2019-08-01 1969 b7675b7bbc3c4c Graham Sider 2021-11-11 1970 for (i = 0; i < KFD_TOPOLOGY_PUBLIC_NAME_SIZE-1; i++) { b7675b7bbc3c4c Graham Sider 2021-11-11 1971 dev->node_props.name[i] = __tolower(asic_name[i]); b7675b7bbc3c4c Graham Sider 2021-11-11 1972 if (asic_name[i] == '\0') b7675b7bbc3c4c Graham Sider 2021-11-11 1973 break; b7675b7bbc3c4c Graham Sider 2021-11-11 1974 } b7675b7bbc3c4c Graham Sider 2021-11-11 1975 dev->node_props.name[i] = '\0'; c181159a5b1e1e Yong Zhao 2019-08-01 1976 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 1977 dev->node_props.simd_arrays_per_engine = 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 1978 cu_info.num_shader_arrays_per_engine; 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 1979 8dc1db3172ae2f Mukul Joshi 2022-09-14 1980 dev->node_props.gfx_target_version = 8dc1db3172ae2f Mukul Joshi 2022-09-14 1981 gpu->kfd->device_info.gfx_target_version; d69a3b762dc4c9 Mukul Joshi 2022-05-09 1982 dev->node_props.vendor_id = gpu->adev->pdev->vendor; d69a3b762dc4c9 Mukul Joshi 2022-05-09 1983 dev->node_props.device_id = gpu->adev->pdev->device; c6d1ec4134edc1 Joseph Greathouse 2020-04-16 1984 dev->node_props.capability |= 02274fc0f67259 Graham Sider 2021-11-05 1985 ((dev->gpu->adev->rev_id << HSA_CAP_ASIC_REVISION_SHIFT) & c6d1ec4134edc1 Joseph Greathouse 2020-04-16 1986 HSA_CAP_ASIC_REVISION_MASK); 92085240ef9c0e Jonathan Kim 2022-05-03 1987 d69a3b762dc4c9 Mukul Joshi 2022-05-09 1988 dev->node_props.location_id = pci_dev_id(gpu->adev->pdev); 92085240ef9c0e Jonathan Kim 2022-05-03 1989 if (KFD_GC_VERSION(dev->gpu->kfd) == IP_VERSION(9, 4, 3)) 92085240ef9c0e Jonathan Kim 2022-05-03 1990 dev->node_props.location_id |= dev->gpu->node_id; 92085240ef9c0e Jonathan Kim 2022-05-03 1991 d69a3b762dc4c9 Mukul Joshi 2022-05-09 1992 dev->node_props.domain = pci_domain_nr(gpu->adev->pdev->bus); 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 1993 dev->node_props.max_engine_clk_fcompute = 574c4183ef7511 Graham Sider 2021-10-19 1994 amdgpu_amdkfd_get_max_engine_clock_in_mhz(dev->gpu->adev); 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 1995 dev->node_props.max_engine_clk_ccompute = 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 1996 cpufreq_quick_get_max(0) / 1000; a476c0c645535c Philip Yang 2023-02-23 1997 a476c0c645535c Philip Yang 2023-02-23 1998 if (gpu->xcp) a476c0c645535c Philip Yang 2023-02-23 1999 dev->node_props.drm_render_minor = gpu->xcp->ddev->render->index; a476c0c645535c Philip Yang 2023-02-23 2000 else 7c9b717196b1af Oak Zeng 2018-03-15 2001 dev->node_props.drm_render_minor = 8dc1db3172ae2f Mukul Joshi 2022-09-14 2002 gpu->kfd->shared_resources.drm_render_minor; 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2003 8dc1db3172ae2f Mukul Joshi 2022-09-14 2004 dev->node_props.hive_id = gpu->kfd->hive_id; ee2f17f4d02b14 Amber Lin 2021-11-18 2005 dev->node_props.num_sdma_engines = kfd_get_num_sdma_engines(gpu); 14568cf6583e9d Oak Zeng 2019-02-08 2006 dev->node_props.num_sdma_xgmi_engines = ee2f17f4d02b14 Amber Lin 2021-11-18 2007 kfd_get_num_xgmi_sdma_engines(gpu); bb71c74db3c554 Huang Rui 2019-12-16 2008 dev->node_props.num_sdma_queues_per_engine = 8dc1db3172ae2f Mukul Joshi 2022-09-14 2009 gpu->kfd->device_info.num_sdma_queues_per_engine - 8dc1db3172ae2f Mukul Joshi 2022-09-14 2010 gpu->kfd->device_info.num_reserved_sdma_queues_per_engine; 29633d0e204df1 Joseph Greathouse 2020-01-15 2011 dev->node_props.num_gws = (dev->gpu->gws && 29e764621bbcd4 Oak Zeng 2019-05-03 2012 dev->gpu->dqm->sched_policy != KFD_SCHED_POLICY_NO_HWS) ? 02274fc0f67259 Graham Sider 2021-11-05 2013 dev->gpu->adev->gds.gws_size : 0; e6945304187dea Yong Zhao 2020-01-30 2014 dev->node_props.num_cp_queues = get_cp_queues_num(dev->gpu->dqm); 0c1690e38b5e68 Shaoyun Liu 2018-07-06 2015 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2016 kfd_fill_mem_clk_max_info(dev); 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2017 kfd_fill_iolink_non_crat_info(dev); 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2018 7eb0502ac0538e Graham Sider 2021-11-10 2019 switch (dev->gpu->adev->asic_type) { 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2020 case CHIP_KAVERI: 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2021 case CHIP_HAWAII: 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2022 case CHIP_TONGA: 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2023 dev->node_props.capability |= ((HSA_CAP_DOORBELL_TYPE_PRE_1_0 << 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2024 HSA_CAP_DOORBELL_TYPE_TOTALBITS_SHIFT) & 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2025 HSA_CAP_DOORBELL_TYPE_TOTALBITS_MASK); 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2026 break; 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2027 case CHIP_CARRIZO: 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2028 case CHIP_FIJI: 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2029 case CHIP_POLARIS10: 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2030 case CHIP_POLARIS11: 846a44d7e918a4 Gang Ba 2018-09-05 2031 case CHIP_POLARIS12: ed81cd6e0e9f37 Kent Russell 2019-03-21 2032 case CHIP_VEGAM: 42aa8793d795f1 Felix Kuehling 2017-12-08 2033 pr_debug("Adding doorbell packet type capability\n"); 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2034 dev->node_props.capability |= ((HSA_CAP_DOORBELL_TYPE_1_0 << 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2035 HSA_CAP_DOORBELL_TYPE_TOTALBITS_SHIFT) & 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2036 HSA_CAP_DOORBELL_TYPE_TOTALBITS_MASK); 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2037 break; e4804a39ba5f72 Graham Sider 2021-10-28 2038 default: d230f1bfe7a197 Jonathan Kim 2022-03-25 2039 if (KFD_GC_VERSION(dev->gpu) < IP_VERSION(9, 0, 1)) 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2040 WARN(1, "Unexpected ASIC family %u", 7eb0502ac0538e Graham Sider 2021-11-10 2041 dev->gpu->adev->asic_type); d230f1bfe7a197 Jonathan Kim 2022-03-25 2042 else d230f1bfe7a197 Jonathan Kim 2022-03-25 2043 kfd_topology_set_capabilities(dev); 7639a8c420f04c Ben Goz 2015-06-07 2044 } 7639a8c420f04c Ben Goz 2015-06-07 2045 1ae99eab34f90c Oak Zeng 2019-06-10 2046 /* 1ae99eab34f90c Oak Zeng 2019-06-10 2047 * Overwrite ATS capability according to needs_iommu_device to fix 1ae99eab34f90c Oak Zeng 2019-06-10 2048 * potential missing corresponding bit in CRAT of BIOS. 1ae99eab34f90c Oak Zeng 2019-06-10 2049 */ 1ae99eab34f90c Oak Zeng 2019-06-10 2050 dev->node_props.capability &= ~HSA_CAP_ATS_PRESENT; 1ae99eab34f90c Oak Zeng 2019-06-10 2051 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2052 /* Fix errors in CZ CRAT. 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2053 * simd_count: Carrizo CRAT reports wrong simd_count, probably 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2054 * because it doesn't consider masked out CUs 70f372bffcc84c Philip Cox 2017-12-08 2055 * max_waves_per_simd: Carrizo reports wrong max_waves_per_simd 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2056 */ 7eb0502ac0538e Graham Sider 2021-11-10 2057 if (dev->gpu->adev->asic_type == CHIP_CARRIZO) { 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2058 dev->node_props.simd_count = 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2059 cu_info.simd_per_cu * cu_info.cu_active_number; 70f372bffcc84c Philip Cox 2017-12-08 2060 dev->node_props.max_waves_per_simd = 10; 70f372bffcc84c Philip Cox 2017-12-08 2061 } 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2062 5436ab94cd9460 Stanley.Yang 2020-08-17 2063 /* kfd only concerns sram ecc on GFX and HBM ecc on UMC */ 0dee45a25a63f7 Eric Huang 2019-01-11 2064 dev->node_props.capability |= 56c5977eae8799 Graham Sider 2021-10-19 2065 ((dev->gpu->adev->ras_enabled & BIT(AMDGPU_RAS_BLOCK__GFX)) != 0) ? 0dee45a25a63f7 Eric Huang 2019-01-11 2066 HSA_CAP_SRAM_EDCSUPPORTED : 0; 56c5977eae8799 Graham Sider 2021-10-19 2067 dev->node_props.capability |= 56c5977eae8799 Graham Sider 2021-10-19 2068 ((dev->gpu->adev->ras_enabled & BIT(AMDGPU_RAS_BLOCK__UMC)) != 0) ? 0dee45a25a63f7 Eric Huang 2019-01-11 2069 HSA_CAP_MEM_EDCSUPPORTED : 0; 0dee45a25a63f7 Eric Huang 2019-01-11 2070 046e674b961594 Graham Sider 2021-11-09 2071 if (KFD_GC_VERSION(dev->gpu) != IP_VERSION(9, 0, 1)) 56c5977eae8799 Graham Sider 2021-10-19 2072 dev->node_props.capability |= (dev->gpu->adev->ras_enabled != 0) ? 0dee45a25a63f7 Eric Huang 2019-01-11 2073 HSA_CAP_RASEVENTNOTIFY : 0; 0dee45a25a63f7 Eric Huang 2019-01-11 2074 610dab118ff501 Philip Yang 2023-03-31 2075 if (KFD_IS_SVM_API_SUPPORTED(dev->gpu->adev)) 4c166eb95decf0 Philip Yang 2020-12-09 2076 dev->node_props.capability |= HSA_CAP_SVMAPI_SUPPORTED; 4c166eb95decf0 Philip Yang 2020-12-09 2077 03d400e7605e3d Alex Sierra 2023-06-15 2078 if (dev->gpu->adev->gmc.is_app_apu || 03d400e7605e3d Alex Sierra 2023-06-15 2079 dev->gpu->adev->gmc.xgmi.connected_to_cpu) 03d400e7605e3d Alex Sierra 2023-06-15 2080 dev->node_props.capability |= HSA_CAP_FLAGS_COHERENTHOSTACCESS; 03d400e7605e3d Alex Sierra 2023-06-15 2081 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2082 kfd_debug_print_topology(); 3a87177eb14113 Harish Kasiviswanathan 2017-12-08 2083 5b5c4e40a37e85 Evgeny Pinchuk 2014-07-16 2084 kfd_notify_gpu_change(gpu_id, 1); f701acb6a4ed0a Felix Kuehling 2022-11-16 2085 7d4f8db4a1448e Dan Carpenter 2022-11-25 2086 return 0; 5b5c4e40a37e85 Evgeny Pinchuk 2014-07-16 2087 } 5b5c4e40a37e85 Evgeny Pinchuk 2014-07-16 2088 :::::: The code at line 1922 was first introduced by commit :::::: 8dc1db3172ae2f17ae71e33b608a33411ce8a1aa drm/amdkfd: Introduce kfd_node struct (v5) :::::: TO: Mukul Joshi <mukul.joshi(a)amd.com> :::::: CC: Alex Deucher <alexander.deucher(a)amd.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH OLK-6.6] x86: resctrl: Fix illegal access by the chips not having RDT
by Zeng Heng 12 Jul '24

12 Jul '24
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IA7L2U --------------------------- If the chip not having RDT function, resctrl_arch_system_num_rmid_idx() would return 0. rmid_ptrs points to an illegal buffer after kcalloc() allocation, which would cause illegal access fault when accessing. Consequently, when we found resctrl_arch_system_num_rmid_idx() return 0, just return EOPNOTSUPP immediatly and skip initializing the resctrl file system. Fixes: 13e249bf4944 ("x86/resctrl: Move the filesystem portions of resctrl to live in '/fs/'") Signed-off-by: Zeng Heng <zengheng4(a)huawei.com> --- fs/resctrl/monitor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/resctrl/monitor.c b/fs/resctrl/monitor.c index fcf2ab18966f..6f93ed1681c4 100644 --- a/fs/resctrl/monitor.c +++ b/fs/resctrl/monitor.c @@ -727,6 +727,9 @@ static int dom_data_init(struct rdt_resource *r) int err = 0, i; u32 idx; + if (!idx_limit) + return -EOPNOTSUPP; + mutex_lock(&rdtgroup_mutex); if (IS_ENABLED(CONFIG_RESCTRL_RMID_DEPENDS_ON_CLOSID)) { u32 *tmp; -- 2.25.1
2 1
0 0
[PATCH V2 OLK-5.10] iommu/arm-smmu-v3: Change the style to identify the the hisi_platform
by Zhang Zekun 12 Jul '24

12 Jul '24
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IACKUP ---------------------------------------------- The code is isolated by CONFIG_ARCH_HISI which could also be opened in other platforms . Change the style to identify the hisi platform to minimize the code influence scope. Fixes: 46f0c5798ba5 ("iommu/arm-smmu-v3: Enable iotlb_sync_map according to SMMU_IIDR") Signed-off-by: Zhang Zekun <zhangzekun11(a)huawei.com> --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 33 ++++++++++++++++----- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index 7c818a17ca11..c5c25be54fd5 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -129,6 +129,7 @@ struct arm_smmu_ctx_desc quiet_cd = { 0 }; static struct arm_smmu_option_prop arm_smmu_options[] = { { ARM_SMMU_OPT_SKIP_PREFETCH, "hisilicon,broken-prefetch-cmd" }, { ARM_SMMU_OPT_PAGE0_REGS_ONLY, "cavium,cn9900-broken-page1-regspace"}, + { ARM_SMMU_OPT_SYNC_MAP, "hisilicon,broken-prefetch-pgtbl"}, { 0, NULL}, }; @@ -4948,14 +4949,9 @@ static void hisi_smmu_check_errata(struct arm_smmu_device *smmu) { u32 reg, i; - /* IIDR */ - reg = readl_relaxed(smmu->base + ARM_SMMU_IIDR); - if (!(FIELD_GET(IIDR_VARIANT, reg) == 0x3) || - !(FIELD_GET(IIDR_REVISON, reg) == 0x2)) + if (!(smmu->options & ARM_SMMU_OPT_SYNC_MAP)) return; - smmu->options |= ARM_SMMU_OPT_SYNC_MAP; - reg = readl_relaxed(smmu->base + ARM_SMMU_USER_CFG1); reg = reg & GENMASK(15, 0); for (i = 0; i < 8; i++) { @@ -4981,6 +4977,8 @@ static void hisi_smmu_check_errata(struct arm_smmu_device *smmu) } smmu->options |= ARM_SMMU_OPT_SYNC_BATCH; } +#else +static void hisi_smmu_check_errata(struct arm_smmu_device *smmu) {} #endif static int arm_smmu_device_hw_probe(struct arm_smmu_device *smmu) @@ -5213,9 +5211,7 @@ static int arm_smmu_device_hw_probe(struct arm_smmu_device *smmu) smmu->oas = 48; } -#ifdef CONFIG_HISILICON_ERRATUM_162100602 hisi_smmu_check_errata(smmu); -#endif if (arm_smmu_ops.pgsize_bitmap == -1UL) arm_smmu_ops.pgsize_bitmap = smmu->pgsize_bitmap; @@ -5248,6 +5244,25 @@ static int arm_smmu_device_hw_probe(struct arm_smmu_device *smmu) } #ifdef CONFIG_ACPI +static struct acpi_platform_list arm_smmu_v3_plat_info[] __initdata = { + /* HiSilicon Hip09 Platform */ + {"HISI ", "HIP09 ", 0, ACPI_SIG_IORT, greater_than_or_equal, + "Erratum #162100602", 0}, + {"HISI ", "HIP10 ", 0, ACPI_SIG_IORT, greater_than_or_equal, + "Erratum #162100602", 0}, + {"HISI ", "HIP11 ", 0, ACPI_SIG_IORT, greater_than_or_equal, + "Erratum #162100602", 0}, + { } +}; + +static void acpi_get_hisi_options(struct arm_smmu_device *smmu) +{ + if (acpi_match_platform_list(arm_smmu_v3_plat_info) < 0) + return; + + smmu->options |= ARM_SMMU_OPT_SYNC_MAP; +} + static void acpi_smmu_get_options(u32 model, struct arm_smmu_device *smmu) { switch (model) { @@ -5259,6 +5274,8 @@ static void acpi_smmu_get_options(u32 model, struct arm_smmu_device *smmu) break; } + acpi_get_hisi_options(smmu); + dev_notice(smmu->dev, "option mask 0x%x\n", smmu->options); } -- 2.17.1
2 1
0 0
[PATCH OLK-5.10] iommu/arm-smmu-v3: Change the style to identify the the hisi_platform
by Zhang Zekun 12 Jul '24

12 Jul '24
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IACKUP ---------------------------------------------- The code is isolated by CONFIG_ARCH_HISI which could also be opened in other platforms . Change the style to identify the hisi platform to minimize the code influence scope. Fixes: 46f0c5798ba5 ("iommu/arm-smmu-v3: Enable iotlb_sync_map according to SMMU_IIDR") Signed-off-by: Zhang Zekun <zhangzekun11(a)huawei.com> --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 33 ++++++++++++++++----- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index 7c818a17ca11..c5c25be54fd5 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -129,6 +129,7 @@ struct arm_smmu_ctx_desc quiet_cd = { 0 }; static struct arm_smmu_option_prop arm_smmu_options[] = { { ARM_SMMU_OPT_SKIP_PREFETCH, "hisilicon,broken-prefetch-cmd" }, { ARM_SMMU_OPT_PAGE0_REGS_ONLY, "cavium,cn9900-broken-page1-regspace"}, + { ARM_SMMU_OPT_SYNC_MAP, "hisilicon,broken-prefetch-pgtbl"}, { 0, NULL}, }; @@ -4948,14 +4949,9 @@ static void hisi_smmu_check_errata(struct arm_smmu_device *smmu) { u32 reg, i; - /* IIDR */ - reg = readl_relaxed(smmu->base + ARM_SMMU_IIDR); - if (!(FIELD_GET(IIDR_VARIANT, reg) == 0x3) || - !(FIELD_GET(IIDR_REVISON, reg) == 0x2)) + if (!(smmu->options & ARM_SMMU_OPT_SYNC_MAP)) return; - smmu->options |= ARM_SMMU_OPT_SYNC_MAP; - reg = readl_relaxed(smmu->base + ARM_SMMU_USER_CFG1); reg = reg & GENMASK(15, 0); for (i = 0; i < 8; i++) { @@ -4981,6 +4977,8 @@ static void hisi_smmu_check_errata(struct arm_smmu_device *smmu) } smmu->options |= ARM_SMMU_OPT_SYNC_BATCH; } +#else +static void hisi_smmu_check_errata(struct arm_smmu_device *smmu) {} #endif static int arm_smmu_device_hw_probe(struct arm_smmu_device *smmu) @@ -5213,9 +5211,7 @@ static int arm_smmu_device_hw_probe(struct arm_smmu_device *smmu) smmu->oas = 48; } -#ifdef CONFIG_HISILICON_ERRATUM_162100602 hisi_smmu_check_errata(smmu); -#endif if (arm_smmu_ops.pgsize_bitmap == -1UL) arm_smmu_ops.pgsize_bitmap = smmu->pgsize_bitmap; @@ -5248,6 +5244,25 @@ static int arm_smmu_device_hw_probe(struct arm_smmu_device *smmu) } #ifdef CONFIG_ACPI +static struct acpi_platform_list arm_smmu_v3_plat_info[] __initdata = { + /* HiSilicon Hip09 Platform */ + {"HISI ", "HIP09 ", 0, ACPI_SIG_IORT, greater_than_or_equal, + "Erratum #162100602", 0}, + {"HISI ", "HIP10 ", 0, ACPI_SIG_IORT, greater_than_or_equal, + "Erratum #162100602", 0}, + {"HISI ", "HIP11 ", 0, ACPI_SIG_IORT, greater_than_or_equal, + "Erratum #162100602", 0}, + { } +}; + +static void acpi_get_hisi_options(struct arm_smmu_device *smmu) +{ + if (acpi_match_platform_list(arm_smmu_v3_plat_info) < 0) + return; + + smmu->options |= ARM_SMMU_OPT_SYNC_MAP; +} + static void acpi_smmu_get_options(u32 model, struct arm_smmu_device *smmu) { switch (model) { @@ -5259,6 +5274,8 @@ static void acpi_smmu_get_options(u32 model, struct arm_smmu_device *smmu) break; } + acpi_get_hisi_options(smmu); + dev_notice(smmu->dev, "option mask 0x%x\n", smmu->options); } -- 2.17.1
2 1
0 0
[PATCH openEuler-22.03-LTS-SP1] Bluetooth: hci_event: Fix handling of HCI_EV_IO_CAPA_REQUEST
by Yongqiang Liu 12 Jul '24

12 Jul '24
From: Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com> stable inclusion from stable-v5.10.212 commit df193568d61234c81de7ed4d540c01975de60277 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9Q8M1 CVE: CVE-2024-27416 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit 7e74aa53a68bf60f6019bd5d9a9a1406ec4d4865 ] If we received HCI_EV_IO_CAPA_REQUEST while HCI_OP_READ_REMOTE_EXT_FEATURES is yet to be responded assume the remote does support SSP since otherwise this event shouldn't be generated. Link: https://lore.kernel.org/linux-bluetooth/CABBYNZ+9UdG1cMZVmdtN3U2aS16AKMCyTA… Fixes: c7f59461f5a7 ("Bluetooth: Fix a refcnt underflow problem for hci_conn") Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Rui Xiang <rui.xiang(a)huawei.com> --- net/bluetooth/hci_event.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index e01159d8fabf..ff348a8a2424 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -4620,9 +4620,12 @@ static void hci_io_capa_request_evt(struct hci_dev *hdev, struct sk_buff *skb) hci_dev_lock(hdev); conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); - if (!conn || !hci_conn_ssp_enabled(conn)) + if (!conn || !hci_dev_test_flag(hdev, HCI_SSP_ENABLED)) goto unlock; + /* Assume remote supports SSP since it has triggered this event */ + set_bit(HCI_CONN_SSP_ENABLED, &conn->flags); + hci_conn_hold(conn); if (!hci_dev_test_flag(hdev, HCI_MGMT)) -- 2.34.1
2 1
0 0
[PATCH OLK-5.10] fs: improve dump_mapping() robustness
by Jinjiang Tu 12 Jul '24

12 Jul '24
From: Baolin Wang <baolin.wang(a)linux.alibaba.com> mainline inclusion from mainline-v6.9-rc1 commit 8b3d838139bcd1e552f1899191f734264ce2a1a5 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IACHGW CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… ------------------------------------------- We met a kernel crash issue when running stress-ng testing, and the system crashes when printing the dentry name in dump_mapping(). Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 pc : dentry_name+0xd8/0x224 lr : pointer+0x22c/0x370 sp : ffff800025f134c0 ...... Call trace: dentry_name+0xd8/0x224 pointer+0x22c/0x370 vsnprintf+0x1ec/0x730 vscnprintf+0x2c/0x60 vprintk_store+0x70/0x234 vprintk_emit+0xe0/0x24c vprintk_default+0x3c/0x44 vprintk_func+0x84/0x2d0 printk+0x64/0x88 __dump_page+0x52c/0x530 dump_page+0x14/0x20 set_migratetype_isolate+0x110/0x224 start_isolate_page_range+0xc4/0x20c offline_pages+0x124/0x474 memory_block_offline+0x44/0xf4 memory_subsys_offline+0x3c/0x70 device_offline+0xf0/0x120 ...... The root cause is that, one thread is doing page migration, and we will use the target page's ->mapping field to save 'anon_vma' pointer between page unmap and page move, and now the target page is locked and refcount is 1. Currently, there is another stress-ng thread performing memory hotplug, attempting to offline the target page that is being migrated. It discovers that the refcount of this target page is 1, preventing the offline operation, thus proceeding to dump the page. However, page_mapping() of the target page may return an incorrect file mapping to crash the system in dump_mapping(), since the target page->mapping only saves 'anon_vma' pointer without setting PAGE_MAPPING_ANON flag. The page migration issue has been fixed by commit d1adb25df711 ("mm: migrate: fix getting incorrect page mapping during page migration"). In addition, Matthew suggested we should also improve dump_mapping()'s robustness to resilient against the kernel crash [1]. With checking the 'dentry.parent' and 'dentry.d_name.name' used by dentry_name(), I can see dump_mapping() will output the invalid dentry instead of crashing the system when this issue is reproduced again. [12211.189128] page:fffff7de047741c0 refcount:1 mapcount:0 mapping:ffff989117f55ea0 index:0x1 pfn:0x211dd07 [12211.189144] aops:0x0 ino:1 invalid dentry:74786574206e6870 [12211.189148] flags: 0x57ffffc0000001(locked|node=1|zone=2|lastcpupid=0x1fffff) [12211.189150] page_type: 0xffffffff() [12211.189153] raw: 0057ffffc0000001 0000000000000000 dead000000000122 ffff989117f55ea0 [12211.189154] raw: 0000000000000001 0000000000000001 00000001ffffffff 0000000000000000 [12211.189155] page dumped because: unmovable page [1] https://lore.kernel.org/all/ZXxn%2F0oixJxxAnpF@casper.infradead.org/ Suggested-by: Matthew Wilcox <willy(a)infradead.org> Signed-off-by: Baolin Wang <baolin.wang(a)linux.alibaba.com> Link: https://lore.kernel.org/r/937ab1f87328516821d39be672b6bc18861d9d3e.17053914… Signed-off-by: Christian Brauner <brauner(a)kernel.org> Conflicts: fs/inode.c mm/debug.c [Prior cleanup commit 3e9d80a891df is not merged.] Signed-off-by: Jinjiang Tu <tujinjiang(a)huawei.com> --- mm/debug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/debug.c b/mm/debug.c index 8a40b3fefbeb..6ead410ec389 100644 --- a/mm/debug.c +++ b/mm/debug.c @@ -150,7 +150,8 @@ void __dump_page(struct page *page, const char *reason) } dentry_ptr = container_of(dentry_first, struct dentry, d_u.d_alias); - if (get_kernel_nofault(dentry, dentry_ptr)) { + if (get_kernel_nofault(dentry, dentry_ptr) || + !dentry.d_parent || !dentry.d_name.name) { pr_warn("aops:%ps ino:%lx with invalid dentry %px\n", a_ops, ino, dentry_ptr); } else { -- 2.25.1
2 1
0 0
  • ← Newer
  • 1
  • ...
  • 1136
  • 1137
  • 1138
  • 1139
  • 1140
  • 1141
  • 1142
  • ...
  • 2204
  • Older →

HyperKitty Powered by HyperKitty