Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp813715ybl; Wed, 11 Dec 2019 07:55:29 -0800 (PST) X-Google-Smtp-Source: APXvYqy9FRiXmsDPous2KsgjPplWbEr54C+tjUf5seafKCe96EapozeoV3Hn2NDtkb3U9KZi/DhN X-Received: by 2002:a9d:58c9:: with SMTP id s9mr2695240oth.182.1576079729110; Wed, 11 Dec 2019 07:55:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576079729; cv=none; d=google.com; s=arc-20160816; b=yfri1NW6BdP/Vw/inghU7uoQRmFnO3DajpMlO9hmJCSDyq04rA5cv/rm3KaMbkfGn+ q+p3fyQLW79O2BKR9lDlIkYzXgF+eob4uVz6r6m9qD87HI/z9nJRMeEd5eZu6aHUbNKP YFEOPubq0F+icwilFXmVag2fSMDheF7KrnbT95dB4SrsWnDLJUZ8fYy9b2jqt6GHfz4T Vaa9r79oLbsGtCw1OzgVdbAXjt8D2VC3D9yX8PLFbmFhjvyqi1o1Z+dI7FZsiglfR/kX 2nLzbOHDvzClnu+KBj1YiflbM8615CWkcNy2Q2UNgHup5ltIrh5CMAkRXqWIlGzusfZ+ R6bw== 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; bh=AFf8K5Cmygm0dBYurpw5K1ZGOFhfFRS58r/N2+C3lhw=; b=NurWNYPG+3cnu6J1DIC3UQ+roPOaYux6AlHwtrf26UmHSAtxeCF35qdLNePIKjeW5P w3pb1R1F3K56yijirNTAgJNS+Z9mrHs6TwY/IYEu08puzLT1VjPNdEy8kclaQKEljc0R bU+YQ/JoLRXvlOYf3tyFVfYY0hDpQylhO/smcwhCWIiFa59N5VHt924gSa7fNt5qi7Dl e5VXg0zhB3t15K/KzkX4SiETdAatcB4+fAZbxSWGJwbrolajfvaVs3lEVpRjrcisZLrw aKMWE7KD1NFvuWS5kDg+T4TgtQQL+p/rIO3o7H7GPFAhe2MRAGabNmjifVKcfKTf1gG8 meVw== ARC-Authentication-Results: i=1; mx.google.com; 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 j6si1357015oij.197.2019.12.11.07.55.17; Wed, 11 Dec 2019 07:55:29 -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; 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 S1732392AbfLKPyP (ORCPT + 99 others); Wed, 11 Dec 2019 10:54:15 -0500 Received: from foss.arm.com ([217.140.110.172]:36624 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731887AbfLKPyM (ORCPT ); Wed, 11 Dec 2019 10:54:12 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A2A2B31B; Wed, 11 Dec 2019 07:54:11 -0800 (PST) Received: from [10.1.194.43] (e112269-lin.cambridge.arm.com [10.1.194.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 88EAD3F52E; Wed, 11 Dec 2019 07:54:08 -0800 (PST) Subject: Re: [PATCH v16 13/25] mm: pagewalk: Don't lock PTEs for walk_page_range_novma() To: kbuild test robot Cc: 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?B?SsOpcsO0bWUgR2xpc3Nl?= , 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 References: <20191206135316.47703-14-steven.price@arm.com> <201912101842.KIXI4yCg%lkp@intel.com> From: Steven Price Message-ID: Date: Wed, 11 Dec 2019 15:54:06 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <201912101842.KIXI4yCg%lkp@intel.com> Content-Type: text/plain; charset=utf-8 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 10/12/2019 11:23, kbuild test robot wrote: > Hi Steven, > > I love your patch! Perhaps something to improve: > > [auto build test WARNING on linus/master] > [also build test WARNING on v5.5-rc1 next-20191209] > [cannot apply to arm64/for-next/core tip/x86/mm] > [if your patch is applied to the wrong git tree, please drop us a note to help > improve the system. BTW, we also suggest to use '--base' option to specify the > base tree in git format-patch, please see https://stackoverflow.com/a/37406982] > > url: https://github.com/0day-ci/linux/commits/Steven-Price/Generic-page-walk-and-ptdump/20191208-035831 > base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ad910e36da4ca3a1bd436989f632d062dda0c921 > reproduce: > # apt-get install sparse > # sparse version: v0.6.1-101-g82dee2e-dirty > make ARCH=x86_64 allmodconfig > make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' > > If you fix the issue, kindly add following tag > Reported-by: kbuild test robot > > > sparse warnings: (new ones prefixed by >>) > >>> include/linux/spinlock.h:378:9: sparse: sparse: context imbalance in 'walk_pte_range' - unexpected unlock I believe this is a false positive (although the trace here is useless). This patch adds a conditional lock/unlock: pte = 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); 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. Steve > vim +/walk_pte_range +378 include/linux/spinlock.h > > c2f21ce2e31286 Thomas Gleixner 2009-12-02 375 > 3490565b633c70 Denys Vlasenko 2015-07-13 376 static __always_inline void spin_unlock(spinlock_t *lock) > c2f21ce2e31286 Thomas Gleixner 2009-12-02 377 { > c2f21ce2e31286 Thomas Gleixner 2009-12-02 @378 raw_spin_unlock(&lock->rlock); > c2f21ce2e31286 Thomas Gleixner 2009-12-02 379 } > c2f21ce2e31286 Thomas Gleixner 2009-12-02 380 > > :::::: The code at line 378 was first introduced by commit > :::::: c2f21ce2e31286a0a32f8da0a7856e9ca1122ef3 locking: Implement new raw_spinlock > > :::::: TO: Thomas Gleixner > :::::: CC: Thomas Gleixner > > --- > 0-DAY kernel test infrastructure Open Source Technology Center > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel >