linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Naming confusion and code comments for security_kernel_(post_)read_file
@ 2018-09-26  0:47 TongZhang
  0 siblings, 0 replies; only message in thread
From: TongZhang @ 2018-09-26  0:47 UTC (permalink / raw)
  To: linux-security-module

When we were doing code review, we found and feel that the current name and 
description of security_kernel_read_file and security_kernel_post_read_file, 
and corresponding document/code comment in include/linux/lsm_hooks.h is
confusing and kind of misleading as we discovered that security_kernel_(post_)read_file and kernel_read() do not always in appear in pair.

security_kerne(post_)read_file is only interested in checking firmware/kernel module/policy file etc, however, kernel_read() are used in other places in which the parameters are also specified by userspace. For example, kernel_read() is used in https://elixir.bootlin.com/linux/latest/source/arch/x86/ia32/ia32_aout.c#L413

We suggest that it might be better to fixing the code comment as well as 
the function naming and it may help clarify the purpose of this LSM hook function.

- Tong

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-09-26  0:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-26  0:47 Naming confusion and code comments for security_kernel_(post_)read_file TongZhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).