module: Refactor section attr into bin attribute
authorKees Cook <keescook@chromium.org>
Thu, 2 Jul 2020 20:47:20 +0000 (13:47 -0700)
committerKees Cook <keescook@chromium.org>
Wed, 8 Jul 2020 23:00:17 +0000 (16:00 -0700)
commited66f991bb19d94cae5d38f77de81f96aac7813f
tree621a73d7bc1c207fb11e9724e2e1cfff438aeacd
parent160251842cd35a75edfb0a1d76afa3eb674ff40a
module: Refactor section attr into bin attribute

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>
kernel/module.c