mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perfcounters: allow sysadmin to restrict non-root counting of kernel events
Date: Wed, 18 Feb 2009 16:51:11 +0100	[thread overview]
Message-ID: <20090218155111.GB23989@elte.hu> (raw)
In-Reply-To: <1234958840.4637.61.camel@laptop>


* Peter Zijlstra <peterz@infradead.org> wrote:

> On Wed, 2009-02-18 at 21:26 +1100, Paul Mackerras wrote:
> > Impact: security feature
> > 
> > This allows the sysadmin to prevent non-root users from counting
> > hardware events that occur in kernel or hypervisor mode via a sysfs file:
> > 
> > 	/sys/devices/system/cpu/perf_counters/restrict_kernel_events
> > 
> > This defaults to off (0), allowing users to count kernel and hypervisor
> > events, but if the sysadmin writes 1 to that file, any new counters
> > created by non-root users will automatically be set to ignore kernel
> > and hypervisor events.
> > 
> > This could be useful if there is a concern that allowing non-root users
> > to count kernel or hypervisor events might leak sensitive information.
> 
> I would expect it the other way around, don't allow users 
> access to kernel/hv events unless explicitly granted.

i think it's useful to make userspace developers aware of the 
kernel overhead they are causing - while still allowing policy 
settings to override that default.

Maybe the name of the control should be switched around, to 
allow_kernel_events? [with the same functional end result though 
- i.e. default-enabled]

	Ingo

      reply	other threads:[~2009-02-18 15:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-18 10:26 Paul Mackerras
2009-02-18 12:07 ` Peter Zijlstra
2009-02-18 15:51   ` Ingo Molnar [this message]

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=20090218155111.GB23989@elte.hu \
    --to=mingo@elte.hu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.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

all inboxes | Powered by JetHome®