Skip to contentSkip to conversation

RFC: ptrace: Enabling PTRACE_{GET,SET}REGSET calls without CONFIG_HAVE_ARCH_TRACEHOOK

DISCUSSION Dave Martin 1 participant 1 message Apr 1, 2011

lore
Share & tools
lore
#0 lore raw

Hi all,

I notice in kernel/ptrace.c that the generic regset ptrace calls PTRACE_GETREGSET and PTRACE_SETREGSET are predicated on CONFIG_HAVE_ARCH_TRACEHOOK.

However, if I'm reading the code correctly then all these calls really depend on is regsets implemented in the target arch.

Since I'm separately proposing a regsets implementation for ARM, it would be nice to enable these ptrace calls; but I don't think we're ready to enable CONFIG_HAVE_ARCH_TRACEHOOK there for now.

Does anyone know whether it would be safe/straightforward to change the #ifdef in kernel/ptrace.c to something else, such as CORE_DUMP_USE_REGSET? I think all arches which implement regsets define this, though I haven't researched this thoroughly.

Any views welcome.

Cheers
---Dave