aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/security
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2017-11-15 11:38:44 -0500
committerDavid Howells <dhowells@redhat.com>2017-11-15 11:38:44 -0500
commitbe543dd626c0a23829e9cc1a28e1e3af4cd9ced6 (patch)
tree7d0a0f99d87697d67565fdf8daafe415a28b62a2 /Documentation/security
parent37cb8e1f8e10c6e9bd2a1b95cdda0620a21b0551 (diff)
KEYS: fix in-kernel documentation for keyctl_read()
When keyctl_read() is passed a buffer that is too small, the behavior is inconsistent. Some key types will fill as much of the buffer as possible, while others won't copy anything. Moreover, the in-kernel documentation contradicted the man page on this point. Update the in-kernel documentation to say that this point is unspecified. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'Documentation/security')
-rw-r--r--Documentation/security/keys/core.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/Documentation/security/keys/core.rst b/Documentation/security/keys/core.rst
index 1266eeae45f6..9ce7256c6edb 100644
--- a/Documentation/security/keys/core.rst
+++ b/Documentation/security/keys/core.rst
@@ -628,12 +628,12 @@ The keyctl syscall functions are:
628 defined key type will return its data as is. If a key type does not 628 defined key type will return its data as is. If a key type does not
629 implement this function, error EOPNOTSUPP will result. 629 implement this function, error EOPNOTSUPP will result.
630 630
631 As much of the data as can be fitted into the buffer will be copied to 631 If the specified buffer is too small, then the size of the buffer required
632 userspace if the buffer pointer is not NULL. 632 will be returned. Note that in this case, the contents of the buffer may
633 633 have been overwritten in some undefined way.
634 On a successful return, the function will always return the amount of data
635 available rather than the amount copied.
636 634
635 Otherwise, on success, the function will return the amount of data copied
636 into the buffer.
637 637
638 * Instantiate a partially constructed key:: 638 * Instantiate a partially constructed key::
639 639