public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] lsm: add comment block for security_sk_classify_flow() LSM hook
@ 2023-08-07  7:14 Khadija Kamran
  2023-08-07 23:14 ` Paul Moore
  0 siblings, 1 reply; 3+ messages in thread
From: Khadija Kamran @ 2023-08-07  7:14 UTC (permalink / raw)
  To: Alison Schofield, ztarkhani, Paul Moore, James Morris,
	Serge E. Hallyn, linux-security-module, linux-kernel

security_sk_classify_flow() LSM hook has no comment block. Add a comment
block with a brief description of LSM hook and its function parameters.

Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
---
Changed in v2:
 - Add parenthesis with security_sk_calssify_flow to refer to it as a
   function in commit message and commit log. 
 - Remove an extra space in the comment block.

security/security.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/security/security.c b/security/security.c
index d5ff7ff45b77..b76fb27a1dc6 100644
--- a/security/security.c
+++ b/security/security.c
@@ -4396,6 +4396,13 @@ void security_sk_clone(const struct sock *sk, struct sock *newsk)
 }
 EXPORT_SYMBOL(security_sk_clone);
 
+/**
+ * security_sk_classify_flow() - Set a flow's secid based on socket
+ * @sk: original socket
+ * @flic: target flow
+ *
+ * Set the target flow's secid to socket's secid.
+ */
 void security_sk_classify_flow(struct sock *sk, struct flowi_common *flic)
 {
 	call_void_hook(sk_getsecid, sk, &flic->flowic_secid);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-08 18:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-07  7:14 [PATCH v2] lsm: add comment block for security_sk_classify_flow() LSM hook Khadija Kamran
2023-08-07 23:14 ` Paul Moore
2023-08-08  5:41   ` Khadija Kamran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox