Re: [PATCH] VMCI: Fixup atomic64_t abuse

2019-06-06 Thread Peter Zijlstra
On Thu, Jun 06, 2019 at 03:54:24PM +, Jorgen Hansen wrote: > > > > On 6 Jun 2019, at 11:34, Peter Zijlstra wrote: > > > > > > The VMCI driver is abusing atomic64_t and atomic_t, there is no actual > > atomic RmW operations around. > > > > Rewrite the code to use a regular u64 with READ_ON

Re: [PATCH] VMCI: Fixup atomic64_t abuse

2019-06-06 Thread Greg Kroah-Hartman
On Thu, Jun 06, 2019 at 03:54:24PM +, Jorgen Hansen wrote: > > > > On 6 Jun 2019, at 11:34, Peter Zijlstra wrote: > > > > > > The VMCI driver is abusing atomic64_t and atomic_t, there is no actual > > atomic RmW operations around. > > > > Rewrite the code to use a regular u64 with READ_ON

Re: [PATCH] VMCI: Fixup atomic64_t abuse

2019-06-06 Thread Greg Kroah-Hartman
On Thu, Jun 06, 2019 at 11:34:28AM +0200, Peter Zijlstra wrote: > > The VMCI driver is abusing atomic64_t and atomic_t, there is no actual > atomic RmW operations around. > > Rewrite the code to use a regular u64 with READ_ONCE() and > WRITE_ONCE() and a cast to 'unsigned long'. This fully preser

Re: [PATCH] VMCI: Fixup atomic64_t abuse

2019-06-06 Thread Jorgen Hansen
> On 6 Jun 2019, at 11:34, Peter Zijlstra wrote: > > > The VMCI driver is abusing atomic64_t and atomic_t, there is no actual > atomic RmW operations around. > > Rewrite the code to use a regular u64 with READ_ONCE() and > WRITE_ONCE() and a cast to 'unsigned long'. This fully preserves > wha

[PATCH] VMCI: Fixup atomic64_t abuse

2019-06-06 Thread Peter Zijlstra
The VMCI driver is abusing atomic64_t and atomic_t, there is no actual atomic RmW operations around. Rewrite the code to use a regular u64 with READ_ONCE() and WRITE_ONCE() and a cast to 'unsigned long'. This fully preserves whatever broken there was (it's not endian-safe for starters, and also