keyctl_capabilities and buflen
Hi,
I'm looking at the implementation of keyctl_capabilities in the next branch and it's not clear if buflen is the size of the memory pointed to by buffer in array size or in byte size by its documentation. It seems to be the size in bytes by the code (the &3) could probably warrant a comment to make it clearer that it is related to sizeof(unsigned int) here). This seems very odd to me, or is it just a common kernel pattern I haven't seen before?
Thanks,
--Ben
Quoted 7 lines · Ben Boeckel
I'm looking at the implementation of
keyctl_capabilitiesin thenextbranch and it's not clear ifbuflenis the size of the memory pointed to bybufferin array size or in byte size by its documentation. It seems to be the size in bytes by the code (the &3) could probably warrant a comment to make it clearer that it is related to sizeof(unsigned int) here). This seems very odd to me, or is it just a common kernel pattern I haven't seen before?
I see that this is now unsigned char* instead of unsigned int on next now and in the kernel by the newest patch submission.
Thanks,
--Ben
David Howells
maintainerQuoted 2 lines · Ben Boeckel
I see that this is now
unsigned char*instead ofunsigned intonnextnow and in the kernel by the newest patch submission.
If you're okay with the patch, could you reply to it with a Reviewed-by?
Thanks,
David
Quoted 1 line · David Howells
If you're okay with the patch, could you reply to it with a Reviewed-by?
I'm not confident enough in the kernel side to give such a tag, sorry. I'm more interested in the libkeyutils patches which tend to just show up in the repo rather than for review on the list (where I'd happily give such tags where I can).
--Ben
David Howells
maintainerQuoted 4 lines · Ben Boeckel
I'm not confident enough in the kernel side to give such a tag, sorry. I'm more interested in the libkeyutils patches which tend to just show up in the repo rather than for review on the list (where I'd happily give such tags where I can).
Okay, thanks.
David