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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 06 May 2010 15:48:35 -0500
From:	James Bottomley <James.Bottomley@...senPartnership.com>
To:	Michal Marek <mmarek@...e.cz>
Cc:	linux-arch@...r.kernel.org,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Sam Ravnborg <sam@...nborg.org>, linux-kbuild@...r.kernel.org,
	Randy Dunlap <randy.dunlap@...cle.com>,
	Vegard Nossum <vegard.nossum@...il.com>
Subject: Re: kbuild: fixing the select problem

On Thu, 2010-05-06 at 09:52 -0500, James Bottomley wrote:
> The list is
> 
> USB_ARCH_HAS_HCD has 4 defaults
> DEFCONFIG_LIST has 5 defaults
> MAC80211_RC_DEFAULT has 2 defaults
> X86_L1_CACHE_SHIFT has 2 defaults
> SPLIT_PTLOCK_CPUS has 2 defaults
> X86_MINIMUM_CPU_FAMILY has 3 defaults
> DEFAULT_TCP_CONG has 2 defaults
> DEFCONFIG_LIST has 5 defaults
> USB_ARCH_HAS_HCD has 4 defaults
> X86_L1_CACHE_SHIFT has 2 defaults
> X86_MINIMUM_CPU_FAMILY has 3 defaults
> SPLIT_PTLOCK_CPUS has 2 defaults
> DEFAULT_TCP_CONG has 2 defaults
> MAC80211_RC_DEFAULT has 2 defaults

Here's a patch that alters the default processing to the needed form and
checks the old vs new values.  I've been running randconfigs but I can't
get the warning to trip ... have at it.

James

---

diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 6c8fbbb..722bc4e 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -115,14 +115,31 @@ struct property *sym_get_env_prop(struct symbol *sym)
 
 struct property *sym_get_default_prop(struct symbol *sym)
 {
-	struct property *prop;
+	struct property *prop, *ret = NULL;
+	tristate old_val = no, val = no;
 
 	for_all_defaults(sym, prop) {
 		prop->visible.tri = expr_calc_value(prop->visible.expr);
-		if (prop->visible.tri != no)
-			return prop;
+		if (prop->visible.tri != no) {
+			tristate v = expr_calc_value(prop->expr);
+			if (!ret)
+				old_val = v;
+			if (v >= val) {
+				val = v;
+				ret = prop;
+			}
+		}
 	}
-	return NULL;
+	/*
+	 * Previously, we took the first valid default we found (this
+	 * is now old_val).  In the new scheme, the value is the or of
+	 * all the defaults.
+	 */
+	if (old_val != val)
+		menu_warn(ret->menu, "ERROR: new parser has inconsistent "
+			  "values for %s (%d != %d)\n", sym->name,
+			  old_val, val);
+	return ret;
 }
 
 static struct property *sym_get_range_prop(struct symbol *sym)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ