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=-15.8 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 2FFADC433DF for ; Mon, 19 Oct 2020 10:42:22 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 72BB82080D for ; Mon, 19 Oct 2020 10:42:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="G4M35Sfv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72BB82080D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-kernel-mentees-bounces@lists.linuxfoundation.org Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id DF7DB86DD7; Mon, 19 Oct 2020 10:42:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1CG6ydfpeOtW; Mon, 19 Oct 2020 10:42:20 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2668486C72; Mon, 19 Oct 2020 10:42:20 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 12062C088B; Mon, 19 Oct 2020 10:42:20 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2A0DAC0051 for ; Mon, 19 Oct 2020 10:42:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 190BC8746A for ; Mon, 19 Oct 2020 10:42:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gUzGP7DGCDwx for ; Mon, 19 Oct 2020 10:42:18 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by hemlock.osuosl.org (Postfix) with ESMTPS id DC1D68743B for ; Mon, 19 Oct 2020 10:42:17 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id z22so5253645wmi.0 for ; Mon, 19 Oct 2020 03:42:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=O/EqBU5q2Q6hTOmBesVq/GHgNZqEsTjUpryhyKYPJLE=; b=G4M35SfvuGhMlUN4gBEOLSWFwQ4xLeweh4byZNulFouhWTgk+lCzzUlPvkB/8ZM/7J 7kTbKxxRVITrqs4S/sPeChykjDilH6T2I4b7HpttccPNdKGeSvVD6fzTsYcZfDB+2kkw A+/kSFsi3M/1o8gz/VbFK1b4NkqLrYNNy3As/bMNkCh3Yc9vppqU6+YUZ9UA7WsV/o8L 07nY5DHuWRJzgF6u7Tp0TnXe4NUmO0IZNQlmh8RI6yppabRl2Jvu6cIQZ9E70s+DFq08 /OPOZOSCLPfwCTBVdz2921S0S9Fd2qPtYl8MAu3Nn6eGl72taw5qVXV92Z+P/QUPZEIB Hejg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=O/EqBU5q2Q6hTOmBesVq/GHgNZqEsTjUpryhyKYPJLE=; b=cxUiegrK+tzXVzRZqYGMWfKzZTy6igMnhGhexoC7XnnCK5xkC/7B+AnZ1V7BUS0p7V EtoKLKpicIVq5n2mAvSzUkleO+Ebg3CjXjKPLd5zdT/FB/T9EnHUH6uqSQXeIkYcp8IR XK6esGh3GEKISNR5K5UGRhvvow/o1BYQl319M1WxIKBXxpnWmwSa9X2e2ASBTxeWzBWB aC6wztiOnyQHIb7R82jDWNH5l6m59HxvyW4qeg7GLTXbPRkP1XHlZFrerZ8dU6njfLBp CrBLBvQi9oVyP3iTgpfWtoU4a91OpMSiSMtSLeRLH5HsvyIVQQOKvU4Xz2qgC+gxG4K7 y7xw== X-Gm-Message-State: AOAM532ZiX1OQkcVwkOnQgi0KpdQWoIOM8I7+Lyy1q0ouBIMcptxOHhY sIXcpaxwX8PXaAfnEz9flCw= X-Google-Smtp-Source: ABdhPJxiGM4ed5pvymdzGZujiurlGolcGSFRFxLehWBCC+E4nej38N1eDpECK3HWSPtTeEXLQDFoRA== X-Received: by 2002:a1c:9854:: with SMTP id a81mr17414361wme.72.1603104136102; Mon, 19 Oct 2020 03:42:16 -0700 (PDT) Received: from felia ([2001:16b8:2df7:1800:a5e7:bc68:6860:6c9b]) by smtp.gmail.com with ESMTPSA id o63sm15302889wmo.2.2020.10.19.03.42.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 03:42:15 -0700 (PDT) From: Lukas Bulwahn X-Google-Original-From: Lukas Bulwahn Date: Mon, 19 Oct 2020 12:42:14 +0200 (CEST) X-X-Sender: lukas@felia To: Aditya In-Reply-To: <9145c954-e644-3bda-56d8-d91af7803947@gmail.com> Message-ID: References: <20201013060714.33713-1-dwaipayanray1@gmail.com> <72615293-a433-9d19-ae9e-ec9dd2c2073c@gmail.com> <9145c954-e644-3bda-56d8-d91af7803947@gmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Cc: linux-kernel-mentees@lists.linuxfoundation.org Subject: Re: [Linux-kernel-mentees] [PATCH v2] checkpatch: fix missing whitespace in formatted email X-BeenThere: linux-kernel-mentees@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-kernel-mentees-bounces@lists.linuxfoundation.org Sender: "Linux-kernel-mentees" On Mon, 19 Oct 2020, Aditya wrote: > On 18/10/20 1:13 pm, Lukas Bulwahn wrote: > > > > > > On Sat, 17 Oct 2020, Aditya wrote: > > > >> > >> On Wed, Oct 14, 2020 at 10:33 PM Aditya wrote: > >> > >>> > >>> On 13/10/20 11:46 am, Lukas Bulwahn wrote: > >>>> > >>>> On Tue, 13 Oct 2020, Dwaipayan Ray wrote: > >>>> > >>>>> Commit 0c01921e56f9 ("checkpatch: add new warnings to author signoff > >>>>> checks.") introduced new checks for author sign off. The format_email > >>>>> procedure was modified to add comment blocks to the formatted email. But > >>>>> no space was added between the email address and mail comment. > >>>>> > >>>>> This causes wrong email formatting in cases where the email is in the > >>> form > >>>>> "author@example.com (Comment block)". The space between the address and > >>>>> comment block is removed, which causes incorrect parsing of the > >>>>> formatted email. > >>>>> > >>>>> An evaluation on checkpatch brought up this case. For example, > >>>>> on commit 1129d31b55d5 ("ima: Fix ima digest hash table key > >>> calculation"), > >>>>> the following warning was reported: > >>>>> > >>>>> WARNING:BAD_SIGN_OFF: email address 'David.Laight@aculab.com (big > >>> endian > >>>>> system concerns)' might be better as 'David.Laight@aculab.com(big > >>> endian > >>>>> system concerns)' > >>>>> > >>>>> Add a single space in between the address and comment when the > >>>>> extracted comment is not empty. > >>>>> > >>>> Dwaipayan, looks good to me. > >>>> > >>>> So, how about a 'Fixes:' tag? > >>>> > >>>> Aditya, can you rerun your evaluation with this fix patch applied on top? > >>>> > >>>> Then, we need a comparison for: > >>>> 1. completely before vs. after the two patches, and > >>>> 2. after the first patch vs. after the two patches (to see that the fix > >>>> works) > >>>> > >>>> More support on evaluation from others interested to become mentees are > >>> of > >>>> course welcome. > >>>> > >>>> Lukas > >>>> > >>>>> Signed-off-by: Dwaipayan Ray > >>>>> --- > >>>>> scripts/checkpatch.pl | 4 +++- > >>>>> 1 file changed, 3 insertions(+), 1 deletion(-) > >>>>> > >>>>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > >>>>> index fab38b493cef..f1a4e61917eb 100755 > >>>>> --- a/scripts/checkpatch.pl > >>>>> +++ b/scripts/checkpatch.pl > >>>>> @@ -1221,7 +1221,9 @@ sub format_email { > >>>>> } else { > >>>>> $formatted_email = "$name$name_comment <$address>"; > >>>>> } > >>>>> - $formatted_email .= "$comment"; > >>>>> + if ("$comment" ne "") { > >>>>> + $formatted_email .= " $comment"; > >>>>> + } > >>>>> return $formatted_email; > >>>>> } > >>>>> > >>>>> -- > >>>>> 2.27.0 > >>>>> > >>>>> > >>> Hi Sir > >>> > >>> I have analyzed the reports using this patch and made comparison. The > >>> links are as follows: > >>> > >>> 1. completely before vs. after this patch: > >>> https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task2/reports/analysis/relative_change/before_v_second/summary_relative.txt > >>> 2. after the first patch vs. after the two patches: > >>> https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task2/reports/analysis/relative_change/first_v_second/summary_relative.txt > >>> > >>> Kindly let me know if you have any questions. > >>> > >>> Aditya > >>> > >>> > >> > >> Hi Sir > >> I have completed all the assigned tasks. What should be my next steps to participate as a mentee in the community bridge program? > >> Kindly guide me regarding it. > >> > > > > (your email client is broken; it should not spread lines so long...) > > > > Aditya, you are on a good way to be towards acceptance for a kernel > > mentorship. > > > > If I am not mistaken, you have not created yet a non-trivial patch to > > checkpatch.pl and got your patch accepted. > > > > > > Look at your own checkpatch.pl evaluation, find a relevant case where > > checkpatch.pl reports a large class of false positives and think about how > > to improve checkpatch.pl. > > > > Especially, when looking at checkpatch.pl complaining about suspicious > > code patterns or style and formatting, you might want to compare to the > > capabilities of compiler static analysers (clang-tidy) or clang-format. > > > > Improving those tools, making them the warning-free for the specific > > class and supporting to make them default tools might also be a good > > extension to the goals of checkpatch. > > > > Let us know which kind of false positive class you found and would like to > > improve. > > > > Dwaipayan and I can help if you really do not find anything at all... > > > > Good luck :) > > > > > > Lukas > > > > Hi Sir, > I observed the reports as you suggested. > I found out that "REPEATED_WORD" is the third most frequent warning in > v6..v8 with frequency of 2797. Although this does give correct > messages most of the times, but a large proportion(probably more than > 50%) of this error comes out of hexadecimal being a part of the commit > or code. > For eg, WARNING:REPEATED_WORD: Possible repeated word: 'ff' > #21: > Code: 00 77 27 48 81 ff 00 00 01 00 76 07 0f b7 d7 ed 0f c8 c3 55 48 > c7 c6 3b ee d5 9f 48 89 e5 e8 67 fc ff ff b8 ff ff ff ff 5d c3 <8b> 07 > 0f c8 c3 66 66 2e 0f 1f 84 00 00 00 00 00 48 81 fe ff ff 03 > > Now, here it reports 'ff' to be repeated many times. But I believe > that this was not the expected outcome from this warning. > > I think that such warnings should be avoided from this class tag of > warning. > > My approach: Use regex to know if the repeated words are of '2' length > and occur among such pattern which consists of 2 lettered words > repeated 5-6 times,ie. size(/[a-f0-9]{2}\s/)>6, eg. "04 19 00 00 c3 48 > 83 ec 08 e8 0a fa ff ff 48 89 04 24 b8 02 00 00 00 0f". > As normally such occurrences do not occur in English, it can be an > effective method to avoid such hexadecimal occurrences. > > Kindly let me know if I can proceed with this. Also, please suggest if > there is a better way to counter this issue. > Sounds good to me. - Create a patch that addresses the issue. - Write a good commit message according to the kernel recommendations. - Share the patch with this list. - We will then review here first. - Show the impact of your patch with an evaluation of before and after the patch (apply it to linux-next and with Dwaipayan's pending patches on this topic). When we reviewed it, you can send the patch to the larger group, Joe Perches and lkml. Looking forward to your patch. Lukas _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees