From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69CB8C35672 for ; Sat, 22 Feb 2020 11:50:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E5D612071E for ; Sat, 22 Feb 2020 11:50:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lca.pw header.i=@lca.pw header.b="UvU7VmeT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E5D612071E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lca.pw Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 57C036B0003; Sat, 22 Feb 2020 06:50:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 505786B0006; Sat, 22 Feb 2020 06:50:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3CE8F6B0007; Sat, 22 Feb 2020 06:50:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0054.hostedemail.com [216.40.44.54]) by kanga.kvack.org (Postfix) with ESMTP id 2113E6B0003 for ; Sat, 22 Feb 2020 06:50:46 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id B7767181AEF0B for ; Sat, 22 Feb 2020 11:50:45 +0000 (UTC) X-FDA: 76517596050.09.lake20_23b0264628a19 X-HE-Tag: lake20_23b0264628a19 X-Filterd-Recvd-Size: 3810 Received: from mail-qt1-f195.google.com (mail-qt1-f195.google.com [209.85.160.195]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Sat, 22 Feb 2020 11:50:45 +0000 (UTC) Received: by mail-qt1-f195.google.com with SMTP id l21so3270913qtr.8 for ; Sat, 22 Feb 2020 03:50:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=2oHoyb+JnJcDOD/ld8MPLRq6aXjPEqdTgiqvEEYJPd8=; b=UvU7VmeTFofcFZ9EDyr5Eo2X0bUAaQkJDkcQZfEv9tc6jLZOG2L8jk/+HM5ka3PuY5 bEWz/lz7o8O+GDrt4gXzLX26fGcGkWH0d3BmCO5KYZpUstTsFnx9ygugZAujF7AEOsfs 7GhmB/lVeDzvDgpRDO/TNGmJHsQCQo49hc2GTsHB9QR2M8yWaj84wK/jkhVT6yUVcP5S jfLwPzXFxz98EazAK2gSjekGKI6SJTPfjMTxuLG0849z/AzYDbrNjhuwRV23VR4BAVRL ENmM5UBKIBW6IQ10avK0/lVPjFXZJ/TcAT5HKCOqsMAZMs02yxWmrihVyG7/bUnXd10j abKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=2oHoyb+JnJcDOD/ld8MPLRq6aXjPEqdTgiqvEEYJPd8=; b=kUf9ghiuCaF3qvtIcolJ78Eoj0gLzOyJJwu5wnqNP5YhxIgbzcHsk1vLU6PU118K99 M0gbt7Q2Q3iCqCM+4Q4Xq+SS4wh88JpOU9hsVweZ1OOvBkMpkQUEcdh8cwGMUhbTMaw8 uKOyREwqGlHGeReYP1cUCxnlyY+mGZFcv09niA2u7WzL4HQzuVkn1o52OgX78hbE5ea/ Vl7r1SJkfRa/sro/MzZA1aeiEg2vR3q/qitjRZcFh6vwG4bvUS8Sooa1dfjbbkzQDh+i TyxfzohZEHAiSE3Vk4UMS53dQ6FiuL3BW7vCt4ImFlyNftJT4tjVUJxo2krxi2f6bHzJ eD0w== X-Gm-Message-State: APjAAAWll5jrVvGou2R798a8U+noq6MK5mbtzyq6Cs622MB1dGmC2A84 xuQo04g1q5gC7Gs8pjuoK8LQyA== X-Google-Smtp-Source: APXvYqyPZZBj5jHH9s08zRFxGWurtD5EPWlHOyvqtpdas4/Y/9wlrObBtktabH81aDv065MOxAxg+w== X-Received: by 2002:aed:2167:: with SMTP id 94mr35462329qtc.318.1582372244475; Sat, 22 Feb 2020 03:50:44 -0800 (PST) Received: from [192.168.1.183] (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id g84sm2962048qke.129.2020.02.22.03.50.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 22 Feb 2020 03:50:43 -0800 (PST) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable From: Qian Cai Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v2] mm/hugetlb: fix a addressing exception caused by huge_pte_offset() Date: Sat, 22 Feb 2020 06:50:42 -0500 Message-Id: References: Cc: akpm@linux-foundation.org, mike.kravetz@oracle.com, kirill.shutemov@linux.intel.com, linux-kernel@vger.kernel.org, arei.gonglei@huawei.com, weidong.huang@huawei.com, weifuqiang@huawei.com, kvm@vger.kernel.org, linux-mm@kvack.org, Matthew Wilcox , Sean Christopherson , stable@vger.kernel.org In-Reply-To: To: "Longpeng (Mike)" X-Mailer: iPhone Mail (17D50) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000269, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > On Feb 22, 2020, at 1:33 AM, Longpeng (Mike) wrote:= >=20 > As explained in the commit messages, it's for safe(e.g. avoid the compilie= r > mischief). You can also find the same usage in the ARM64's huge_pte_offset= () in > arch/arm64/mm/hugetlbpage.c Rather than blindly copy over there, are those correct here? What kind of ba= d compiler optimizations exactly do they try to prevent? Until we understand= those details, blindly adding READ_ONCE() will only hide other problems.=