lkml.org 
[lkml]   [2011]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] x86, AMD: Correct F15h IC aliasing issue
On Tue, Jul 26, 2011 at 02:34:30PM -0400, Ingo Molnar wrote:
>
> * Borislav Petkov <bp@amd64.org> wrote:
>
> > Ok, I went and installed a Debian wheezy with gnome and started
> > almost everything I could find in the startup menu. Kernel is 3.0
> > with Linus' simpler fix.
> >
> > The attached file shows all libraries which would create aliases
> > (i.e. 2 or more unique values for bits [14:12] along with the
> > respective count) in the total of:
> >
> > Total r-xp mappings: 831, aliasing: 240 (0.289%)
>
> 28.9%, right?

Yessir.

> > For example, libc gets mapped into all possible slots for [14:12]
> >
> > Library [14:12] count
> > ======= ======= =====
> > /lib/libc-2.11.2.so
> > 0 12
> > 1 12
> > 2 11
> > 3 12
> > 4 13
> > 5 16
> > 6 13
> > 7 9
> >
> >
> > and so on.
>
> 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;
}
return rnd << PAGE_SHIFT;
}
--
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551


\
 
 \ /
  Last update: 2011-07-26 20:43    [W:0.070 / U:0.772 seconds]
©2003-2014 Jasper Spaans. hosted at Digital Ocean