public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Milan Broz <mbroz@redhat.com>, Alasdair G Kergon <agk@redhat.com>,
	Matthew Wilcox <matthew@wil.cx>,
	Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>,
	linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org,
	Hugh Dickins <hughd@google.com>, Oleg Nesterov <oleg@redhat.com>
Subject: Re: [PATCH] Don't mlock guardpage if the stack is growing up
Date: Thu, 12 May 2011 11:06:03 +0200	[thread overview]
Message-ID: <4DCBA2FB.3040907@redhat.com> (raw)
In-Reply-To: <BANLkTi=4raxPiRzBH=b44=SLsAujhx2xUw@mail.gmail.com>

Dne 12.5.2011 04:12, Linus Torvalds napsal(a):
> On Wed, May 11, 2011 at 1:42 AM, Milan Broz <mbroz@redhat.com> wrote:
>>
>> Another one is cryptsetup [..]
> 
> Quite frankly, all security-related uses should always be happy about
> a "MCL_SPARSE" model, since there is no point in ever bringing in
> pages that haven't been used. The whole (and only) point of
> mlock[all]() for them is the "avoid to push to disk" issue.
> 
> I do wonder if we really should ever do the page-in at all. We might
> simply be better off always just saying "we'll lock pages you've
> touched, that's it".
> 


For LVM we need to ensure the code which might ever be executed during  disk
suspend state must be paged and locked in - thus we would need MCL_SPARSE only
on several selected 'unneeded' libraries - as we are obviously not really able
to select which part of glibc might be needed during all code path (though I
guess we may find some limits).  But if we are sure that some libraries and
locale files will never be used during suspend state - we do not care about
those pages at all.

So it's not like we would always need only MCL_SPARSE all the time - we would
probably need to have some control to switch i.e.  glibc into MCL_ALL.

Zdenek

      reply	other threads:[~2011-05-12  9:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-08 18:55 [PATCH] Don't mlock guardpage if the stack is growing up Mikulas Patocka
2011-05-08 20:12 ` Hugh Dickins
2011-05-09 11:12   ` Mikulas Patocka
2011-05-09 15:57     ` Linus Torvalds
2011-05-09 22:07       ` Linus Torvalds
2011-05-09 22:19         ` James Bottomley
2011-05-09 22:31           ` Linus Torvalds
2011-05-09 22:53             ` Tony Luck
2011-05-09 22:58               ` Linus Torvalds
2011-05-09 23:08                 ` Tony Luck
2011-05-09 23:17                   ` Linus Torvalds
2011-05-09 23:25                     ` Linus Torvalds
2011-05-10  4:12                       ` James Bottomley
2011-05-09 22:26         ` Mikulas Patocka
2011-05-15 22:18           ` Mikulas Patocka
2011-05-08 21:47 ` Linus Torvalds
2011-05-09 11:01   ` Mikulas Patocka
2011-05-09 11:43     ` Zdenek Kabelac
2011-05-09 21:08       ` Alasdair G Kergon
2011-05-09 22:45       ` Matthew Wilcox
2011-05-09 22:56         ` Linus Torvalds
2011-05-10 22:57           ` Alasdair G Kergon
2011-05-11  8:42             ` Milan Broz
2011-05-12  2:12               ` Linus Torvalds
2011-05-12  9:06                 ` Zdenek Kabelac [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=4DCBA2FB.3040907@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=agk@redhat.com \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=mbroz@redhat.com \
    --cc=mikulas@artax.karlin.mff.cuni.cz \
    --cc=oleg@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox