lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 17 Jul 2022 19:07:29 +0800
From:   kernel test robot <lkp@...el.com>
To:     hmy <huanglin@...ontech.com>, robh+dt@...nel.org
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        hmy <huanglin@...ontech.com>
Subject: Re: [PATCH] FIX CONFIG_CMDLINE is not avail when kernel config line
 in grub ends with --

Hi hmy,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on linus/master v5.19-rc6 next-20220715]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/hmy/FIX-CONFIG_CMDLINE-is-not-avail-when-kernel-config-line-in-grub-ends-with/20220630-124059
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: loongarch-randconfig-c041-20220717 (https://download.01.org/0day-ci/archive/20220717/202207171910.KLJBcWEv-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/a68da93a13a9544ea17147828f16894ab6cfd204
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review hmy/FIX-CONFIG_CMDLINE-is-not-avail-when-kernel-config-line-in-grub-ends-with/20220630-124059
        git checkout a68da93a13a9544ea17147828f16894ab6cfd204
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch SHELL=/bin/bash drivers/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   drivers/of/fdt.c: In function 'early_init_dt_scan_chosen':
>> drivers/of/fdt.c:1192:20: error: 'data' undeclared (first use in this function); did you mean '_data'?
    1192 |         q = strstr(data, "--");
         |                    ^~~~
         |                    _data
   drivers/of/fdt.c:1192:20: note: each undeclared identifier is reported only once for each function it appears in


vim +1192 drivers/of/fdt.c

  1158	
  1159	int __init early_init_dt_scan_chosen(char *cmdline)
  1160	{
  1161		int l, node;
  1162		const char *p;
  1163		char *q;
  1164		const void *rng_seed;
  1165		const void *fdt = initial_boot_params;
  1166	
  1167		node = fdt_path_offset(fdt, "/chosen");
  1168		if (node < 0)
  1169			node = fdt_path_offset(fdt, "/chosen@0");
  1170		if (node < 0)
  1171			return -ENOENT;
  1172	
  1173		chosen_node_offset = node;
  1174	
  1175		early_init_dt_check_for_initrd(node);
  1176		early_init_dt_check_for_elfcorehdr(node);
  1177	
  1178		/* Retrieve command line */
  1179		p = of_get_flat_dt_prop(node, "bootargs", &l);
  1180		if (p != NULL && l > 0)
  1181			strlcpy(cmdline, p, min(l, COMMAND_LINE_SIZE));
  1182	
  1183		/*
  1184		 * CONFIG_CMDLINE is meant to be a default in case nothing else
  1185		 * managed to set the command line, unless CONFIG_CMDLINE_FORCE
  1186		 * is set in which case we override whatever was found earlier.
  1187		 */
  1188	#ifdef CONFIG_CMDLINE
  1189	#if defined(CONFIG_CMDLINE_EXTEND)
  1190		strlcat(cmdline, " ", COMMAND_LINE_SIZE);
  1191		strlcat(cmdline, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
> 1192		q = strstr(data, "--");
  1193		if (q)
  1194			*q = '\0';
  1195	#elif defined(CONFIG_CMDLINE_FORCE)
  1196		strlcpy(cmdline, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
  1197	#else
  1198		/* No arguments from boot loader, use kernel's  cmdl*/
  1199		if (!((char *)cmdline)[0])
  1200			strlcpy(cmdline, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
  1201	#endif
  1202	#endif /* CONFIG_CMDLINE */
  1203	
  1204		pr_debug("Command line is: %s\n", (char *)cmdline);
  1205	
  1206		rng_seed = of_get_flat_dt_prop(node, "rng-seed", &l);
  1207		if (rng_seed && l > 0) {
  1208			add_bootloader_randomness(rng_seed, l);
  1209	
  1210			/* try to clear seed so it won't be found. */
  1211			fdt_nop_property(initial_boot_params, node, "rng-seed");
  1212	
  1213			/* update CRC check value */
  1214			of_fdt_crc32 = crc32_be(~0, initial_boot_params,
  1215					fdt_totalsize(initial_boot_params));
  1216		}
  1217	
  1218		return 0;
  1219	}
  1220	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ