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]
Message-ID: <20190822091858.GA60652@google.com>
Date:   Thu, 22 Aug 2019 10:18:58 +0100
From:   Matthias Maennich <maennich@...gle.com>
To:     Markus Elfring <Markus.Elfring@....de>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Julia Lawall <Julia.Lawall@...6.fr>,
        Martijn Coenen <maco@...roid.com>, cocci@...teme.lip6.fr,
        kernel-janitors@...r.kernel.org, linux-arch@...r.kernel.org,
        linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-m68k@...ts.linux-m68k.org, linux-modules@...r.kernel.org,
        linux-scsi@...r.kernel.org, linux-usb@...r.kernel.org,
        kernel-team@...roid.com, usb-storage@...ts.one-eyed-alien.net,
        x86@...nel.org, Alan Stern <stern@...land.harvard.edu>,
        Arnd Bergmann <arnd@...db.de>,
        "David S. Miller" <davem@...emloft.net>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Gilles Muller <Gilles.Muller@...6.fr>,
        "H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
        Jessica Yu <jeyu@...nel.org>,
        Joel Fernandes <joel@...lfernandes.org>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        Kate Stewart <kstewart@...uxfoundation.org>,
        Lucas De Marchi <lucas.de.marchi@...il.com>,
        Martijn Coenen <maco@...gle.com>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        Nicolas Palix <nicolas.palix@...g.fr>,
        Oliver Neukum <oneukum@...e.com>,
        Philippe Ombredanne <pombredanne@...b.com>,
        Sam Ravnborg <sam@...nborg.org>,
        Sandeep Patil <sspatil@...gle.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [v2 08/10] scripts: Coccinelle script for namespace dependencies

On Thu, Aug 15, 2019 at 03:50:38PM +0200, Markus Elfring wrote:
>> +generate_deps_for_ns() {
>> +    $SPATCH --very-quiet --in-place --sp-file \
>> +	    $srctree/scripts/coccinelle/misc/add_namespace.cocci -D ns=$1 $2
>> +}
>
>* Where will the variable “srctree” be set for the file “scripts/nsdeps”?
>

$srctree is defined by kbuild in the toplevel Makefile.

>* Would you like to support a separate build directory for desired adjustments?
>

No, as the purpose of this script is to directly patch the kernel
sources where applicable.

>* How do you think about to check error handling around such commands?
>
>

spatch emits a descriptive message on error. I will add a 'set
-e' to the script so that it aborts on errors.

>> +generate_deps() {
>…
>> +        for source_file in $mod_source_files; do
>> +            sed '/MODULE_IMPORT_NS/Q' $source_file > ${source_file}.tmp
>…
>
>I suggest to assign the name for the temporary file to a variable
>which should be used by subsequent commands.

I somehow don't agree that this is an improvement to the code as the
variable would likely be something like ${source_file_tmp}. Sticking to
${source_file}.tmp does express the intent of a temporary file next to
the original source file and the reader of the code does not need to
reason about the value of ${source_file_tmp}.

Cheers,
Matthias

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ