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

February 2025

  • 56 participants
  • 330 discussions
[openeuler:OLK-5.10] BUILD REGRESSION 263072f655dcd6fd63f7d5dd1f9c5553134982fa
by kernel test robot 09 Feb '25

09 Feb '25
tree/branch: https://gitee.com/openeuler/kernel.git OLK-5.10 branch HEAD: 263072f655dcd6fd63f7d5dd1f9c5553134982fa !15046 pinmux: Use sequential access to access desc->pinmux data Error/Warning (recently discovered and may have been fixed): https://lore.kernel.org/oe-kbuild-all/202502082204.WShjoZst-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202502082313.lZnwkvkI-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202502082340.S6mQ2xsd-lkp@intel.com fs/ceph/snap.o: warning: objtool: ceph_update_snap_trace()+0xb8c: unreachable instruction mm/damon/core-test.h:284:2: warning: comparison of distinct pointer types ('typeof (__left) *' (aka 'unsigned int *') and 'typeof (__right) *' (aka 'int *')) [-Wcompare-distinct-pointer-types] Error/Warning ids grouped by kconfigs: recent_errors |-- arm64-allnoconfig | |-- include-linux-backing-dev.h:warning:struct-cgroup_subsys-declared-inside-parameter-list-will-not-be-visible-outside-of-this-definition-or-declaration | |-- kismet:WARNING:unmet-direct-dependencies-detected-for-DRM_PANEL_BRIDGE-when-selected-by-DRM_TOSHIBA_TC358762 | |-- kismet:WARNING:unmet-direct-dependencies-detected-for-SERIAL_EARLYCON-when-selected-by-SERIAL_IMX_EARLYCON | |-- kismet:WARNING:unmet-direct-dependencies-detected-for-SND_SOC_DMIC-when-selected-by-SND_SOC_INTEL_DA7219_MAX98357A_GENERIC | |-- kismet:WARNING:unmet-direct-dependencies-detected-for-SND_SOC_DMIC-when-selected-by-SND_SOC_STM32_DFSDM | |-- mm-page_alloc.c:warning:no-previous-prototype-for-arch_memmap_init | `-- mm-page_alloc.c:warning:no-previous-prototype-for-should_fail_alloc_page |-- arm64-defconfig | |-- include-linux-lsm_hook_defs.h:warning:file_ioctl_compat_default-defined-but-not-used | |-- mm-khugepaged.c:warning:Function-parameter-or-member-reliable-not-described-in-collapse_file | |-- mm-page_alloc.c:warning:no-previous-prototype-for-arch_memmap_init | `-- mm-page_alloc.c:warning:no-previous-prototype-for-should_fail_alloc_page |-- x86_64-allnoconfig | |-- include-linux-backing-dev.h:warning:declaration-of-struct-cgroup_subsys-will-not-be-visible-outside-of-this-function | |-- include-linux-blk_types.h:linux-kabi.h-is-included-more-than-once. | |-- include-linux-cred.h:linux-kabi.h-is-included-more-than-once. | |-- include-linux-device-class.h:linux-kabi.h-is-included-more-than-once. | |-- include-linux-device.h:linux-kabi.h-is-included-more-than-once. | |-- include-linux-ioport.h:linux-kabi.h-is-included-more-than-once. | |-- include-linux-mm.h:linux-kabi.h-is-included-more-than-once. | |-- include-linux-swap.h:linux-kabi.h-is-included-more-than-once. | |-- ld.lld:error:version-script-assignment-of-LINUX_2.-to-symbol-__vdso_sgx_enter_enclave-failed:symbol-not-defined | |-- llvm-objcopy:error:arch-x86-entry-vdso-vdso64.so.dbg:No-such-file-or-directory | `-- llvm-objdump:error:arch-x86-entry-vdso-vdso64.so.dbg:No-such-file-or-directory |-- x86_64-allyesconfig | |-- crypto-asymmetric_keys-pgp_library.c:warning:Excess-function-parameter-_data-description-in-pgp_parse_packets | |-- crypto-asymmetric_keys-pgp_library.c:warning:Excess-function-parameter-_datalen-description-in-pgp_parse_packets | |-- crypto-asymmetric_keys-pgp_library.c:warning:Function-parameter-or-member-data-not-described-in-pgp_parse_packets | |-- crypto-asymmetric_keys-pgp_library.c:warning:Function-parameter-or-member-datalen-not-described-in-pgp_parse_packets | |-- mm-khugepaged.c:warning:Function-parameter-or-member-reliable-not-described-in-collapse_file | `-- mm-mem_reliable.c:warning:arithmetic-between-different-enumeration-types-(-enum-node_stat_item-and-enum-lru_list-) |-- x86_64-buildonly-randconfig-001-20250208 | |-- ld.lld:error:version-script-assignment-of-LINUX_2.-to-symbol-__vdso_sgx_enter_enclave-failed:symbol-not-defined | |-- llvm-objcopy:error:arch-x86-entry-vdso-vdso64.so.dbg:No-such-file-or-directory | `-- llvm-objdump:error:arch-x86-entry-vdso-vdso64.so.dbg:No-such-file-or-directory |-- x86_64-buildonly-randconfig-002-20250205 | `-- fs-ceph-snap.o:warning:objtool:ceph_update_snap_trace:unreachable-instruction |-- x86_64-buildonly-randconfig-002-20250208 | |-- include-trace-trace_events.h:warning:str__fs__trace_system_name-defined-but-not-used | |-- mm-khugepaged.c:warning:Function-parameter-or-member-reliable-not-described-in-collapse_file | |-- mm-page_alloc.c:warning:no-previous-prototype-for-arch_memmap_init | `-- mm-page_alloc.c:warning:no-previous-prototype-for-should_fail_alloc_page |-- x86_64-buildonly-randconfig-003-20250208 | |-- include-linux-lsm_hook_defs.h:warning:file_ioctl_compat_default-defined-but-not-used | |-- mm-khugepaged.c:warning:Function-parameter-or-member-reliable-not-described-in-collapse_file | |-- mm-page_alloc.c:warning:no-previous-prototype-for-arch_memmap_init | `-- mm-page_alloc.c:warning:no-previous-prototype-for-should_fail_alloc_page |-- x86_64-buildonly-randconfig-004-20250208 | |-- mm-damon-core-test.h:warning:comparison-of-distinct-pointer-types-(-typeof-(__left)-(aka-unsigned-int-)-and-typeof-(__right)-(aka-int-)) | `-- mm-hugetlb.c:warning:variable-gfp-set-but-not-used |-- x86_64-buildonly-randconfig-005-20250208 | |-- include-linux-backing-dev.h:warning:declaration-of-struct-cgroup_subsys-will-not-be-visible-outside-of-this-function | |-- ld.lld:error:version-script-assignment-of-LINUX_2.-to-symbol-__vdso_sgx_enter_enclave-failed:symbol-not-defined | |-- llvm-objcopy:error:arch-x86-entry-vdso-vdso64.so.dbg:No-such-file-or-directory | |-- llvm-objdump:error:arch-x86-entry-vdso-vdso64.so.dbg:No-such-file-or-directory | `-- mm-khugepaged.c:warning:Function-parameter-or-member-reliable-not-described-in-collapse_file |-- x86_64-buildonly-randconfig-006-20250208 | |-- include-trace-trace_events.h:warning:str__fs__trace_system_name-defined-but-not-used | |-- mm-khugepaged.c:warning:Function-parameter-or-member-reliable-not-described-in-collapse_file | |-- mm-page_alloc.c:warning:no-previous-prototype-for-arch_memmap_init | `-- mm-page_alloc.c:warning:no-previous-prototype-for-should_fail_alloc_page `-- x86_64-defconfig |-- include-linux-lsm_hook_defs.h:warning:file_ioctl_compat_default-defined-but-not-used |-- include-trace-trace_events.h:warning:str__fs__trace_system_name-defined-but-not-used |-- mm-page_alloc.c:warning:no-previous-prototype-for-arch_memmap_init `-- mm-page_alloc.c:warning:no-previous-prototype-for-should_fail_alloc_page elapsed time: 728m configs tested: 16 configs skipped: 113 tested configs: arm64 allmodconfig clang-18 arm64 allnoconfig gcc-14.2.0 arm64 defconfig gcc-14.2.0 arm64 randconfig-001-20250208 clang-21 arm64 randconfig-002-20250208 clang-21 arm64 randconfig-003-20250208 clang-21 arm64 randconfig-004-20250208 clang-15 x86_64 allnoconfig clang-19 x86_64 allyesconfig clang-19 x86_64 buildonly-randconfig-001-20250208 clang-19 x86_64 buildonly-randconfig-002-20250208 gcc-12 x86_64 buildonly-randconfig-003-20250208 gcc-12 x86_64 buildonly-randconfig-004-20250208 clang-19 x86_64 buildonly-randconfig-005-20250208 clang-19 x86_64 buildonly-randconfig-006-20250208 gcc-12 x86_64 defconfig gcc-11 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2729/2729] mm/hugetlb.c:2216:9: warning: variable 'gfp' set but not used
by kernel test robot 09 Feb '25

09 Feb '25
Hi Ben, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 263072f655dcd6fd63f7d5dd1f9c5553134982fa commit: 27a782f719fdab073c5b0e19764fad1f93cddd00 [2729/2729] mm/hugetlb: add support for mempolicy MPOL_PREFERRED_MANY config: x86_64-buildonly-randconfig-004-20250208 (https://download.01.org/0day-ci/archive/20250209/202502090535.KiiKAKub-lkp@…) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250209/202502090535.KiiKAKub-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/202502090535.KiiKAKub-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from mm/hugetlb.c:8: In file included from include/linux/mm.h:1573: include/linux/vmstat.h:431:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 431 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ >> mm/hugetlb.c:2216:9: warning: variable 'gfp' set but not used [-Wunused-but-set-variable] 2216 | gfp_t gfp = gfp_mask | __GFP_NOWARN; | ^ 2 warnings generated. vim +/gfp +2216 mm/hugetlb.c 2200 2201 /* 2202 * Use the VMA's mpolicy to allocate a huge page from the buddy. 2203 */ 2204 static 2205 struct page *alloc_buddy_huge_page_with_mpol(struct hstate *h, 2206 struct vm_area_struct *vma, unsigned long addr) 2207 { 2208 struct page *page = NULL; 2209 struct mempolicy *mpol; 2210 gfp_t gfp_mask = htlb_alloc_mask(h); 2211 int nid; 2212 nodemask_t *nodemask; 2213 2214 nid = huge_node(vma, addr, gfp_mask, &mpol, &nodemask); 2215 if (mpol_is_preferred_many(mpol)) { > 2216 gfp_t gfp = gfp_mask | __GFP_NOWARN; 2217 2218 gfp &= ~(__GFP_DIRECT_RECLAIM | __GFP_NOFAIL); 2219 page = alloc_surplus_huge_page(h, gfp_mask, nid, nodemask); 2220 2221 /* Fallback to all nodes if page==NULL */ 2222 nodemask = NULL; 2223 } 2224 2225 if (!page) 2226 page = alloc_surplus_huge_page(h, gfp_mask, nid, nodemask); 2227 mpol_cond_put(mpol); 2228 return page; 2229 } 2230 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1418/1418] mm/hugetlb.c:1370:6: warning: no previous prototype for 'free_huge_page_to_dhugetlb_pool'
by kernel test robot 09 Feb '25

09 Feb '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: cc7cb040bd0afe96f1da94c9f21eda5a986510a5 commit: 0bc0d0d57edacd59ebe38d05ad9c4b2bc185aa51 [1418/1418] dhugetlb: backport dynamic hugetlb feature config: x86_64-buildonly-randconfig-001-20250207 (https://download.01.org/0day-ci/archive/20250209/202502090531.QZLxv0jk-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250209/202502090531.QZLxv0jk-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/202502090531.QZLxv0jk-lkp@intel.com/ All warnings (new ones prefixed by >>): >> mm/hugetlb.c:1370:6: warning: no previous prototype for 'free_huge_page_to_dhugetlb_pool' [-Wmissing-prototypes] 1370 | void free_huge_page_to_dhugetlb_pool(struct page *page, bool restore_reserve) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from mm/hugetlb.c:14: include/linux/mempolicy.h:329:13: warning: '__do_mbind' defined but not used [-Wunused-function] 329 | static long __do_mbind(unsigned long start, unsigned long len, | ^~~~~~~~~~ -- In file included from include/linux/page_counter.h:6, from mm/memcontrol.c:34: mm/memcontrol.c: In function 'mem_cgroup_get_max': include/linux/kernel.h:884:45: warning: comparison of unsigned expression in '< 0' is always false [-Wtype-limits] 884 | #define min(x, y) __careful_cmp(x, y, <) | ^ include/linux/kernel.h:867:30: note: in definition of macro '__cmp' 867 | #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) | ^~ include/linux/kernel.h:884:25: note: in expansion of macro '__careful_cmp' 884 | #define min(x, y) __careful_cmp(x, y, <) | ^~~~~~~~~~~~~ mm/memcontrol.c:1542:28: note: in expansion of macro 'min' 1542 | swap_max = min(swap_max, (unsigned long)total_swap_pages); | ^~~ mm/memcontrol.c: At top level: >> mm/memcontrol.c:5008:6: warning: no previous prototype for 'dhugetlb_pool_is_free' [-Wmissing-prototypes] 5008 | bool dhugetlb_pool_is_free(struct cgroup_subsys_state *css) | ^~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/shmem_fs.h:7, from mm/memcontrol.c:39: include/linux/mempolicy.h:329:13: warning: '__do_mbind' defined but not used [-Wunused-function] 329 | static long __do_mbind(unsigned long start, unsigned long len, | ^~~~~~~~~~ mm/memcontrol.c:6718: warning: bad line: | 0, otherwise. vim +/free_huge_page_to_dhugetlb_pool +1370 mm/hugetlb.c 1324 1325 #ifdef CONFIG_DYNAMIC_HUGETLB 1326 static void free_huge_page_to_dhugetlb_pool(struct page *page, 1327 bool restore_reserve) 1328 { 1329 struct hstate *h = page_hstate(page); 1330 struct dhugetlb_pool *hpool; 1331 1332 hpool = get_dhugetlb_pool_from_dhugetlb_pagelist(page); 1333 if (unlikely(!hpool)) { 1334 pr_err("dhugetlb: free error: get hpool failed\n"); 1335 return; 1336 } 1337 1338 spin_lock(&hpool->lock); 1339 ClearPagePool(page); 1340 set_compound_page_dtor(page, NULL_COMPOUND_DTOR); 1341 if (!hstate_is_gigantic(h)) { 1342 list_add(&page->lru, &hpool->dhugetlb_2M_freelists); 1343 hpool->free_reserved_2M++; 1344 hpool->used_2M--; 1345 if (restore_reserve) { 1346 hpool->mmap_reserved_2M++; 1347 trace_dhugetlb_acct_memory(hpool, 1348 hpool->mmap_reserved_2M, 1349 DHUGETLB_RESV_2M); 1350 } 1351 trace_dhugetlb_alloc_free(hpool, page, hpool->free_reserved_2M, 1352 DHUGETLB_FREE_2M); 1353 } else { 1354 list_add(&page->lru, &hpool->dhugetlb_1G_freelists); 1355 hpool->free_reserved_1G++; 1356 hpool->used_1G--; 1357 if (restore_reserve) { 1358 hpool->mmap_reserved_1G++; 1359 trace_dhugetlb_acct_memory(hpool, 1360 hpool->mmap_reserved_1G, 1361 DHUGETLB_RESV_1G); 1362 } 1363 trace_dhugetlb_alloc_free(hpool, page, hpool->free_reserved_1G, 1364 DHUGETLB_FREE_1G); 1365 } 1366 spin_unlock(&hpool->lock); 1367 dhugetlb_pool_put(hpool); 1368 } 1369 #else > 1370 void free_huge_page_to_dhugetlb_pool(struct page *page, bool restore_reserve) 1371 { 1372 } 1373 #endif 1374 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1418/1418] mm/khugepaged.c:1336: warning: Function parameter or member 'reliable' not described in 'collapse_shmem'
by kernel test robot 09 Feb '25

09 Feb '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: cc7cb040bd0afe96f1da94c9f21eda5a986510a5 commit: ff0fb9e816fac221fa24a1810dd895745406070b [1418/1418] mm: thp: Add memory reliable support for hugepaged collapse config: x86_64-buildonly-randconfig-001-20250207 (https://download.01.org/0day-ci/archive/20250209/202502090339.Fw3TyU0R-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250209/202502090339.Fw3TyU0R-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/202502090339.Fw3TyU0R-lkp@intel.com/ All warnings (new ones prefixed by >>): mm/khugepaged.c:1336: warning: Function parameter or member 'mm' not described in 'collapse_shmem' mm/khugepaged.c:1336: warning: Function parameter or member 'mapping' not described in 'collapse_shmem' mm/khugepaged.c:1336: warning: Function parameter or member 'start' not described in 'collapse_shmem' mm/khugepaged.c:1336: warning: Function parameter or member 'hpage' not described in 'collapse_shmem' mm/khugepaged.c:1336: warning: Function parameter or member 'node' not described in 'collapse_shmem' >> mm/khugepaged.c:1336: warning: Function parameter or member 'reliable' not described in 'collapse_shmem' vim +1336 mm/khugepaged.c f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1314 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1315 /** f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1316 * collapse_shmem - collapse small tmpfs/shmem pages into huge one. f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1317 * f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1318 * Basic scheme is simple, details are more complex: af24c01831e4e21 Hugh Dickins 2018-11-30 1319 * - allocate and lock a new huge page; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1320 * - scan over radix tree replacing old pages the new one f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1321 * + swap in pages if necessary; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1322 * + fill in gaps; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1323 * + keep old pages around in case if rollback is required; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1324 * - if replacing succeed: f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1325 * + copy data over; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1326 * + free old pages; af24c01831e4e21 Hugh Dickins 2018-11-30 1327 * + unlock huge page; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1328 * - if replacing failed; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1329 * + put all pages back and unfreeze them; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1330 * + restore gaps in the radix-tree; af24c01831e4e21 Hugh Dickins 2018-11-30 1331 * + unlock and free huge page; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1332 */ f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1333 static void collapse_shmem(struct mm_struct *mm, f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1334 struct address_space *mapping, pgoff_t start, ff0fb9e816fac22 Ma Wupeng 2022-02-09 1335 struct page **hpage, int node, bool reliable) f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 @1336 { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1337 gfp_t gfp; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1338 struct page *page, *new_page, *tmp; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1339 struct mem_cgroup *memcg; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1340 pgoff_t index, end = start + HPAGE_PMD_NR; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1341 LIST_HEAD(pagelist); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1342 struct radix_tree_iter iter; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1343 void **slot; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1344 int nr_none = 0, result = SCAN_SUCCEED; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1345 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1346 VM_BUG_ON(start & (HPAGE_PMD_NR - 1)); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1347 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1348 /* Only allocate from the target node */ 41b6167e8f746b4 Michal Hocko 2017-01-10 1349 gfp = alloc_hugepage_khugepaged_gfpmask() | __GFP_THISNODE; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1350 ff0fb9e816fac22 Ma Wupeng 2022-02-09 1351 if (reliable) ff0fb9e816fac22 Ma Wupeng 2022-02-09 1352 gfp |= ___GFP_RELIABILITY; ff0fb9e816fac22 Ma Wupeng 2022-02-09 1353 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1354 new_page = khugepaged_alloc_page(hpage, gfp, node); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1355 if (!new_page) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1356 result = SCAN_ALLOC_HUGE_PAGE_FAIL; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1357 goto out; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1358 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1359 2a70f6a76bb86d1 Michal Hocko 2018-04-10 1360 if (unlikely(mem_cgroup_try_charge(new_page, mm, gfp, &memcg, true))) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1361 result = SCAN_CGROUP_CHARGE_FAIL; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1362 goto out; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1363 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1364 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1365 __SetPageLocked(new_page); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1366 __SetPageSwapBacked(new_page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1367 new_page->index = start; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1368 new_page->mapping = mapping; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1369 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1370 /* af24c01831e4e21 Hugh Dickins 2018-11-30 1371 * At this point the new_page is locked and not up-to-date. af24c01831e4e21 Hugh Dickins 2018-11-30 1372 * It's safe to insert it into the page cache, because nobody would af24c01831e4e21 Hugh Dickins 2018-11-30 1373 * be able to map it or use it in another way until we unlock it. f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1374 */ f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1375 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1376 index = start; b93b016313b3ba8 Matthew Wilcox 2018-04-10 1377 xa_lock_irq(&mapping->i_pages); b93b016313b3ba8 Matthew Wilcox 2018-04-10 1378 radix_tree_for_each_slot(slot, &mapping->i_pages, &iter, start) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1379 int n = min(iter.index, end) - index; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1380 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1381 /* 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1382 * Stop if extent has been hole-punched, and is now completely 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1383 * empty (the more obvious i_size_read() check would take an 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1384 * irq-unsafe seqlock on 32-bit). 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1385 */ 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1386 if (n >= HPAGE_PMD_NR) { 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1387 result = SCAN_TRUNCATED; 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1388 goto tree_locked; 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1389 } 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1390 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1391 /* f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1392 * Handle holes in the radix tree: charge it from shmem and f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1393 * insert relevant subpage of new_page into the radix-tree. f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1394 */ f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1395 if (n && !shmem_charge(mapping->host, n)) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1396 result = SCAN_FAIL; 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1397 goto tree_locked; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1398 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1399 for (; index < min(iter.index, end); index++) { b93b016313b3ba8 Matthew Wilcox 2018-04-10 1400 radix_tree_insert(&mapping->i_pages, index, f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1401 new_page + (index % HPAGE_PMD_NR)); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1402 } 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1403 nr_none += n; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1404 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1405 /* We are done. */ f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1406 if (index >= end) f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1407 break; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1408 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1409 page = radix_tree_deref_slot_protected(slot, b93b016313b3ba8 Matthew Wilcox 2018-04-10 1410 &mapping->i_pages.xa_lock); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1411 if (radix_tree_exceptional_entry(page) || !PageUptodate(page)) { b93b016313b3ba8 Matthew Wilcox 2018-04-10 1412 xa_unlock_irq(&mapping->i_pages); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1413 /* swap in or instantiate fallocated page */ f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1414 if (shmem_getpage(mapping->host, index, &page, f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1415 SGP_NOHUGE)) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1416 result = SCAN_FAIL; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1417 goto tree_unlocked; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1418 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1419 } else if (trylock_page(page)) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1420 get_page(page); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1421 xa_unlock_irq(&mapping->i_pages); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1422 } else { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1423 result = SCAN_PAGE_LOCK; 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1424 goto tree_locked; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1425 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1426 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1427 /* b93b016313b3ba8 Matthew Wilcox 2018-04-10 1428 * The page must be locked, so we can drop the i_pages lock f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1429 * without racing with truncate. f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1430 */ f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1431 VM_BUG_ON_PAGE(!PageLocked(page), page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1432 VM_BUG_ON_PAGE(!PageUptodate(page), page); 8b37c40503eadc6 Hugh Dickins 2018-11-30 1433 8b37c40503eadc6 Hugh Dickins 2018-11-30 1434 /* 8b37c40503eadc6 Hugh Dickins 2018-11-30 1435 * If file was truncated then extended, or hole-punched, before 8b37c40503eadc6 Hugh Dickins 2018-11-30 1436 * we locked the first page, then a THP might be there already. 8b37c40503eadc6 Hugh Dickins 2018-11-30 1437 */ 8b37c40503eadc6 Hugh Dickins 2018-11-30 1438 if (PageTransCompound(page)) { 8b37c40503eadc6 Hugh Dickins 2018-11-30 1439 result = SCAN_PAGE_COMPOUND; 8b37c40503eadc6 Hugh Dickins 2018-11-30 1440 goto out_unlock; 8b37c40503eadc6 Hugh Dickins 2018-11-30 1441 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1442 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1443 if (page_mapping(page) != mapping) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1444 result = SCAN_TRUNCATED; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1445 goto out_unlock; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1446 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1447 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1448 if (isolate_lru_page(page)) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1449 result = SCAN_DEL_PAGE_LRU; 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1450 goto out_unlock; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1451 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1452 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1453 if (page_mapped(page)) 977fbdcd5986c9f Matthew Wilcox 2018-01-31 1454 unmap_mapping_pages(mapping, index, 1, false); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1455 b93b016313b3ba8 Matthew Wilcox 2018-04-10 1456 xa_lock_irq(&mapping->i_pages); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1457 b93b016313b3ba8 Matthew Wilcox 2018-04-10 1458 slot = radix_tree_lookup_slot(&mapping->i_pages, index); 91a45f71078a656 Johannes Weiner 2016-12-12 1459 VM_BUG_ON_PAGE(page != radix_tree_deref_slot_protected(slot, b93b016313b3ba8 Matthew Wilcox 2018-04-10 1460 &mapping->i_pages.xa_lock), page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1461 VM_BUG_ON_PAGE(page_mapped(page), page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1462 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1463 /* f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1464 * The page is expected to have page_count() == 3: f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1465 * - we hold a pin on it; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1466 * - one reference from radix tree; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1467 * - one from isolate_lru_page; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1468 */ f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1469 if (!page_ref_freeze(page, 3)) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1470 result = SCAN_PAGE_COUNT; 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1471 xa_unlock_irq(&mapping->i_pages); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1472 putback_lru_page(page); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1473 goto out_unlock; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1474 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1475 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1476 /* f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1477 * Add the page to the list to be able to undo the collapse if f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1478 * something go wrong. f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1479 */ f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1480 list_add_tail(&page->lru, &pagelist); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1481 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1482 /* Finally, replace with the new page. */ b93b016313b3ba8 Matthew Wilcox 2018-04-10 1483 radix_tree_replace_slot(&mapping->i_pages, slot, f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1484 new_page + (index % HPAGE_PMD_NR)); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1485 148deab223b2373 Matthew Wilcox 2016-12-14 1486 slot = radix_tree_iter_resume(slot, &iter); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1487 index++; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1488 continue; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1489 out_unlock: f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1490 unlock_page(page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1491 put_page(page); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1492 goto tree_unlocked; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1493 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1494 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1495 /* f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1496 * Handle hole in radix tree at the end of the range. f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1497 * This code only triggers if there's nothing in radix tree f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1498 * beyond 'end'. f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1499 */ 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1500 if (index < end) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1501 int n = end - index; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1502 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1503 /* Stop if extent has been truncated, and is now empty */ 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1504 if (n >= HPAGE_PMD_NR) { 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1505 result = SCAN_TRUNCATED; 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1506 goto tree_locked; 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1507 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1508 if (!shmem_charge(mapping->host, n)) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1509 result = SCAN_FAIL; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1510 goto tree_locked; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1511 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1512 for (; index < end; index++) { b93b016313b3ba8 Matthew Wilcox 2018-04-10 1513 radix_tree_insert(&mapping->i_pages, index, f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1514 new_page + (index % HPAGE_PMD_NR)); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1515 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1516 nr_none += n; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1517 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1518 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1519 __inc_node_page_state(new_page, NR_SHMEM_THPS); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1520 if (nr_none) { 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1521 struct zone *zone = page_zone(new_page); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1522 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1523 __mod_node_page_state(zone->zone_pgdat, NR_FILE_PAGES, nr_none); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1524 __mod_node_page_state(zone->zone_pgdat, NR_SHMEM, nr_none); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1525 } 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1526 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1527 tree_locked: b93b016313b3ba8 Matthew Wilcox 2018-04-10 1528 xa_unlock_irq(&mapping->i_pages); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1529 tree_unlocked: f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1530 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1531 if (result == SCAN_SUCCEED) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1532 /* f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1533 * Replacing old pages with new one has succeed, now we need to f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1534 * copy the content and free old pages. f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1535 */ ee13d69bc1e8a55 Hugh Dickins 2018-11-30 1536 index = start; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1537 list_for_each_entry_safe(page, tmp, &pagelist, lru) { ee13d69bc1e8a55 Hugh Dickins 2018-11-30 1538 while (index < page->index) { ee13d69bc1e8a55 Hugh Dickins 2018-11-30 1539 clear_highpage(new_page + (index % HPAGE_PMD_NR)); ee13d69bc1e8a55 Hugh Dickins 2018-11-30 1540 index++; ee13d69bc1e8a55 Hugh Dickins 2018-11-30 1541 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1542 copy_highpage(new_page + (page->index % HPAGE_PMD_NR), f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1543 page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1544 list_del(&page->lru); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1545 page->mapping = NULL; 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1546 page_ref_unfreeze(page, 1); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1547 ClearPageActive(page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1548 ClearPageUnevictable(page); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1549 unlock_page(page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1550 put_page(page); ee13d69bc1e8a55 Hugh Dickins 2018-11-30 1551 index++; ee13d69bc1e8a55 Hugh Dickins 2018-11-30 1552 } ee13d69bc1e8a55 Hugh Dickins 2018-11-30 1553 while (index < end) { ee13d69bc1e8a55 Hugh Dickins 2018-11-30 1554 clear_highpage(new_page + (index % HPAGE_PMD_NR)); ee13d69bc1e8a55 Hugh Dickins 2018-11-30 1555 index++; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1556 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1557 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1558 SetPageUptodate(new_page); af24c01831e4e21 Hugh Dickins 2018-11-30 1559 page_ref_add(new_page, HPAGE_PMD_NR - 1); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1560 set_page_dirty(new_page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1561 mem_cgroup_commit_charge(new_page, memcg, false, true); 9d5425af85abe36 Chris Down 2021-06-30 1562 count_memcg_events(memcg, THP_COLLAPSE_ALLOC, 1); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1563 lru_cache_add_anon(new_page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1564 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1565 /* 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1566 * Remove pte page tables, so we can re-fault the page as huge. 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1567 */ 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1568 retract_page_tables(mapping, start); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1569 *hpage = NULL; 87aa752906ecf69 Yang Shi 2018-08-17 1570 87aa752906ecf69 Yang Shi 2018-08-17 1571 khugepaged_pages_collapsed++; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1572 } else { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1573 /* Something went wrong: rollback changes to the radix-tree */ b93b016313b3ba8 Matthew Wilcox 2018-04-10 1574 xa_lock_irq(&mapping->i_pages); 78141aabfbb9560 Hugh Dickins 2018-11-30 1575 mapping->nrpages -= nr_none; 78141aabfbb9560 Hugh Dickins 2018-11-30 1576 shmem_uncharge(mapping->host, nr_none); 78141aabfbb9560 Hugh Dickins 2018-11-30 1577 b93b016313b3ba8 Matthew Wilcox 2018-04-10 1578 radix_tree_for_each_slot(slot, &mapping->i_pages, &iter, start) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1579 if (iter.index >= end) f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1580 break; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1581 page = list_first_entry_or_null(&pagelist, f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1582 struct page, lru); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1583 if (!page || iter.index < page->index) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1584 if (!nr_none) f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1585 break; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1586 nr_none--; 59749e6ce53735d Johannes Weiner 2016-12-12 1587 /* Put holes back where they were */ b93b016313b3ba8 Matthew Wilcox 2018-04-10 1588 radix_tree_delete(&mapping->i_pages, iter.index); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1589 continue; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1590 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1591 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1592 VM_BUG_ON_PAGE(page->index != iter.index, page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1593 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1594 /* Unfreeze the page. */ f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1595 list_del(&page->lru); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1596 page_ref_unfreeze(page, 2); b93b016313b3ba8 Matthew Wilcox 2018-04-10 1597 radix_tree_replace_slot(&mapping->i_pages, slot, page); 148deab223b2373 Matthew Wilcox 2016-12-14 1598 slot = radix_tree_iter_resume(slot, &iter); b93b016313b3ba8 Matthew Wilcox 2018-04-10 1599 xa_unlock_irq(&mapping->i_pages); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1600 unlock_page(page); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1601 putback_lru_page(page); b93b016313b3ba8 Matthew Wilcox 2018-04-10 1602 xa_lock_irq(&mapping->i_pages); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1603 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1604 VM_BUG_ON(nr_none); b93b016313b3ba8 Matthew Wilcox 2018-04-10 1605 xa_unlock_irq(&mapping->i_pages); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1606 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1607 mem_cgroup_cancel_charge(new_page, memcg, true); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1608 new_page->mapping = NULL; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1609 } 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1610 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1611 unlock_page(new_page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1612 out: f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1613 VM_BUG_ON(!list_empty(&pagelist)); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1614 /* TODO: tracepoints */ f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1615 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1616 :::::: The code at line 1336 was first introduced by commit :::::: f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 khugepaged: add support of collapse for tmpfs/shmem pages :::::: TO: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com> :::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1418/1418] mm/maccess.c:64:6: warning: no previous prototype for '__probe_user_read'
by kernel test robot 09 Feb '25

09 Feb '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: cc7cb040bd0afe96f1da94c9f21eda5a986510a5 commit: 5c5bac1227aee80ee106ec07b32c981558049304 [1418/1418] uaccess: Add non-pagefault user-space read functions config: x86_64-buildonly-randconfig-001-20250207 (https://download.01.org/0day-ci/archive/20250209/202502090137.3KkiIJ8x-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250209/202502090137.3KkiIJ8x-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/202502090137.3KkiIJ8x-lkp@intel.com/ All warnings (new ones prefixed by >>): >> mm/maccess.c:64:6: warning: no previous prototype for '__probe_user_read' [-Wmissing-prototypes] 64 | long __probe_user_read(void *dst, const void __user *src, size_t size) | ^~~~~~~~~~~~~~~~~ vim +/__probe_user_read +64 mm/maccess.c 50 51 /** 52 * probe_user_read(): safely attempt to read from a user-space location 53 * @dst: pointer to the buffer that shall take the data 54 * @src: address to read from. This must be a user address. 55 * @size: size of the data chunk 56 * 57 * Safely read from user address @src to the buffer at @dst. If a kernel fault 58 * happens, handle that and return -EFAULT. 59 */ 60 61 long __weak probe_user_read(void *dst, const void __user *src, size_t size) 62 __attribute__((alias("__probe_user_read"))); 63 > 64 long __probe_user_read(void *dst, const void __user *src, size_t size) 65 { 66 long ret = -EFAULT; 67 mm_segment_t old_fs = get_fs(); 68 69 set_fs(USER_DS); 70 if (access_ok(src, size)) 71 ret = probe_read_common(dst, src, size); 72 set_fs(old_fs); 73 74 return ret; 75 } 76 EXPORT_SYMBOL_GPL(probe_user_read); 77 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS] BUILD REGRESSION cc7cb040bd0afe96f1da94c9f21eda5a986510a5
by kernel test robot 09 Feb '25

09 Feb '25
tree/branch: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS branch HEAD: cc7cb040bd0afe96f1da94c9f21eda5a986510a5 !15017 spi: mpc52xx: Add cancel_work_sync before module remove Error/Warning (recently discovered and may have been fixed): https://lore.kernel.org/oe-kbuild-all/202502082031.V2tZWUQg-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202502082225.bZGoGhTq-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202502082245.oXwKH6sI-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202502082355.jrzYRRaD-lkp@intel.com include/linux/thread_info.h:59:17: warning: 'ctl' may be used uninitialized [-Wmaybe-uninitialized] include/linux/uaccess.h:115:17: warning: 'from' may be used uninitialized [-Wmaybe-uninitialized] mm/.tmp_ioremap.o: warning: objtool: missing symbol for section .text mm/hugetlb.c:1370:6: warning: no previous prototype for function 'free_huge_page_to_dhugetlb_pool' [-Wmissing-prototypes] mm/kasan/kasan_init.c:328:16: warning: variable 'p4d' set but not used [-Wunused-but-set-variable] mm/memcontrol.c:432:54: warning: array subscript nid is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] mm/memcontrol.c:5375: warning: bad line: | 0, otherwise. Unverified Error/Warning (likely false positive, kindly check if interested): drivers/mtd/spi-nor/fsl-quadspi.c:909:9: sparse: sparse: incorrect type in argument 2 (different address spaces) drivers/usb/mtu3/mtu3_qmu.c:297:26: sparse: sparse: incorrect type in assignment (different base types) kernel/trace/ftrace.c:295:49: sparse: sparse: incorrect type in argument 1 (different address spaces) Error/Warning ids grouped by kconfigs: recent_errors |-- arm64-allmodconfig | |-- block-bio-integrity.c:warning:no-previous-prototype-for-__bio_integrity_free | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-blkg-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-delta-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-now-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-q-not-described-in-blkcg_schedule_throttle | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-use_memdelay-not-described-in-blkcg_schedule_throttle | |-- block-blk-io-hierarchy-iodump.c:warning:no-previous-prototype-for-__bio_stage_hierarchy_start | |-- block-blk-iolatency.c:warning:variable-blkiolat-set-but-not-used | |-- block-blk-iolatency.c:warning:variable-changed-set-but-not-used | |-- block-blk-mq-sched.c:warning:no-previous-prototype-for-__blk_mq_sched_dispatch_requests | |-- block-genhd.c:warning:no-previous-prototype-for-disk_scan_partitions | |-- drivers-net-ethernet-netswift-ngbe-ngbe_main.c:warning:unused-variable-len | |-- include-asm-generic-bitops-non-atomic.h:warning:array-subscript-long-unsigned-int-is-partly-outside-array-bounds-of-u32-aka-unsigned-int | |-- include-linux-kernel.h:warning:comparison-of-distinct-pointer-types-lacks-a-cast | |-- include-linux-thread_info.h:warning:b-may-be-used-uninitialized | |-- include-net-netns-generic.h:warning:array-subscript-id-is-outside-array-bounds-of-void | |-- include-scsi-scsi_cmnd.h:warning:scsi_cmnd-may-be-used-uninitialized | |-- mm-kasan-kasan_init.c:warning:variable-p4d-set-but-not-used | `-- mm-memcontrol.c:warning:array-subscript-nid-is-outside-array-bounds-of-struct-mem_cgroup_per_node |-- arm64-allnoconfig | |-- include-linux-mempolicy.h:warning:__do_mbind-defined-but-not-used | `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled |-- arm64-randconfig-001-20250207 | `-- mm-kasan-kasan_init.c:warning:variable-p4d-set-but-not-used |-- arm64-randconfig-001-20250208 | |-- block-bio-integrity.c:warning:no-previous-prototype-for-__bio_integrity_free | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-blkg-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-delta-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-now-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-q-not-described-in-blkcg_schedule_throttle | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-use_memdelay-not-described-in-blkcg_schedule_throttle | |-- block-blk-iolatency.c:warning:variable-blkiolat-set-but-not-used | |-- block-blk-iolatency.c:warning:variable-changed-set-but-not-used | |-- block-blk-merge.c:warning:no-previous-prototype-for-blk_try_req_merge | |-- block-blk-mq-sched.c:warning:no-previous-prototype-for-__blk_mq_sched_dispatch_requests | |-- block-genhd.c:warning:no-previous-prototype-for-disk_scan_partitions | |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union | |-- include-linux-filter.h:warning:cast-between-incompatible-function-types-from-u64-(-)(u64-u64-u64-u64-u64)-aka-long-long-unsigned-int-(-)(long-long-unsigned-int-long-long-unsigned-int-long-long-unsigne | |-- include-linux-list.h:warning:array-subscript-is-outside-array-bounds-of-struct-plist_node | |-- include-linux-list.h:warning:storing-the-address-of-local-variable-tmp-in-((struct-list_head-)lip)-.prev | |-- include-linux-mempolicy.h:warning:__do_mbind-defined-but-not-used | |-- include-linux-plist.h:warning:array-subscript-is-outside-array-bounds-of-struct-plist_node | `-- include-scsi-scsi_cmnd.h:warning:scsi_cmnd-may-be-used-uninitialized |-- arm64-randconfig-002-20250207 | `-- mm-memcontrol.c:warning:array-subscript-nid-is-outside-array-bounds-of-struct-mem_cgroup_per_node |-- arm64-randconfig-002-20250208 | |-- drivers-gpu-drm-ttm-ttm_object.c:error:Cannot-parse-struct-or-union | |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union | |-- include-linux-filter.h:warning:cast-between-incompatible-function-types-from-u64-(-)(u64-u64-u64-u64-u64)-aka-long-long-unsigned-int-(-)(long-long-unsigned-int-long-long-unsigned-int-long-long-unsigne | |-- include-linux-mempolicy.h:warning:__do_mbind-defined-but-not-used | `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled |-- arm64-randconfig-003-20250208 | |-- drivers-gpu-drm-ttm-ttm_object.c:error:Cannot-parse-struct-or-union | |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union | `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled |-- arm64-randconfig-004-20250208 | |-- drivers-gpu-drm-ttm-ttm_object.c:error:Cannot-parse-struct-or-union | |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union | |-- include-linux-filter.h:warning:cast-between-incompatible-function-types-from-u64-(-)(u64-u64-u64-u64-u64)-aka-long-long-unsigned-int-(-)(long-long-unsigned-int-long-long-unsigned-int-long-long-unsigne | |-- include-linux-mempolicy.h:warning:__do_mbind-defined-but-not-used | `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled |-- arm64-randconfig-r131-20250208 | |-- drivers-mtd-spi-nor-fsl-quadspi.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-const-got-void-noderef-__iomem | |-- drivers-usb-mtu3-mtu3_qmu.c:sparse:sparse:incorrect-type-in-assignment-(different-base-types)-expected-unsigned-char-usertype-rx_ext_addr-got-restricted-__le16-usertype | |-- include-linux-uaccess.h:warning:from-may-be-used-uninitialized | `-- kernel-trace-ftrace.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-struct-ftrace_ops-ops-got-struct-ftrace_ops-noderef-__rcu-static-toplevel-ftrace_ops_list |-- x86_64-allmodconfig | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-blkg-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-delta-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-now-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-q-not-described-in-blkcg_schedule_throttle | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-use_memdelay-not-described-in-blkcg_schedule_throttle | |-- block-blk-iolatency.c:warning:variable-blkiolat-set-but-not-used | |-- block-blk-iolatency.c:warning:variable-changed-set-but-not-used | `-- block-blk-mq-sched.c:warning:no-previous-prototype-for-function-__blk_mq_sched_dispatch_requests |-- x86_64-allnoconfig | |-- arch-x86-entry-entry_64.o:warning:objtool:.entry.text:unsupported-intra-function-call | |-- mm-ioremap.o:warning:objtool:missing-symbol-for-section-.text | `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled-Werror-Wimplicit-function-declaration |-- x86_64-allyesconfig | |-- block-bio-integrity.c:warning:no-previous-prototype-for-function-__bio_integrity_free | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-blkg-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-delta-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-now-not-described-in-blkcg_add_delay | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-q-not-described-in-blkcg_schedule_throttle | |-- block-blk-cgroup.c:warning:Function-parameter-or-member-use_memdelay-not-described-in-blkcg_schedule_throttle | |-- block-blk-iolatency.c:warning:variable-blkiolat-set-but-not-used | |-- block-blk-iolatency.c:warning:variable-changed-set-but-not-used | |-- block-blk-mq-sched.c:warning:no-previous-prototype-for-function-__blk_mq_sched_dispatch_requests | |-- block-blk-wbt.c:warning:no-previous-prototype-for-function-wbt_issue | |-- block-blk-wbt.c:warning:no-previous-prototype-for-function-wbt_requeue | |-- block-genhd.c:warning:no-previous-prototype-for-function-disk_scan_partitions | |-- drivers-gpu-drm-ttm-ttm_object.c:error:Cannot-parse-struct-or-union | |-- drivers-net-ethernet-netswift-ngbe-ngbe_main.c:warning:unused-variable-len | `-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union |-- x86_64-buildonly-randconfig-001-20250207 | `-- mm-memcontrol.c:warning:bad-line:otherwise. |-- x86_64-buildonly-randconfig-002-20250208 | |-- arch-x86-entry-entry_64.o:warning:objtool:.entry.text:unsupported-intra-function-call | |-- arch-x86-entry-entry_64.o:warning:objtool:If-this-is-a-retpoline-please-patch-it-in-with-alternatives-and-annotate-it-with-ANNOTATE_NOSPEC_ALTERNATIVE. | |-- drivers-net-ethernet-netswift-ngbe-ngbe_main.c:warning:unused-variable-len | |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union | |-- include-linux-filter.h:warning:cast-between-incompatible-function-types-from-u64-(-)(u64-u64-u64-u64-u64)-aka-long-long-unsigned-int-(-)(long-long-unsigned-int-long-long-unsigned-int-long-long-unsigne | |-- include-linux-kernel.h:warning:comparison-of-distinct-pointer-types-lacks-a-cast | |-- include-linux-mempolicy.h:warning:__do_mbind-defined-but-not-used | |-- include-linux-thread_info.h:warning:ctl-may-be-used-uninitialized | `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled |-- x86_64-buildonly-randconfig-003-20250207 | `-- mm-hugetlb.c:warning:no-previous-prototype-for-function-free_huge_page_to_dhugetlb_pool |-- x86_64-buildonly-randconfig-004-20250207 | `-- mm-.tmp_ioremap.o:warning:objtool:missing-symbol-for-section-.text `-- x86_64-defconfig |-- arch-x86-entry-entry_64.o:warning:objtool:.entry.text:unsupported-intra-function-call |-- arch-x86-entry-entry_64.o:warning:objtool:If-this-is-a-retpoline-please-patch-it-in-with-alternatives-and-annotate-it-with-ANNOTATE_NOSPEC_ALTERNATIVE. |-- block-blk-merge.c:warning:no-previous-prototype-for-blk_try_req_merge |-- block-blk-mq-sched.c:warning:no-previous-prototype-for-__blk_mq_sched_dispatch_requests |-- block-genhd.c:warning:no-previous-prototype-for-disk_scan_partitions |-- include-linux-filter.h:warning:cast-between-incompatible-function-types-from-u64-(-)(u64-u64-u64-u64-u64)-aka-long-long-unsigned-int-(-)(long-long-unsigned-int-long-long-unsigned-int-long-long-unsigne |-- include-linux-kernel.h:warning:comparison-of-distinct-pointer-types-lacks-a-cast `-- mm-ioremap.o:warning:objtool:missing-symbol-for-section-.text elapsed time: 738m configs tested: 10 configs skipped: 108 tested configs: arm64 allmodconfig gcc-14.2.0 arm64 allnoconfig gcc-14.2.0 arm64 randconfig-001-20250208 gcc-14.2.0 arm64 randconfig-002-20250208 gcc-14.2.0 arm64 randconfig-003-20250208 gcc-14.2.0 arm64 randconfig-004-20250208 gcc-14.2.0 x86_64 allnoconfig clang-19 x86_64 allyesconfig clang-19 x86_64 buildonly-randconfig-002-20250208 gcc-12 x86_64 defconfig gcc-11 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1421/1421] include/linux/thread_info.h:59:17: warning: 'ctl' may be used uninitialized
by kernel test robot 08 Feb '25

08 Feb '25
Hi Jens, FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: cc7cb040bd0afe96f1da94c9f21eda5a986510a5 commit: c6e864fee7c3dd416048d129997c7def53cb9ed8 [1421/1421] net: separate out the msghdr copy from ___sys_{send,recv}msg() config: x86_64-buildonly-randconfig-002-20250208 (https://download.01.org/0day-ci/archive/20250208/202502082355.jrzYRRaD-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250208/202502082355.jrzYRRaD-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/202502082355.jrzYRRaD-lkp@intel.com/ Note: it may well be a FALSE warning. FWIW you are at least aware of it now. http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings All warnings (new ones prefixed by >>): In function '__sock_release', inlined from 'sock_close' at net/socket.c:1140:2: net/socket.c:579:21: warning: array subscript -1 is outside array bounds of 'struct inode[9078122083518480]' [-Warray-bounds] 579 | sock->ops->release(sock); | ~~~~^~~~~ net/socket.c:580:26: warning: array subscript -1 is outside array bounds of 'struct inode[9078122083518480]' [-Warray-bounds] 580 | sock->sk = NULL; In file included from arch/x86/include/asm/preempt.h:7, from include/linux/preempt.h:81, from include/linux/spinlock.h:51, from include/linux/mmzone.h:9, from include/linux/gfp.h:6, from include/linux/mm.h:11, from net/socket.c:61: In function 'check_object_size', inlined from 'check_copy_size' at include/linux/thread_info.h:90:2, inlined from 'copy_from_user' at include/linux/uaccess.h:143:6, inlined from '____sys_sendmsg' at net/socket.c:2110:7: >> include/linux/thread_info.h:59:17: warning: 'ctl' may be used uninitialized [-Wmaybe-uninitialized] 59 | __check_object_size(ptr, n, to_user); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/thread_info.h: In function '____sys_sendmsg': include/linux/thread_info.h:52:13: note: by argument 1 of type 'const void *' to '__check_object_size' declared here 52 | extern void __check_object_size(const void *ptr, unsigned long n, | ^~~~~~~~~~~~~~~~~~~ net/socket.c:2075:23: note: 'ctl' declared here 2075 | unsigned char ctl[sizeof(struct cmsghdr) + 20] | ^~~ In function 'check_object_size', inlined from 'check_copy_size' at include/linux/thread_info.h:90:2, inlined from 'copy_from_user' at include/linux/uaccess.h:143:6, inlined from '__do_sys_socketcall' at net/socket.c:2618:6, inlined from '__se_sys_socketcall' at net/socket.c:2602:1: include/linux/thread_info.h:59:17: warning: 'a' may be used uninitialized [-Wmaybe-uninitialized] 59 | __check_object_size(ptr, n, to_user); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/thread_info.h: In function '__se_sys_socketcall': include/linux/thread_info.h:52:13: note: by argument 1 of type 'const void *' to '__check_object_size' declared here 52 | extern void __check_object_size(const void *ptr, unsigned long n, | ^~~~~~~~~~~~~~~~~~~ net/socket.c:2604:23: note: 'a' declared here 2604 | unsigned long a[AUDITSC_ARGS]; | ^ net/socket.c:573: warning: Function parameter or member 'inode' not described in '__sock_release' vim +/ctl +59 include/linux/thread_info.h 0f60a8efe4005a Kees Cook 2016-07-12 50 f5509cc18daa7f Kees Cook 2016-06-07 51 #ifdef CONFIG_HARDENED_USERCOPY f5509cc18daa7f Kees Cook 2016-06-07 52 extern void __check_object_size(const void *ptr, unsigned long n, f5509cc18daa7f Kees Cook 2016-06-07 53 bool to_user); f5509cc18daa7f Kees Cook 2016-06-07 54 a85d6b8242dc78 Kees Cook 2016-09-07 55 static __always_inline void check_object_size(const void *ptr, unsigned long n, f5509cc18daa7f Kees Cook 2016-06-07 56 bool to_user) f5509cc18daa7f Kees Cook 2016-06-07 57 { 81409e9e280588 Kees Cook 2016-08-31 58 if (!__builtin_constant_p(n)) f5509cc18daa7f Kees Cook 2016-06-07 @59 __check_object_size(ptr, n, to_user); f5509cc18daa7f Kees Cook 2016-06-07 60 } f5509cc18daa7f Kees Cook 2016-06-07 61 #else f5509cc18daa7f Kees Cook 2016-06-07 62 static inline void check_object_size(const void *ptr, unsigned long n, f5509cc18daa7f Kees Cook 2016-06-07 63 bool to_user) f5509cc18daa7f Kees Cook 2016-06-07 64 { } f5509cc18daa7f Kees Cook 2016-06-07 65 #endif /* CONFIG_HARDENED_USERCOPY */ f5509cc18daa7f Kees Cook 2016-06-07 66 :::::: The code at line 59 was first introduced by commit :::::: f5509cc18daa7f82bcc553be70df2117c8eedc16 mm: Hardened usercopy :::::: TO: Kees Cook <keescook(a)chromium.org> :::::: CC: Kees Cook <keescook(a)chromium.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2722/2722] fs/ceph/snap.o: warning: objtool: ceph_update_snap_trace()+0xb8c: unreachable instruction
by kernel test robot 08 Feb '25

08 Feb '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 263072f655dcd6fd63f7d5dd1f9c5553134982fa commit: 4925e6790b8bb3d912820724a224fbe9bf7ad4cf [2722/2722] ceph: blocklist the kclient when receiving corrupted snap trace config: x86_64-buildonly-randconfig-002-20250205 (https://download.01.org/0day-ci/archive/20250208/202502082313.lZnwkvkI-lkp@…) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250208/202502082313.lZnwkvkI-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/202502082313.lZnwkvkI-lkp@intel.com/ All warnings (new ones prefixed by >>): >> fs/ceph/snap.o: warning: objtool: ceph_update_snap_trace()+0xb8c: unreachable instruction -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2729/2729] mm/damon/core-test.h:284:2: warning: comparison of distinct pointer types ('typeof (__left) *' (aka 'unsigned int *') and 'typeof (__right) *' (aka 'int *'))
by kernel test robot 08 Feb '25

08 Feb '25
Hi SeongJae, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 263072f655dcd6fd63f7d5dd1f9c5553134982fa commit: 83b931be40b2829e20f38356509d8706ea6b6238 [2729/2729] mm/damon/core-test: test damon_set_regions config: x86_64-buildonly-randconfig-004-20250208 (https://download.01.org/0day-ci/archive/20250208/202502082340.S6mQ2xsd-lkp@…) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250208/202502082340.S6mQ2xsd-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/202502082340.S6mQ2xsd-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from mm/damon/core.c:13: In file included from include/linux/mm.h:1573: include/linux/vmstat.h:431:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 431 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ In file included from mm/damon/core.c:1248: >> mm/damon/core-test.h:284:2: warning: comparison of distinct pointer types ('typeof (__left) *' (aka 'unsigned int *') and 'typeof (__right) *' (aka 'int *')) [-Wcompare-distinct-pointer-types] 284 | KUNIT_EXPECT_EQ(test, damon_nr_regions(t), 3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/kunit/test.h:1234:2: note: expanded from macro 'KUNIT_EXPECT_EQ' 1234 | KUNIT_BINARY_EQ_ASSERTION(test, KUNIT_EXPECTATION, left, right) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/kunit/test.h:871:2: note: expanded from macro 'KUNIT_BINARY_EQ_ASSERTION' 871 | KUNIT_BINARY_EQ_MSG_ASSERTION(test, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 872 | assert_type, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 873 | left, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 874 | right, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 875 | NULL) | ~~~~~ include/kunit/test.h:861:2: note: expanded from macro 'KUNIT_BINARY_EQ_MSG_ASSERTION' 861 | KUNIT_BASE_EQ_MSG_ASSERTION(test, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 862 | kunit_binary_assert, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 863 | KUNIT_INIT_BINARY_ASSERT_STRUCT, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 864 | assert_type, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 865 | left, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 866 | right, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 867 | fmt, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 868 | ##__VA_ARGS__) | ~~~~~~~~~~~~~~ include/kunit/test.h:772:2: note: expanded from macro 'KUNIT_BASE_EQ_MSG_ASSERTION' 772 | KUNIT_BASE_BINARY_ASSERTION(test, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 773 | assert_class, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 774 | ASSERT_CLASS_INIT, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 775 | assert_type, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 776 | left, ==, right, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 777 | fmt, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 778 | ##__VA_ARGS__) | ~~~~~~~~~~~~~~ include/kunit/test.h:748:9: note: expanded from macro 'KUNIT_BASE_BINARY_ASSERTION' 748 | ((void)__typecheck(__left, __right)); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:20:28: note: expanded from macro '__typecheck' 20 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ 2 warnings generated. vim +284 mm/damon/core-test.h 269 270 static void damon_test_set_regions(struct kunit *test) 271 { 272 struct damon_target *t = damon_new_target(); 273 struct damon_region *r1 = damon_new_region(4, 16); 274 struct damon_region *r2 = damon_new_region(24, 32); 275 struct damon_addr_range range = {.start = 8, .end = 28}; 276 unsigned long expects[] = {8, 16, 16, 24, 24, 28}; 277 int expect_idx = 0; 278 struct damon_region *r; 279 280 damon_add_region(r1, t); 281 damon_add_region(r2, t); 282 damon_set_regions(t, &range, 1); 283 > 284 KUNIT_EXPECT_EQ(test, damon_nr_regions(t), 3); 285 damon_for_each_region(r, t) { 286 KUNIT_EXPECT_EQ(test, r->ar.start, expects[expect_idx++]); 287 KUNIT_EXPECT_EQ(test, r->ar.end, expects[expect_idx++]); 288 } 289 damon_destroy_target(t); 290 } 291 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1418/1418] mm/hugetlb.c:1370:6: warning: no previous prototype for function 'free_huge_page_to_dhugetlb_pool'
by kernel test robot 08 Feb '25

08 Feb '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: cc7cb040bd0afe96f1da94c9f21eda5a986510a5 commit: 0bc0d0d57edacd59ebe38d05ad9c4b2bc185aa51 [1418/1418] dhugetlb: backport dynamic hugetlb feature config: x86_64-buildonly-randconfig-003-20250207 (https://download.01.org/0day-ci/archive/20250208/202502082245.oXwKH6sI-lkp@…) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250208/202502082245.oXwKH6sI-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/202502082245.oXwKH6sI-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from mm/hugetlb.c:13: include/linux/pagemap.h:425:21: warning: cast from 'int (*)(struct file *, struct page *)' to 'filler_t *' (aka 'int (*)(void *, struct page *)') converts to incompatible function type [-Wcast-function-type-strict] 425 | filler_t *filler = (filler_t *)mapping->a_ops->readpage; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from mm/hugetlb.c:35: include/linux/mm_inline.h:33:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 33 | __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages); | ~~~~~~~~~~~ ^ ~~~ include/linux/mm_inline.h:35:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 35 | NR_ZONE_LRU_BASE + lru, nr_pages); | ~~~~~~~~~~~~~~~~ ^ ~~~ >> mm/hugetlb.c:1370:6: warning: no previous prototype for function 'free_huge_page_to_dhugetlb_pool' [-Wmissing-prototypes] 1370 | void free_huge_page_to_dhugetlb_pool(struct page *page, bool restore_reserve) | ^ mm/hugetlb.c:1370:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1370 | void free_huge_page_to_dhugetlb_pool(struct page *page, bool restore_reserve) | ^ | static In file included from mm/hugetlb.c:14: include/linux/mempolicy.h:329:13: warning: unused function '__do_mbind' [-Wunused-function] 329 | static long __do_mbind(unsigned long start, unsigned long len, | ^~~~~~~~~~ 5 warnings generated. vim +/free_huge_page_to_dhugetlb_pool +1370 mm/hugetlb.c 1324 1325 #ifdef CONFIG_DYNAMIC_HUGETLB 1326 static void free_huge_page_to_dhugetlb_pool(struct page *page, 1327 bool restore_reserve) 1328 { 1329 struct hstate *h = page_hstate(page); 1330 struct dhugetlb_pool *hpool; 1331 1332 hpool = get_dhugetlb_pool_from_dhugetlb_pagelist(page); 1333 if (unlikely(!hpool)) { 1334 pr_err("dhugetlb: free error: get hpool failed\n"); 1335 return; 1336 } 1337 1338 spin_lock(&hpool->lock); 1339 ClearPagePool(page); 1340 set_compound_page_dtor(page, NULL_COMPOUND_DTOR); 1341 if (!hstate_is_gigantic(h)) { 1342 list_add(&page->lru, &hpool->dhugetlb_2M_freelists); 1343 hpool->free_reserved_2M++; 1344 hpool->used_2M--; 1345 if (restore_reserve) { 1346 hpool->mmap_reserved_2M++; 1347 trace_dhugetlb_acct_memory(hpool, 1348 hpool->mmap_reserved_2M, 1349 DHUGETLB_RESV_2M); 1350 } 1351 trace_dhugetlb_alloc_free(hpool, page, hpool->free_reserved_2M, 1352 DHUGETLB_FREE_2M); 1353 } else { 1354 list_add(&page->lru, &hpool->dhugetlb_1G_freelists); 1355 hpool->free_reserved_1G++; 1356 hpool->used_1G--; 1357 if (restore_reserve) { 1358 hpool->mmap_reserved_1G++; 1359 trace_dhugetlb_acct_memory(hpool, 1360 hpool->mmap_reserved_1G, 1361 DHUGETLB_RESV_1G); 1362 } 1363 trace_dhugetlb_alloc_free(hpool, page, hpool->free_reserved_1G, 1364 DHUGETLB_FREE_1G); 1365 } 1366 spin_unlock(&hpool->lock); 1367 dhugetlb_pool_put(hpool); 1368 } 1369 #else > 1370 void free_huge_page_to_dhugetlb_pool(struct page *page, bool restore_reserve) 1371 { 1372 } 1373 #endif 1374 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • ...
  • 33
  • Older →

HyperKitty Powered by HyperKitty