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:	Tue, 15 Apr 2014 16:00:35 +0100
From:	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>
To:	Emmanuel Colbus <ecolbus@...ux.info>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [RFC][4/11][MANUX] Kernel compatibility : ioctl(2)

On Tue, 15 Apr 2014 15:42:54 +0200
Emmanuel Colbus <ecolbus@...ux.info> wrote:

> Continuing with syscalls, I would like to indicate you a modification
> I've done with regards to ioctl's. The thing is, I have had the need for
> ioctl's that return *file descriptors*, instead of standard return codes.

You probably only think you have ;-)

The return from an ioctl on 32bit is going to be an unsigned 32bit value,
as is a Linux file handle. So if you do

	fd = ioctl(foo);

then not only have you got an interface that isn't compliant with
POSIX/SuS you also have no error reporting capability.

The expectation of ioctl is

	err = ioctl(fd, FDIOWIBBLE, &result);

now if result is a pointer to where to store one or more file handles you
are sorted.

If you are going to use SuS/POSIX naming I'd really suggest sticking to
the expected behaviour in the standards.

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