Lines Matching refs:buffer
636 * If there's a buffer, we place up to buflen bytes of data into it formatted
642 * of how much we may have copied into the buffer.
645 char __user *buffer,
692 if (buffer && buflen >= ret) {
693 if (copy_to_user(buffer, infobuf, infolen) != 0 ||
694 copy_to_user(buffer + infolen, key->description,
803 static long __keyctl_read_key(struct key *key, char *buffer, size_t buflen)
810 ret = key->type->read(key, buffer, buflen);
821 * If successful, we place up to buflen bytes of data into the buffer, if one
823 * irrespective of how much we copied into the buffer.
825 long keyctl_read_key(key_serial_t keyid, char __user *buffer, size_t buflen)
869 if (!buffer || !buflen) {
879 * Allocating a temporary buffer to hold the keys before
880 * transferring them to user buffer to avoid potential
886 * This prevents allocating arbitrary large buffer which can
912 * a larger buffer and redo the key read when
919 continue; /* Allocate buffer */
922 if (copy_to_user(buffer, key_data, ret))
1556 * If there's a buffer, then up to buflen bytes of data will be placed into it.
1562 char __user *buffer,
1594 if (buffer && buflen > 0 &&
1595 copy_to_user(buffer, "", 1) != 0)
1599 if (buffer && buflen > 0) {
1603 if (copy_to_user(buffer, context, buflen) != 0)