From: Eric Biggers <ebiggers3@gmail.com>
To: keyrings@vger.kernel.org
Subject: Re: [PATCH] KEYS: fix in-kernel documentation for keyctl_read()
Date: Wed, 01 Nov 2017 23:22:23 +0000 [thread overview]
Message-ID: <20171101232223.GA30281@gmail.com> (raw)
In-Reply-To: <20171026205458.105299-1-ebiggers3@gmail.com>
On Wed, Nov 01, 2017 at 01:57:18PM +0000, David Howells wrote:
> Eric Biggers <ebiggers3@gmail.com> wrote:
>
> > - As much of the data as can be fitted into the buffer will be copied to
> > - userspace if the buffer pointer is not NULL.
> > -
> > - On a successful return, the function will always return the amount of data
> > - available rather than the amount copied.
> > + On success, the function will return the amount of data placed into the
> > + buffer.
> >
> > + If the specified buffer is too small, then the size of the buffer required
> > + will be returned, and it is unspecified whether any data will be copied
> > + into the buffer.
>
> How about:
>
> If the specified buffer is too small, then the size of the buffer
> required will be returned. Note that, in this case, the contents of the
> buffer may be have been overwritten in some undefined way.
>
> Otherwise, on success, the function will return the amount of data copied
> into the buffer.
>
> David
I guess that's fine --- either way users can't rely on the contents of the
buffer. The man page should use the same wording, though. Should I send a v2
of both patches?
Eric
next prev parent reply other threads:[~2017-11-01 23:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-26 20:54 [PATCH] KEYS: fix in-kernel documentation for keyctl_read() Eric Biggers
2017-11-01 13:57 ` David Howells
2017-11-01 23:22 ` Eric Biggers [this message]
2017-11-02 0:06 ` David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171101232223.GA30281@gmail.com \
--to=ebiggers3@gmail.com \
--cc=keyrings@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.