Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2191185ybh; Fri, 17 Jul 2020 11:28:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQWC8KChnougtQknWQWjSLSGbE9RNaZ9jDCsvZIAQ0CaEVr4Gg9xcRdGqFdOqlnaMbRm8j X-Received: by 2002:a50:fe0c:: with SMTP id f12mr10222504edt.360.1595010501365; Fri, 17 Jul 2020 11:28:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595010501; cv=none; d=google.com; s=arc-20160816; b=qQcNh1wKnQ/NK4bkP9OlBgarBgXjn7RGiiVGGzj4asnYNbOwGahbmiCsSeam5cTSkE sac7CXCg3zPh+au3GhwLTTEFL7X2IlwAnabOIdmKJzxfZOkf93Hh8GsYtfW6iICNS80c bFvEcFtJJKhniV3jQk0XuWKkAyZxOAeUMt5OzAMBiboxC912Grw5yFU5e+23ovb8e60l sx3pmNImwAe581mnvwMuHix+oTjgIWTNV7G6jVISMi/67Kcfqvr5RmLYxBbbXb0Sa4BL +B3IJBxNdVhl7myFU5WBcrJgxxY8rfZMRwDqD7n9VnNeL3IC0uOPO6txuaJ+SlRpKed4 EoNA== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Kg4S7uclrZ5I69uo3imTxol1DJCZzu47bNS6rfDtCCY=; b=r/tjAczyC4mGq4w3Xziyh15rDJSbMktnahu1l7I5BvjWQPF4AFDbMwENcdmgF+BQPg IsfPm3FG7GDEYpTarTmayk4FbP0n9MQN0jZt+iKyBhLgnl0Jughh7F/GMmoI8qqYyLia /Cj174NnLuBid4rQCdxNOUGUsPVT7GQ25z28IHuCQTuz+Iy3a73O7DYN03LHhnTSh1dR mat4YOmT0bgzMfSCz5qY0/KpmvWYTK2c4hR14LeVMtD4FnSitONCA3uyZORznYrFsRNz 1fwgbrwfY7hHK1LTRQnNA5U83ik/PXlonP5QTp1F7iF4zSdkPnOiVCFdOxERkcvzGuZo FA+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VFaH1+AI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ch9si5609869edb.155.2020.07.17.11.27.57; Fri, 17 Jul 2020 11:28:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VFaH1+AI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728117AbgGQSZi (ORCPT + 99 others); Fri, 17 Jul 2020 14:25:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727779AbgGQSZi (ORCPT ); Fri, 17 Jul 2020 14:25:38 -0400 Received: from mail-oi1-x243.google.com (mail-oi1-x243.google.com [IPv6:2607:f8b0:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA86DC0619D4 for ; Fri, 17 Jul 2020 11:25:37 -0700 (PDT) Received: by mail-oi1-x243.google.com with SMTP id h17so8768251oie.3 for ; Fri, 17 Jul 2020 11:25:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Kg4S7uclrZ5I69uo3imTxol1DJCZzu47bNS6rfDtCCY=; b=VFaH1+AIJ+enjGLy5eIENCFaiUrQsqozvHROKDK3bPQC7w0xF32ov1eZo+SmlfkEJc DzdykkwY4wd5ceFw/oH2m8Il2xzYOFV4nxeJ5QHNQ5bVy7OtCYOzAiUCdVI1aWsSPzJk NgQ4MJ/3iACFbJBlroq4UB6olr4XnblRDcOzOyVtUiXcoPF6nwpFiNChaJxCUtC3odsn aoLWvQsa+8urlQri0/aMWqcyFrW+aPHli3c6OmkLAn3v48XR2wICxudAztFy9X2jflhZ OBCTwaPxhWDCipCA5ZUMcdZ4rnS3WavEWXdKRkw9JBxessaFXU5X9BGMQtd6IpEy1lj2 KAEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Kg4S7uclrZ5I69uo3imTxol1DJCZzu47bNS6rfDtCCY=; b=J5oclsBMPq1IUMYDaAj/ouivJpc4hwxpQQuJmizJOB5X8zJM0FoaNP/c3cw5W3b2c9 qoFU/m5p0b+AqGqIhTtDTXEt1RMU7otb7BLJFa2vLUhbWnMq9QMXlNrwR/MrOKClzys1 45SGjq1mMC7jkJGi8sAvygEFHGVB9FF8z0tqZ9wqyxvMy7tbtjt4NwfCijjOkSfwAy1o EbHRyqdcjc1EjQv7+r13RQFP7sEhx4CE+AP4z/pLQzWe3trseke59479iEGkTB5+/yq1 00Xtfv5LFeTGPELpSZZ2jkQuC1UKk5iBy+boWY++86iZuj/w2iP7xmSc6kuagNJ1iaTo 3c+w== X-Gm-Message-State: AOAM531Tay1P2kO8Fg7YlD5O8vTzBH8afs8n+QNQGvJyfQjkxyb4hkt0 U/xBT2tFPMaHCDZF88vhfTu0x0KDo10MLurBqcgoOA== X-Received: by 2002:aca:380a:: with SMTP id f10mr8190766oia.161.1595010337104; Fri, 17 Jul 2020 11:25:37 -0700 (PDT) MIME-Version: 1.0 References: <20200712131003.23271-1-madhuparnabhowmik10@gmail.com> <20200712131003.23271-2-madhuparnabhowmik10@gmail.com> <20200712160856.GW9247@paulmck-ThinkPad-P72> <20200717170747.GW9247@paulmck-ThinkPad-P72> In-Reply-To: From: =?UTF-8?B?RGFuaWVsIETDrWF6?= Date: Fri, 17 Jul 2020 13:25:26 -0500 Message-ID: Subject: Re: [PATCH 2/2] kvm: mmu: page_track: Fix RCU list API usage To: "Paul E. McKenney" Cc: Dexuan-Linux Cui , Naresh Kamboju , madhuparnabhowmik10@gmail.com, Josh Triplett , Joel Fernandes , Paolo Bonzini , rcu@vger.kernel.org, open list , X86 ML , kvm list , frextrite@gmail.com, lkft-triage@lists.linaro.org, Dexuan Cui , juhlee@microsoft.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The sender of this email would like to recall the message. And drink more coffee. The sender will also avoid making any more commits on Friday. On Fri, 17 Jul 2020 at 13:03, Daniel D=C3=ADaz wro= te: > > Hello! > > On Fri, 17 Jul 2020 at 12:07, Paul E. McKenney wrote= : > > > > On Thu, Jul 16, 2020 at 05:19:52PM -0700, Dexuan-Linux Cui wrote: > > > On Thu, Jul 16, 2020 at 7:47 AM Naresh Kamboju > > > wrote: > > > > > > > > On Sun, 12 Jul 2020 at 21:39, Paul E. McKenney = wrote: > > > > > > > > > > On Sun, Jul 12, 2020 at 06:40:03PM +0530, madhuparnabhowmik10@gma= il.com wrote: > > > > > > From: Madhuparna Bhowmik > > > > > > > > > > > > Use hlist_for_each_entry_srcu() instead of hlist_for_each_entry= _rcu() > > > > > > as it also checkes if the right lock is held. > > > > > > Using hlist_for_each_entry_rcu() with a condition argument will= not > > > > > > report the cases where a SRCU protected list is traversed using > > > > > > rcu_read_lock(). Hence, use hlist_for_each_entry_srcu(). > > > > > > > > > > > > Signed-off-by: Madhuparna Bhowmik > > > > > > > > > > I queued both for testing and review, thank you! > > > > > > > > > > In particular, this one needs an ack by the maintainer. > > > > > > > > > > Thanx, Pa= ul > > > > > > > > > > > arch/x86/kvm/mmu/page_track.c | 6 ++++-- > > > > > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > > > > > > > > > diff --git a/arch/x86/kvm/mmu/page_track.c b/arch/x86/kvm/mmu/p= age_track.c > > > > > > index a7bcde34d1f2..a9cd17625950 100644 > > > > > > --- a/arch/x86/kvm/mmu/page_track.c > > > > > > +++ b/arch/x86/kvm/mmu/page_track.c > > > > > > @@ -229,7 +229,8 @@ void kvm_page_track_write(struct kvm_vcpu *= vcpu, gpa_t gpa, const u8 *new, > > > > > > return; > > > > > > > > > > > > idx =3D srcu_read_lock(&head->track_srcu); > > > > > > - hlist_for_each_entry_rcu(n, &head->track_notifier_list, n= ode) > > > > > > + hlist_for_each_entry_srcu(n, &head->track_notifier_list, = node, > > > > > > + srcu_read_lock_held(&head->track_= srcu)) > > > > > > > > x86 build failed on linux -next 20200716. > > > > > > > > arch/x86/kvm/mmu/page_track.c: In function 'kvm_page_track_write': > > > > include/linux/rculist.h:727:30: error: left-hand operand of comma > > > > expression has no effect [-Werror=3Dunused-value] > > > > for (__list_check_srcu(cond), \ > > > > ^ > > > > arch/x86/kvm/mmu/page_track.c:232:2: note: in expansion of macro > > > > 'hlist_for_each_entry_srcu' > > > > hlist_for_each_entry_srcu(n, &head->track_notifier_list, node, > > > > ^~~~~~~~~~~~~~~~~~~~~~~~~ > > > > arch/x86/kvm/mmu/page_track.c: In function 'kvm_page_track_flush_sl= ot': > > > > include/linux/rculist.h:727:30: error: left-hand operand of comma > > > > expression has no effect [-Werror=3Dunused-value] > > > > for (__list_check_srcu(cond), \ > > > > ^ > > > > arch/x86/kvm/mmu/page_track.c:258:2: note: in expansion of macro > > > > 'hlist_for_each_entry_srcu' > > > > hlist_for_each_entry_srcu(n, &head->track_notifier_list, node, > > > > ^~~~~~~~~~~~~~~~~~~~~~~~~ > > > > cc1: all warnings being treated as errors > > > > make[3]: *** [arch/x86/kvm/mmu/page_track.o] Error 1 > > > > > > > > build link, > > > > https://ci.linaro.org/view/lkft/job/openembedded-lkft-linux-next/DI= STRO=3Dlkft,MACHINE=3Dintel-corei7-64,label=3Ddocker-lkft/815/consoleText > > > > > > > > > > Hi, we're seeing the same building failure with the latest linux-next= tree. > > > > I am not seeing this here. Could you please let us know what compiler > > and command-line options you are using to generate this? Please disregard anything below. Thanks and greetings! Daniel D=C3=ADaz daniel.diaz@linaro.org > It fails with gcc-8 and gcc-9, but it builds with gcc-10. Quick way to > reproduce: > [host] docker run --rm -it -v /linux:/linux -w /linux > tuxbuild/build-gcc-9_mips > [docker] make ARCH=3Dmips CROSS_COMPILE=3Dmips-linux-gnu- defconfig > [docker] make ARCH=3Dmips CROSS_COMPILE=3Dmips-linux-gnu- mm > > You can use these other Docker containers: tuxbuild/build-gcc-8_mips > and tuxbuild/build-gcc-10_mips. > > Logs for those builds (and allnoconfig, tinyconfig, with gcc-8, gcc-9 > and gcc-10) can also be found here: > https://gitlab.com/Linaro/lkft/kernel-runs/-/jobs/643978135 > > Greetings! > > Daniel D=C3=ADaz > daniel.diaz@linaro.org