Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758991Ab2JZSzb (ORCPT ); Fri, 26 Oct 2012 14:55:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15078 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758221Ab2JZSza (ORCPT ); Fri, 26 Oct 2012 14:55:30 -0400 Message-ID: <508ADD2F.6030805@redhat.com> Date: Fri, 26 Oct 2012 14:57:51 -0400 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121009 Thunderbird/16.0 MIME-Version: 1.0 To: Linus Torvalds CC: Ingo Molnar , Andi Kleen , Michel Lespinasse , Peter Zijlstra , Andrea Arcangeli , Mel Gorman , Johannes Weiner , Thomas Gleixner , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 3/3] mm,generic: only flush the local TLB in ptep_set_access_flags References: <20121025121617.617683848@chello.nl> <20121025124832.840241082@chello.nl> <5089F5B5.1050206@redhat.com> <508A0A0D.4090001@redhat.com> <508A8D31.9000106@redhat.com> <20121026132601.GC9886@gmail.com> <20121026144615.2276cd59@dull> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1161 Lines: 31 On 10/26/2012 02:48 PM, Linus Torvalds wrote: > On Fri, Oct 26, 2012 at 11:46 AM, Rik van Riel wrote: >> >> The function ptep_set_access_flags is only ever used to upgrade >> access permissions to a page. > > NOTE: It's *not* "access permissions". It's "access flags". > > Big difference. This is not about permissions at all. It looks like do_wp_page also sets the write bit in the pte "entry" before passing it to ptep_set_access_flags, making that the place where the write bit is set in the pte. Is this a bug in do_wp_page? Am I reading things wrong? reuse: flush_cache_page(vma, address, pte_pfn(orig_pte)); entry = pte_mkyoung(orig_pte); entry = maybe_mkwrite(pte_mkdirty(entry), vma); if (ptep_set_access_flags(vma, address, page_table, entry,1)) update_mmu_cache(vma, address, page_table); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/