Re: [PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users

2021-02-22 Thread James Bottomley
On Mon, 2021-02-22 at 11:17 -0800, Dan Williams wrote: > On Mon, Feb 22, 2021 at 2:24 AM Mike Rapoport > wrote: > > On Mon, Feb 22, 2021 at 07:34:52AM +, Matthew Garrett wrote: > > > On Mon, Feb 08, 2021 at 10:49:18AM +0200, Mike Rapoport wrote: > > > > > > > It is unsafe to allow saving of

Re: [PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users

2021-02-22 Thread Dan Williams
On Mon, Feb 22, 2021 at 2:24 AM Mike Rapoport wrote: > > On Mon, Feb 22, 2021 at 07:34:52AM +, Matthew Garrett wrote: > > On Mon, Feb 08, 2021 at 10:49:18AM +0200, Mike Rapoport wrote: > > > > > It is unsafe to allow saving of secretmem areas to the hibernation > > > snapshot as they would be

Re: [PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users

2021-02-22 Thread Matthew Garrett
On Mon, Feb 22, 2021 at 12:23:59PM +0200, Mike Rapoport wrote: > On Mon, Feb 22, 2021 at 07:34:52AM +, Matthew Garrett wrote: > > On Mon, Feb 08, 2021 at 10:49:18AM +0200, Mike Rapoport wrote: > > > > > It is unsafe to allow saving of secretmem areas to the hibernation > > > snapshot as they

Re: [PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users

2021-02-22 Thread Mike Rapoport
On Mon, Feb 22, 2021 at 07:34:52AM +, Matthew Garrett wrote: > On Mon, Feb 08, 2021 at 10:49:18AM +0200, Mike Rapoport wrote: > > > It is unsafe to allow saving of secretmem areas to the hibernation > > snapshot as they would be visible after the resume and this essentially > > will defeat

Re: [PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users

2021-02-21 Thread Matthew Garrett
On Mon, Feb 08, 2021 at 10:49:18AM +0200, Mike Rapoport wrote: > It is unsafe to allow saving of secretmem areas to the hibernation > snapshot as they would be visible after the resume and this essentially > will defeat the purpose of secret memory mappings. Sorry for being a bit late to this -

Re: [PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users

2021-02-08 Thread Mike Rapoport
On Mon, Feb 08, 2021 at 11:18:37AM +0100, Michal Hocko wrote: > On Mon 08-02-21 10:49:18, Mike Rapoport wrote: > > From: Mike Rapoport > > > > It is unsafe to allow saving of secretmem areas to the hibernation > > snapshot as they would be visible after the resume and this essentially > > will

Re: [PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users

2021-02-08 Thread David Hildenbrand
On 08.02.21 13:17, Michal Hocko wrote: On Mon 08-02-21 12:26:31, David Hildenbrand wrote: [...] My F33 system happily hibernates to disk, even with an application that succeeded in din doing an mlockall(). And it somewhat makes sense. Even my freshly-booted, idle F33 has $ cat /proc/meminfo

Re: [PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users

2021-02-08 Thread Michal Hocko
Btw. I do not see Rafael involved. Maybe he can add some insight to this. Please note that the patch in question is http://lkml.kernel.org/r/20210208084920.2884-9-r...@kernel.org and the full series is http://lkml.kernel.org/r/20210208084920.2884-1-r...@kernel.org On Mon 08-02-21 13:17:26,

Re: [PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users

2021-02-08 Thread Michal Hocko
On Mon 08-02-21 12:26:31, David Hildenbrand wrote: [...] > My F33 system happily hibernates to disk, even with an application that > succeeded in din doing an mlockall(). > > And it somewhat makes sense. Even my freshly-booted, idle F33 has > > $ cat /proc/meminfo | grep lock > Mlocked:

Re: [PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users

2021-02-08 Thread David Hildenbrand
On 08.02.21 12:14, David Hildenbrand wrote: On 08.02.21 12:13, David Hildenbrand wrote: On 08.02.21 11:57, Michal Hocko wrote: On Mon 08-02-21 11:53:58, David Hildenbrand wrote: On 08.02.21 11:51, Michal Hocko wrote: On Mon 08-02-21 11:32:11, David Hildenbrand wrote: On 08.02.21 11:18,

Re: [PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users

2021-02-08 Thread David Hildenbrand
On 08.02.21 12:13, David Hildenbrand wrote: On 08.02.21 11:57, Michal Hocko wrote: On Mon 08-02-21 11:53:58, David Hildenbrand wrote: On 08.02.21 11:51, Michal Hocko wrote: On Mon 08-02-21 11:32:11, David Hildenbrand wrote: On 08.02.21 11:18, Michal Hocko wrote: On Mon 08-02-21 10:49:18,

Re: [PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users

2021-02-08 Thread David Hildenbrand
On 08.02.21 11:57, Michal Hocko wrote: On Mon 08-02-21 11:53:58, David Hildenbrand wrote: On 08.02.21 11:51, Michal Hocko wrote: On Mon 08-02-21 11:32:11, David Hildenbrand wrote: On 08.02.21 11:18, Michal Hocko wrote: On Mon 08-02-21 10:49:18, Mike Rapoport wrote: From: Mike Rapoport It

Re: [PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users

2021-02-08 Thread Michal Hocko
On Mon 08-02-21 11:53:58, David Hildenbrand wrote: > On 08.02.21 11:51, Michal Hocko wrote: > > On Mon 08-02-21 11:32:11, David Hildenbrand wrote: > > > On 08.02.21 11:18, Michal Hocko wrote: > > > > On Mon 08-02-21 10:49:18, Mike Rapoport wrote: > > > > > From: Mike Rapoport > > > > > > > > > >

Re: [PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users

2021-02-08 Thread David Hildenbrand
On 08.02.21 11:51, Michal Hocko wrote: On Mon 08-02-21 11:32:11, David Hildenbrand wrote: On 08.02.21 11:18, Michal Hocko wrote: On Mon 08-02-21 10:49:18, Mike Rapoport wrote: From: Mike Rapoport It is unsafe to allow saving of secretmem areas to the hibernation snapshot as they would be

Re: [PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users

2021-02-08 Thread Michal Hocko
On Mon 08-02-21 11:32:11, David Hildenbrand wrote: > On 08.02.21 11:18, Michal Hocko wrote: > > On Mon 08-02-21 10:49:18, Mike Rapoport wrote: > > > From: Mike Rapoport > > > > > > It is unsafe to allow saving of secretmem areas to the hibernation > > > snapshot as they would be visible after

Re: [PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users

2021-02-08 Thread David Hildenbrand
On 08.02.21 11:18, Michal Hocko wrote: On Mon 08-02-21 10:49:18, Mike Rapoport wrote: From: Mike Rapoport It is unsafe to allow saving of secretmem areas to the hibernation snapshot as they would be visible after the resume and this essentially will defeat the purpose of secret memory

Re: [PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users

2021-02-08 Thread Michal Hocko
On Mon 08-02-21 10:49:18, Mike Rapoport wrote: > From: Mike Rapoport > > It is unsafe to allow saving of secretmem areas to the hibernation > snapshot as they would be visible after the resume and this essentially > will defeat the purpose of secret memory mappings. > > Prevent hibernation

[PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users

2021-02-08 Thread Mike Rapoport
From: Mike Rapoport It is unsafe to allow saving of secretmem areas to the hibernation snapshot as they would be visible after the resume and this essentially will defeat the purpose of secret memory mappings. Prevent hibernation whenever there are active secret memory users. Signed-off-by: