* [PATCH 01/18] ptrace: export ptrace_may_access
[not found] <20241001144306.1991001-1-mika.kuoppala@linux.intel.com>
@ 2024-10-01 14:42 ` Mika Kuoppala
0 siblings, 0 replies; only message in thread
From: Mika Kuoppala @ 2024-10-01 14:42 UTC (permalink / raw)
To: intel-xe
Cc: Mika Kuoppala, Oleg Nesterov, linux-kernel, Dave Airlie,
Lucas De Marchi, Matthew Brost, Andi Shyti, Joonas Lahtinen,
Maciej Patelczyk, Dominik Grzegorzek, Jonathan Cavitt,
Andi Shyti
xe driver would like to allow fine grained access control
for GDB debugger using ptrace. Without this export, the only
option would be to check for CAP_SYS_ADMIN.
The check intended for an ioctl to attach a GPU debugger
is similar to the ptrace use case: allow a calling process
to manipulate a target process if it has the necessary
capabilities or the same permissions, as described in
Documentation/process/adding-syscalls.rst.
Export ptrace_may_access function to allow GPU debugger to
have identical access control for debugger(s)
as a CPU debugger.
v2: proper commit message (Lucas)
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: linux-kernel@vger.kernel.org
Cc: Dave Airlie <airlied@redhat.com>
CC: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
CC: Andi Shyti <andi.shyti@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
CC: Maciej Patelczyk <maciej.patelczyk@linux.intel.com>
Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
---
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-10-01 14:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20241001144306.1991001-1-mika.kuoppala@linux.intel.com>
2024-10-01 14:42 ` [PATCH 01/18] ptrace: export ptrace_may_access Mika Kuoppala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®