Received: by 10.192.165.148 with SMTP id m20csp734384imm; Fri, 27 Apr 2018 06:44:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrOBG9QsmlJ63XTHU/2mLn1s0ZssyVE/vsArvKrf7KwcghYEuXpphEzXEqL4xEyFMmlrEpg X-Received: by 2002:a17:902:968d:: with SMTP id n13-v6mr2324241plp.168.1524836671801; Fri, 27 Apr 2018 06:44:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524836671; cv=none; d=google.com; s=arc-20160816; b=RDvngDJhvgC+gb4Sil7x+WsPrmVDwYicZQ0MOBzOvkYraaxHaN8NX5j0YXejzJabFm 5X6Ak7gfA5yGKyG+mWCIYOiLkd+AY+W0XKNRZmzO5I/Whkjq5h1R1cbyn4/lyBfFUq4l tEuNTOTc4Q73dUCYGSmOQWncsuewyfkVidg7qMnFYueFD91FxczwGfj+od9zpgqNWT/k Nwd9PoNmwkUGVh03RE25Eog3Brqm9BY2DcBXuP78LzB05yVYSs0pKJobmKnixKYA5Vo2 oY3x5KLySFFogY86tAnF71uZBuczm1SMzYWEaWFHuMNUBzbLiFcwyzMjqWsDtbKXq6tt XVXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=RT2zQO1g9pJPWCr+y4aZtTJyH66M0PN0l6Kpxj7Oqrc=; b=zcBOZDuNFlFmuOi3I/QbHlgJ0GhOaTr1ugfRjvDcic4XHnDD4cxVRjKTWXuSNG73K4 eKJjzItlOqIAuaGptvlh9gOfsCyODQJtBjQtUseb8yxBjieEILCTEunX5cA3pZdb4Mad dcM8Mej8adP13h/LHznbLZu288XcGi+jINYZmAKe5tJWwv0fIZtG8F656Zu4Cbu2/kVS R8GNJ2fx1gV9yaLCLy0PLuTVKhZOdBmwP9T36JA+lr5SNYdyUFXMC5mRnOBchcJ7ws2+ YRD8KBE/HIBPvODIgDfXHvjeYVNQMVKPY0LWaKdQqapSJ3laV5BNtp1hzeCiniwKX3QA vETw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=R26w6jwR; dkim=pass header.i=@codeaurora.org header.s=default header.b=VFCuLmJZ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3-v6si1212164pgp.375.2018.04.27.06.44.17; Fri, 27 Apr 2018 06:44:31 -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=pass header.i=@codeaurora.org header.s=default header.b=R26w6jwR; dkim=pass header.i=@codeaurora.org header.s=default header.b=VFCuLmJZ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932530AbeD0NnI (ORCPT + 99 others); Fri, 27 Apr 2018 09:43:08 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55278 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758355AbeD0NnG (ORCPT ); Fri, 27 Apr 2018 09:43:06 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 58BB460F8F; Fri, 27 Apr 2018 13:43:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524836586; bh=WozAo8q4QDWQ+dKxoCb4t81DWZ/oL5meVhZhk+X0bWc=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=R26w6jwRgJIPg9bLl/hi5A2lrz2OQIEZieX1BzhbUag8onSnFi8X6Lx6lvU0OdnGM qcBEKiS/VjqWMjcshUCQQJRhN5JVnS8xzCmeyMTTHstmPf9DSAOE4vVY4c3a5EF5nr fWMuygFZirpTQunnbEuVYj+ag7hEalSFO7mZ6xKs= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.204.79.109] (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: cpandya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2AB146021C; Fri, 27 Apr 2018 13:42:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524836584; bh=WozAo8q4QDWQ+dKxoCb4t81DWZ/oL5meVhZhk+X0bWc=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=VFCuLmJZMkyl1yV5k/oLIeq15kTnCJp9h2dQJfsItJySaJ7ARnc7wwTiklWPaa3gI jGsWqcD6PD4R8AW23mYh77Nzj79lFWbEY2Bu+hkNpybJGCWgRxu7WRQce/tjuT2ApM 73Jhv6Z494u8Odz6ueNMP3DVhPCIy/B/TfD2Tz84= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2AB146021C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=cpandya@codeaurora.org Subject: Re: [PATCH v2 2/2] x86/mm: implement free pmd/pte page interfaces To: "joro@8bytes.org" Cc: "guohanjun@huawei.com" , "Hocko, Michal" , "Kani, Toshi" , "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" , "hpa@zytor.com" , "tglx@linutronix.de" , "bp@suse.de" , "akpm@linux-foundation.org" , "linux-arm-kernel@lists.infradead.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> <20180427124828.GW15462@8bytes.org> From: Chintan Pandya Message-ID: Date: Fri, 27 Apr 2018 19:12:57 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180427124828.GW15462@8bytes.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/27/2018 6:18 PM, joro@8bytes.org wrote: > 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. Sure ! This is my understanding too (from arm64 context). > > > > Joerg > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > Chintan -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project