All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] signals, ia64, mips: update arch-specific siginfos with pkeys field
@ 2016-02-17 18:17 ` Dave Hansen
  0 siblings, 0 replies; 7+ messages in thread
From: Dave Hansen @ 2016-02-17 18:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-mm, x86, Dave Hansen, dave.hansen, linux-mips, linux-ia64


This fixes a compile error that Ingo was hitting with MIPS when the
x86 pkeys patch set is applied.

ia64 and mips have separate definitions for siginfo from the
generic one.  Patch them to have the pkey fields.

Note that this is exactly what we did for MPX as well.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: linux-mips@linux-mips.org
Cc: linux-ia64@vger.kernel.org
---

 b/arch/ia64/include/uapi/asm/siginfo.h |   13 +++++++++----
 b/arch/mips/include/uapi/asm/siginfo.h |   13 +++++++++----
 2 files changed, 18 insertions(+), 8 deletions(-)

diff -puN arch/ia64/include/uapi/asm/siginfo.h~pkeys-09-1-siginfo-for-mips-ia64 arch/ia64/include/uapi/asm/siginfo.h
--- a/arch/ia64/include/uapi/asm/siginfo.h~pkeys-09-1-siginfo-for-mips-ia64	2016-02-17 09:32:06.001815266 -0800
+++ b/arch/ia64/include/uapi/asm/siginfo.h	2016-02-17 09:32:06.010815672 -0800
@@ -63,10 +63,15 @@ typedef struct siginfo {
 			unsigned int _flags;	/* see below */
 			unsigned long _isr;	/* isr */
 			short _addr_lsb;	/* lsb of faulting address */
-			struct {
-				void __user *_lower;
-				void __user *_upper;
-			} _addr_bnd;
+			union {
+				/* used when si_code=SEGV_BNDERR */
+				struct {
+					void __user *_lower;
+					void __user *_upper;
+				} _addr_bnd;
+				/* used when si_code=SEGV_PKUERR */
+				u64 _pkey;
+			};
 		} _sigfault;
 
 		/* SIGPOLL */
diff -puN arch/mips/include/uapi/asm/siginfo.h~pkeys-09-1-siginfo-for-mips-ia64 arch/mips/include/uapi/asm/siginfo.h
--- a/arch/mips/include/uapi/asm/siginfo.h~pkeys-09-1-siginfo-for-mips-ia64	2016-02-17 09:32:06.003815357 -0800
+++ b/arch/mips/include/uapi/asm/siginfo.h	2016-02-17 09:32:06.010815672 -0800
@@ -86,10 +86,15 @@ typedef struct siginfo {
 			int _trapno;	/* TRAP # which caused the signal */
 #endif
 			short _addr_lsb;
-			struct {
-				void __user *_lower;
-				void __user *_upper;
-			} _addr_bnd;
+			union {
+				/* used when si_code=SEGV_BNDERR */
+				struct {
+					void __user *_lower;
+					void __user *_upper;
+				} _addr_bnd;
+				/* used when si_code=SEGV_PKUERR */
+				u64 _pkey;
+			};
 		} _sigfault;
 
 		/* SIGPOLL, SIGXFSZ (To do ...)	 */
_

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] signals, ia64, mips: update arch-specific siginfos with pkeys field
@ 2016-02-17 18:17 ` Dave Hansen
  0 siblings, 0 replies; 7+ messages in thread
From: Dave Hansen @ 2016-02-17 18:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-mm, x86, Dave Hansen, dave.hansen, linux-mips, linux-ia64


This fixes a compile error that Ingo was hitting with MIPS when the
x86 pkeys patch set is applied.

ia64 and mips have separate definitions for siginfo from the
generic one.  Patch them to have the pkey fields.

Note that this is exactly what we did for MPX as well.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: linux-mips@linux-mips.org
Cc: linux-ia64@vger.kernel.org
---

 b/arch/ia64/include/uapi/asm/siginfo.h |   13 +++++++++----
 b/arch/mips/include/uapi/asm/siginfo.h |   13 +++++++++----
 2 files changed, 18 insertions(+), 8 deletions(-)

diff -puN arch/ia64/include/uapi/asm/siginfo.h~pkeys-09-1-siginfo-for-mips-ia64 arch/ia64/include/uapi/asm/siginfo.h
--- a/arch/ia64/include/uapi/asm/siginfo.h~pkeys-09-1-siginfo-for-mips-ia64	2016-02-17 09:32:06.001815266 -0800
+++ b/arch/ia64/include/uapi/asm/siginfo.h	2016-02-17 09:32:06.010815672 -0800
@@ -63,10 +63,15 @@ typedef struct siginfo {
 			unsigned int _flags;	/* see below */
 			unsigned long _isr;	/* isr */
 			short _addr_lsb;	/* lsb of faulting address */
-			struct {
-				void __user *_lower;
-				void __user *_upper;
-			} _addr_bnd;
+			union {
+				/* used when si_code=SEGV_BNDERR */
+				struct {
+					void __user *_lower;
+					void __user *_upper;
+				} _addr_bnd;
+				/* used when si_code=SEGV_PKUERR */
+				u64 _pkey;
+			};
 		} _sigfault;
 
 		/* SIGPOLL */
diff -puN arch/mips/include/uapi/asm/siginfo.h~pkeys-09-1-siginfo-for-mips-ia64 arch/mips/include/uapi/asm/siginfo.h
--- a/arch/mips/include/uapi/asm/siginfo.h~pkeys-09-1-siginfo-for-mips-ia64	2016-02-17 09:32:06.003815357 -0800
+++ b/arch/mips/include/uapi/asm/siginfo.h	2016-02-17 09:32:06.010815672 -0800
@@ -86,10 +86,15 @@ typedef struct siginfo {
 			int _trapno;	/* TRAP # which caused the signal */
 #endif
 			short _addr_lsb;
-			struct {
-				void __user *_lower;
-				void __user *_upper;
-			} _addr_bnd;
+			union {
+				/* used when si_code=SEGV_BNDERR */
+				struct {
+					void __user *_lower;
+					void __user *_upper;
+				} _addr_bnd;
+				/* used when si_code=SEGV_PKUERR */
+				u64 _pkey;
+			};
 		} _sigfault;
 
 		/* SIGPOLL, SIGXFSZ (To do ...)	 */
_

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] signals, ia64, mips: update arch-specific siginfos with pkeys field
@ 2016-02-17 18:17 ` Dave Hansen
  0 siblings, 0 replies; 7+ messages in thread
From: Dave Hansen @ 2016-02-17 18:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-mm, x86, Dave Hansen, dave.hansen, linux-mips, linux-ia64


This fixes a compile error that Ingo was hitting with MIPS when the
x86 pkeys patch set is applied.

ia64 and mips have separate definitions for siginfo from the
generic one.  Patch them to have the pkey fields.

Note that this is exactly what we did for MPX as well.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: linux-mips@linux-mips.org
Cc: linux-ia64@vger.kernel.org
---

 b/arch/ia64/include/uapi/asm/siginfo.h |   13 +++++++++----
 b/arch/mips/include/uapi/asm/siginfo.h |   13 +++++++++----
 2 files changed, 18 insertions(+), 8 deletions(-)

diff -puN arch/ia64/include/uapi/asm/siginfo.h~pkeys-09-1-siginfo-for-mips-ia64 arch/ia64/include/uapi/asm/siginfo.h
--- a/arch/ia64/include/uapi/asm/siginfo.h~pkeys-09-1-siginfo-for-mips-ia64	2016-02-17 09:32:06.001815266 -0800
+++ b/arch/ia64/include/uapi/asm/siginfo.h	2016-02-17 09:32:06.010815672 -0800
@@ -63,10 +63,15 @@ typedef struct siginfo {
 			unsigned int _flags;	/* see below */
 			unsigned long _isr;	/* isr */
 			short _addr_lsb;	/* lsb of faulting address */
-			struct {
-				void __user *_lower;
-				void __user *_upper;
-			} _addr_bnd;
+			union {
+				/* used when si_code=SEGV_BNDERR */
+				struct {
+					void __user *_lower;
+					void __user *_upper;
+				} _addr_bnd;
+				/* used when si_code=SEGV_PKUERR */
+				u64 _pkey;
+			};
 		} _sigfault;
 
 		/* SIGPOLL */
diff -puN arch/mips/include/uapi/asm/siginfo.h~pkeys-09-1-siginfo-for-mips-ia64 arch/mips/include/uapi/asm/siginfo.h
--- a/arch/mips/include/uapi/asm/siginfo.h~pkeys-09-1-siginfo-for-mips-ia64	2016-02-17 09:32:06.003815357 -0800
+++ b/arch/mips/include/uapi/asm/siginfo.h	2016-02-17 09:32:06.010815672 -0800
@@ -86,10 +86,15 @@ typedef struct siginfo {
 			int _trapno;	/* TRAP # which caused the signal */
 #endif
 			short _addr_lsb;
-			struct {
-				void __user *_lower;
-				void __user *_upper;
-			} _addr_bnd;
+			union {
+				/* used when si_code=SEGV_BNDERR */
+				struct {
+					void __user *_lower;
+					void __user *_upper;
+				} _addr_bnd;
+				/* used when si_code=SEGV_PKUERR */
+				u64 _pkey;
+			};
 		} _sigfault;
 
 		/* SIGPOLL, SIGXFSZ (To do ...)	 */
_

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] signals, ia64, mips: update arch-specific siginfos with pkeys field
  2016-02-17 18:17 ` Dave Hansen
  (?)
@ 2016-02-18 10:15   ` Ingo Molnar
  -1 siblings, 0 replies; 7+ messages in thread
From: Ingo Molnar @ 2016-02-18 10:15 UTC (permalink / raw)
  To: Dave Hansen
  Cc: linux-kernel, linux-mm, x86, dave.hansen, linux-mips, linux-ia64


* Dave Hansen <dave@sr71.net> wrote:

> 
> This fixes a compile error that Ingo was hitting with MIPS when the
> x86 pkeys patch set is applied.
> 
> ia64 and mips have separate definitions for siginfo from the
> generic one.  Patch them to have the pkey fields.
> 
> Note that this is exactly what we did for MPX as well.
> 
> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: linux-mips@linux-mips.org
> Cc: linux-ia64@vger.kernel.org
> ---
> 
>  b/arch/ia64/include/uapi/asm/siginfo.h |   13 +++++++++----
>  b/arch/mips/include/uapi/asm/siginfo.h |   13 +++++++++----
>  2 files changed, 18 insertions(+), 8 deletions(-)

This solved the MIPS and IA64 build problems, but there's still one bug left: UML 
does not build:

 /home/mingo/tip/mm/gup.c: In function ‘check_vma_flags’:
 /home/mingo/tip/mm/gup.c:456:2: error: implicit declaration of function ‘arch_vma_access_permitted’ [-Werror=implicit-function-declaration]
   if (!arch_vma_access_permitted(vma, write, false, foreign))
 [...]

Please send a delta patch for this too.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] signals, ia64, mips: update arch-specific siginfos with pkeys field
@ 2016-02-18 10:15   ` Ingo Molnar
  0 siblings, 0 replies; 7+ messages in thread
From: Ingo Molnar @ 2016-02-18 10:15 UTC (permalink / raw)
  To: Dave Hansen
  Cc: linux-kernel, linux-mm, x86, dave.hansen, linux-mips, linux-ia64


* Dave Hansen <dave@sr71.net> wrote:

> 
> This fixes a compile error that Ingo was hitting with MIPS when the
> x86 pkeys patch set is applied.
> 
> ia64 and mips have separate definitions for siginfo from the
> generic one.  Patch them to have the pkey fields.
> 
> Note that this is exactly what we did for MPX as well.
> 
> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: linux-mips@linux-mips.org
> Cc: linux-ia64@vger.kernel.org
> ---
> 
>  b/arch/ia64/include/uapi/asm/siginfo.h |   13 +++++++++----
>  b/arch/mips/include/uapi/asm/siginfo.h |   13 +++++++++----
>  2 files changed, 18 insertions(+), 8 deletions(-)

This solved the MIPS and IA64 build problems, but there's still one bug left: UML 
does not build:

 /home/mingo/tip/mm/gup.c: In function a??check_vma_flagsa??:
 /home/mingo/tip/mm/gup.c:456:2: error: implicit declaration of function a??arch_vma_access_permitteda?? [-Werror=implicit-function-declaration]
   if (!arch_vma_access_permitted(vma, write, false, foreign))
 [...]

Please send a delta patch for this too.

Thanks,

	Ingo

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] signals, ia64, mips: update arch-specific siginfos with pkeys field
@ 2016-02-18 10:15   ` Ingo Molnar
  0 siblings, 0 replies; 7+ messages in thread
From: Ingo Molnar @ 2016-02-18 10:15 UTC (permalink / raw)
  To: Dave Hansen
  Cc: linux-kernel, linux-mm, x86, dave.hansen, linux-mips, linux-ia64


* Dave Hansen <dave@sr71.net> wrote:

> 
> This fixes a compile error that Ingo was hitting with MIPS when the
> x86 pkeys patch set is applied.
> 
> ia64 and mips have separate definitions for siginfo from the
> generic one.  Patch them to have the pkey fields.
> 
> Note that this is exactly what we did for MPX as well.
> 
> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: linux-mips@linux-mips.org
> Cc: linux-ia64@vger.kernel.org
> ---
> 
>  b/arch/ia64/include/uapi/asm/siginfo.h |   13 +++++++++----
>  b/arch/mips/include/uapi/asm/siginfo.h |   13 +++++++++----
>  2 files changed, 18 insertions(+), 8 deletions(-)

This solved the MIPS and IA64 build problems, but there's still one bug left: UML 
does not build:

 /home/mingo/tip/mm/gup.c: In function ‘check_vma_flags’:
 /home/mingo/tip/mm/gup.c:456:2: error: implicit declaration of function ‘arch_vma_access_permitted’ [-Werror=implicit-function-declaration]
   if (!arch_vma_access_permitted(vma, write, false, foreign))
 [...]

Please send a delta patch for this too.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [tip:mm/pkeys] signals, ia64, mips: Update arch-specific siginfos with pkeys field
  2016-02-17 18:17 ` Dave Hansen
                   ` (2 preceding siblings ...)
  (?)
@ 2016-02-18 20:20 ` tip-bot for Dave Hansen
  -1 siblings, 0 replies; 7+ messages in thread
From: tip-bot for Dave Hansen @ 2016-02-18 20:20 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: dave.hansen, linux-kernel, hpa, tglx, dave, peterz, fenghua.yu,
	mingo, ralf, torvalds, oss, tony.luck

Commit-ID:  b376cd0256f86db3078409dc51963b315c7843d8
Gitweb:     http://git.kernel.org/tip/b376cd0256f86db3078409dc51963b315c7843d8
Author:     Dave Hansen <dave@sr71.net>
AuthorDate: Wed, 17 Feb 2016 10:17:03 -0800
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 18 Feb 2016 09:32:42 +0100

signals, ia64, mips: Update arch-specific siginfos with pkeys field

ia64 and mips have separate definitions for siginfo from the
generic one.  Patch them to have the pkey fields.

Note that this is exactly what we did for MPX as well.

[ This fixes a compile error that Ingo was hitting with MIPS when the
  x86 pkeys patch set is applied. ]

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Dave Hansen <dave@sr71.net>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Petr Malat <oss@malat.biz>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-ia64@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/20160217181703.E99B6656@viggo.jf.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/ia64/include/uapi/asm/siginfo.h | 13 +++++++++----
 arch/mips/include/uapi/asm/siginfo.h | 13 +++++++++----
 2 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/arch/ia64/include/uapi/asm/siginfo.h b/arch/ia64/include/uapi/asm/siginfo.h
index bce9bc1..0151cfa 100644
--- a/arch/ia64/include/uapi/asm/siginfo.h
+++ b/arch/ia64/include/uapi/asm/siginfo.h
@@ -63,10 +63,15 @@ typedef struct siginfo {
 			unsigned int _flags;	/* see below */
 			unsigned long _isr;	/* isr */
 			short _addr_lsb;	/* lsb of faulting address */
-			struct {
-				void __user *_lower;
-				void __user *_upper;
-			} _addr_bnd;
+			union {
+				/* used when si_code=SEGV_BNDERR */
+				struct {
+					void __user *_lower;
+					void __user *_upper;
+				} _addr_bnd;
+				/* used when si_code=SEGV_PKUERR */
+				u64 _pkey;
+			};
 		} _sigfault;
 
 		/* SIGPOLL */
diff --git a/arch/mips/include/uapi/asm/siginfo.h b/arch/mips/include/uapi/asm/siginfo.h
index 2cb7fde..6f4edf0 100644
--- a/arch/mips/include/uapi/asm/siginfo.h
+++ b/arch/mips/include/uapi/asm/siginfo.h
@@ -86,10 +86,15 @@ typedef struct siginfo {
 			int _trapno;	/* TRAP # which caused the signal */
 #endif
 			short _addr_lsb;
-			struct {
-				void __user *_lower;
-				void __user *_upper;
-			} _addr_bnd;
+			union {
+				/* used when si_code=SEGV_BNDERR */
+				struct {
+					void __user *_lower;
+					void __user *_upper;
+				} _addr_bnd;
+				/* used when si_code=SEGV_PKUERR */
+				u64 _pkey;
+			};
 		} _sigfault;
 
 		/* SIGPOLL, SIGXFSZ (To do ...)	 */

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-02-18 20:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-17 18:17 [PATCH] signals, ia64, mips: update arch-specific siginfos with pkeys field Dave Hansen
2016-02-17 18:17 ` Dave Hansen
2016-02-17 18:17 ` Dave Hansen
2016-02-18 10:15 ` Ingo Molnar
2016-02-18 10:15   ` Ingo Molnar
2016-02-18 10:15   ` Ingo Molnar
2016-02-18 20:20 ` [tip:mm/pkeys] signals, ia64, mips: Update " tip-bot for Dave Hansen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.