lkml.org 
[lkml]   [2018]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectNaming confusion and code comments for security_kernel_(post_)read_file
Date
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

\
 
 \ /
  Last update: 2018-09-26 02:48    [W:0.026 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site