summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorMickaël Salaün <mic@digikod.net>2025-03-18 17:14:36 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-20 10:15:55 +0200
commit9b0d24fa64cae26ef49dd7a2c4a3531ea03b85f9 (patch)
tree541e4fd819c2241df17a96ef39d761067fcdd639 /security
parent7bc5c360375d28ba5ef6298b0d53e735c81d66a1 (diff)
downloadlinux-9b0d24fa64cae26ef49dd7a2c4a3531ea03b85f9.tar.gz
linux-9b0d24fa64cae26ef49dd7a2c4a3531ea03b85f9.tar.bz2
linux-9b0d24fa64cae26ef49dd7a2c4a3531ea03b85f9.zip
landlock: Move code to ease future backports
commit 624f177d8f62032b4f3343c289120269645cec37 upstream. To ease backports in setup.c, let's group changes from __lsm_ro_after_init to __ro_after_init with commit f22f9aaf6c3d ("selinux: remove the runtime disable functionality"), and the landlock_lsmid addition with commit f3b8788cde61 ("LSM: Identify modules by more than name"). That will help to backport the following errata. Cc: Günther Noack <gnoack@google.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250318161443.279194-2-mic@digikod.net Fixes: f3b8788cde61 ("LSM: Identify modules by more than name") Signed-off-by: Mickaël Salaün <mic@digikod.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security')
-rw-r--r--security/landlock/setup.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/security/landlock/setup.c b/security/landlock/setup.c
index 28519a45b11f..c71832a8e369 100644
--- a/security/landlock/setup.c
+++ b/security/landlock/setup.c
@@ -19,6 +19,11 @@
bool landlock_initialized __ro_after_init = false;
+const struct lsm_id landlock_lsmid = {
+ .name = LANDLOCK_NAME,
+ .id = LSM_ID_LANDLOCK,
+};
+
struct lsm_blob_sizes landlock_blob_sizes __ro_after_init = {
.lbs_cred = sizeof(struct landlock_cred_security),
.lbs_file = sizeof(struct landlock_file_security),
@@ -26,11 +31,6 @@ struct lsm_blob_sizes landlock_blob_sizes __ro_after_init = {
.lbs_superblock = sizeof(struct landlock_superblock_security),
};
-const struct lsm_id landlock_lsmid = {
- .name = LANDLOCK_NAME,
- .id = LSM_ID_LANDLOCK,
-};
-
static int __init landlock_init(void)
{
landlock_add_cred_hooks();