mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Dave Hansen <dave.hansen@intel.com>
Cc: Kees Cook <keescook@chromium.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Theodore Ts'o" <tytso@mit.edu>, Oleg Nesterov <oleg@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Dave Hansen <dave.hansen@linux.intel.com>
Subject: Re: [RFC][PATCH 1/2] fs proc: make pagemap a privileged interface
Date: Mon, 09 Mar 2015 23:49:39 -0500	[thread overview]
Message-ID: <87twxtpicc.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <54FE5C28.10305@intel.com> (Dave Hansen's message of "Mon, 09 Mar 2015 19:51:20 -0700")

Dave Hansen <dave.hansen@intel.com> writes:

> On 03/09/2015 05:03 PM, Kees Cook wrote:
>> On Mon, Mar 9, 2015 at 4:43 PM, Eric W. Biederman <ebiederm@xmission.com> wrote:
>>> A 1 to 1 blinding function like integer multiplication mudulo 2^32 by an
>>> appropriate random number ought to keep from revealing page numbers or
>>> page ajacencies while not requiring any changes in userspace.
>>>
>>> That way the revealed pfn and the physcial pfn would be different but
>>> you could still use pagemap for it's intended purpose.
>> 
>> If this could be done in a way where it was sufficiently hard to
>> expose the random number, we should absolutely do this.
>
> We would need something which is both reversible (so that the given
> offsets can still be used in /proc/kpagemap) and also hard to do a
> known-plaintext-type attack on it.
>
> Transparent huge pages are a place where userspace knows the
> relationship between 512 adjacent physical addresses.  That represents a
> good chunk of known data.  Surely there are more of these kinds of things.
>
> Right now, for instance, the ways in which a series of sequential
> allocations come out of the page allocator are fairly deterministic.  We
> would also need to do some kind of allocator randomization to ensure
> that userspace couldn't make good guesses about the physical addresses
> of things coming out of the allocator.
>
> Or, we just be sure and turn the darn thing off. :)

Yes.  If we are worried about something a big off switch is fine.

As for a one-to-one transform that is resitant to plain text attacks
I think that is the definition of a cypher.  That is we should just use
AES or something well know to encrypt the pafe frame numbers if we want
to hide them.  I don't know if the block mode of AES would be a problem
or not.

Eric



  reply	other threads:[~2015-03-10  4:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20150309204321.AAF412E0@viggo.jf.intel.com>
2015-03-09 21:31 ` Kees Cook
     [not found] ` <20150309204322.50DA6B5D@viggo.jf.intel.com>
2015-03-09 21:32   ` [RFC][PATCH 2/2] proc: config options for making privileged /proc the default Kees Cook
2015-03-09 22:13 ` [RFC][PATCH 1/2] fs proc: make pagemap a privileged interface Eric W. Biederman
2015-03-09 22:22   ` Kees Cook
2015-03-09 23:08     ` Eric W. Biederman
2015-03-09 23:40       ` Kees Cook
2015-03-09 23:43       ` Eric W. Biederman
2015-03-10  0:03         ` Kees Cook
2015-03-10  2:51           ` Dave Hansen
2015-03-10  4:49             ` Eric W. Biederman [this message]
2015-03-10  2:28       ` Dave Hansen
2015-03-12 22:35 ` Andrew Morton
2015-03-13 15:56   ` Dave Hansen
2015-03-13 17:16     ` Eric W. Biederman

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=87twxtpicc.fsf@x220.int.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=akpm@linux-foundation.org \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=tytso@mit.edu \
    /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

Powered by JetHome