Re: [PATCH] hibernate: unlock swap bdev for writing when uswsusp is active

Domenico Andreoli
2020-04-21T18:39:35Z

[-- Attachment #1: Type: text/plain, Size: 975 bytes --]

On Tue, Apr 21, 2020 at 08:43:33AM -0700, Darrick J. Wong wrote:
> On Mon, Apr 20, 2020 at 08:52:55PM +0200, Domenico Andreoli wrote:
> > On Sun, Mar 01, 2020 at 10:35:36PM +0100, Rafael J. Wysocki wrote:
> > > On Sat, Feb 29, 2020 at 9:02 PM Domenico Andreoli <domenico.andreoli@linux.com> wrote:
> > > >
> > > > Maybe user-space hibernation should be a separate option.
> > >
> > > That actually is not a bad idea at all in my view.
> >
> > I prepared a patch for this:
> > https://lore.kernel.org/linux-pm/20200413190843.044112674@gmail.com/
>
> If you succeed in making uswsusp a kconfig option, can you amend the
> "!hibernation available()" test in blkdev_write_iter so that users of
> in-kernel hibernate are protected against userspace swap device
> scribbles, please?

Yes, that's the plan.

>
> --D

Domenico

--
rsa4096: 3B10 0CA1 8674 ACBA B4FE FCD2 CE5B CF17 9960 DE13
ed25519: FFB4 0CC3 7F2E 091D F7DA 356E CC79 2832 ED38 CB05

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]