Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2881504ybt; Mon, 22 Jun 2020 09:16:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEOAy78m7rucMDFpUYR1eQuUrGNXWmXnCOf3WZXUIRo38tsFxoCo2D61c9wNktaapr6JTi X-Received: by 2002:aa7:d492:: with SMTP id b18mr17968563edr.339.1592842619497; Mon, 22 Jun 2020 09:16:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592842619; cv=none; d=google.com; s=arc-20160816; b=KNisC15gGxZ3+1FT+X2joiu0KPooYHuSr4/Gq7pwqA/vFnFY61L7MC5bYOH/LYjaMH MJK3QCFEae1A6tuvd9C6rybFRmkhDZXWmbk26Bj2XKBPt+Pf9zYWDpvqGmwT7aeyTWbX E6HP42nP/2uCrq8AzQrVoeSvxIIJpmDUCTas3oMoJDG5fK9NNx5ZzR1NZ7GbyC8uzY9w KYOE2vBEHgj5I7JMQL+29QYFCljkEWR1xN+2O1zuNATynC30UYbRf2GgJg+CiypcTVZE qb05b20bLdyowpAQ8IPVL3R6xqenoNCxEipIuCzHTN9pRFfL+K/qYavqQ/EcCjzcZn9b O9BA== 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=VVaCcZG58WyWvPJ2lYOGRecBDq8B1jl/4gBvyhUrQn8=; b=kOfH+ppY90xACPioVqW2FMAovLzkeFI7APB25jjEdG24j4UJV8Rrb3fsmU686uzTeW SXbrgqnMmrhifCsHfQg/JzCSqmWTIRSKy8p+tM5uUBEuzw1ZHQYwj4OFhXFFv+kzKvLK Q5HsFfEBzCqQVOdCByqlsBk0HEAAK4UZKWZzsZbdITExioHFvEYU5RRCByxE4BM2WI5y HCuVgihd/wut20h8u55Bo6YgprB/Z7n1wbgDvzwuQ8oJ5C3HUNwT28++YOeNxdkion1k Wm/CVR4RuuLluUeCedhCUxyAH8AjsDupvxrqpAElzBxyulNmI3vuJcfO1skmPHVIXKI6 1d0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=hjOqsA1J; 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 j13si4504629ejc.314.2020.06.22.09.16.35; Mon, 22 Jun 2020 09:16:59 -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=hjOqsA1J; 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 S1729493AbgFVQOh (ORCPT + 99 others); Mon, 22 Jun 2020 12:14:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729358AbgFVQOg (ORCPT ); Mon, 22 Jun 2020 12:14:36 -0400 Received: from mail-oi1-x244.google.com (mail-oi1-x244.google.com [IPv6:2607:f8b0:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A37BC061795 for ; Mon, 22 Jun 2020 09:14:36 -0700 (PDT) Received: by mail-oi1-x244.google.com with SMTP id c194so16123512oig.5 for ; Mon, 22 Jun 2020 09:14:36 -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=VVaCcZG58WyWvPJ2lYOGRecBDq8B1jl/4gBvyhUrQn8=; b=hjOqsA1J9Nge6aShoubXb7xlmkqcvD0u8sQ/uIBCrC8e0bV/fPKVmzQKXoxiz+uH8G 7zaQSSlnpNs4/FKAMUbEFx657gJcZzY8dAVSe7rNcGm1tEoKepIA1gNYRSHak7eU5pAR 4AR1Bq0GeXrG+kCCO+BaDcpqAhMClQ+vJiEU0= 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=VVaCcZG58WyWvPJ2lYOGRecBDq8B1jl/4gBvyhUrQn8=; b=WLiKa6vWQDr3FEVC2HR2efTZyfkgXQ3RKfMX5lYu+osjqqah7DQw0RU/T3z6hZEq6z qO55Pv/lO+FFwZHzpHElFLwVJj8aR8IQ54HJ3c07cOpreXc5PTKpRCFPdVMcZ2RYEcHi XHGFVKQKRvWOe2wvuLfFjnzZIZapWXV0OKW+LQCKNfrM0/whBLFsckEHAtqklQ0UZIEM 4nyItEF5RNR6rJAwkyrJTFChdo6OpalFkQVOmACm63ej0d9ysoReg/V5LdqLkeqjiwJn 69LfEZrkdHNUdj9HKaIl//NHRdiJac7vWb2H+guhISfcidifiyfPi6vYc0gRaVOhyE3L jV8w== X-Gm-Message-State: AOAM532ydpbgRfePC9j2yoyP4z8cCMyFPuQIulEvWMdhbL+hyv/+sowo lmGFu7MhX1vaYdUIqRAULmXWtw== X-Received: by 2002:aca:6008:: with SMTP id u8mr13575129oib.58.1592842475938; Mon, 22 Jun 2020 09:14:35 -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 35sm3365700otd.68.2020.06.22.09.14.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jun 2020 09:14:35 -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, skhan@linuxfoundation.org References: <20200604164145.173925-1-maennich@google.com> <20200622080345.GD260206@google.com> <0eda607e-4083-46d2-acb8-63cfa2697a71@linuxfoundation.org> <20200622150605.GA3828014@kroah.com> From: Shuah Khan Message-ID: Date: Mon, 22 Jun 2020 10:14:34 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200622150605.GA3828014@kroah.com> Content-Type: text/plain; charset=utf-8; format=flowed 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 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. thanks, -- Shuah