 16f77de82f
			
		
	
	
	16f77de82f
	
	
	
		
			
			This reverts commiteec43a224c"MIPS: Save/restore MSA context around signals" and the MSA parts ofca750649e0"MIPS: kernel: signal: Prevent save/restore FPU context in user memory" (the restore path of which appears incorrect anyway...). The reverted patch took care not to break compatibility with userland users of struct sigcontext, but inadvertantly changed the offset of the uc_sigmask field of struct ucontext. Thus Linux v3.15 breaks the userland ABI. The MSA context will need to be saved via some other opt-in mechanism, but for now revert the change to reduce the fallout. This will have minimal impact upon use of MSA since the only supported CPU which includes it (the P5600) is 32-bit and therefore requires that the experimental CONFIG_MIPS_O32_FP64_SUPPORT Kconfig option be selected before the kernel will set FR=1 for a task, a requirement for MSA use. Thus the users of MSA are limited to known small groups of people & this patch won't be breaking any previously working MSA-using userland outside of experimental settings. [ralf@linux-mips.org: Fixed rejects.] Cc: stable@vger.kernel.org Reported-by: Joseph S. Myers <joseph@codesourcery.com> Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/7107/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
		
			
				
	
	
		
			78 lines
		
	
	
	
		
			2.1 KiB
			
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			78 lines
		
	
	
	
		
			2.1 KiB
			
		
	
	
	
		
			C
		
	
	
	
	
	
| /*
 | |
|  * This file is subject to the terms and conditions of the GNU General Public
 | |
|  * License.  See the file "COPYING" in the main directory of this archive
 | |
|  * for more details.
 | |
|  *
 | |
|  * Copyright (C) 1996, 1997, 1999 by Ralf Baechle
 | |
|  * Copyright (C) 1999 Silicon Graphics, Inc.
 | |
|  */
 | |
| #ifndef _UAPI_ASM_SIGCONTEXT_H
 | |
| #define _UAPI_ASM_SIGCONTEXT_H
 | |
| 
 | |
| #include <linux/types.h>
 | |
| #include <asm/sgidefs.h>
 | |
| 
 | |
| #if _MIPS_SIM == _MIPS_SIM_ABI32
 | |
| 
 | |
| /*
 | |
|  * Keep this struct definition in sync with the sigcontext fragment
 | |
|  * in arch/mips/tools/offset.c
 | |
|  */
 | |
| struct sigcontext {
 | |
| 	unsigned int		sc_regmask;	/* Unused */
 | |
| 	unsigned int		sc_status;	/* Unused */
 | |
| 	unsigned long long	sc_pc;
 | |
| 	unsigned long long	sc_regs[32];
 | |
| 	unsigned long long	sc_fpregs[32];
 | |
| 	unsigned int		sc_acx;		/* Was sc_ownedfp */
 | |
| 	unsigned int		sc_fpc_csr;
 | |
| 	unsigned int		sc_fpc_eir;	/* Unused */
 | |
| 	unsigned int		sc_used_math;
 | |
| 	unsigned int		sc_dsp;		/* dsp status, was sc_ssflags */
 | |
| 	unsigned long long	sc_mdhi;
 | |
| 	unsigned long long	sc_mdlo;
 | |
| 	unsigned long		sc_hi1;		/* Was sc_cause */
 | |
| 	unsigned long		sc_lo1;		/* Was sc_badvaddr */
 | |
| 	unsigned long		sc_hi2;		/* Was sc_sigset[4] */
 | |
| 	unsigned long		sc_lo2;
 | |
| 	unsigned long		sc_hi3;
 | |
| 	unsigned long		sc_lo3;
 | |
| };
 | |
| 
 | |
| #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
 | |
| 
 | |
| #if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32
 | |
| 
 | |
| #include <linux/posix_types.h>
 | |
| /*
 | |
|  * Keep this struct definition in sync with the sigcontext fragment
 | |
|  * in arch/mips/tools/offset.c
 | |
|  *
 | |
|  * Warning: this structure illdefined with sc_badvaddr being just an unsigned
 | |
|  * int so it was changed to unsigned long in 2.6.0-test1.  This may break
 | |
|  * binary compatibility - no prisoners.
 | |
|  * DSP ASE in 2.6.12-rc4.  Turn sc_mdhi and sc_mdlo into an array of four
 | |
|  * entries, add sc_dsp and sc_reserved for padding.  No prisoners.
 | |
|  */
 | |
| struct sigcontext {
 | |
| 	__u64	sc_regs[32];
 | |
| 	__u64	sc_fpregs[32];
 | |
| 	__u64	sc_mdhi;
 | |
| 	__u64	sc_hi1;
 | |
| 	__u64	sc_hi2;
 | |
| 	__u64	sc_hi3;
 | |
| 	__u64	sc_mdlo;
 | |
| 	__u64	sc_lo1;
 | |
| 	__u64	sc_lo2;
 | |
| 	__u64	sc_lo3;
 | |
| 	__u64	sc_pc;
 | |
| 	__u32	sc_fpc_csr;
 | |
| 	__u32	sc_used_math;
 | |
| 	__u32	sc_dsp;
 | |
| 	__u32	sc_reserved;
 | |
| };
 | |
| 
 | |
| 
 | |
| #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */
 | |
| 
 | |
| #endif /* _UAPI_ASM_SIGCONTEXT_H */
 |