Skip to contentSkip to conversation

security: fix documentation for the socket_getpeersec_dgram hook

PATCH In review [email protected] 2 participants 2 messages Oct 23, 2018 Security (LSM)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 security: fix documentation for the socket_getpeersec_dgram hook

From: Denis Efremov <[email protected]>

The socket_getpeersec_dgram hook was changed in the commit "[AF_UNIX]: Kernel memory leak fix for af_unix datagram getpeersec patch" (dc49c1f94e34). The arguments @secdata and @seclen were changed to @sock and @secid. This patch updates the documentation accordingly.

---
 include/linux/lsm_hooks.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/linux/lsm_hooks.h +3 -3
index ae3766720264..a598e601ccb3 100644
@@ -861,9 +861,9 @@
  *	the IP_PASSSEC option via getsockopt.  It can then retrieve the
  *	security state returned by this hook for a packet via the SCM_SECURITY
  *	ancillary message type.
- *	@skb is the skbuff for the packet being queried
- *	@secdata is a pointer to a buffer in which to copy the security data
- *	@seclen is the maximum length for @secdata
+ *	@sock contains the socket structure.
+ *	@skb is the skbuff for the packet being queried.
+ *	@secid: pointer to where to put the secid of the packet.
  *	Return 0 on success, error on failure.
  * @sk_alloc_security:
  *	Allocate and attach a security structure to the sk->sk_security field,
Signature · 1 line
2.17.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · On Tue, Oct 23, 2018 at 4:14 AM, <[email protected]> wrote:

From: Denis Efremov <[email protected]>

The socket_getpeersec_dgram hook was changed in the commit "[AF_UNIX]: Kernel memory leak fix for af_unix datagram getpeersec patch" (dc49c1f94e34). The arguments @secdata and @seclen were changed to @sock and @secid. This patch updates the documentation accordingly.

-Kees

Quoted 24 lines
---
 include/linux/lsm_hooks.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/linux/lsm_hooks.h +3 -4
index ae3766720264..a598e601ccb3 100644
@@ -861,9 +861,9 @@
  *     the IP_PASSSEC option via getsockopt.  It can then retrieve the
  *     security state returned by this hook for a packet via the SCM_SECURITY
  *     ancillary message type.
- *     @skb is the skbuff for the packet being queried
- *     @secdata is a pointer to a buffer in which to copy the security data
- *     @seclen is the maximum length for @secdata
+ *     @sock contains the socket structure.
+ *     @skb is the skbuff for the packet being queried.
+ *     @secid: pointer to where to put the secid of the packet.
  *     Return 0 on success, error on failure.
  * @sk_alloc_security:
  *     Allocate and attach a security structure to the sk->sk_security field,
--

2.17.2

Signature · 1 line
Kees Cook