Messages in this thread | | | Date | Wed, 23 Dec 2020 08:53:07 +0100 | From | Christoph Hellwig <> | Subject | Re: Does uaccess_kernel() work for detecting kernel thread? |
| |
On Tue, Dec 22, 2020 at 11:39:08PM +0900, Tetsuo Handa wrote: > For example, if uaccess_kernel() is "false" due to CONFIG_SET_FS=n, > isn't sg_check_file_access() failing to detect kernel context?
sg_check_file_access does exactly the right thing - fail for all kernel threads as those can't support the magic it does.
> For another example, if uaccess_kernel() is "false" due to CONFIG_SET_FS=n, > isn't TOMOYO unexpectedly checking permissions for socket operations?
Can someone explain WTF TOMOYO is even doing there? A security module has absolutely no business checking what context it is called from, but must check the process credentials instead.
| |