tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: f6f9abf1a5ef2fc559630c77b3570346dcd19d40
commit: 64018b291c1f49622c4b23b303364d760306d662 [2392/2894] mm/memblock: Introduce ability to alloc memory from specify memory region
config: x86_64-randconfig-123-20240131 (https://download.01.org/0day-ci/archive/20240201/202402010125.UTtd3edB-lkp@…)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240201/202402010125.UTtd3edB-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/202402010125.UTtd3edB-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> mm/memblock.c:1409:20: sparse: sparse: symbol 'memblock_alloc_range_nid_flags' was not declared. Should it be static?
vim +/memblock_alloc_range_nid_flags +1409 mm/memblock.c
1386
1387 /**
1388 * memblock_alloc_range_nid_flags - allocate boot memory block with specify flag
1389 * @size: size of memory block to be allocated in bytes
1390 * @align: alignment of the region and block's size
1391 * @start: the lower bound of the memory region to allocate (phys address)
1392 * @end: the upper bound of the memory region to allocate (phys address)
1393 * @nid: nid of the free area to find, %NUMA_NO_NODE for any node
1394 * @exact_nid: control the allocation fall back to other nodes
1395 * @flags: alloc memory from specify memblock flag
1396 *
1397 * The allocation is performed from memory region limited by
1398 * memblock.current_limit if @end == %MEMBLOCK_ALLOC_ACCESSIBLE.
1399 *
1400 * If the specified node can not hold the requested memory and @exact_nid
1401 * is false, the allocation falls back to any node in the system.
1402 *
1403 * In addition, function sets the min_count to 0 using kmemleak_alloc_phys for
1404 * allocated boot memory block, so that it is never reported as leaks.
1405 *
1406 * Return:
1407 * Physical address of allocated memory block on success, %0 on failure.
1408 */
> 1409 phys_addr_t __init memblock_alloc_range_nid_flags(phys_addr_t size,
1410 phys_addr_t align, phys_addr_t start,
1411 phys_addr_t end, int nid,
1412 bool exact_nid,
1413 enum memblock_flags flags)
1414 {
1415 phys_addr_t found;
1416
1417 if (WARN_ONCE(nid == MAX_NUMNODES, "Usage of MAX_NUMNODES is deprecated. Use NUMA_NO_NODE instead\n"))
1418 nid = NUMA_NO_NODE;
1419
1420 if (!align) {
1421 /* Can't use WARNs this early in boot on powerpc */
1422 dump_stack();
1423 align = SMP_CACHE_BYTES;
1424 }
1425
1426 again:
1427 found = memblock_find_in_range_node(size, align, start, end, nid,
1428 flags);
1429 if (found && !memblock_reserve(found, size))
1430 goto done;
1431
1432 if (nid != NUMA_NO_NODE && !exact_nid) {
1433 found = memblock_find_in_range_node(size, align, start,
1434 end, NUMA_NO_NODE,
1435 flags);
1436 if (found && !memblock_reserve(found, size))
1437 goto done;
1438 }
1439
1440 if (flags & MEMBLOCK_MIRROR) {
1441 flags &= ~MEMBLOCK_MIRROR;
1442 pr_warn_ratelimited("Could not allocate %pap bytes of mirrored memory\n",
1443 &size);
1444 goto again;
1445 }
1446
1447 return 0;
1448
1449 done:
1450 /*
1451 * Skip kmemleak for those places like kasan_init() and
1452 * early_pgtable_alloc() due to high volume.
1453 */
1454 if (end != MEMBLOCK_ALLOC_NOLEAKTRACE)
1455 /*
1456 * Memblock allocated blocks are never reported as
1457 * leaks. This is because many of these blocks are
1458 * only referred via the physical address which is
1459 * not looked up by kmemleak.
1460 */
1461 kmemleak_alloc_phys(found, size, 0);
1462
1463 /*
1464 * Some Virtual Machine platforms, such as Intel TDX or AMD SEV-SNP,
1465 * require memory to be accepted before it can be used by the
1466 * guest.
1467 *
1468 * Accept the memory of the allocated buffer.
1469 */
1470 accept_memory(found, found + size);
1471
1472 return found;
1473 }
1474
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 0ec2c5ee4e0f8c1bdd76fa1b5f9eb0cf68d4d62d
commit: 9dae7e237a64858407b7626260bad53aa13c9198 [2662/21599] serial: sh-sci: Fix locking in sci_submit_rx()
config: arm64-randconfig-002-20240130 (https://download.01.org/0day-ci/archive/20240131/202401312337.31e2xc48-lkp@…)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240131/202401312337.31e2xc48-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/202401312337.31e2xc48-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 file included from include/linux/irqflags.h:16,
from include/linux/spinlock.h:54,
from include/linux/rwsem.h:16,
from include/linux/notifier.h:15,
from include/linux/clk.h:17,
from drivers/tty/serial/sh-sci.c:24:
In function 'arch_local_irq_restore',
inlined from '__raw_spin_unlock_irqrestore' at include/linux/spinlock_api_smp.h:160:2,
inlined from 'spin_unlock_irqrestore' at include/linux/spinlock.h:384:2,
inlined from 'sci_submit_rx' at drivers/tty/serial/sh-sci.c:1376:3:
>> arch/arm64/include/asm/irqflags.h:88:9: warning: 'flags' may be used uninitialized [-Wmaybe-uninitialized]
88 | asm volatile(
| ^~~
drivers/tty/serial/sh-sci.c: In function 'sci_submit_rx':
drivers/tty/serial/sh-sci.c:1338:23: note: 'flags' was declared here
1338 | unsigned long flags;
| ^~~~~
In file included from drivers/tty/serial/sh-sci.c:53:
In function 'tty_insert_flip_char',
inlined from 'sci_handle_errors' at drivers/tty/serial/sh-sci.c:940:7:
include/linux/tty_flip.h:27:53: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
27 | *flag_buf_ptr(tb, tb->used) = flag;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from include/linux/serial_core.h:29,
from include/linux/serial_sci.h:6,
from drivers/tty/serial/sh-sci.c:46:
include/linux/tty.h: In function 'sci_handle_errors':
include/linux/tty.h:69:23: note: destination object 'data' of size 0
69 | unsigned long data[0];
| ^~~~
In function 'tty_insert_flip_char',
inlined from 'sci_handle_errors' at drivers/tty/serial/sh-sci.c:940:7:
include/linux/tty_flip.h:28:47: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
28 | *char_buf_ptr(tb, tb->used++) = ch;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
include/linux/tty.h: In function 'sci_handle_errors':
include/linux/tty.h:69:23: note: destination object 'data' of size 0
69 | unsigned long data[0];
| ^~~~
In function 'tty_insert_flip_char',
inlined from 'sci_handle_errors' at drivers/tty/serial/sh-sci.c:950:7:
include/linux/tty_flip.h:27:53: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
27 | *flag_buf_ptr(tb, tb->used) = flag;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
include/linux/tty.h: In function 'sci_handle_errors':
include/linux/tty.h:69:23: note: destination object 'data' of size 0
69 | unsigned long data[0];
| ^~~~
In function 'tty_insert_flip_char',
inlined from 'sci_handle_errors' at drivers/tty/serial/sh-sci.c:950:7:
include/linux/tty_flip.h:28:47: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
28 | *char_buf_ptr(tb, tb->used++) = ch;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
include/linux/tty.h: In function 'sci_handle_errors':
include/linux/tty.h:69:23: note: destination object 'data' of size 0
69 | unsigned long data[0];
| ^~~~
In function 'tty_insert_flip_char',
inlined from 'sci_handle_errors' at drivers/tty/serial/sh-sci.c:960:7:
include/linux/tty_flip.h:27:53: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
27 | *flag_buf_ptr(tb, tb->used) = flag;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
include/linux/tty.h: In function 'sci_handle_errors':
include/linux/tty.h:69:23: note: destination object 'data' of size 0
69 | unsigned long data[0];
| ^~~~
In function 'tty_insert_flip_char',
inlined from 'sci_handle_errors' at drivers/tty/serial/sh-sci.c:960:7:
include/linux/tty_flip.h:28:47: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
28 | *char_buf_ptr(tb, tb->used++) = ch;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
include/linux/tty.h: In function 'sci_handle_errors':
include/linux/tty.h:69:23: note: destination object 'data' of size 0
69 | unsigned long data[0];
| ^~~~
In function 'tty_insert_flip_char',
inlined from 'sci_receive_chars' at drivers/tty/serial/sh-sci.c:906:5:
include/linux/tty_flip.h:27:53: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
27 | *flag_buf_ptr(tb, tb->used) = flag;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
include/linux/tty.h: In function 'sci_receive_chars':
include/linux/tty.h:69:23: note: destination object 'data' of size 0
69 | unsigned long data[0];
| ^~~~
In function 'tty_insert_flip_char',
inlined from 'sci_receive_chars' at drivers/tty/serial/sh-sci.c:906:5:
include/linux/tty_flip.h:28:47: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
28 | *char_buf_ptr(tb, tb->used++) = ch;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
include/linux/tty.h: In function 'sci_receive_chars':
include/linux/tty.h:69:23: note: destination object 'data' of size 0
69 | unsigned long data[0];
| ^~~~
In function 'tty_insert_flip_char',
inlined from 'sci_receive_chars' at drivers/tty/serial/sh-sci.c:883:5:
include/linux/tty_flip.h:27:53: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
27 | *flag_buf_ptr(tb, tb->used) = flag;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
include/linux/tty.h: In function 'sci_receive_chars':
include/linux/tty.h:69:23: note: destination object 'data' of size 0
69 | unsigned long data[0];
| ^~~~
In function 'tty_insert_flip_char',
inlined from 'sci_receive_chars' at drivers/tty/serial/sh-sci.c:883:5:
include/linux/tty_flip.h:28:47: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
28 | *char_buf_ptr(tb, tb->used++) = ch;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
include/linux/tty.h: In function 'sci_receive_chars':
include/linux/tty.h:69:23: note: destination object 'data' of size 0
69 | unsigned long data[0];
| ^~~~
vim +/flags +88 arch/arm64/include/asm/irqflags.h
fb9bd7d6df81dd Marc Zyngier 2012-03-05 82
fb9bd7d6df81dd Marc Zyngier 2012-03-05 83 /*
fb9bd7d6df81dd Marc Zyngier 2012-03-05 84 * restore saved IRQ state
fb9bd7d6df81dd Marc Zyngier 2012-03-05 85 */
fb9bd7d6df81dd Marc Zyngier 2012-03-05 86 static inline void arch_local_irq_restore(unsigned long flags)
fb9bd7d6df81dd Marc Zyngier 2012-03-05 87 {
fb9bd7d6df81dd Marc Zyngier 2012-03-05 @88 asm volatile(
fb9bd7d6df81dd Marc Zyngier 2012-03-05 89 "msr daif, %0 // arch_local_irq_restore"
fb9bd7d6df81dd Marc Zyngier 2012-03-05 90 :
fb9bd7d6df81dd Marc Zyngier 2012-03-05 91 : "r" (flags)
fb9bd7d6df81dd Marc Zyngier 2012-03-05 92 : "memory");
fb9bd7d6df81dd Marc Zyngier 2012-03-05 93 }
fb9bd7d6df81dd Marc Zyngier 2012-03-05 94
:::::: The code at line 88 was first introduced by commit
:::::: fb9bd7d6df81ddf1e7ab6648ac89ddbe0625b26b arm64: IRQ handling
:::::: TO: Marc Zyngier <marc.zyngier(a)arm.com>
:::::: CC: Catalin Marinas <catalin.marinas(a)arm.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
tree: https://gitee.com/openeuler/kernel.git OLK-5.10
head: b05df567e52ae4ff99904dd1d0df1ad0d2fa60e8
commit: b12b4a14e6dc13b75697ebc80f513fedd068345e [10594/30000] xfs: remove xfs_dqrele_all_inodes
config: x86_64-randconfig-161-20240128 (attached as .config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
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/202401292144.6NpDqMmn-lkp@intel.com/
New smatch warnings:
fs/xfs/xfs_icache.c:52 xfs_icwalk_tag() warn: unsigned 'goal' is never less than zero.
Old smatch warnings:
fs/xfs/xfs_icache.c:534 xfs_iget_cache_hit() warn: missing unwind goto?
vim +/goal +52 fs/xfs/xfs_icache.c
656d89e710ffc0 Darrick J. Wong 2022-01-07 47
656d89e710ffc0 Darrick J. Wong 2022-01-07 48 /* Compute the inode radix tree tag for this goal. */
656d89e710ffc0 Darrick J. Wong 2022-01-07 49 static inline unsigned int
656d89e710ffc0 Darrick J. Wong 2022-01-07 50 xfs_icwalk_tag(enum xfs_icwalk_goal goal)
656d89e710ffc0 Darrick J. Wong 2022-01-07 51 {
656d89e710ffc0 Darrick J. Wong 2022-01-07 @52 return goal < 0 ? XFS_ICWALK_NULL_TAG : goal;
656d89e710ffc0 Darrick J. Wong 2022-01-07 53 }
656d89e710ffc0 Darrick J. Wong 2022-01-07 54
:::::: The code at line 52 was first introduced by commit
:::::: 656d89e710ffc01bc169a476208c84a0048cb554 xfs: pass the goal of the incore inode walk to xfs_inode_walk()
:::::: TO: Darrick J. Wong <djwong(a)kernel.org>
:::::: CC: Zheng Zengkai <zhengzengkai(a)huawei.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki