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]
Message-ID: <20090315055510.GD20949@elte.hu>
Date:	Sun, 15 Mar 2009 06:55:10 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Jaswinder Singh Rajput <jaswinder@...nel.org>
Cc:	Vegard Nossum <vegard.nossum@...il.com>,
	Sam Ravnborg <sam@...nborg.org>,
	x86 maintainers <x86@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -tip] x86: cpu/intel.c cleanup


* Jaswinder Singh Rajput <jaswinder@...nel.org> wrote:

> On Sat, 2009-03-14 at 18:04 +0100, Ingo Molnar wrote:
> > * Jaswinder Singh Rajput <jaswinder@...nel.org> wrote:
> > 
> > > On Sat, 2009-03-14 at 16:31 +0100, Ingo Molnar wrote:
> > > > > 
> > > > > I don't really like this change (last hunk). Doesn't it seem a 
> > > > > bit pointless? It breaks the symmetry with the masked CPUID 
> > > > > levels at the beginning of the function. If somebody wants to 
> > > > > add something else to this function, it might have to be 
> > > > > reindented again. Or is there a problem with too long lines 
> > > > > here?
> > > > 
> > > > yes, it would be cleaner to put the whole family 15 branch into 
> > > > a helper inline function instead.
> > > > 
> > > 
> > > OK, better I keep it unchanged :-)
> > 
> > Why not implement the cleanup i suggested?
> 
> I followed your approached and made new helper function. But the result
> was same, in that helper function I have to check for family 15 and rest
> of things. So I found nothing was gained, So I again reverted it and
> provided you this patch.

Well my suggestion was to:

> > > > yes, it would be cleaner to put the whole family 15 branch into 
> > > > a helper inline function instead.

I.e. replace this branch:

#ifdef CONFIG_KMEMCHECK
	/*
	 * P4s have a "fast strings" feature which causes single-
	 * stepping REP instructions to only generate a #DB on
	 * cache-line boundaries.
	 *
	 * Ingo Molnar reported a Pentium D (model 6) and a Xeon
	 * (model 2) with the same problem.
	 */
	if (c->x86 == 15) {
		u64 misc_enable;

		rdmsrl(MSR_IA32_MISC_ENABLE, misc_enable);

		if (misc_enable & MSR_IA32_MISC_ENABLE_FAST_STRING) {
			printk(KERN_INFO "kmemcheck: Disabling fast string operations\n");

			misc_enable &= ~MSR_IA32_MISC_ENABLE_FAST_STRING;
			wrmsrl(MSR_IA32_MISC_ENABLE, misc_enable);
		}
	}
#endif

With a helper inline function:

	if (c->x86 == 15)
		early_init_intel_fam15();

Why would you have to check family 15 inside 
early_init_intel_fam15() again?

	Ingo
--
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