Re: [RFC]: mm,power: introduce MADV_WIPEONSUSPEND

2020-07-03 Thread Jann Horn via Virtualization
On Sat, Jul 4, 2020 at 12:44 AM Pavel Machek wrote: > > Cryptographic libraries carry pseudo random number generators to > > quickly provide randomness when needed. If such a random pool gets > > cloned, secrets may get revealed, as the same random number may get > > used multiple times. For fork,

Re: [RFC]: mm,power: introduce MADV_WIPEONSUSPEND

2020-07-03 Thread Jann Horn via Virtualization
On Sat, Jul 4, 2020 at 12:34 AM Pavel Machek wrote: > On Fri 2020-07-03 15:29:22, Jann Horn wrote: > > On Fri, Jul 3, 2020 at 1:30 PM Michal Hocko wrote: > > > On Fri 03-07-20 10:34:09, Catangiu, Adrian Costin wrote: > > > > This patch adds logic to the kernel power code to zero out contents of >

Re: [RFC]: mm,power: introduce MADV_WIPEONSUSPEND

2020-07-03 Thread Pavel Machek
Hi! > Cryptographic libraries carry pseudo random number generators to > quickly provide randomness when needed. If such a random pool gets > cloned, secrets may get revealed, as the same random number may get > used multiple times. For fork, this was fixed using the WIPEONFORK > madvise flag [1].

Re: [RFC]: mm,power: introduce MADV_WIPEONSUSPEND

2020-07-03 Thread Pavel Machek
On Fri 2020-07-03 14:17:50, Rafael J. Wysocki wrote: > On Fri, Jul 3, 2020 at 1:30 PM Michal Hocko wrote: > > > > On Fri 03-07-20 10:34:09, Catangiu, Adrian Costin wrote: > > > This patch adds logic to the kernel power code to zero out contents of > > > all MADV_WIPEONSUSPEND VMAs present in the s

Re: [RFC]: mm,power: introduce MADV_WIPEONSUSPEND

2020-07-03 Thread Pavel Machek
On Fri 2020-07-03 15:29:22, Jann Horn wrote: > On Fri, Jul 3, 2020 at 1:30 PM Michal Hocko wrote: > > On Fri 03-07-20 10:34:09, Catangiu, Adrian Costin wrote: > > > This patch adds logic to the kernel power code to zero out contents of > > > all MADV_WIPEONSUSPEND VMAs present in the system during

Re: [RFC]: mm,power: introduce MADV_WIPEONSUSPEND

2020-07-03 Thread Jann Horn via Virtualization
On Fri, Jul 3, 2020 at 1:30 PM Michal Hocko wrote: > On Fri 03-07-20 10:34:09, Catangiu, Adrian Costin wrote: > > This patch adds logic to the kernel power code to zero out contents of > > all MADV_WIPEONSUSPEND VMAs present in the system during its transition > > to any suspend state equal or gre

Re: [RFC]: mm,power: introduce MADV_WIPEONSUSPEND

2020-07-03 Thread Rafael J. Wysocki
On Fri, Jul 3, 2020 at 1:30 PM Michal Hocko wrote: > > On Fri 03-07-20 10:34:09, Catangiu, Adrian Costin wrote: > > This patch adds logic to the kernel power code to zero out contents of > > all MADV_WIPEONSUSPEND VMAs present in the system during its transition > > to any suspend state equal or g

Re: [RFC]: mm,power: introduce MADV_WIPEONSUSPEND

2020-07-03 Thread Michal Hocko
On Fri 03-07-20 10:34:09, Catangiu, Adrian Costin wrote: > This patch adds logic to the kernel power code to zero out contents of > all MADV_WIPEONSUSPEND VMAs present in the system during its transition > to any suspend state equal or greater/deeper than Suspend-to-memory, > known as S3. How does

Re: [RFC]: mm,power: introduce MADV_WIPEONSUSPEND

2020-07-03 Thread Jann Horn via Virtualization
On Fri, Jul 3, 2020 at 12:34 PM Catangiu, Adrian Costin wrote: > Cryptographic libraries carry pseudo random number generators to > quickly provide randomness when needed. If such a random pool gets > cloned, secrets may get revealed, as the same random number may get > used multiple times. For fo

Re: [PATCH 5/8] powerpc/64s: implement queued spinlocks and rwlocks

2020-07-03 Thread Michael Ellerman
Nicholas Piggin writes: > Excerpts from Will Deacon's message of July 2, 2020 8:35 pm: >> On Thu, Jul 02, 2020 at 08:25:43PM +1000, Nicholas Piggin wrote: >>> Excerpts from Will Deacon's message of July 2, 2020 6:02 pm: >>> > On Thu, Jul 02, 2020 at 05:48:36PM +1000, Nicholas Piggin wrote: >>> >>

[PATCH v2 6/6] powerpc/qspinlock: optimised atomic_try_cmpxchg_lock that adds the lock hint

2020-07-03 Thread Nicholas Piggin
This brings the behaviour of the uncontended fast path back to roughly equivalent to simple spinlocks -- a single atomic op with lock hint. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/atomic.h| 28 arch/powerpc/include/asm/qspinlock.h | 2 +- 2 f

[PATCH v2 0/6] powerpc: queued spinlocks and rwlocks

2020-07-03 Thread Nicholas Piggin
v2 is updated to account for feedback from Will, Peter, and Waiman (thank you), and trims off a couple of RFC and unrelated patches. Thanks, Nick Nicholas Piggin (6): powerpc/powernv: must include hvcall.h to get PAPR defines powerpc/pseries: move some PAPR paravirt functions to their own fil

[PATCH v2 3/6] powerpc: move spinlock implementation to simple_spinlock

2020-07-03 Thread Nicholas Piggin
To prepare for queued spinlocks. This is a simple rename except to update preprocessor guard name and a file reference. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/simple_spinlock.h| 292 ++ .../include/asm/simple_spinlock_types.h | 21 ++ arch/powerpc/

[PATCH v2 1/6] powerpc/powernv: must include hvcall.h to get PAPR defines

2020-07-03 Thread Nicholas Piggin
An include goes away in future patches which breaks compilation without this. Signed-off-by: Nicholas Piggin --- arch/powerpc/platforms/powernv/pci-ioda-tce.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/powernv/pci-ioda-tce.c b/arch/powerpc/platforms/powernv/pci-i

[PATCH v2 2/6] powerpc/pseries: move some PAPR paravirt functions to their own file

2020-07-03 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/paravirt.h | 61 + arch/powerpc/include/asm/spinlock.h | 24 +--- arch/powerpc/lib/locks.c| 12 +++--- 3 files changed, 68 insertions(+), 29 deletions(-) create mode 100644 arch/powerpc/in

[PATCH v2 4/6] powerpc/64s: implement queued spinlocks and rwlocks

2020-07-03 Thread Nicholas Piggin
These have shown significantly improved performance and fairness when spinlock contention is moderate to high on very large systems. [ Numbers hopefully forthcoming after more testing, but initial results look good ] Thanks to the fast path, single threaded performance is not noticably hurt.

[PATCH v2 5/6] powerpc/pseries: implement paravirt qspinlocks for SPLPAR

2020-07-03 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/paravirt.h | 28 ++ arch/powerpc/include/asm/qspinlock.h | 55 +++ arch/powerpc/include/asm/qspinlock_paravirt.h | 5 ++ arch/powerpc/platforms/pseries/Kconfig| 5 ++ arch/powerpc/plat

Re: [RFC PATCH 00/22] Enhance VHOST to enable SoC-to-SoC communication

2020-07-03 Thread Jason Wang
On 2020/7/2 下午9:35, Kishon Vijay Abraham I wrote: Hi Jason, On 7/2/2020 3:40 PM, Jason Wang wrote: On 2020/7/2 下午5:51, Michael S. Tsirkin wrote: On Thu, Jul 02, 2020 at 01:51:21PM +0530, Kishon Vijay Abraham I wrote: This series enhances Linux Vhost support to enable SoC-to-SoC communication