Thread (2 messages) 2 messages, 2 authors, 2020-08-20

Re: [PATCH] mm/migrate: Avoid possible unnecessary ptrace_may_access() call in kernel_move_pages()

From: linmiaohe <linmiaohe@huawei.com>
Date: 2020-08-20 02:18:29
Also in: linux-mm, lkml

Kees Cook [off-list ref] wrote:
On Mon, Aug 17, 2020 at 07:59:33AM -0400, Miaohe Lin wrote:
quoted
There is no need to check if this process has the right to modify the 
specified process when they are same.

Signed-off-by: Hongxiang Lou <redacted>
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
NAK, please don't do this -- the ptrace and security hooks already do these kinds of self-introspection checks, and I'd like to keep a central place to perform these kinds of checks.
Many thanks for your reply.
We also avoid get_task_struct/ put_task_struct pair of atomic ops, rcu_lock, task_lock and so on this way.
Is there a specific problem you've encountered that this fixes?
I'am sorry but there's no specific problem. I do this mainly to skip the unnecessary ptrace and security hooks.
--
Kees Cook
Thanks again.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help