Received: by 10.192.165.148 with SMTP id m20csp676594imm; Fri, 27 Apr 2018 05:49:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp7g8wjOfGg7mOLIcetjbdAu1BvivfX9nyCbhjsbmmVcN67JIRVondViwdQf6tsoUREWPA4 X-Received: by 2002:a63:8dc1:: with SMTP id z184-v6mr2075086pgd.114.1524833393661; Fri, 27 Apr 2018 05:49:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524833393; cv=none; d=google.com; s=arc-20160816; b=GkxiScNhnA0rHlIPQ3FToTXOF2ygH5tL7WQacwKESSanA3r4GAE8yjt/3mm+b5L5d+ rvfmoVugKSN2VqXDt3kbDq7s2+zLa2v0VBu7ws3WJpYGH2awlGM8ecEI9m6g66n+g6Ez vXrfBpUKOpj0KDTiqGsDUewmSqDi2oR01haU3/cwMlr8BBv56KiQweU1XLQNfZH9Q2Tp c5mxC0Of4c7C+ntblnF/6PSLKOLF54vedwDEGZVpyQDT1GyfmF1ytTtodn0sZ653aLWX y06yl/oZ/Lrjwk4D7UpOTZQqWC+xtLtFH5JrCLcRJutPu4QiZliJRXuepVQR3gyPLEPN en0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=w50O5cP0jQi0v+VIIEKm09cF11mAcTTzcJu+hlGuzjU=; b=DbBfgekOI9M7Ep1xegybmXXVMk80Ek0AGXnVAYY3LmiLdB25ACzKmCdxyhCFnXRNZi HNHvg6TjMwR9sS7CKIJZg4ycntENzC9e+7iGF+JawMvHWRml+Jqb4RXPAjKO/ixv+upU y2WpxdwesPDc+2IoQktdkGuTmzhR8oF34DUqptqPqsH1OI5oSdjwMltw8TvpVaW0+62h DpuRECmmcnfIuGcPGPXtjCtHER+3+rbV4mDyrv8rraE7wa+TsQ+RJZXRo/KH8oD1ER/N eAV/Plw6//SUtPZd+7UCWW7xCHEcjroA4YvP7ab9H4ps1asiFcy1/XCWefDsuHQ62AMb Cegw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@8bytes.org header.s=mail-1 header.b=pbU7ttVc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k1-v6si1181768pld.267.2018.04.27.05.49.39; Fri, 27 Apr 2018 05:49:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@8bytes.org header.s=mail-1 header.b=pbU7ttVc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758200AbeD0Msc (ORCPT + 99 others); Fri, 27 Apr 2018 08:48:32 -0400 Received: from 8bytes.org ([81.169.241.247]:39426 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758096AbeD0Msa (ORCPT ); Fri, 27 Apr 2018 08:48:30 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id 3090E1E7; Fri, 27 Apr 2018 14:48:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=8bytes.org; s=mail-1; t=1524833309; bh=Sp/ZOo6vJ6SJDePtyUTTGcwDLRa03sapEca7G0iA0qk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pbU7ttVcpcvogZH/FSSdIesFmIiiTgwz+LM7er9L2sHy38ogJQdZY7gqoYQ/jFI73 8IN2lAC0uOlRx3606kdh3IXue9C663hswFN0bOMinW0jcv0RXbEviYnqY999qjdT8Y iyeYbcMuvQ+gzivNypaewLaSc/h7zX9RFi5rzzJZK2dE4Qg+9QDAVOH3zWfrfY0mQh PQQBPlN77HU2Q//AQp0O4OU29IbvRLOds2ZToNcCmMaNAiv2peR6aynsZ7RWuXflPg NpMTkU4OVT4kdEagR/QkORheiNJZfW0JamvMsZYfVPzhBVSv7tDoTbZm6qN6MT9eYL fh3rP942+syBA== Date: Fri, 27 Apr 2018 14:48:29 +0200 From: "joro@8bytes.org" To: Chintan Pandya Cc: "Kani, Toshi" , "Hocko, Michal" , "hpa@zytor.com" , "wxf.wang@hisilicon.com" , "catalin.marinas@arm.com" , "x86@kernel.org" , "will.deacon@arm.com" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , "linux-mm@kvack.org" , "mingo@redhat.com" , "willy@infradead.org" , "guohanjun@huawei.com" , "tglx@linutronix.de" , "bp@suse.de" , "akpm@linux-foundation.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH v2 2/2] x86/mm: implement free pmd/pte page interfaces Message-ID: <20180427124828.GW15462@8bytes.org> References: <20180314180155.19492-1-toshi.kani@hpe.com> <20180314180155.19492-3-toshi.kani@hpe.com> <20180426141926.GN15462@8bytes.org> <1524759629.2693.465.camel@hpe.com> <20180426172327.GQ15462@8bytes.org> <1524764948.2693.478.camel@hpe.com> <20180426200737.GS15462@8bytes.org> <1524781764.2693.503.camel@hpe.com> <20180427073719.GT15462@8bytes.org> <5b237058-6617-6af3-8499-8836d95f538d@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5b237058-6617-6af3-8499-8836d95f538d@codeaurora.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 27, 2018 at 05:22:28PM +0530, Chintan Pandya wrote: > I'm bit confused here. Are you pointing to race within ioremap/vmalloc > framework while updating the page table or race during tlb ops. Since > later is arch dependent, I would not comment. But if the race being > discussed here while altering page tables, I'm not on the same page. The race condition is between hardware and software. It is not sufficient to just remove the software references to the page that is about to be freed (by clearing the PMD/PUD), also the hardware references in the page-walk cache need to be removed with a TLB flush. Otherwise the hardware can use the freed (and possibly reused) page to establish new TLB entries. Joerg