From: Greg Kroah-Hartman Date: Tue, 18 Oct 2022 06:36:22 +0000 (+0200) Subject: drop queue-5.10/fs-security-add-sb_delete-hook.patch X-Git-Tag: v6.0.3~85 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4b3f142e4410e3332fdc1789305fae99336a8a0c;p=thirdparty%2Fkernel%2Fstable-queue.git drop queue-5.10/fs-security-add-sb_delete-hook.patch --- diff --git a/queue-5.10/fs-security-add-sb_delete-hook.patch b/queue-5.10/fs-security-add-sb_delete-hook.patch deleted file mode 100644 index a190c62ff6c..00000000000 --- a/queue-5.10/fs-security-add-sb_delete-hook.patch +++ /dev/null @@ -1,117 +0,0 @@ -From d46fe169d6c766a600e6037e8fa87ac94d0f8bd8 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 22 Apr 2021 17:41:16 +0200 -Subject: fs,security: Add sb_delete hook -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Mickaël Salaün - -[ Upstream commit 83e804f0bfee2247b1c0aa64845c81a38562da7a ] - -The sb_delete security hook is called when shutting down a superblock, -which may be useful to release kernel objects tied to the superblock's -lifetime (e.g. inodes). - -This new hook is needed by Landlock to release (ephemerally) tagged -struct inodes. This comes from the unprivileged nature of Landlock -described in the next commit. - -Cc: Al Viro -Cc: James Morris -Signed-off-by: Mickaël Salaün -Reviewed-by: Jann Horn -Acked-by: Serge Hallyn -Reviewed-by: Kees Cook -Link: https://lore.kernel.org/r/20210422154123.13086-7-mic@digikod.net -Signed-off-by: James Morris -Stable-dep-of: d7e7b9af104c ("fscrypt: stop using keyrings subsystem for fscrypt_master_key") -Signed-off-by: Sasha Levin ---- - fs/super.c | 1 + - include/linux/lsm_hook_defs.h | 1 + - include/linux/lsm_hooks.h | 3 +++ - include/linux/security.h | 4 ++++ - security/security.c | 5 +++++ - 5 files changed, 14 insertions(+) - -diff --git a/fs/super.c b/fs/super.c -index bae3fe80f852..705be5d0600e 100644 ---- a/fs/super.c -+++ b/fs/super.c -@@ -454,6 +454,7 @@ void generic_shutdown_super(struct super_block *sb) - evict_inodes(sb); - /* only nonzero refcount inodes can have marks */ - fsnotify_sb_delete(sb); -+ security_sb_delete(sb); - - if (sb->s_dio_done_wq) { - destroy_workqueue(sb->s_dio_done_wq); -diff --git a/include/linux/lsm_hook_defs.h b/include/linux/lsm_hook_defs.h -index d13631a5e908..d74ffcdc7be6 100644 ---- a/include/linux/lsm_hook_defs.h -+++ b/include/linux/lsm_hook_defs.h -@@ -59,6 +59,7 @@ LSM_HOOK(int, 0, fs_context_dup, struct fs_context *fc, - LSM_HOOK(int, -ENOPARAM, fs_context_parse_param, struct fs_context *fc, - struct fs_parameter *param) - LSM_HOOK(int, 0, sb_alloc_security, struct super_block *sb) -+LSM_HOOK(void, LSM_RET_VOID, sb_delete, struct super_block *sb) - LSM_HOOK(void, LSM_RET_VOID, sb_free_security, struct super_block *sb) - LSM_HOOK(void, LSM_RET_VOID, sb_free_mnt_opts, void *mnt_opts) - LSM_HOOK(int, 0, sb_eat_lsm_opts, char *orig, void **mnt_opts) -diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h -index 64cdf4d7bfb3..73abbdd94c13 100644 ---- a/include/linux/lsm_hooks.h -+++ b/include/linux/lsm_hooks.h -@@ -108,6 +108,9 @@ - * allocated. - * @sb contains the super_block structure to be modified. - * Return 0 if operation was successful. -+ * @sb_delete: -+ * Release objects tied to a superblock (e.g. inodes). -+ * @sb contains the super_block structure being released. - * @sb_free_security: - * Deallocate and clear the sb->s_security field. - * @sb contains the super_block structure to be modified. -diff --git a/include/linux/security.h b/include/linux/security.h -index e9b4b5410614..f37087d76913 100644 ---- a/include/linux/security.h -+++ b/include/linux/security.h -@@ -290,6 +290,7 @@ void security_bprm_committed_creds(struct linux_binprm *bprm); - int security_fs_context_dup(struct fs_context *fc, struct fs_context *src_fc); - int security_fs_context_parse_param(struct fs_context *fc, struct fs_parameter *param); - int security_sb_alloc(struct super_block *sb); -+void security_sb_delete(struct super_block *sb); - void security_sb_free(struct super_block *sb); - void security_free_mnt_opts(void **mnt_opts); - int security_sb_eat_lsm_opts(char *options, void **mnt_opts); -@@ -622,6 +623,9 @@ static inline int security_sb_alloc(struct super_block *sb) - return 0; - } - -+static inline void security_sb_delete(struct super_block *sb) -+{ } -+ - static inline void security_sb_free(struct super_block *sb) - { } - -diff --git a/security/security.c b/security/security.c -index 8ea826ea6167..771ec21a6e0b 100644 ---- a/security/security.c -+++ b/security/security.c -@@ -885,6 +885,11 @@ int security_sb_alloc(struct super_block *sb) - return call_int_hook(sb_alloc_security, 0, sb); - } - -+void security_sb_delete(struct super_block *sb) -+{ -+ call_void_hook(sb_delete, sb); -+} -+ - void security_sb_free(struct super_block *sb) - { - call_void_hook(sb_free_security, sb); --- -2.35.1 - diff --git a/queue-5.10/series b/queue-5.10/series index 54d1205724a..9bab94cba31 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -93,7 +93,6 @@ userfaultfd-open-userfaultfds-with-o_rdonly.patch sh-machvec-use-char-for-section-boundaries.patch mips-sgi-ip27-free-some-unused-memory.patch mips-sgi-ip27-fix-platform-device-leak-in-bridge_pla.patch -fs-security-add-sb_delete-hook.patch arm-9244-1-dump-fix-wrong-pg_level-in-walk_pmd.patch arm-9247-1-mm-set-readonly-for-mt_memory_ro-with-arm.patch objtool-preserve-special-st_shndx-indexes-in-elf_upd.patch