summaryrefslogtreecommitdiffstats
path: root/Documentation/ioctl
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2018-05-02 09:51:06 +0200
committerJonathan Corbet <corbet@lwn.net>2018-05-08 08:51:03 -0600
commit1897e8f394c50124f90d6c1be672f05846438bf8 (patch)
treecaea8566194c4037268c574afcfcba35e98e0931 /Documentation/ioctl
parentc9161088e54b56d7ff8c92fd9e18b0fb7a20b2b3 (diff)
downloadlinux-1897e8f394c50124f90d6c1be672f05846438bf8.tar.bz2
doc: botching-up-ioctls: Make it clearer why structs must be padded
This came up in discussions when reviewing drm patches. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/ioctl')
-rw-r--r--Documentation/ioctl/botching-up-ioctls.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/Documentation/ioctl/botching-up-ioctls.txt b/Documentation/ioctl/botching-up-ioctls.txt
index d02cfb48901c..883fb034bd04 100644
--- a/Documentation/ioctl/botching-up-ioctls.txt
+++ b/Documentation/ioctl/botching-up-ioctls.txt
@@ -73,7 +73,9 @@ will have a second iteration or at least an extension for any given interface.
future extensions is going right down the gutters since someone will submit
an ioctl struct with random stack garbage in the yet unused parts. Which
then bakes in the ABI that those fields can never be used for anything else
- but garbage.
+ but garbage. This is also the reason why you must explicitly pad all
+ structures, even if you never use them in an array - the padding the compiler
+ might insert could contain garbage.
* Have simple testcases for all of the above.