Re: [RFC PATCH v1 08/31] ARC: Fundamental ARCH data-types/defines

From: Jonas Bonn
Date: Thu Nov 08 2012 - 02:10:32 EST


On 7 November 2012 10:47, Vineet Gupta <Vineet.Gupta1@xxxxxxxxxxxx> wrote:
> diff --git a/arch/arc/include/asm/ptrace.h b/arch/arc/include/asm/ptrace.h
> new file mode 100644
> index 0000000..c178357
> --- /dev/null
> +++ b/arch/arc/include/asm/ptrace.h
> @@ -0,0 +1,120 @@
> +/* THE pt_regs: Defines how regs are saved during entry into kernel */
> +
> +struct pt_regs {

I'd recommend not exporting the pt_regs structure to userspace. This
struct is used heavily within the kernel and it's nice to have the
leeway to be able to modify it as things evolve. GDB doesn't need to
know about this struct anymore as it should be using regset's for any
recent architectures anyway, so it's the regset layout that should be
ABI stable instead of pt_regs.

You can check the openrisc architecture as an example of how to do this.

/Jonas
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/