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=-7.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 428E5C43603 for ; Wed, 11 Dec 2019 15:54:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0E3382073B for ; Wed, 11 Dec 2019 15:54:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mtvS3H16" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E3382073B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=L6/INMDnLw96wmi/9oSphush6/U7NXsQMMJWOG8kdlk=; b=mtvS3H164S2gUG EBYPVvZk5A4QtrCVyvC46k/oZaKnjr5wApIKpTaFyZ9NuHfBa6webz8KmEHV+gBkMI12LDFtqQhWA HF1KTd+wkvO2bJvqBw5QGOue7hqSJUa1PCzAQLxU9J4mIbqIBH2z3ahbubFJTYt+el2RriU4d1G8b 9g67T5HJ5DK3YRY9fO51tbVbiami3BMEhGFg2KFGoDxqpOvcGHIOQlakMUwh7WbP9p32lPFKiN7pf Mf+9IDH0NdUb73i0vE+qwEnR4RzNXG5WQMvebT7elnt265SevntDkJ0m3ZYc/tai4+u5jRCcQjRak hbnAIhPmQ41TjUbKAcCA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1if4Jf-0002PG-1P; Wed, 11 Dec 2019 15:54:19 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1if4Jb-0002MV-JO for linux-arm-kernel@lists.infradead.org; Wed, 11 Dec 2019 15:54:17 +0000 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 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-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191211_075415_726531_E44150C1 X-CRM114-Status: GOOD ( 19.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , x86@kernel.org, kbuild-all@lists.01.org, Arnd Bergmann , Ard Biesheuvel , Peter Zijlstra , Catalin Marinas , Dave Hansen , linux-kernel@vger.kernel.org, linux-mm@kvack.org, =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Ingo Molnar , Borislav Petkov , Andy Lutomirski , "H. Peter Anvin" , James Morse , Thomas Gleixner , Will Deacon , Andrew Morton , linux-arm-kernel@lists.infradead.org, "Liang, Kan" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel