From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-bn1on0057.outbound.protection.outlook.com ([157.56.110.57]:25968 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754284AbbHDVe3 (ORCPT ); Tue, 4 Aug 2015 17:34:29 -0400 Message-ID: <55C11A37.5070509@caviumnetworks.com> Date: Tue, 4 Aug 2015 13:01:59 -0700 From: David Daney MIME-Version: 1.0 To: Leonid Yegoshin CC: David Daney , , , David Daney , Subject: Re: MIPS: Make set_pte() SMP safe. References: <1438649323-1082-1-git-send-email-ddaney.cavm@gmail.com> <55C10F4B.2050003@imgtec.com> In-Reply-To: <55C10F4B.2050003@imgtec.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: On 08/04/2015 12:15 PM, Leonid Yegoshin wrote: > David, > > Did you observe this in real? Yes. It is not hypothetical. > The function __get_vm_area_node() allocates a guard page if flag > VM_NO_GUARD is not used and I don't see any use of it in source. > > In past vmap allocated a guard page even unconditionally. It has nothing to do with guard pages per se. The problem is if a vmap range (including guard page) ends on an even PFN. The buddy code will clobber the PTE for PFN+1. If another vmap operation is executing in set_pte() for the clobbered location, you can get corrupted page tables. > > - Leonid. >