module: Refactor section attr into bin attribute
commit0d5d9413a692a2cc0f8848c6d93d7c487caececf
authorKees Cook <keescook@chromium.org>
Thu, 2 Jul 2020 20:47:20 +0000 (2 13:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Jul 2020 06:16:44 +0000 (16 08:16 +0200)
tree5b70c71c2f7cb41c350b6bd3216839ec533ed304
parent2a6c8d3d0dd0204fd38f302c3822e7bbb0613f24
module: Refactor section attr into bin attribute

commit ed66f991bb19d94cae5d38f77de81f96aac7813f upstream.

In order to gain access to the open file's f_cred for kallsym visibility
permission checks, refactor the module section attributes to use the
bin_attribute instead of attribute interface. Additionally removes the
redundant "name" struct member.

Cc: stable@vger.kernel.org
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Jessica Yu <jeyu@kernel.org>
Acked-by: Jessica Yu <jeyu@kernel.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/module.c