Re: [PATCH] x86, AMD: Correct F15h IC aliasing issue

From: Ingo Molnar
Date: Tue Jul 26 2011 - 14:48:45 EST



* Borislav Petkov <bp@xxxxxxxxx> wrote:

> > Was this done with a stock kernel, or with the simple patch
> > applied?
>
> with the simplest version of Linus' patch:
>
> diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c
> index 1dab519..6b1094d 100644
> --- a/arch/x86/mm/mmap.c
> +++ b/arch/x86/mm/mmap.c
> @@ -90,6 +90,8 @@ static unsigned long mmap_rnd(void)
> rnd = (long)get_random_int() % (1<<8);
> else
> rnd = (long)(get_random_int() % (1<<28));
> +
> + rnd &= ~0x7;

So, unless i got the stats right, unmodified kernel has like a 75%
mis-aligned rate, while with the simple fix this goes down to 30%?

Have you run the numbers on the stock, unmodified kernel by any
chance, just to make sure the stats are ok?

Thanks,

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