Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp907664ybl; Wed, 11 Dec 2019 09:20:40 -0800 (PST) X-Google-Smtp-Source: APXvYqzKycUiJnoawE/4KZHZzy+H8mdcQOUFpg3gLsJNeBjIpwVquLjjjQIUz2dCqrxEirf4Uzr+ X-Received: by 2002:a9d:7a4b:: with SMTP id z11mr3130429otm.46.1576084839302; Wed, 11 Dec 2019 09:20:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576084839; cv=none; d=google.com; s=arc-20160816; b=gAZ9Fzoj8jGfGzojKPF4h4Bz92qKiRgYN40YGIu1Jt13TwvdZVVnI2mIjm+ajoDf+2 e6f557Jlaul0eZ5KWjc8Wo1H5laTCNRvdT/i3IwhywkYZlUPiaE+H7BVVqQ+aSY/OXMG VQJaI9RlRuW4lsdE+YJRNqEjksjusglyTS3vxgKHMdpNnzao3M01vlQXlATFR2pa6U+l rcuFBb9ykUS0PprmgDYD5nhdBQQwajQ5hzocPkh/kE5hiElDjNn9CtksMu23cPStNZcB G0DoPsrXw9MsOeDUu8Af4eqF1ar5doABMQURa1qEHLw64heGgwMJVXYJlEcedntUPwwF VpxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:in-reply-to:cc:references:message-id :date:subject:mime-version:from:content-transfer-encoding :dkim-signature; bh=KG1B1/XNdtFtj52rr+keQdkSlXVNtixvd3xO9+2XJ3g=; b=f693oVqsaROJFAylRfErqnwl0uIo4xh0MGUuJroFt/6cQjnMNueMLTy/aucwNdlrT4 Q2Iw7OJURy0ZxsrGvXz7vQRpi9Ycd1xvwPkwvCqgH/Fv8KK4OGgfrn0kYmKgZ1buKxli /KDwVKZGjK2kxLsTEkTnn8Geg/R9l6XFDUNlTTx7yy2BTkp5jCSu4TgrpMdwFPnf8yRu /zm+ceQZmpybSeOlz8gQXyroX5vnUxJpd0fpzQeekGq/wnaEeSfBsRjCDU9SLN85hZt7 /Mok4bLG5i87GpHwNYRj7TjXmukH/roUGSpSEieATORzeC47ibzogKSPCASSg0tCSHm4 ghwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=rPdOmD+9; 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 d8si1482875otl.83.2019.12.11.09.20.26; Wed, 11 Dec 2019 09:20:39 -0800 (PST) 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=@lca.pw header.s=google header.b=rPdOmD+9; 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 S1730934AbfLKRTi (ORCPT + 99 others); Wed, 11 Dec 2019 12:19:38 -0500 Received: from mail-qk1-f193.google.com ([209.85.222.193]:38505 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730318AbfLKRTh (ORCPT ); Wed, 11 Dec 2019 12:19:37 -0500 Received: by mail-qk1-f193.google.com with SMTP id k6so20330258qki.5 for ; Wed, 11 Dec 2019 09:19:37 -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=KG1B1/XNdtFtj52rr+keQdkSlXVNtixvd3xO9+2XJ3g=; b=rPdOmD+9MCriMKlGpN93RjC2asNR0TjQF5EX6nSzzBHq+kSTO1lDDr7cicx5REQ3pD 8KA2llMqbpABZbkxF60kjsQjTbbbrkzVY4smbkHgkWr7VoiEPxnBUS3FwYduw/17QxG3 6GXpRv5e3ru8+IL6BhxkZaq4+HGxjs1okYOqaQIFGo6QgjZrKVx9vJzKGpTWDW9zkwHI 8uyYpUr0hCuWXLMhTzkMMk9nMVYLJD8SPxV/Imhe2pZb64yY5qsJzCD8iQI3Hx7Wmrgx V1zMmPLQEuhnOhtLfuZQ4Lh63s/P1jeYhrG8hpEF2xLGHZnOFuzj/QPhRo1OQoiz7AHo WzDQ== 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=KG1B1/XNdtFtj52rr+keQdkSlXVNtixvd3xO9+2XJ3g=; b=XZ8tktqkqmYkoJopNU7DoyRwQxqv42MO/rTi3RwyDLegkQRhxNO0GqwM7yiYbOBSU3 lsFljAScY4YDzIw/HdNIpbVB8Dg+fs9r2BrgSjahLf435tdCU5Qk0O43lima//lj++Uz ABm/TjqBNpjEiYS/EVeGAZmtyKir65Rwz/GnJnBlNxI0ROUWnM7aiOx6cc1pS67isyUu Y8r257FaPA5gRtDhmaGznJ67v6Pgr1hTYETleeFB5ccTkLPJLBumerzxu8Lv8OKPY282 LeAKNkS0GUxlVHUPNwU0Gk8VHY+xxWzXYPSZfd2GcNCoU7X+V0oh+suF372sZCDDKrhs AL2Q== X-Gm-Message-State: APjAAAVjBmFqihJ587PZIirChztlupvN6hHO83ozJZ3H9fMB7TtbyDQn PuT8I3h6lW+yO4Jmx3PT+3a2Iw== X-Received: by 2002:a37:27cc:: with SMTP id n195mr3658562qkn.428.1576084776776; Wed, 11 Dec 2019 09:19:36 -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 r5sm849819qkf.44.2019.12.11.09.19.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Dec 2019 09:19:36 -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 v16 13/25] mm: pagewalk: Don't lock PTEs for walk_page_range_novma() Date: Wed, 11 Dec 2019 12:19:35 -0500 Message-Id: <728FAC8D-AA0C-4326-8990-A3D5D0DA1EE5@lca.pw> References: Cc: kbuild test robot , Mark Rutland , Peter Zijlstra , Catalin Marinas , Dave Hansen , linux-mm@kvack.org, "H. Peter Anvin" , Will Deacon , "Liang, Kan" , x86@kernel.org, Ingo Molnar , Arnd Bergmann , =?utf-8?Q?J=C3=A9r=C3=B4me_Glisse?= , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, kbuild-all@lists.01.org, Ard Biesheuvel , linux-kernel@vger.kernel.org, James Morse , Andrew Morton In-Reply-To: To: Steven Price X-Mailer: iPhone Mail (17B111) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Dec 11, 2019, at 10:54 AM, Steven Price wrote: >=20 > I believe this is a false positive (although the trace here is useless). > This patch adds a conditional lock/unlock: >=20 > pte =3D walk->no_vma ? pte_offset_map(pmd, addr) : > pte_offset_map_lock(walk->mm, pmd, addr, &ptl); > ... > if (!walk->no_vma) > spin_unlock(ptl); > pte_unmap(pte); >=20 > I'm not sure how to match sparse happy about that. Is the only option to > have two versions of the walk_pte_range() function? One which takes the > lock and one which doesn't. Or just ignore the sparse false positive without complicating the code furth= er.=