[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201504091855.01927@pali>
Date: Thu, 9 Apr 2015 18:55:01 +0200
From: Pali Rohár <pali.rohar@...il.com>
To: "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc: Alasdair Kergon <agk@...hat.com>,
Mike Snitzer <snitzer@...hat.com>, Neil Brown <neilb@...e.de>,
Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
dm-devel@...hat.com, linux-raid@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH 1/3] PM suspend/hibernate: Call notifier after freezing processes
On Thursday 09 April 2015 19:13:55 Rafael J. Wysocki wrote:
> On Thursday, April 09, 2015 08:36:57 AM Pali Rohár wrote:
> > --nextPart2566388.gOmNIJrIqI
> > Content-Type: Text/Plain;
> >
> > charset="utf-8"
> >
> > Content-Transfer-Encoding: quoted-printable
> >
> > On Thursday 09 April 2015 02:28:41 Rafael J. Wysocki wrote:
> > > On Sunday, April 05, 2015 07:20:17 PM Pali Roh=C3=A1r
> > > wrote:
> > > > To prevent race conditions on userspace processes with
> > > > I/O some taks must be called after processes are
> > > > freezed. This patch adds new events which are delivered
> > > > by
> > > > pm_notifier_call_chain() after freezing processes when
> > > > doing suspend or hibernate action.
> > > >
> > > >=20
> > > >
> > > > Signed-off-by: Pali Roh=C3=A1r <pali.rohar@...il.com>
> > >
> > >=20
> > >
> > > Please don't add more notifiers. Just call whatever you
> > > need directly from where you need to call that.
> > >
> > >=20
> > >
> > > If that is device-related, try to use device PM
> > > suspend/hibernate callbacks instead.
> > >
> > >=20
> >
> > Hi! It is not possible to use any exiting pm notifiers! This
> > is=20 reason why I added new ones. As I wrote wiping dm
> > crypt keys must=20 be done *after* userspace processes are
> > freezed to prevent race=20 conditions...
>
> I'm not talking about using the existing notifiers. I'm
> talking about calling the function you need to call directly
> from a suitable place in the system suspend code.
I need to wipe crypto keys from dm-crypt module. That module can
be compiled as external .ko file and so kernel cannot call
directly needed function. This is reason why I'm adding new
notifier event.
--
Pali Rohár
pali.rohar@...il.com
Download attachment "signature.asc " of type "application/pgp-signature" (199 bytes)
Powered by blists - more mailing lists