public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Shaohua Li <shli@fb.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	X86 ML <x86@kernel.org>,
	kernel-team@fb.com, "H. Peter Anvin" <hpa@zytor.com>,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH 3/3] X86: Add a thread cpu time implementation to vDSO
Date: Thu, 11 Dec 2014 07:36:21 +0100	[thread overview]
Message-ID: <20141211063621.GC5059@gmail.com> (raw)
In-Reply-To: <CALCETrXpVUVY6paKJq0Uq8VeHG2A0E3qc4b_H+5ZT-QJApkaJw@mail.gmail.com>


* Andy Lutomirski <luto@amacapital.net> wrote:

> On Wed, Dec 10, 2014 at 2:56 PM, Shaohua Li <shli@fb.com> wrote:
> > On Wed, Dec 10, 2014 at 02:13:23PM -0800, Andy Lutomirski wrote:
> >> On Wed, Dec 10, 2014 at 1:57 PM, Shaohua Li <shli@fb.com> wrote:
> >> > On Wed, Dec 10, 2014 at 11:10:52AM -0800, Andy Lutomirski wrote:
> >> >> On Sun, Dec 7, 2014 at 7:03 PM, Shaohua Li <shli@fb.com> wrote:
> >> >> > This primarily speeds up clock_gettime(CLOCK_THREAD_CPUTIME_ID, ..). We
> >> >> > use the following method to compute the thread cpu time:
> >> >>
> >> >> I like the idea, and I like making this type of profiling fast.  I
> >> >> don't love the implementation because it's an information leak (maybe
> >> >> we don't care) and it's ugly.
> >> >>
> >> >> The info leak could be fixed completely by having a per-process array
> >> >> instead of a global array.  That's currently tricky without wasting
> >> >> memory, but it could be created on demand if we wanted to do that,
> >> >> once my vvar .fault patches go in (assuming they do -- I need to ping
> >> >> the linux-mm people).
> >> >
> >> > those info leak really doesn't matter.
> >>
> >> Why not?
> >
> > Ofcourse I can't make sure completely, but how could this 
> > info be used as attack?
> 
> It may leak interesting timing info, even from cpus that are 
> outside your affinity mask / cpuset.  I don't know how much 
> anyone actually cares.

Finegraned timing information has been successfully used to 
recover secret keys (and sometimes even coarse timing 
information), so it can be a security issue in certain setups.

Thanks,

	Ingo

  reply	other threads:[~2014-12-11  6:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-08  3:03 [PATCH 1/3] X86: make VDSO data support multiple pages Shaohua Li
2014-12-08  3:03 ` [PATCH 2/3] X86: add a generic API to let vdso code detect context switch Shaohua Li
2014-12-10 18:38   ` Andy Lutomirski
2014-12-10 18:51     ` Shaohua Li
2014-12-10 19:11       ` Andy Lutomirski
2014-12-10 19:41         ` Shaohua Li
2014-12-08  3:03 ` [PATCH 3/3] X86: Add a thread cpu time implementation to vDSO Shaohua Li
2014-12-10 19:10   ` Andy Lutomirski
2014-12-10 21:57     ` Shaohua Li
2014-12-10 22:13       ` Andy Lutomirski
2014-12-10 22:56         ` Shaohua Li
2014-12-10 23:06           ` Andy Lutomirski
2014-12-11  6:36             ` Ingo Molnar [this message]
2014-12-15 18:36               ` Chris Mason
2014-12-15 18:55                 ` Andy Lutomirski
2014-12-10 18:36 ` [PATCH 1/3] X86: make VDSO data support multiple pages Andy Lutomirski

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=20141211063621.GC5059@gmail.com \
    --to=mingo@kernel.org \
    --cc=hpa@zytor.com \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@redhat.com \
    --cc=shli@fb.com \
    --cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox