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:	Mon, 21 May 2012 11:21:17 +0300
From:	Avi Kivity <avi@...hat.com>
To:	Xudong Hao <xudong.hao@...el.com>
CC:	kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
	takuya.yoshikawa@...il.com, xiantao.zhang@...el.com,
	Haitao Shan <haitao.shan@...el.com>
Subject: Re: [PATCH v2 4/4] Enabling Access bit when doing memory swapping

On 05/21/2012 06:54 AM, Xudong Hao wrote:
> Enabling Access bit when doing memory swapping.
>
> @@ -1243,11 +1244,11 @@ static int kvm_age_rmapp(struct kvm *kvm, unsigned long *rmapp,
>  
>  	for (sptep = rmap_get_first(*rmapp, &iter); sptep;
>  	     sptep = rmap_get_next(&iter)) {
> -		BUG_ON(!(*sptep & PT_PRESENT_MASK));
> +		BUG_ON(!is_shadow_present_pte(*sptep));
>  
> -		if (*sptep & PT_ACCESSED_MASK) {
> +		if (*sptep & shadow_accessed_mask) {
>  			young = 1;
> -			clear_bit(PT_ACCESSED_SHIFT, (unsigned long *)sptep);
> +			*sptep &= ~shadow_accessed_mask;
>  		}
>  	}

As Marcelo already noted, this converts an atomic operation into a
non-atomic one.


-- 
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ