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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 12 Jun 2024 05:18:40 +0800
From: kernel test robot <lkp@...el.com>
To: Masahiro Yamada <masahiroy@...nel.org>, linux-kbuild@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Masahiro Yamada <masahiroy@...nel.org>
Subject: Re: [PATCH 06/16] kconfig: refactor choice value calculation

Hi Masahiro,

kernel test robot noticed the following build warnings:

[auto build test WARNING on masahiroy-kbuild/kbuild]
[also build test WARNING on masahiroy-kbuild/for-next next-20240611]
[cannot apply to masahiroy-kbuild/fixes linus/master v6.10-rc3]
[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/Masahiro-Yamada/kconfig-remove-unneeded-code-in-expr_compare_type/20240612-020202
base:   https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild
patch link:    https://lore.kernel.org/r/20240611175536.3518179-7-masahiroy%40kernel.org
patch subject: [PATCH 06/16] kconfig: refactor choice value calculation
reproduce: (https://download.01.org/0day-ci/archive/20240612/202406120445.P5QmPYgD-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406120445.P5QmPYgD-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> scripts/kconfig/symbol.c:448:3: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
     448 |                 struct menu *choice_menu = sym_get_choice_menu(sym);
         |                 ^
   1 warning generated.


vim +448 scripts/kconfig/symbol.c

   398	
   399	void sym_calc_value(struct symbol *sym)
   400	{
   401		struct symbol_value newval, oldval;
   402		struct property *prop;
   403	
   404		if (!sym)
   405			return;
   406	
   407		if (sym->flags & SYMBOL_VALID)
   408			return;
   409	
   410		sym->flags |= SYMBOL_VALID;
   411	
   412		oldval = sym->curr;
   413	
   414		newval.tri = no;
   415	
   416		switch (sym->type) {
   417		case S_INT:
   418			newval.val = "0";
   419			break;
   420		case S_HEX:
   421			newval.val = "0x0";
   422			break;
   423		case S_STRING:
   424			newval.val = "";
   425			break;
   426		case S_BOOLEAN:
   427		case S_TRISTATE:
   428			newval.val = "n";
   429			break;
   430		default:
   431			sym->curr.val = sym->name;
   432			sym->curr.tri = no;
   433			return;
   434		}
   435		sym->flags &= ~SYMBOL_WRITE;
   436	
   437		sym_calc_visibility(sym);
   438	
   439		if (sym->visible != no)
   440			sym->flags |= SYMBOL_WRITE;
   441	
   442		/* set default if recursively called */
   443		sym->curr = newval;
   444	
   445		switch (sym_get_type(sym)) {
   446		case S_BOOLEAN:
   447		case S_TRISTATE:
 > 448			struct menu *choice_menu = sym_get_choice_menu(sym);
   449	
   450			if (choice_menu) {
   451				sym_calc_choice(choice_menu);
   452				newval.tri = sym->curr.tri;
   453			} else {
   454				if (sym->visible != no) {
   455					/* if the symbol is visible use the user value
   456					 * if available, otherwise try the default value
   457					 */
   458					if (sym_has_value(sym)) {
   459						newval.tri = EXPR_AND(sym->def[S_DEF_USER].tri,
   460								      sym->visible);
   461						goto calc_newval;
   462					}
   463				}
   464				if (sym->rev_dep.tri != no)
   465					sym->flags |= SYMBOL_WRITE;
   466				if (!sym_is_choice(sym)) {
   467					prop = sym_get_default_prop(sym);
   468					if (prop) {
   469						newval.tri = EXPR_AND(expr_calc_value(prop->expr),
   470								      prop->visible.tri);
   471						if (newval.tri != no)
   472							sym->flags |= SYMBOL_WRITE;
   473					}
   474					if (sym->implied.tri != no) {
   475						sym->flags |= SYMBOL_WRITE;
   476						newval.tri = EXPR_OR(newval.tri, sym->implied.tri);
   477						newval.tri = EXPR_AND(newval.tri,
   478								      sym->dir_dep.tri);
   479					}
   480				}
   481			calc_newval:
   482				if (sym->dir_dep.tri < sym->rev_dep.tri)
   483					sym_warn_unmet_dep(sym);
   484				newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri);
   485			}
   486			if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN)
   487				newval.tri = yes;
   488			break;
   489		case S_STRING:
   490		case S_HEX:
   491		case S_INT:
   492			if (sym->visible != no && sym_has_value(sym)) {
   493				newval.val = sym->def[S_DEF_USER].val;
   494				break;
   495			}
   496			prop = sym_get_default_prop(sym);
   497			if (prop) {
   498				struct symbol *ds = prop_get_symbol(prop);
   499				if (ds) {
   500					sym->flags |= SYMBOL_WRITE;
   501					sym_calc_value(ds);
   502					newval.val = ds->curr.val;
   503				}
   504			}
   505			break;
   506		default:
   507			;
   508		}
   509	
   510		sym->curr = newval;
   511		sym_validate_range(sym);
   512	
   513		if (memcmp(&oldval, &sym->curr, sizeof(oldval))) {
   514			sym_set_changed(sym);
   515			if (modules_sym == sym) {
   516				sym_set_all_changed();
   517				modules_val = modules_sym->curr.tri;
   518			}
   519		}
   520	
   521		if (sym_is_choice(sym))
   522			sym->flags &= ~SYMBOL_WRITE;
   523	}
   524	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ