Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1673928pxa; Thu, 6 Aug 2020 13:04:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8FB+K/AJTAEBhqNoSdNyNuk4i3d1TZKkEuuT5Dp9nam45JxxokEl8oMJSnfWOe7zvo7ra X-Received: by 2002:a50:fa99:: with SMTP id w25mr5885684edr.150.1596744278855; Thu, 06 Aug 2020 13:04:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596744278; cv=none; d=google.com; s=arc-20160816; b=pUDWv0haojcWuaqFB505naguuYEhw0+mgn02cLT7/zi6T9x3+j00lQpR53BP6kn6Cm 4FI57lxH2eEpIwQVrwSdRDQKYjkcqaLkPvi3oVIhC9rUbfcWw8rFdQ1iBA5X3lc+o3Li BYRB4MzevY56zA0niI4bCbdS4/J5qLCgGLSwmw2+KIh7kc7Ggeu97IYMPX0Xx8VHNa23 L42IZm0+jBuBDSvYgIXd1K6XYaRnel/Qs1BbHNzvWIGszORv3gnmn3mwNxqzwsjLfPz2 Pz3EVyHhaRqTQ4Bpzraja8A6FkPD8IJeSQfQvdlvfkq22zz5xG4Uq/ZmQnS3O7RV/rDP 5jIQ== 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:dkim-signature; bh=GcmxaFAbN9FMOZvy1ws6uE/hP82637tGxfEk48uh7HY=; b=MCs24Qc/iVxlKZoiqxQtesebgAEzx6+8+zc67g5L0pgKuyCUe3eDDOaVctcrNzpw1g kM7m6dykxKSlbyCVBOjR/qr99GBHtqZrx+jC7dKnWSOy24nnCkduPohhVloXrlV78j+7 CaYmld61CAghrBqhpq+hah+C7+ejsdSfqrTNsxW5tqsK+oCAcljj7eNFrhSeBxIMnAGG S7bB9XnyD911W2qxSg+4Z/4VAhkaKL4jY1ZNzZ4+cO6lhxMxJim44eikTWAaPY+RniFm EmQYqmVBfQ4oRaPKIBaFyMNMRbRl5lbKYayMsJN7GZD/B/0g4nzljjwinK8V0rTFfW6T mOlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=AzQNBu5L; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cz8si3733681edb.455.2020.08.06.13.04.15; Thu, 06 Aug 2020 13:04:38 -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=@linuxfoundation.org header.s=google header.b=AzQNBu5L; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726547AbgHFUCw (ORCPT + 99 others); Thu, 6 Aug 2020 16:02:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725272AbgHFUCu (ORCPT ); Thu, 6 Aug 2020 16:02:50 -0400 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEF03C061574 for ; Thu, 6 Aug 2020 13:02:50 -0700 (PDT) Received: by mail-il1-x144.google.com with SMTP id c6so6401222ilo.13 for ; Thu, 06 Aug 2020 13:02:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=GcmxaFAbN9FMOZvy1ws6uE/hP82637tGxfEk48uh7HY=; b=AzQNBu5LtmU+t3c6vUOJRUCvqiRtHE7oZ2mjfQNHOTkSRfBPMdGUrkKbxZBQI1jIU5 LKinN/3WztDZsYn5pMZ1v3MxwbqbolF0H+dYM5UpKIhdOHXv1r41z2XVOl7VY3QHH1tL 7bb+Ssl+fBKgZxUvcWKBbr/I4BFlGWg/jvilI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=GcmxaFAbN9FMOZvy1ws6uE/hP82637tGxfEk48uh7HY=; b=MdEFUig/F1zcOqArKEXemwLyAZHroHEVX4s0gcUFj+QJHg2/VFpDkUCK/pe4xgHUFd xilZroS/SnGO7WAtp4n+5PNMN9XzavZbUoKASHsXD0EXsnu1cgMKkyMJaHHxXMXepvqY 8kr0CbTQPCDONaYUqcae6qWxWjxoAYDVeqdyWcF5eCQCAZqHqi66w/Ou5oC0EWz4FQEF tp03zfRwDKm0+4DJpe6Je1Xh+ULVQevMyygB5tTDNAuMZAIMoUpzsmO7KEuBJVzeOl1N mF/VzuUyLUQsltxAw7l5fj9lEQ6W2T7NbSqAWC/L4KtBkvNo+cqvDL0JnZ4mGYnwl8k2 33ZQ== X-Gm-Message-State: AOAM53089fdkIDNV3Y5HZcSEYpJlCzskpQmKufkSuzd8E3z+cgZN9EA1 0aRrQcnWj8+XKpOY5HJtY2O9hA== X-Received: by 2002:a05:6e02:1213:: with SMTP id a19mr658521ilq.129.1596744169530; Thu, 06 Aug 2020 13:02:49 -0700 (PDT) Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id l5sm5241282ios.3.2020.08.06.13.02.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Aug 2020 13:02:49 -0700 (PDT) Subject: Re: [PATCH] scripts: add dummy report mode to add_namespace.cocci To: Greg Kroah-Hartman Cc: Matthias Maennich , Julia Lawall , linux-kernel@vger.kernel.org, kernel-team@android.com, YueHaibing , jeyu@kernel.org, cocci@systeme.lip6.fr, stable@vger.kernel.org, Shuah Khan References: <20200604164145.173925-1-maennich@google.com> <20200622080345.GD260206@google.com> <0eda607e-4083-46d2-acb8-63cfa2697a71@linuxfoundation.org> <20200622150605.GA3828014@kroah.com> <20200806195704.GA2950037@kroah.com> From: Shuah Khan Message-ID: <8417ccd3-9964-3b8e-65e5-6140be0b28fd@linuxfoundation.org> Date: Thu, 6 Aug 2020 14:02:47 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200806195704.GA2950037@kroah.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/6/20 1:57 PM, Greg Kroah-Hartman wrote: > On Thu, Aug 06, 2020 at 01:48:26PM -0600, Shuah Khan wrote: >> On 6/22/20 10:14 AM, Shuah Khan wrote: >>> On 6/22/20 9:06 AM, Greg Kroah-Hartman wrote: >>>> On Mon, Jun 22, 2020 at 08:46:18AM -0600, Shuah Khan wrote: >>>>> On 6/22/20 2:03 AM, Matthias Maennich wrote: >>>>>> On Thu, Jun 04, 2020 at 02:39:18PM -0600, Shuah Khan wrote: >>>>>>> On 6/4/20 1:31 PM, Julia Lawall wrote: >>>>>>>> >>>>>>>> >>>>>>>> On Thu, 4 Jun 2020, Matthias Maennich wrote: >>>>>>>> >>>>>>>>> When running `make coccicheck` in report mode using the >>>>>>>>> add_namespace.cocci file, it will fail for files that contain >>>>>>>>> MODULE_LICENSE. Those match the replacement precondition, but spatch >>>>>>>>> errors out as virtual.ns is not set. >>>>>>>>> >>>>>>>>> In order to fix that, add the virtual rule nsdeps and only >>>>>>>>> do search and >>>>>>>>> replace if that rule has been explicitly requested. >>>>>>>>> >>>>>>>>> In order to make spatch happy in report mode, we also need a >>>>>>>>> dummy rule, >>>>>>>>> as otherwise it errors out with "No rules >>>>>>>>> apply". Using a script:python >>>>>>>>> rule appears unrelated and odd, but this is the shortest I >>>>>>>>> could come up >>>>>>>>> with. >>>>>>>>> >>>>>>>>> Adjust scripts/nsdeps accordingly to set the nsdeps rule >>>>>>>>> when run trough >>>>>>>>> `make nsdeps`. >>>>>>>>> >>>>>>>>> Suggested-by: Julia Lawall >>>>>>>>> Fixes: c7c4e29fb5a4 ("scripts: add_namespace: >>>>>>>>> Fix coccicheck failed") >>>>>>>>> Cc: YueHaibing >>>>>>>>> Cc: jeyu@kernel.org >>>>>>>>> Cc: cocci@systeme.lip6.fr >>>>>>>>> Cc: stable@vger.kernel.org >>>>>>>>> Signed-off-by: Matthias Maennich >>>>>>>> >>>>>>>> Acked-by: Julia Lawall >>>>>>>> >>>>>>>> Shuah reported the problem to me, so you could add >>>>>>>> >>>>>>>> Reported-by: Shuah Khan >>>>>>>> >>>>>>> >>>>>>> Very cool. No errors with this patch. Thanks for fixing it >>>>>>> quickly. >>>>>> >>>>>> I am happy I could fix that and thanks for confirming. I assume your >>>>>> Tested-by could be added? >>>>> >>>>> Yes >>>>> >>>>> Tested-by: Shuah Khan >>>>>> >>>>>> Is somebody willing to take this patch through their tree? >>>>>> >>>>> >>>>> My guess is that these go through kbuild git?? >>>> >>>> If you want to take this, that's fine with me.  But as I had the >>>> original file come through my tree, I can take it too.  It's up to you, >>>> either is ok with me. >>>> >>> >>> Great. Please take this through your tree. >>> >> >> Greg! Looks like this one didn't make it in. Can you pick this up? > > I think this is 55c7549819e4 ("scripts: add dummy report mode to > add_namespace.cocci") in Linus's tree right now, right? > Yes. It is in Linux 5.9. I was looking in the wrong place on Linux 5.8. :( thanks, -- Shuah