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-next>] [day] [month] [year] [list]
Message-ID: <1511745165.20482.34.camel@perches.com>
Date:   Sun, 26 Nov 2017 17:12:45 -0800
From:   Joe Perches <joe@...ches.com>
To:     Julia Lawall <julia.lawall@...6.fr>
Cc:     Logan Gunthorpe <logang@...tatee.com>,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        Andy Whitcroft <apw@...onical.com>
Subject: Re: [PATCH v2] checkpatch: Add a warning for log messages that
 don't end in a new line

On Sun, 2017-11-26 at 23:44 +0100, Julia Lawall wrote:
> My semantic patch and results are below.  The semantic patch has some
> features that may or may not be desired:
> 
> 1.  It goes beyond printk, pr_xxx, dev_xxx, and netdev_xxx, by finding
> functions that are sometimes used with a format string ending with a
> newline.  To reduce false positives, such a function is ignored if it is
> sometimes used with a string that ends in a space.  This could lead to
> false positives where actually one of the calls has a \n that it should
> not have.
> 
> 2.  Coccinelle puts multipart strings on a single line.  So the rule goes
> a little further and eliminates the multipartness.  Basically "xxx " "yyy"
> becomes "xxx yyy" regardless of the length of the result.

What about the semi-common string concatenation "foo" #var "bar" ?

> 3.  Some prints appear not to end with a newline because they end with \n.
> where .\n was likely intended.  Instead of creating \n.\n, the semantic
> patch just moves the .to the left of the . And if there was .\n. it just
> drops the final period.

That may be a problem if the sentence is "something...\n"

There seem to be many false positives in here too.

cheers, Joe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ