Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1667643

Re: [RFC PATCH 7/7 v1]powerpc: Deliver SEGV signal on protection key violation.

From Michael Ellerman <mpe@ellerman.id.au>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 7/7 v1]powerpc: Deliver SEGV signal on protection key violation.
Date 2017-06-16 13:20 +0200
Message-ID <tSXsd-7J2-3@gated-at.bofh.it> (permalink)
References <tPbaq-1V1-3@gated-at.bofh.it> <tPbar-1V1-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Ram Pai <linuxram@us.ibm.com> writes:
> diff --git a/arch/powerpc/include/uapi/asm/ptrace.h b/arch/powerpc/include/uapi/asm/ptrace.h
> index 8036b38..109d0c2 100644
> --- a/arch/powerpc/include/uapi/asm/ptrace.h
> +++ b/arch/powerpc/include/uapi/asm/ptrace.h
> @@ -49,6 +49,8 @@ struct pt_regs {
>  	unsigned long dar;		/* Fault registers */
>  	unsigned long dsisr;		/* on 4xx/Book-E used for ESR */
>  	unsigned long result;		/* Result of a system call */
> +	unsigned long dscr;		/* contents of the DSCR register */
> +	unsigned long amr;		/* contents of AMR register */
>  };

You can't change pt_regs, it's ABI.

> @@ -109,7 +111,8 @@ struct pt_regs {
>  #define PT_DSISR 42
>  #define PT_RESULT 43
>  #define PT_DSCR 44
> -#define PT_REGS_COUNT 44
> +#define PT_AMR 45
> +#define PT_REGS_COUNT 45

You can add PT_AMR, but it has to be synthetic like DSCR, ie. not
actually in pt_regs but available via ptrace.

But do we want to do that? How does the x86 code export the key(s) of a
process? Or doesn't it?

cheers

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [RFC PATCH 7/7 v1]powerpc: Deliver SEGV signal on protection key violation. Michael Ellerman <mpe@ellerman.id.au> - 2017-06-16 13:20 +0200
  Re: [RFC PATCH 7/7 v1]powerpc: Deliver SEGV signal on protection key  violation. Ram Pai <linuxram@us.ibm.com> - 2017-06-16 21:40 +0200

csiph-web