module: Refactor section attr into bin attribute
authorKees Cook <keescook@chromium.org>
Thu, 2 Jul 2020 20:47:20 +0000 (13:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Jul 2020 06:13:29 +0000 (08:13 +0200)
commitbe163232ad51d8280f310bcf99429327ba8166e9
treeba1449ca4e97f7423b2ca4abe747214fa80e99a9
parent27801485039d491539d29c262e8927ccff6cf477
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