lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 17 May 2022 09:48:00 -0700
From:   "Srivatsa S. Bhat" <srivatsa@...il.mit.edu>
To:     Will Deacon <will@...nel.org>
Cc:     Elliot Berman <quic_eberman@...cinc.com>,
        Juergen Gross <jgross@...e.com>,
        Alexey Makhalov <amakhalov@...are.com>,
        Catalin Marinas <catalin.marinas@....com>,
        Prakruthi Deepak Heragu <quic_pheragu@...cinc.com>,
        virtualization@...ts.linux-foundation.org, x86@...nel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Murali Nalajala <quic_mnalajal@...cinc.com>
Subject: Re: [PATCH v3] arm64: paravirt: Use RCU read locks to guard
 stolen_time

On 5/17/22 1:54 AM, Will Deacon wrote:
> On Fri, May 13, 2022 at 04:32:53PM -0700, Srivatsa S. Bhat wrote:
>> On 5/13/22 10:46 AM, Elliot Berman wrote:
>>> From: Prakruthi Deepak Heragu <quic_pheragu@...cinc.com>
>>>

[...]

>>>  static int stolen_time_cpu_down_prepare(unsigned int cpu)
>>>  {
>>> +	struct pvclock_vcpu_stolen_time *kaddr = NULL;
>>>  	struct pv_time_stolen_time_region *reg;
>>>  
>>>  	reg = this_cpu_ptr(&stolen_time_region);
>>>  	if (!reg->kaddr)
>>>  		return 0;
>>>  
>>> -	memunmap(reg->kaddr);
>>> -	memset(reg, 0, sizeof(*reg));
>>> +	kaddr = rcu_replace_pointer(reg->kaddr, NULL, true);
>>> +	synchronize_rcu();
>>> +	memunmap(kaddr);
>>>  
>>
>> The original code used to memset the stolen time region, but this
>> patch seems to drop it. Was that change intentional?
> 
> 'struct pv_time_stolen_time_region' only has one field ('kaddr'), which
> we're now clearing with rcu_replace_pointer() so the memset doesn't make
> sense.
> 

Ah right, never mind :)

Thank you!

Regards,
Srivatsa

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ