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.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 2250CC00454 for ; Wed, 11 Dec 2019 17:19:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DB30420409 for ; Wed, 11 Dec 2019 17:19:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lca.pw header.i=@lca.pw header.b="rPdOmD+9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB30420409 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 8AD2D6B330F; Wed, 11 Dec 2019 12:19:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 85E9E6B3310; Wed, 11 Dec 2019 12:19:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 74CDF6B3311; Wed, 11 Dec 2019 12:19:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0071.hostedemail.com [216.40.44.71]) by kanga.kvack.org (Postfix) with ESMTP id 5EBE46B330F for ; Wed, 11 Dec 2019 12:19:39 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 07C61180AD80F for ; Wed, 11 Dec 2019 17:19:39 +0000 (UTC) X-FDA: 76253522478.19.cent93_712c14f61a702 X-HE-Tag: cent93_712c14f61a702 X-Filterd-Recvd-Size: 4396 Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Wed, 11 Dec 2019 17:19:37 +0000 (UTC) Received: by mail-qk1-f195.google.com with SMTP id d202so20335048qkb.1 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=Ery0zLCnS/pZjeKsE3S+2NZzNJdnX3odoS5hZ6HIW61SOh77ugOfB++EnzUXIQN6ZV vSCr5uCDjK9cnMVFRT2s4067tjkAquNgRKLNtBx6r3ANZwoNzpby74BKn8FgExlaxFw1 jauJHTxb7GVMSIq5tW5rnZHB9qxfjyI+uKY5JdYWkchKuCoKspN5VXfo1BwUKVDsEOyK N9ycd9M/EoK4ydsxZDFunTsRtSzdccINagEoUviQFArtY444puS8NnOExry2WFl3pxw/ aH33vEDGcBcrYyEi6icaCNOFEHLl1sa77VOKRZunFMXmzuCZHl8V+4tbciZPivGxC7hA Ng6A== X-Gm-Message-State: APjAAAW8S70HnifyQSlQElwNwUEoslovRytDIxp0vfY1HAfZLXXCtgu0 cTCrwhX00P6KgCbpkCyru+LxGg== X-Google-Smtp-Source: APXvYqziSQ2OU4OXjzdNoNYeczSwDlStzGJAob4piuigMuCkjbj07ZxDhMEWk9MKjPgnwpfe9JISVg== 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) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > 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.=