* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: sparc32: Fix thinko in previous change. sparc: Align clone and signal stacks to 16 bytes.
···526526 * Set some valid stack frames to give to the child.527527 */528528 childstack = (struct sparc_stackf __user *)529529- (sp & ~0x7UL);529529+ (sp & ~0xfUL);530530 parentstack = (struct sparc_stackf __user *)531531 regs->u_regs[UREG_FP];532532
+4-4
arch/sparc/kernel/process_64.c
···398398 } else399399 __get_user(fp, &(((struct reg_window32 __user *)psp)->ins[6]));400400401401- /* Now 8-byte align the stack as this is mandatory in the402402- * Sparc ABI due to how register windows work. This hides403403- * the restriction from thread libraries etc. -DaveM401401+ /* Now align the stack as this is mandatory in the Sparc ABI402402+ * due to how register windows work. This hides the403403+ * restriction from thread libraries etc.404404 */405405- csp &= ~7UL;405405+ csp &= ~15UL;406406407407 distance = fp - psp;408408 rval = (csp - distance);
+6-4
arch/sparc/kernel/signal32.c
···120120};121121122122/* Align macros */123123-#define SF_ALIGNEDSZ (((sizeof(struct signal_frame32) + 7) & (~7)))124124-#define RT_ALIGNEDSZ (((sizeof(struct rt_signal_frame32) + 7) & (~7)))123123+#define SF_ALIGNEDSZ (((sizeof(struct signal_frame32) + 15) & (~15)))124124+#define RT_ALIGNEDSZ (((sizeof(struct rt_signal_frame32) + 15) & (~15)))125125126126int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)127127{···420420 sp = current->sas_ss_sp + current->sas_ss_size;421421 }422422423423+ sp -= framesize;424424+423425 /* Always align the stack frame. This handles two cases. First,424426 * sigaltstack need not be mindful of platform specific stack425427 * alignment. Second, if we took this signal because the stack426428 * is not aligned properly, we'd like to take the signal cleanly427429 * and report that.428430 */429429- sp &= ~7UL;431431+ sp &= ~15UL;430432431431- return (void __user *)(sp - framesize);433433+ return (void __user *) sp;432434}433435434436static int save_fpu_state32(struct pt_regs *regs, __siginfo_fpu_t __user *fpu)
+4-2
arch/sparc/kernel/signal_32.c
···267267 sp = current->sas_ss_sp + current->sas_ss_size;268268 }269269270270+ sp -= framesize;271271+270272 /* Always align the stack frame. This handles two cases. First,271273 * sigaltstack need not be mindful of platform specific stack272274 * alignment. Second, if we took this signal because the stack273275 * is not aligned properly, we'd like to take the signal cleanly274276 * and report that.275277 */276276- sp &= ~7UL;278278+ sp &= ~15UL;277279278278- return (void __user *)(sp - framesize);280280+ return (void __user *) sp;279281}280282281283static inline int
+5-3
arch/sparc/kernel/signal_64.c
···353353/* Checks if the fp is valid */354354static int invalid_frame_pointer(void __user *fp, int fplen)355355{356356- if (((unsigned long) fp) & 7)356356+ if (((unsigned long) fp) & 15)357357 return 1;358358 return 0;359359}···396396 sp = current->sas_ss_sp + current->sas_ss_size;397397 }398398399399+ sp -= framesize;400400+399401 /* Always align the stack frame. This handles two cases. First,400402 * sigaltstack need not be mindful of platform specific stack401403 * alignment. Second, if we took this signal because the stack402404 * is not aligned properly, we'd like to take the signal cleanly403405 * and report that.404406 */405405- sp &= ~7UL;407407+ sp &= ~15UL;406408407407- return (void __user *)(sp - framesize);409409+ return (void __user *) sp;408410}409411410412static inline void