[PATCH 04/21] kernel: export ptrace_may_access
Lucas De Marchi
lucas.demarchi at intel.com
Mon Jul 29 18:56:59 UTC 2024
On Fri, Jul 26, 2024 at 05:08:01PM GMT, Mika Kuoppala wrote:
>We need to export ptrace_may_access to be able to
>allow debugger connection to check for debuggee access and
>at the same time allow xe.ko module build.
I don't follow this explanation, particularly this last line.
Based on other patches you want to export the function because it would
cause the calling process to manipulate another process. Like described
in Documentation/process/adding-syscalls.rst.
The reason to export this function is that this comes as an ioctl to the
xe driver, which may be built as a module.
>
>CC: Lucas De Marchi <lucas.demarchi at intel.com>
>Signed-off-by: Mika Kuoppala <mika.kuoppala at linux.intel.com>
>CC: Andi Shyti <andi.shyti at intel.com>
>CC: Maciej Patelczyk <maciej.patelczyk at linux.intel.com>
>Signed-off-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
$ ./scripts/get_maintainer.pl kernel/ptrace.c
Oleg Nesterov <oleg at redhat.com> (maintainer:PTRACE SUPPORT)
linux-kernel at vger.kernel.org (open list)
and I don't see these Cc'ed. Also the commit title should likely start
with "ptrace:" rather than "kernel:"
Lucas De Marchi
>---
> kernel/ptrace.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/kernel/ptrace.c b/kernel/ptrace.c
>index d5f89f9ef29f..86be1805ebd8 100644
>--- a/kernel/ptrace.c
>+++ b/kernel/ptrace.c
>@@ -354,6 +354,7 @@ bool ptrace_may_access(struct task_struct *task, unsigned int mode)
> task_unlock(task);
> return !err;
> }
>+EXPORT_SYMBOL_GPL(ptrace_may_access);
>
> static int check_ptrace_options(unsigned long data)
> {
>--
>2.34.1
>
More information about the Intel-xe
mailing list