Message ID | 20200430155240.68748-1-kpsingh@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [bpf] security: Fix the default value of fs_context_parse_param hook | expand |
On Thu, 30 Apr 2020, KP Singh wrote: > From: KP Singh <kpsingh@google.com> > Applied to: git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git for-v5.7
On 30/04/2020 18:52, KP Singh wrote: > This was noticed when lsm=bpf is supplied on the command line before any > other LSM. As the bpf lsm uses this default value to implement a default > hook, this resulted in a failure to parse any fs_context parameters and > a failure to mount the root filesystem. Tested-by: Mikko Ylinen <mikko.ylinen@linux.intel.com>
On Thu, Apr 30, 2020 at 8:46 PM James Morris <jmorris@namei.org> wrote: > > On Thu, 30 Apr 2020, KP Singh wrote: > > > From: KP Singh <kpsingh@google.com> > > > > Applied to: > git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git for-v5.7 > James, could you please send PR to Linus this week to make sure the fix makes it into the next -rc ? Few other people reported issues that are fixed by this patch. Thanks!
diff --git a/include/linux/lsm_hook_defs.h b/include/linux/lsm_hook_defs.h index 9cd4455528e5..1bdd027766d4 100644 --- a/include/linux/lsm_hook_defs.h +++ b/include/linux/lsm_hook_defs.h @@ -55,7 +55,7 @@ LSM_HOOK(void, LSM_RET_VOID, bprm_committing_creds, struct linux_binprm *bprm) LSM_HOOK(void, LSM_RET_VOID, bprm_committed_creds, struct linux_binprm *bprm) LSM_HOOK(int, 0, fs_context_dup, struct fs_context *fc, struct fs_context *src_sc) -LSM_HOOK(int, 0, fs_context_parse_param, 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_free_security, struct super_block *sb)