virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: "Weiss, Radu" <raduweis@amazon.com>,
	virtualization@lists.linux-foundation.org, linux-mm@kvack.org,
	mingo@kernel.org, Jann Horn <jannh@google.com>,
	"Brooker, Marc" <mbrooker@amazon.com>,
	"Singh, Balbir" <sblbir@amazon.com>,
	len.brown@intel.com, bonzini@gnu.org, "Graf (AWS),
	Alexander" <graf@amazon.de>,
	keescook@chromium.org, linux-pm@vger.kernel.org, "Catangiu,
	Adrian Costin" <acatan@amazon.com>,
	Colm MacCarthaigh <colmmacc@amazon.com>,
	fweimer@redhat.com, wad@chromium.org, linux-api@vger.kernel.org,
	"Manwaring, Derek" <derekmn@amazon.com>,
	rjw@rjwysocki.net, luto@amacapital.net, "Sandu,
	Andrei" <sandreim@amazon.com>,
	akpm@linux-foundation.org
Subject: Re: [RFC]: mm,power: introduce MADV_WIPEONSUSPEND
Date: Mon, 13 Jul 2020 10:02:06 +0200	[thread overview]
Message-ID: <20200713080206.GD16783@dhcp22.suse.cz> (raw)
In-Reply-To: <20200712072228.GB4721@duo.ucw.cz>

On Sun 12-07-20 09:22:28, Pavel Machek wrote:
> On Tue 2020-07-07 12:00:41, Colm MacCarthaigh wrote:
> > 
> > 
> > On 7 Jul 2020, at 9:37, Pavel Machek wrote:
> > > Please go through the thread and try to understand it.
> > > 
> > > You'd need syscalls per get_randomness(), not per migration.
> > 
> > I think one check per get_randomness() is sufficient, though putting it at
> > the end of the critical section rather than the beginning helps.
> 
> Yeah, well, one syscall is still enough to make it useless.

I am sorry but I really do not follow. Why would you want to call a
syscall on each get_randomness invocation? Why is it not enough to
simply have a flag that tells that an external event has happened
and reinitialize if the flag is set? Yes this wouldn't be really sync
operation but does that matter? Is using a few random numbers from the
old pool just because the notifier hasn't processed and flag the
situation a major security concern?

Btw. let me just clarify that I am not by any means pushing a solution
like that. All I am saying is that MADV_WIPEONSUSPEND is inherently
subtle interface that we likely want to avoid.
-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2020-07-13  8:02 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03 10:34 [RFC]: mm,power: introduce MADV_WIPEONSUSPEND Catangiu, Adrian Costin
     [not found] ` <B7793B7A-3660-4769-9B9A-FFCF250728BB-vV1OtcyAfmbQT0dZR+AlfA@public.gmane.org>
2020-07-03 11:04   ` Jann Horn
     [not found]     ` <CAG48ez2CpHX9i3YgkNyMHPz63ohjkaSZscMtwSHOFYN4VQow3Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-07-04  1:33       ` Colm MacCárthaigh
2020-07-06 12:09       ` Alexander Graf
2020-07-03 11:30   ` Michal Hocko
     [not found]     ` <20200703113026.GT18446-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2020-07-03 12:17       ` Rafael J. Wysocki
     [not found]         ` <CAJZ5v0g+ip-EuUsoK646W-jVSSUhbnvHKsWmFH0+F1w0oYSmGw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-07-03 22:39           ` Pavel Machek
2020-07-03 13:29       ` Jann Horn
     [not found]         ` <CAG48ez2O2z4L=n57Omwy6s1sWQkdTkPKiikhbfdVhiyd_TGRRw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-07-03 22:34           ` Pavel Machek
2020-07-03 22:53             ` Jann Horn
2020-07-07  7:38           ` Michal Hocko
     [not found]             ` <20200707073823.GA3820-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2020-07-07  8:07               ` Pavel Machek
2020-07-07  8:58                 ` Michal Hocko
     [not found]                   ` <20200707085847.GA5913-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2020-07-07 16:37                     ` Pavel Machek
     [not found]                       ` <E6B41570-E206-4458-921B-465B9EF74949@amazon.com>
     [not found]                         ` <E6B41570-E206-4458-921B-465B9EF74949-vV1OtcyAfmbQT0dZR+AlfA@public.gmane.org>
2020-07-12  7:22                           ` Pavel Machek
2020-07-13  8:02                             ` Michal Hocko [this message]
2020-07-04  1:45       ` Colm MacCárthaigh
     [not found]         ` <BC9E44B2-D3C2-43C7-8F4B-A31477147368-vV1OtcyAfmbQT0dZR+AlfA@public.gmane.org>
2020-07-07  7:40           ` Michal Hocko
2020-07-03 22:44   ` Pavel Machek
2020-07-03 22:56     ` Jann Horn
     [not found]       ` <CAG48ez0oWQd42a-H-Dzw1Wq7HgB5PpFRGCZeYxP8ohxaoZHmvQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-07-04 11:48         ` Pavel Machek
2020-07-06 12:26           ` Alexander Graf
     [not found]             ` <57ab4fb3-3f82-d34f-ad74-2214b45a4dd9-vV1OtcyAfmbQT0dZR+AlfA@public.gmane.org>
2020-07-06 12:52               ` Jann Horn
     [not found]                 ` <CAG48ez1tAAD+x6n07uCisXpqVpDUPX7xBWiKFkS3u2azHqd41A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-07-06 13:14                   ` Alexander Graf
2020-07-07  7:44                   ` Michal Hocko
     [not found]                     ` <20200707074425.GC3820-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2020-07-07  8:01                       ` Alexander Graf
     [not found]                         ` <efa55313-ce8a-bac9-15df-167f93c672b3-vV1OtcyAfmbQT0dZR+AlfA@public.gmane.org>
2020-07-07  9:14                           ` Michal Hocko

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=20200713080206.GD16783@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=acatan@amazon.com \
    --cc=akpm@linux-foundation.org \
    --cc=bonzini@gnu.org \
    --cc=colmmacc@amazon.com \
    --cc=derekmn@amazon.com \
    --cc=fweimer@redhat.com \
    --cc=graf@amazon.de \
    --cc=jannh@google.com \
    --cc=keescook@chromium.org \
    --cc=len.brown@intel.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mbrooker@amazon.com \
    --cc=mingo@kernel.org \
    --cc=pavel@ucw.cz \
    --cc=raduweis@amazon.com \
    --cc=rjw@rjwysocki.net \
    --cc=sandreim@amazon.com \
    --cc=sblbir@amazon.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=wad@chromium.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;
as well as URLs for NNTP newsgroup(s).