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:	Sun, 3 Aug 2008 13:56:22 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Brian Beattie <beattie@...ttie-home.net>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: ioctl's suck?

> I could add a control device and pass ascii strings for status and OOB
> messages, would that be an improvement?

Usually not. The idea that ioctl can be replaced with ascii messages is
clueless rubbish that generally gets spouted by people with their head
in the clouds of conceptual elegance and no grasp of reality.

There are certain things you can expose that way usefully via sysfs
- things like general stateless status information. Ioctl however provides
an interface tied to file handle not name (which is essential in a hotplug
environment) and an ordering to events so you know the response you get
matches the query you made.

There are good things to do with ioctls:
- Make sure the size of all the fields are consistent across 32/64bit
(for 32bit binaries on 64bit)
- Use the IOR/IOW/IORW macros

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