diff mbox series

[v2] lsm: add comment block for security_sk_classify_flow() LSM hook

Message ID ZNCZ4KL7TRDE9vIC@gmail.com (mailing list archive)
State In Next
Delegated to: Paul Moore
Headers show
Series [v2] lsm: add comment block for security_sk_classify_flow() LSM hook | expand

Commit Message

Khadija Kamran Aug. 7, 2023, 7:14 a.m. UTC
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(+)

Comments

Paul Moore Aug. 7, 2023, 11:14 p.m. UTC | #1
On Mon, Aug 7, 2023 at 3:14 AM Khadija Kamran <kamrankhadijadj@gmail.com> wrote:
>
> 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(+)

Hi Khadija,

Thanks, but I already merged your original patch :)

https://lore.kernel.org/linux-security-module/abe91475c7f9e3483405c6096006b2a9.paul@paul-moore.com/

> 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
Khadija Kamran Aug. 8, 2023, 5:41 a.m. UTC | #2
On Mon, Aug 07, 2023 at 07:14:45PM -0400, Paul Moore wrote:
> On Mon, Aug 7, 2023 at 3:14 AM Khadija Kamran <kamrankhadijadj@gmail.com> wrote:
> >
> > 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(+)
> 
> Hi Khadija,
> 
> Thanks, but I already merged your original patch :)
> 
> https://lore.kernel.org/linux-security-module/abe91475c7f9e3483405c6096006b2a9.paul@paul-moore.com/

Hey Paul,

Great. Thank you. :)

Regards,
Khadija

> 
> > 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
> 
> -- 
> paul-moore.com
diff mbox series

Patch

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);