Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 14086/14440] lib/cmdline.c:188: undefined reference to `__efistub___lshrdi3'
@ 2026-05-04  5:22 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-04  5:22 UTC (permalink / raw)
  To: Dmitry Antipov
  Cc: oe-kbuild-all, Andrew Morton, Linux Memory Management List,
	Andy Shevchenko

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   b9303e6bff706758c167af686b5315ad00233bf8
commit: 7f448f913d6f048e448df40a877be6f5afb5249d [14086/14440] lib: fix memparse() to handle overflow
config: riscv-randconfig-001-20260504 (https://download.01.org/0day-ci/archive/20260504/202605041353.nsZSMiIC-lkp@intel.com/config)
compiler: riscv32-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260504/202605041353.nsZSMiIC-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/202605041353.nsZSMiIC-lkp@intel.com/

All errors (new ones prefixed by >>):

   riscv32-linux-ld: ./drivers/firmware/efi/libstub/lib-cmdline.stub.o: in function `memparse':
>> lib/cmdline.c:188: undefined reference to `__efistub___lshrdi3'


vim +188 lib/cmdline.c

   140	
   141	/**
   142	 *	memparse - parse a string with mem suffixes into a number
   143	 *	@ptr: Where parse begins
   144	 *	@retptr: (output) Optional pointer to next char after parse completes
   145	 *
   146	 *	Parses a string into a number.  The number stored at @ptr is
   147	 *	potentially suffixed with K, M, G, T, P, E.
   148	 */
   149	
   150	unsigned long long memparse(const char *ptr, char **retptr)
   151	{
   152		char *endptr;	/* local pointer to end of parsed string */
   153		unsigned long long ret = simple_strtoull(ptr, &endptr, 0);
   154		unsigned int shl = 0;
   155	
   156		/* Consume valid suffix even in case of overflow. */
   157		switch (*endptr) {
   158		case 'E':
   159		case 'e':
   160			shl += 10;
   161			fallthrough;
   162		case 'P':
   163		case 'p':
   164			shl += 10;
   165			fallthrough;
   166		case 'T':
   167		case 't':
   168			shl += 10;
   169			fallthrough;
   170		case 'G':
   171		case 'g':
   172			shl += 10;
   173			fallthrough;
   174		case 'M':
   175		case 'm':
   176			shl += 10;
   177			fallthrough;
   178		case 'K':
   179		case 'k':
   180			shl += 10;
   181			fallthrough;
   182		default:
   183			break;
   184		}
   185	
   186		if (shl && likely(ptr != endptr)) {
   187			/* Have valid suffix with preceding number. */
 > 188			if (unlikely(check_shl_overflow(ret, shl, &ret)))
   189				ret = ULLONG_MAX;
   190			endptr++;
   191		}
   192	
   193		if (retptr)
   194			*retptr = endptr;
   195	
   196		return ret;
   197	}
   198	EXPORT_SYMBOL(memparse);
   199	

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-04  5:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-04  5:22 [linux-next:master 14086/14440] lib/cmdline.c:188: undefined reference to `__efistub___lshrdi3' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox