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: <20081114064919.GB29121@gollum.tnic>
Date:	Fri, 14 Nov 2008 07:49:19 +0100
From:	Borislav Petkov <petkovbb@...glemail.com>
To:	Wolfram Sang <w.sang@...gutronix.de>
Cc:	Andy Whitcroft <apw@...dowen.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][RESEND] checkpatch: Add warning for p0-patches

Hi Wolfram,

On Thu, Nov 13, 2008 at 11:55:40PM +0100, Wolfram Sang wrote:
> Hello Boris,
> 
> > files. Well, this one suffers from the exact opposite problem - it won't trigger
> > even if it is a -p0 patch on new files, AFAICT.
> 
> Can you give an example, please? I fail to see this at the moment.

Watch this:

Here's an arbitrary piece of a patch one could create:

--- /dev/null   2008-11-09 02:46:02.525014459 +0100
+++ arch/x86/kernel/tsc_resync.c        2008-11-14 07:22:34.000000000 +0100
@@ -0,0 +1 @@
+This is a new file

and, as you can see, it is a -p0 patch. Now, in the code you do:

if ($tree && -e "$root/$p1_prefix") {
	WARN("Patch prefix '$p1_prefix' exists. Is it maybe a p0-patch?\n");

and the "$root/$p1_prefix" won't exist - as a matter of fact - would
lose its "arch" part due to the regex before and the if-condition won't
trigger.

Nevertheless, this can be made to work if a special condition is added
which looks for "/dev/null" or similar strings which are a unique for a
patch adding a new file, or something like that. But I admit, this is a
contrived case and as such it is really rare in reality and you never
gonna have a problem like that if you use git or quilt :).

-- 
Regards/Gruss,
    Boris.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ