From: "Bruce Rogers" Subject: Re: [PATCH] Fix performance problems with mprotect() Date: Mon, 07 Jan 2008 09:16:40 -0700 Message-ID: <4781EE5F.092E.0048.1@novell.com> References: <477EAC09.5C6B.0048.1@novell.com><477EAC09.5C6B.0048.1@novell.com> (Bruce Rogers's message of "Fri\, 04 Jan 2008 21\:49\:41 -0700") Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Andi Kleen Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org I'm not sure how this BUG_ON would get triggered with current x86 paging = semantics, and probably isn't needed I think. Am I missing something? The code is almost exactly the same as the existing update_intpte, which = has the same BUG_ON, and so I just left it in. (BTW:I considered merging the new functions into the non "sync" versions = but opted not to.) - Bruce >>> On 1/7/2008 at 8:18 AM, in message , = Andi Kleen wrote: > "Bruce Rogers" writes: >> + >> + /* Allowed to change in Accessed/Dirty flags only. */ >> + BUG_ON((t ^ old) & ~(intpte_t)(_PAGE_ACCESSED|_PAGE_DIRTY)); >=20 >=20 > Are you sure that BUG_ON can't be triggered from the hypercall? > It should error out in this case I think. >=20 > -Andi