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]
Date:	Thu, 28 Jan 2010 08:47:50 +0100
From:	Oliver Neukum <oliver@...kum.org>
To:	Pavel Machek <pavel@....cz>
Cc:	"Rick L. Vinyard, Jr." <rvinyard@...nmsu.edu>,
	Jiri Kosina <jkosina@...e.cz>, linux-kernel@...r.kernel.org,
	felipe.balbi@...ia.com, jayakumar.lkml@...il.com,
	linux-fbdev@...r.kernel.org, krzysztof.h1@...pl,
	akpm@...ux-foundation.org, linux-usb@...r.kernel.org,
	linux-input@...r.kernel.org, dmitry.torokhov@...il.com
Subject: Re: [PATCH] hid: Logitech G13 driver 0.0.4

 Am Donnerstag, 28. Januar 2010 08:24:26 schrieben Sie:
> > Again, like I said, I don't have a problem changing it. If it's wrong,
> > it's wrong no matter how many other drivers may take the same
> > approach.
> 
> I believe it is wrong.

So do I. You need not fail if copy_to_user() fails, but if you go
that route you need to evaluate the return value of copy_to_user()
and return:

not_written = copy_to_user(...);
return to_be_written - not_written ? to_be_written - not_written : -EFAULT;

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