All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@amd64.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Borislav Petkov <bp@amd64.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>,
	"Przywara, Andre" <Andre.Przywara@amd.com>,
	"Pohlack, Martin" <Martin.Pohlack@amd.com>
Subject: Re: [PATCH] x86, AMD: Correct F15h IC aliasing issue
Date: Mon, 25 Jul 2011 23:53:28 +0200	[thread overview]
Message-ID: <20110725215328.GA25960@aftab> (raw)
In-Reply-To: <20110725200645.GC8302@elte.hu>

On Mon, Jul 25, 2011 at 04:06:45PM -0400, Ingo Molnar wrote:
> 
> * Borislav Petkov <bp@amd64.org> wrote:
> 
> > So yeah, the simpler fix works for processes mapping libraries in 
> > the same order but not for processes mapping a subset of libraries 
> > in a different order.
> 
> but what is the proportion of 'good' versus bad alignment of 
> libraries, could you collect some stats on a representative enough, 
> fully booted up Linux system?
> 
> Are only 1% of mappings 'bad'? 5%? 10%? 50%? We have no idea and the 
> actual number matters a lot.

Actually, it's hard to say what is a 'good' and 'bad' allocation. If
they don't alias, they're always good :).

Anyway, I did some beginners awk-ery on a gentoo system with ca. 150
processes. Below is some data for the "r-xp" mappings.

ld-2.12.2.so, for example, is always loaded at an address with [14:12]
= 000b while libc's addresses differ in those bits because a different
number of allocations is being done between ld and libc, thus libc lands
at different offsets.

I'll do a more comprehensive collection tomorrow and distribute the
mappings by [14:12] value, that should give us a better idea.

/lib64/ld-2.12.2.so|r-xp|7f07f61d8000 1
/lib64/ld-2.12.2.so|r-xp|7f1d8be10000 1
/lib64/ld-2.12.2.so|r-xp|7f1ea7678000 1
/lib64/ld-2.12.2.so|r-xp|7f272e248000 1
/lib64/ld-2.12.2.so|r-xp|7f37acf88000 1
/lib64/ld-2.12.2.so|r-xp|7f49853f0000 1
/lib64/ld-2.12.2.so|r-xp|7f50c1460000 1
/lib64/ld-2.12.2.so|r-xp|7f59f58e0000 1
/lib64/ld-2.12.2.so|r-xp|7f63dc818000 1
/lib64/ld-2.12.2.so|r-xp|7f7267d70000 1
/lib64/ld-2.12.2.so|r-xp|7fa026ba0000 2
/lib64/ld-2.12.2.so|r-xp|7fa24de88000 1
/lib64/ld-2.12.2.so|r-xp|7fa604cf8000 1
/lib64/ld-2.12.2.so|r-xp|7fb07d418000 1
/lib64/ld-2.12.2.so|r-xp|7fc33cb78000 1
/lib64/ld-2.12.2.so|r-xp|7fd0c2770000 1
/lib64/ld-2.12.2.so|r-xp|7fd1e2a08000 1
/lib64/ld-2.12.2.so|r-xp|7fd214b18000 1
/lib64/ld-2.12.2.so|r-xp|7fda88a58000 1
/lib64/ld-2.12.2.so|r-xp|7fdb87d98000 1
/lib64/ld-2.12.2.so|r-xp|7fe42a588000 1
/lib64/ld-2.12.2.so|r-xp|7ffd79c08000 1
/lib64/libc-2.12.2.so|r-xp|7f07f4e3e000 1
/lib64/libc-2.12.2.so|r-xp|7f1d8b66d000 1
/lib64/libc-2.12.2.so|r-xp|7f1ea7315000 1
/lib64/libc-2.12.2.so|r-xp|7f272ceae000 1
/lib64/libc-2.12.2.so|r-xp|7f37acc25000 1
/lib64/libc-2.12.2.so|r-xp|7f498508d000 1
/lib64/libc-2.12.2.so|r-xp|7f50c0ca9000 1
/lib64/libc-2.12.2.so|r-xp|7f59f557d000 1
/lib64/libc-2.12.2.so|r-xp|7f63dc061000 1
/lib64/libc-2.12.2.so|r-xp|7f7267a0d000 1
/lib64/libc-2.12.2.so|r-xp|7fa02591d000 2
/lib64/libc-2.12.2.so|r-xp|7fa24d8a5000 1
/lib64/libc-2.12.2.so|r-xp|7fa604995000 1
/lib64/libc-2.12.2.so|r-xp|7fb07cc31000 1
/lib64/libc-2.12.2.so|r-xp|7fc33b7de000 1
/lib64/libc-2.12.2.so|r-xp|7fd0c1f89000 1
/lib64/libc-2.12.2.so|r-xp|7fd1e26a5000 1
/lib64/libc-2.12.2.so|r-xp|7fd2147b5000 1
/lib64/libc-2.12.2.so|r-xp|7fda884e8000 1
/lib64/libc-2.12.2.so|r-xp|7fdb87a35000 1
/lib64/libc-2.12.2.so|r-xp|7fe42a01c000 1
/lib64/libc-2.12.2.so|r-xp|7ffd79451000 1

Thanks.

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

  reply	other threads:[~2011-07-25 21:53 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-22 13:15 [PATCH] x86, AMD: Correct F15h IC aliasing issue Borislav Petkov
2011-07-24 11:13 ` Ingo Molnar
2011-07-24 13:40   ` Borislav Petkov
2011-07-24 13:47     ` Ingo Molnar
2011-07-24 16:16     ` Andrew Morton
2011-07-26 18:33     ` Borislav Petkov
2011-07-24 16:04 ` Linus Torvalds
2011-07-24 17:22   ` Borislav Petkov
2011-07-24 17:39     ` Linus Torvalds
2011-07-24 18:12       ` Ingo Molnar
2011-07-24 18:23       ` Borislav Petkov
2011-07-24 18:30         ` Ingo Molnar
2011-07-24 19:07           ` Borislav Petkov
2011-07-24 20:44             ` Ingo Molnar
2011-07-25 20:00               ` Borislav Petkov
2011-07-25 20:06                 ` Ingo Molnar
2011-07-25 21:53                   ` Borislav Petkov [this message]
2011-07-26  5:58                     ` Ray Lee
2011-07-26 17:28                       ` Borislav Petkov
2011-07-26 18:34                         ` Ingo Molnar
2011-07-26 18:39                           ` Borislav Petkov
2011-07-26 18:47                             ` Ingo Molnar
2011-07-26 19:33                               ` Borislav Petkov
2011-07-27 17:10       ` Borislav Petkov
2011-07-27 17:16         ` H. Peter Anvin
2011-07-28 13:44           ` Borislav Petkov
2011-07-28 14:02             ` H. Peter Anvin
2011-07-28 14:13               ` Borislav Petkov
2011-07-28 14:18                 ` H. Peter Anvin
2011-07-28 14:35                   ` Borislav Petkov
2011-07-26 17:59 ` Avi Kivity
2011-07-26 18:13   ` Borislav Petkov
2011-07-26 18:16     ` H. Peter Anvin
2011-07-26 18:37       ` Borislav Petkov
2011-07-26 18:38         ` H. Peter Anvin
2011-07-26 19:42           ` Andre Przywara
2011-07-26 22:34             ` H. Peter Anvin
2011-07-27  4:14             ` Avi Kivity
2011-07-27  6:21               ` Borislav Petkov
2011-07-27  6:59                 ` Ingo Molnar
2011-07-27  9:30                   ` Avi Kivity
2011-07-27 15:37                     ` Borislav Petkov
2011-07-27 15:45                       ` Avi Kivity
2011-07-27 15:49                         ` Borislav Petkov
2011-07-27 15:57                           ` Avi Kivity
2011-07-27 16:42                             ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110725215328.GA25960@aftab \
    --to=bp@amd64.org \
    --cc=Andre.Przywara@amd.com \
    --cc=Martin.Pohlack@amd.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.