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] [day] [month] [year] [list]
Message-ID: <CAGnkfhwYpDOn=dcN-ko1eFn+WTCW+MurcHsLUa3z6xCxs9j6HQ@mail.gmail.com>
Date:   Fri, 31 May 2019 03:08:14 +0200
From:   Matteo Croce <mcroce@...hat.com>
To:     Joe Perches <joe@...ches.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Andy Whitcroft <apw@...onical.com>,
        Kees Cook <keescook@...omium.org>,
        Aaron Tomlin <atomlin@...hat.com>,
        Matthew Wilcox <willy@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] checkpatch.pl: Warn on duplicate sysctl local variable

On Fri, May 31, 2019 at 2:55 AM Joe Perches <joe@...ches.com> wrote:
>
> On Fri, 2019-05-31 at 01:51 +0200, Matteo Croce wrote:
> > Commit 6a33853c5773 ("proc/sysctl: add shared variables for range check")
> > adds some shared const variables to be used instead of a local copy in
> > each source file.
> > Warn when a chunk duplicates one of these values in a ctl_table struct:
> []
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> []
> > @@ -6639,6 +6639,13 @@ sub process {
> >                                    "unknown module license " . $extracted_string . "\n" . $herecurr);
> >                       }
> >               }
> > +
> > +# check for sysctl duplicate constants
> > +             if ($line =~ /\.extra[12]\s*=\s*&(zero|one|int_max|max_int)\b/) {
> > +                     my $extracted_string = get_quoted_string($line, $rawline);
> > +                     WARN("DUPLICATED_SYSCTL_CONST",
> > +                             "duplicated sysctl range checking value '$1', consider using the shared one in include/linux/sysctl.h" . $extracted_string . "\n" . $herecurr);
> > +             }
>
> why is $extracted_string used here?
>
>

Right, it's always empty. I'm sending a v2.

Regards,
-- 
Matteo Croce
per aspera ad upstream

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ