linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] mm/migrate: Avoid possible unnecessary ptrace_may_access() call in kernel_move_pages()
@ 2020-08-20  2:18 linmiaohe
  2020-08-20 21:21 ` Kees Cook
  0 siblings, 1 reply; 3+ messages in thread
From: linmiaohe @ 2020-08-20  2:18 UTC (permalink / raw)
  To: Kees Cook
  Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org

Kees Cook <keescook@chromium.org> wrote:
>On Mon, Aug 17, 2020 at 07:59:33AM -0400, Miaohe Lin wrote:
>> 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 <louhongxiang@huawei.com>
>> 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.


^ permalink raw reply	[flat|nested] 3+ messages in thread
[parent not found: <20200817115933.44565-1-linmiaohe@huawei.com>]

end of thread, other threads:[~2020-08-20 21:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-20  2:18 [PATCH] mm/migrate: Avoid possible unnecessary ptrace_may_access() call in kernel_move_pages() linmiaohe
2020-08-20 21:21 ` Kees Cook
     [not found] <20200817115933.44565-1-linmiaohe@huawei.com>
2020-08-19 18:04 ` Kees Cook

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).