From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailapp01.imgtec.com ([195.59.15.196]:30066 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752351AbbHDUcU (ORCPT ); Tue, 4 Aug 2015 16:32:20 -0400 Message-ID: <55C1214F.8050208@imgtec.com> Date: Tue, 4 Aug 2015 13:32:15 -0700 From: Leonid Yegoshin MIME-Version: 1.0 To: David Daney 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> <55C11A37.5070509@caviumnetworks.com> In-Reply-To: <55C11A37.5070509@caviumnetworks.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: David, It is interesting, I still don't understand the effect - if guard page is used then two different VMAP allocations can't use two buddy PTEs. Yes, only one of buddy PTEs in that case can be allocated and attached to VMA but caller doesn't know about additional page and two cases are possible. Even map_vm_area has no any info about guard page. (assume VMA1 has low address range and VMA2 has higher address range): a. VMA1 (after adjustment) ends at even PTE ==> caller doesn't use that PTE and there is no collision with last pair of buddy PTEs, even if VMA2 uses odd PTE from that pair. b. VMA1 (after adjustment) ends at odd PTE ==> again, this buddy pair is used only VMA1. Next VMA2 start from next pair. What is wrong here? Is it possible that access gone bad and touches a page beyond a requested size? Is it possible that it is not vmap() but some different interface was used? - Leonid.