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]
Message-ID: <49A029F9.40902@cs.helsinki.fi>
Date:	Sat, 21 Feb 2009 18:21:13 +0200
From:	Pekka Enberg <penberg@...helsinki.fi>
To:	Vegard Nossum <vegard.nossum@...il.com>
CC:	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH] kmemcheck: disable fast string operations on P4 CPUs

Vegard Nossum wrote:
> This patch may allow us to remove the REP emulation code from
> kmemcheck.
> 
> Signed-off-by: Vegard Nossum <vegard.nossum@...il.com>

Looks good to me!

Acked-by: Pekka Enberg <penberg@...helsinki.fi>

> +#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.
> +	 */

Minor nit: I'd move the latter part of the comment to the changelog.

> +	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
>  }
>  
>  #ifdef CONFIG_X86_32

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