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: <20091015155023.GB11408@elte.hu>
Date:	Thu, 15 Oct 2009 17:50:23 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Jeff Garzik <jeff@...zik.org>
Cc:	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Thomas Gleixner <tglx@...utronix.de>,
	LKML <linux-kernel@...r.kernel.org>,
	Arnd Bergmann <arnd@...db.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [RFC] Remove or convert empty ioctls ?


* Jeff Garzik <jeff@...zik.org> wrote:

> On 10/15/2009 11:31 AM, Alan Cox wrote:
>> EINVAL means you used an ioctl that is correct for the driver but that
>> for some reason the driver didn't like it.
>
> Precisely.
>
> The driver author proactively chose to implement the ioctl and return 
> a value other than ENOTTY.
>
> It is invalid to assume that all such cases are a direct result of 
> author mistakes or ignorance.

If 10% of the cases the error return was for a reason it's still worth 
doing this. If it matters we'll hear about it.

Something that looks like crap should not get extra protection to stay 
in the kernel just because it 'might' be non-crap. If it's not clearly 
documented in the source to be -EINVAL for a good reason (and frankly i 
cannot think of any) then i'd suggest to do what Alan has been doing for 
years: just change it and see if it causes any problems.

It's not like it's hard to revert such a change. (and we'll also add a 
comment explaining the reason for the -EINVAL in that case.)

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