Skip to contentSkip to conversation

libsepol: add bpf_token_perms polcap

PATCH In review Eric Suen 3 participants 4 messages Oct 8, 2025 – Feb 5 SELinux security module

lore
Share & tools
lore

Eric Suen

author
#0 lore raw

PATCH v2 1/1 libsepol: add bpf_token_perms polcap

New policy capability 'bpf_token_perms' required by patch to support SELinux for BPF token control:
https://lore.kernel.org/selinux/[email protected]/

---
Changes in v2:
- Rebase to the latest changes

 libsepol/include/sepol/policydb/polcaps.h | 1 +
 libsepol/src/polcaps.c                    | 1 +
 2 files changed, 2 insertions(+)
libsepol/include/sepol/policydb/polcaps.h +1 -0
index 5a3fbdb4..ef529e76 100644
@@ -21,6 +21,7 @@ enum {
 	POLICYDB_CAP_GENFS_SECLABEL_WILDCARD,
 	POLICYDB_CAP_FUNCTIONFS_SECLABEL,
 	POLICYDB_CAP_MEMFD_CLASS,
+	POLICYDB_CAP_BPF_TOKEN_PERMS,
 	__POLICYDB_CAP_MAX
 };
 #define POLICYDB_CAP_MAX (__POLICYDB_CAP_MAX - 1)
libsepol/src/polcaps.c +1 -0
index 526f35ed..31b52d70 100644
@@ -20,6 +20,7 @@ static const char * const polcap_names[POLICYDB_CAP_MAX + 1] = {
 	[POLICYDB_CAP_GENFS_SECLABEL_WILDCARD]		= "genfs_seclabel_wildcard",
 	[POLICYDB_CAP_FUNCTIONFS_SECLABEL]		= "functionfs_seclabel",
 	[POLICYDB_CAP_MEMFD_CLASS]			= "memfd_class",
+	[POLICYDB_CAP_BPF_TOKEN_PERMS]                  = "bpf_token_perms",
 };
 
 int sepol_polcap_getnum(const char *name)
Signature · 1 line
2.50.1
maintainer Acked-by on v2 1/1
#1 lore raw
Quoted 6 lines · Eric Suen

New policy capability 'bpf_token_perms' required by patch to support SELinux for BPF token control:
https://lore.kernel.org/selinux/[email protected]/

Will wait to merge until after the kernel patch is merged.

Quoted 36 lines

---
Changes in v2:
- Rebase to the latest changes

 libsepol/include/sepol/policydb/polcaps.h | 1 +
 libsepol/src/polcaps.c                    | 1 +
 2 files changed, 2 insertions(+)
libsepol/include/sepol/policydb/polcaps.h +1 -0
index 5a3fbdb4..ef529e76 100644
@@ -21,6 +21,7 @@ enum {
        POLICYDB_CAP_GENFS_SECLABEL_WILDCARD,
        POLICYDB_CAP_FUNCTIONFS_SECLABEL,
        POLICYDB_CAP_MEMFD_CLASS,
+       POLICYDB_CAP_BPF_TOKEN_PERMS,
        __POLICYDB_CAP_MAX
 };
 #define POLICYDB_CAP_MAX (__POLICYDB_CAP_MAX - 1)
libsepol/src/polcaps.c +1 -1
index 526f35ed..31b52d70 100644
@@ -20,6 +20,7 @@ static const char * const polcap_names[POLICYDB_CAP_MAX + 1] = {
        [POLICYDB_CAP_GENFS_SECLABEL_WILDCARD]          = "genfs_seclabel_wildcard",
        [POLICYDB_CAP_FUNCTIONFS_SECLABEL]              = "functionfs_seclabel",
        [POLICYDB_CAP_MEMFD_CLASS]                      = "memfd_class",
+       [POLICYDB_CAP_BPF_TOKEN_PERMS]                  = "bpf_token_perms",
 };
 
 int sepol_polcap_getnum(const char *name)
--

2.50.1

#2 lore raw
In reply to Eric Suen
Quoted 5 lines · Eric Suen

New policy capability 'bpf_token_perms' required by patch to support SELinux for BPF token control:
https://lore.kernel.org/selinux/[email protected]/

Thanks, merged.
As discussed in the recent maintainer call, this will be in the 3.10 release soon.

wkr,
Jason

Quoted 36 lines

---
Changes in v2:
- Rebase to the latest changes

 libsepol/include/sepol/policydb/polcaps.h | 1 +
 libsepol/src/polcaps.c                    | 1 +
 2 files changed, 2 insertions(+)
libsepol/include/sepol/policydb/polcaps.h +1 -0
index 5a3fbdb4..ef529e76 100644
@@ -21,6 +21,7 @@ enum {
 	POLICYDB_CAP_GENFS_SECLABEL_WILDCARD,
 	POLICYDB_CAP_FUNCTIONFS_SECLABEL,
 	POLICYDB_CAP_MEMFD_CLASS,
+	POLICYDB_CAP_BPF_TOKEN_PERMS,
 	__POLICYDB_CAP_MAX
 };
 #define POLICYDB_CAP_MAX (__POLICYDB_CAP_MAX - 1)
libsepol/src/polcaps.c +1 -0
index 526f35ed..31b52d70 100644
@@ -20,6 +20,7 @@ static const char * const polcap_names[POLICYDB_CAP_MAX + 1] = {
 	[POLICYDB_CAP_GENFS_SECLABEL_WILDCARD]		= "genfs_seclabel_wildcard",
 	[POLICYDB_CAP_FUNCTIONFS_SECLABEL]		= "functionfs_seclabel",
 	[POLICYDB_CAP_MEMFD_CLASS]			= "memfd_class",
+	[POLICYDB_CAP_BPF_TOKEN_PERMS]                  = "bpf_token_perms",
 };
 
 int sepol_polcap_getnum(const char *name)
Signature · 1 line
2.50.1
author
#3 lore raw
Quoted 5 lines · Jason Zaman
Quoted 4 lines · Eric Suen

New policy capability 'bpf_token_perms' required by patch to support SELinux for BPF token control:

   https://lore.kernel.org/selinux/[email protected]/
Quoted 7 lines
Quoted 1 line

Thanks, merged.
As discussed in the recent maintainer call, this will be in the 3.10 release soon.

wkr,
Jason

Thanks a lot, Jason.

Quoted 36 lines
Quoted 36 lines

---
Changes in v2:
- Rebase to the latest changes

  libsepol/include/sepol/policydb/polcaps.h | 1 +
  libsepol/src/polcaps.c                    | 1 +
  2 files changed, 2 insertions(+)
libsepol/include/sepol/policydb/polcaps.h +1 -0
index 5a3fbdb4..ef529e76 100644
@@ -21,6 +21,7 @@ enum {
  	POLICYDB_CAP_GENFS_SECLABEL_WILDCARD,
  	POLICYDB_CAP_FUNCTIONFS_SECLABEL,
  	POLICYDB_CAP_MEMFD_CLASS,
+	POLICYDB_CAP_BPF_TOKEN_PERMS,
  	__POLICYDB_CAP_MAX
  };
  #define POLICYDB_CAP_MAX (__POLICYDB_CAP_MAX - 1)
libsepol/src/polcaps.c +1 -0
index 526f35ed..31b52d70 100644
@@ -20,6 +20,7 @@ static const char * const polcap_names[POLICYDB_CAP_MAX + 1] = {
  	[POLICYDB_CAP_GENFS_SECLABEL_WILDCARD]		= "genfs_seclabel_wildcard",
  	[POLICYDB_CAP_FUNCTIONFS_SECLABEL]		= "functionfs_seclabel",
  	[POLICYDB_CAP_MEMFD_CLASS]			= "memfd_class",
+	[POLICYDB_CAP_BPF_TOKEN_PERMS]                  = "bpf_token_perms",
  };
 
  int sepol_polcap_getnum(const char *name)
Signature · 1 line
2.50.1