* [PATCH] selinux: use a consistent method to get full socket from skb
@ 2025-07-29 9:10 Tianjia Zhang
2025-07-29 14:00 ` Stephen Smalley
2025-08-05 21:26 ` Paul Moore
0 siblings, 2 replies; 4+ messages in thread
From: Tianjia Zhang @ 2025-07-29 9:10 UTC (permalink / raw)
To: Paul Moore, Stephen Smalley, Ondrej Mosnacek, selinux,
linux-kernel
Cc: Tianjia Zhang
In order to maintain code consistency and readability,
skb_to_full_sk() is used to get full socket from skb.
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
---
security/selinux/hooks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 595ceb314aeb..362f92b2fafb 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -5861,7 +5861,7 @@ static unsigned int selinux_ip_output(void *priv, struct sk_buff *skb,
/* we do this in the LOCAL_OUT path and not the POST_ROUTING path
* because we want to make sure we apply the necessary labeling
* before IPsec is applied so we can leverage AH protection */
- sk = sk_to_full_sk(skb->sk);
+ sk = skb_to_full_sk(skb);
if (sk) {
struct sk_security_struct *sksec;
--
2.39.5 (Apple Git-154)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] selinux: use a consistent method to get full socket from skb
2025-07-29 9:10 [PATCH] selinux: use a consistent method to get full socket from skb Tianjia Zhang
@ 2025-07-29 14:00 ` Stephen Smalley
2025-08-05 21:26 ` Paul Moore
1 sibling, 0 replies; 4+ messages in thread
From: Stephen Smalley @ 2025-07-29 14:00 UTC (permalink / raw)
To: Tianjia Zhang; +Cc: Paul Moore, Ondrej Mosnacek, selinux, linux-kernel
On Tue, Jul 29, 2025 at 5:10 AM Tianjia Zhang
<tianjia.zhang@linux.alibaba.com> wrote:
>
> In order to maintain code consistency and readability,
> skb_to_full_sk() is used to get full socket from skb.
>
> Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
> ---
> security/selinux/hooks.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index 595ceb314aeb..362f92b2fafb 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -5861,7 +5861,7 @@ static unsigned int selinux_ip_output(void *priv, struct sk_buff *skb,
> /* we do this in the LOCAL_OUT path and not the POST_ROUTING path
> * because we want to make sure we apply the necessary labeling
> * before IPsec is applied so we can leverage AH protection */
> - sk = sk_to_full_sk(skb->sk);
> + sk = skb_to_full_sk(skb);
> if (sk) {
> struct sk_security_struct *sksec;
>
> --
> 2.39.5 (Apple Git-154)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] selinux: use a consistent method to get full socket from skb
2025-07-29 9:10 [PATCH] selinux: use a consistent method to get full socket from skb Tianjia Zhang
2025-07-29 14:00 ` Stephen Smalley
@ 2025-08-05 21:26 ` Paul Moore
2025-08-11 22:17 ` Paul Moore
1 sibling, 1 reply; 4+ messages in thread
From: Paul Moore @ 2025-08-05 21:26 UTC (permalink / raw)
To: Tianjia Zhang, Stephen Smalley, Ondrej Mosnacek, selinux,
linux-kernel
Cc: Tianjia Zhang
On Jul 29, 2025 Tianjia Zhang <tianjia.zhang@linux.alibaba.com> wrote:
>
> In order to maintain code consistency and readability,
> skb_to_full_sk() is used to get full socket from skb.
>
> Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
> Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
> ---
> security/selinux/hooks.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Merged into selinux/dev-staging with plans to move it to selinux/dev
once the merge window closes.
--
paul-moore.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] selinux: use a consistent method to get full socket from skb
2025-08-05 21:26 ` Paul Moore
@ 2025-08-11 22:17 ` Paul Moore
0 siblings, 0 replies; 4+ messages in thread
From: Paul Moore @ 2025-08-11 22:17 UTC (permalink / raw)
To: Tianjia Zhang, Stephen Smalley, Ondrej Mosnacek, selinux,
linux-kernel
On Tue, Aug 5, 2025 at 5:26 PM Paul Moore <paul@paul-moore.com> wrote:
> On Jul 29, 2025 Tianjia Zhang <tianjia.zhang@linux.alibaba.com> wrote:
> >
> > In order to maintain code consistency and readability,
> > skb_to_full_sk() is used to get full socket from skb.
> >
> > Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
> > Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
> > ---
> > security/selinux/hooks.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Merged into selinux/dev-staging with plans to move it to selinux/dev
> once the merge window closes.
Now merged into selinux/dev, thanks!
--
paul-moore.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-08-11 22:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-29 9:10 [PATCH] selinux: use a consistent method to get full socket from skb Tianjia Zhang
2025-07-29 14:00 ` Stephen Smalley
2025-08-05 21:26 ` Paul Moore
2025-08-11 22:17 ` Paul Moore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).