Re: [PATCH] KEYS: fix in-kernel documentation for keyctl_read()

2017-11-01 Thread David Howells
Eric Biggers wrote: > 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? Please. I just think it's better to put the 'semi-successful' case before the 'really successful'

Re: [PATCH] KEYS: fix in-kernel documentation for keyctl_read()

2017-11-01 Thread Eric Biggers
On Wed, Nov 01, 2017 at 01:57:18PM +, David Howells wrote: > Eric Biggers 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 th

Re: [PATCH] KEYS: fix in-kernel documentation for keyctl_read()

2017-11-01 Thread David Howells
Eric Biggers 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. > +

[PATCH] KEYS: fix in-kernel documentation for keyctl_read()

2017-10-26 Thread Eric Biggers
From: Eric Biggers 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-k