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


Groups > linux.kernel > #1345116

[PATCH v2] signals, pkeys: make si_pkey 32 bits

From Stephen Rothwell <sfr@canb.auug.org.au>
Newsgroups linux.kernel
Subject [PATCH v2] signals, pkeys: make si_pkey 32 bits
Date 2016-02-28 00:50 +0100
Message-ID <r6WMy-1YM-5@gated-at.bofh.it> (permalink)
References (2 earlier) <r6yTU-1pV-13@gated-at.bofh.it> <r6LxL-2kH-1@gated-at.bofh.it> <r6Szf-7Cl-1@gated-at.bofh.it> <r6SSC-7LP-11@gated-at.bofh.it> <r6Wtc-1Rk-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


In order to prevent a change of alignment of the _sifields union in the
siginfo structure on (some) 32 bit platforms and an ABI breakage, we
change the type of _pkey to unsigned int.  If more bits are needed in
the future, a second unsigned int could be added.

Fixes: cd0ea35ff551 ("signals, pkeys: Notify userspace about protection key faults")
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/ia64/include/uapi/asm/siginfo.h | 2 +-
 arch/mips/include/uapi/asm/siginfo.h | 2 +-
 include/uapi/asm-generic/siginfo.h   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/ia64/include/uapi/asm/siginfo.h b/arch/ia64/include/uapi/asm/siginfo.h
index 0151cfab929d..19e7db0c9453 100644
--- a/arch/ia64/include/uapi/asm/siginfo.h
+++ b/arch/ia64/include/uapi/asm/siginfo.h
@@ -70,7 +70,7 @@ typedef struct siginfo {
 					void __user *_upper;
 				} _addr_bnd;
 				/* used when si_code=SEGV_PKUERR */
-				u64 _pkey;
+				unsigned int _pkey;
 			};
 		} _sigfault;
 
diff --git a/arch/mips/include/uapi/asm/siginfo.h b/arch/mips/include/uapi/asm/siginfo.h
index 6f4edf0d794c..3cc14f4a5936 100644
--- a/arch/mips/include/uapi/asm/siginfo.h
+++ b/arch/mips/include/uapi/asm/siginfo.h
@@ -93,7 +93,7 @@ typedef struct siginfo {
 					void __user *_upper;
 				} _addr_bnd;
 				/* used when si_code=SEGV_PKUERR */
-				u64 _pkey;
+				unsigned int _pkey;
 			};
 		} _sigfault;
 
diff --git a/include/uapi/asm-generic/siginfo.h b/include/uapi/asm-generic/siginfo.h
index 90384d55225b..f4459dc3d31b 100644
--- a/include/uapi/asm-generic/siginfo.h
+++ b/include/uapi/asm-generic/siginfo.h
@@ -98,7 +98,7 @@ typedef struct siginfo {
 					void __user *_upper;
 				} _addr_bnd;
 				/* used when si_code=SEGV_PKUERR */
-				u64 _pkey;
+				unsigned int _pkey;
 			};
 		} _sigfault;
 
-- 
2.7.0

-- 
Cheers,
Stephen Rothwell

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


Thread

[PATCH] x86, pkeys: fix siginfo ABI breakage from new field Dave Hansen <dave@sr71.net> - 2016-02-26 18:40 +0100
  Re: [PATCH] x86, pkeys: fix siginfo ABI breakage from new field "H. Peter Anvin" <hpa@zytor.com> - 2016-02-26 18:50 +0100
    Re: [PATCH] x86, pkeys: fix siginfo ABI breakage from new field Stephen Rothwell <sfr@canb.auug.org.au> - 2016-02-26 23:20 +0100
      Re: [PATCH] x86, pkeys: fix siginfo ABI breakage from new field Ingo Molnar <mingo@kernel.org> - 2016-02-27 12:50 +0100
        Re: [PATCH] x86, pkeys: fix siginfo ABI breakage from new field Dave Hansen <dave@sr71.net> - 2016-02-27 20:20 +0100
          Re: [PATCH] x86, pkeys: fix siginfo ABI breakage from new field "H. Peter Anvin" <hpa@zytor.com> - 2016-02-27 20:40 +0100
            Re: [PATCH] x86, pkeys: fix siginfo ABI breakage from new field Stephen Rothwell <sfr@canb.auug.org.au> - 2016-02-28 00:30 +0100
              [PATCH v2] signals, pkeys: make si_pkey 32 bits Stephen Rothwell <sfr@canb.auug.org.au> - 2016-02-28 00:50 +0100
                Re: [PATCH v2] signals, pkeys: make si_pkey 32 bits Ingo Molnar <mingo@kernel.org> - 2016-02-29 09:00 +0100
              Re: [PATCH] x86, pkeys: fix siginfo ABI breakage from new field Ingo Molnar <mingo@kernel.org> - 2016-02-29 09:10 +0100
                Re: [PATCH] x86, pkeys: fix siginfo ABI breakage from new field Stephen Rothwell <sfr@canb.auug.org.au> - 2016-03-01 00:00 +0100

csiph-web