public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Vasily Gorbik <gor@linux.ibm.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-s390@vger.kernel.org,
	Alexander Gordeev <agordeev@linux.ibm.com>
Subject: [s390:for-next 68/91] arch/s390/mm/vmem.c:665:36: warning: performing pointer arithmetic on a null pointer has undefined behavior
Date: Mon, 27 Jan 2025 03:47:11 +0800	[thread overview]
Message-ID: <202501270309.HzsVNo3o-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-next
head:   6abcbcab29996eba5d4bc5df20ed0bb4800effa9
commit: d7bebcb4a898bd214bbd71107f975b7b9f0bde32 [68/91] s390: Optimize __pa/__va when RANDOMIZE_IDENTITY_BASE is off
config: s390-randconfig-001-20250127 (https://download.01.org/0day-ci/archive/20250127/202501270309.HzsVNo3o-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 19306351a2c45e266fa11b41eb1362b20b6ca56d)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250127/202501270309.HzsVNo3o-lkp@intel.com/reproduce)

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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501270309.HzsVNo3o-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from arch/s390/mm/vmem.c:7:
   In file included from include/linux/memblock.h:12:
   In file included from include/linux/mm.h:2223:
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> arch/s390/mm/vmem.c:665:36: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     665 |                 __set_memory_4k(__va(0), __va(0) + ident_map_size);
         |                                          ~~~~~~~ ^
   2 warnings generated.


vim +665 arch/s390/mm/vmem.c

4df29d2b9024d6 Alexander Gordeev 2022-07-20  651  
f4eb07c17df2e6 Heiko Carstens    2006-12-08  652  void __init vmem_map_init(void)
f4eb07c17df2e6 Heiko Carstens    2006-12-08  653  {
a7eb28801b692d Heiko Carstens    2023-08-25  654  	__set_memory_rox(_stext, _etext);
a7eb28801b692d Heiko Carstens    2023-08-25  655  	__set_memory_ro(_etext, __end_rodata);
a7eb28801b692d Heiko Carstens    2023-08-25  656  	__set_memory_rox(__stext_amode31, __etext_amode31);
a6e49f10f4411e Heiko Carstens    2023-08-25  657  	/*
a6e49f10f4411e Heiko Carstens    2023-08-25  658  	 * If the BEAR-enhancement facility is not installed the first
a6e49f10f4411e Heiko Carstens    2023-08-25  659  	 * prefix page is used to return to the previous context with
a6e49f10f4411e Heiko Carstens    2023-08-25  660  	 * an LPSWE instruction and therefore must be executable.
a6e49f10f4411e Heiko Carstens    2023-08-25  661  	 */
c0f1d478121131 Heiko Carstens    2023-08-25  662  	if (!static_key_enabled(&cpu_has_bear))
c0f1d478121131 Heiko Carstens    2023-08-25  663  		set_memory_x(0, 1);
1e72ba5566d90a Heiko Carstens    2024-07-29  664  	if (debug_pagealloc_enabled())
1e72ba5566d90a Heiko Carstens    2024-07-29 @665  		__set_memory_4k(__va(0), __va(0) + ident_map_size);

:::::: The code at line 665 was first introduced by commit
:::::: 1e72ba5566d90a668c1c0fbde319cec03454fd20 s390/mm: Get rid of RELOC_HIDE()

:::::: TO: Heiko Carstens <hca@linux.ibm.com>
:::::: CC: Vasily Gorbik <gor@linux.ibm.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2025-01-26 19:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202501270309.HzsVNo3o-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=agordeev@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox