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, 12 Aug 2010 14:02:22 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Rabin Vincent <rabin.vincent@...ricsson.com>
Cc:	<linux-kernel@...r.kernel.org>, Andy Whitcroft <apw@...onical.com>,
	Linus Walleij <linus.walleij@...ricsson.com>
Subject: Re: [PATCH] checkpatch: check for incorrect permissions

On Thu, 12 Aug 2010 10:45:45 +0530
Rabin Vincent <rabin.vincent@...ricsson.com> wrote:

> Throw an error when a source file has been given execute permissions
> using the mode change line present in git diffs.  Also alow the filename
> matching to use the "diff" line in addition to the "+++" line, since the
> mode change lines appear before any "+++" lines.
> 
> Cc: Andy Whitcroft <apw@...onical.com>
> Acked-by: Linus Walleij <linus.walleij@...ricsson.com>
> Signed-off-by: Rabin Vincent <rabin.vincent@...ricsson.com>
> ---
>  scripts/checkpatch.pl |   10 +++++++++-
>  1 files changed, 9 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 2039acd..4c35cb9 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -1308,7 +1308,7 @@ sub process {
>  		$here = "#$realline: " if ($file);
>  
>  		# extract the filename as it passes
> -		if ($line=~/^\+\+\+\s+(\S+)/) {
> +		if ($line=~/^\+\+\+\s+(\S+)/ || $line=~/^diff\s.*?(\S+)$/) {

Breakage.  This causes the false warning:

WARNING: patch prefix 'drivers' exists, appears to be a -p0 patch

to be emitted when processing the below patch:



From: Dan Carpenter <error27@...il.com>

copy_to_user() returns the number of bytes remaining but we want to return
a negative error code on errors.

Signed-off-by: Dan Carpenter <error27@...il.com>
Cc: "Michael H. Warfield" <mhw@...tsend.com>
Cc: Greg KH <greg@...ah.com>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---

 drivers/char/ip2/ip2main.c |    2 ++
 1 file changed, 2 insertions(+)

diff -puN drivers/char/ip2/ip2main.c~ip2-return-efault-on-copy_to_user-errors drivers/char/ip2/ip2main.c
--- a/drivers/char/ip2/ip2main.c~ip2-return-efault-on-copy_to_user-errors
+++ a/drivers/char/ip2/ip2main.c
@@ -2930,6 +2930,8 @@ ip2_ipl_ioctl (struct file *pFile, UINT 
 				if ( pCh )
 				{
 					rc = copy_to_user(argp, pCh, sizeof(i2ChanStr));
+					if (rc)
+						rc = -EFAULT;
 				} else {
 					rc = -ENODEV;
 				}
_

--
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