From: Paul Moore <paul@paul-moore.com>
To: Matthieu Baerts <matthieu.baerts@tessares.net>,
James Morris <jmorris@namei.org>,
"Serge E. Hallyn" <serge@hallyn.com>,
Stephen Smalley <stephen.smalley.work@gmail.com>,
Eric Paris <eparis@parisplace.org>
Cc: Paolo Abeni <pabeni@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Ondrej Mosnacek <omosnace@redhat.com>,
mptcp@lists.linux.dev, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, linux-security-module@vger.kernel.org,
selinux@vger.kernel.org,
Matthieu Baerts <matthieu.baerts@tessares.net>
Subject: Re: [PATCH v2 2/2] selinux: Implement mptcp_add_subflow hook
Date: Thu, 18 May 2023 13:12:00 -0400 [thread overview]
Message-ID: <1947d38c30b18829a5c122025c52847e.paul@paul-moore.com> (raw)
In-Reply-To: <20230419-upstream-lsm-next-20230419-mptcp-sublows-user-ctx-v2-2-e7a3c8c15676@tessares.net>
On Apr 20, 2023 Matthieu Baerts <matthieu.baerts@tessares.net> wrote:
>
> Newly added subflows should inherit the LSM label from the associated
> MPTCP socket regardless of the current context.
>
> This patch implements the above copying sid and class from the MPTCP
> socket context, deleting the existing subflow label, if any, and then
> re-creating the correct one.
>
> The new helper reuses the selinux_netlbl_sk_security_free() function,
> and the latter can end-up being called multiple times with the same
> argument; we additionally need to make it idempotent.
>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> Acked-by: Matthieu Baerts <matthieu.baerts@tessares.net>
> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
> ---
> v2:
> - Address Paul's comments:
> - use "MPTCP socket" instead of "msk" in the commit message
> - "updated" context instead of "current" one in the comment
> ---
> security/selinux/hooks.c | 16 ++++++++++++++++
> security/selinux/netlabel.c | 8 ++++++--
> 2 files changed, 22 insertions(+), 2 deletions(-)
Also merged into selinux/next, thanks again.
--
paul-moore.com
next prev parent reply other threads:[~2023-05-18 17:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-20 17:17 [PATCH LSM v2 0/2] security: SELinux/LSM label with MPTCP and accept Matthieu Baerts
2023-04-20 17:17 ` [PATCH LSM v2 1/2] security, lsm: Introduce security_mptcp_add_subflow() Matthieu Baerts
2023-05-18 17:11 ` [PATCH " Paul Moore
2023-04-20 17:17 ` [PATCH LSM v2 2/2] selinux: Implement mptcp_add_subflow hook Matthieu Baerts
2023-05-18 17:12 ` Paul Moore [this message]
2023-05-04 14:14 ` [PATCH LSM v2 0/2] security: SELinux/LSM label with MPTCP and accept Ondrej Mosnacek
2023-05-04 16:13 ` Paolo Abeni
2023-05-05 14:16 ` Ondrej Mosnacek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1947d38c30b18829a5c122025c52847e.paul@paul-moore.com \
--to=paul@paul-moore.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eparis@parisplace.org \
--cc=jmorris@namei.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=matthieu.baerts@tessares.net \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=omosnace@redhat.com \
--cc=pabeni@redhat.com \
--cc=selinux@vger.kernel.org \
--cc=serge@hallyn.com \
--cc=stephen.smalley.work@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®