All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: arch/x86/kernel/crash.c:205 elf_header_exclude_ranges() warn: we never enter this loop
Date: Fri, 19 Dec 2025 04:33:49 +0800	[thread overview]
Message-ID: <202512190414.AOXweMca-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Jiri Bohac <jbohac@suse.cz>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   ea1013c1539270e372fc99854bc6e4d94eaeff66
commit: bf8be1c3610829056e5445282ca92ca7b7a4ba7b x86: implement crashkernel cma reservation
date:   5 months ago
:::::: branch date: 2 days ago
:::::: commit date: 5 months ago
config: i386-randconfig-141-20251219 (https://download.01.org/0day-ci/archive/20251219/202512190414.AOXweMca-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0

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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202512190414.AOXweMca-lkp@intel.com/

smatch warnings:
arch/x86/kernel/crash.c:205 elf_header_exclude_ranges() warn: we never enter this loop

vim +205 arch/x86/kernel/crash.c

dd5f726076cc76 Vivek Goyal     2014-08-08  179  
dd5f726076cc76 Vivek Goyal     2014-08-08  180  /*
dd5f726076cc76 Vivek Goyal     2014-08-08  181   * Look for any unwanted ranges between mstart, mend and remove them. This
8d5f894a3108ac AKASHI Takahiro 2018-04-13  182   * might lead to split and split ranges are put in cmem->ranges[] array
dd5f726076cc76 Vivek Goyal     2014-08-08  183   */
8d5f894a3108ac AKASHI Takahiro 2018-04-13  184  static int elf_header_exclude_ranges(struct crash_mem *cmem)
dd5f726076cc76 Vivek Goyal     2014-08-08  185  {
dd5f726076cc76 Vivek Goyal     2014-08-08  186  	int ret = 0;
bf8be1c3610829 Jiri Bohac      2025-06-12  187  	int i;
dd5f726076cc76 Vivek Goyal     2014-08-08  188  
7c321eb2b843bf Lianbo Jiang    2019-11-08  189  	/* Exclude the low 1M because it is always reserved */
61bb219f9d83c1 Yuntao Wang     2024-01-02  190  	ret = crash_exclude_mem_range(cmem, 0, SZ_1M - 1);
7c321eb2b843bf Lianbo Jiang    2019-11-08  191  	if (ret)
7c321eb2b843bf Lianbo Jiang    2019-11-08  192  		return ret;
7c321eb2b843bf Lianbo Jiang    2019-11-08  193  
dd5f726076cc76 Vivek Goyal     2014-08-08  194  	/* Exclude crashkernel region */
babac4a84a8884 AKASHI Takahiro 2018-04-13  195  	ret = crash_exclude_mem_range(cmem, crashk_res.start, crashk_res.end);
dd5f726076cc76 Vivek Goyal     2014-08-08  196  	if (ret)
dd5f726076cc76 Vivek Goyal     2014-08-08  197  		return ret;
dd5f726076cc76 Vivek Goyal     2014-08-08  198  
9eff303725da65 Borislav Petkov 2019-11-14  199  	if (crashk_low_res.end)
babac4a84a8884 AKASHI Takahiro 2018-04-13  200  		ret = crash_exclude_mem_range(cmem, crashk_low_res.start,
babac4a84a8884 AKASHI Takahiro 2018-04-13  201  					      crashk_low_res.end);
bf8be1c3610829 Jiri Bohac      2025-06-12  202  	if (ret)
bf8be1c3610829 Jiri Bohac      2025-06-12  203  		return ret;
dd5f726076cc76 Vivek Goyal     2014-08-08  204  
bf8be1c3610829 Jiri Bohac      2025-06-12 @205  	for (i = 0; i < crashk_cma_cnt; ++i) {
bf8be1c3610829 Jiri Bohac      2025-06-12  206  		ret = crash_exclude_mem_range(cmem, crashk_cma_ranges[i].start,
bf8be1c3610829 Jiri Bohac      2025-06-12  207  					      crashk_cma_ranges[i].end);
bf8be1c3610829 Jiri Bohac      2025-06-12  208  		if (ret)
dd5f726076cc76 Vivek Goyal     2014-08-08  209  			return ret;
dd5f726076cc76 Vivek Goyal     2014-08-08  210  	}
dd5f726076cc76 Vivek Goyal     2014-08-08  211  
bf8be1c3610829 Jiri Bohac      2025-06-12  212  	return 0;
bf8be1c3610829 Jiri Bohac      2025-06-12  213  }
bf8be1c3610829 Jiri Bohac      2025-06-12  214  

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

                 reply	other threads:[~2025-12-18 20:34 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=202512190414.AOXweMca-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.