lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 3 Dec 2020 08:26:23 +0100
From:   Lukas Bulwahn <lukas.bulwahn@...il.com>
To:     Tom Rix <trix@...hat.com>
Cc:     Nick Desaulniers <ndesaulniers@...gle.com>,
        Joe Perches <joe@...ches.com>,
        Nathan Chancellor <natechancellor@...il.com>,
        LKML <linux-kernel@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>,
        Dwaipayan Ray <dwaipayanray1@...il.com>
Subject: Re: [PATCH] netfilter: conntrack: fix -Wformat

On Thu, Dec 3, 2020 at 1:46 AM Tom Rix <trix@...hat.com> wrote:
>
>
> On 12/2/20 2:34 PM, Nick Desaulniers wrote:
> > On Tue, Nov 10, 2020 at 2:04 PM Joe Perches <joe@...ches.com> wrote:
> >> On Tue, 2020-11-10 at 14:00 -0800, Nick Desaulniers wrote:
> >>
> >>> Yeah, we could go through and remove %h and %hh to solve this, too, right?
> >> Yup.
> >>
> >> I think one of the checkpatch improvement mentees is adding
> >> some suggestion and I hope an automated fix mechanism for that.
> >>
> >> https://lore.kernel.org/lkml/5e3265c241602bb54286fbaae9222070daa4768e.camel@perches.com/
> > + Tom, who's been looking at leveraging clang-tidy to automate such
> > treewide mechanical changes.
> > ex. https://reviews.llvm.org/D91789
>
> This looks like a good one to automate.
>
> If you don't mind, I'll give it a try next.
>
> Need a break from semicolons ;)
>
> Tom
>
> >
> > See also commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging
> > use of unnecessary %h[xudi] and %hh[xudi]") for a concise summary of
> > related context.
>

Nick, Tom,

It is not a competition between checkpatch and clang-format, but if it would be:

...checkpatch was first...

But jokes aside: Dwaipayan Ray, a mentee Joe and I are working with,
has already submitted a patch to checkpatch that identifies those
patterns and provides a fix:

https://lore.kernel.org/lkml/20201128200046.78739-1-dwaipayanray1@gmail.com/

Maybe that is helpful; and of course, clean-up patches to the various
places still need to be sent out and having a second tool with
clang-format that can check and provide automatic fixes as well is
great.

Tom, go for it: that clean-up is certainly helpful to get a "make
CC=clang -W1" warning-free kernel build. For some smaller x86 kernel
config (my playground config), there were not too many warnings
outstanding, but the -Wformat was still among the larger class among
them.

Lukas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ