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

Darrick J. Wong
2020-04-21T15:44:09Z

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?

--D

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