Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755428AbbBUJv2 (ORCPT ); Sat, 21 Feb 2015 04:51:28 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:34820 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751946AbbBUJv0 (ORCPT ); Sat, 21 Feb 2015 04:51:26 -0500 Date: Sat, 21 Feb 2015 09:51:23 +0000 From: Al Viro To: Yoshinori Sato Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH v4 05/15] h8300: Process and signal Message-ID: <20150221095123.GV29656@ZenIV.linux.org.uk> References: <1424505239-7082-1-git-send-email-ysato@users.sourceforge.jp> <1424505239-7082-6-git-send-email-ysato@users.sourceforge.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1424505239-7082-6-git-send-email-ysato@users.sourceforge.jp> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1143 Lines: 34 On Sat, Feb 21, 2015 at 04:53:49PM +0900, Yoshinori Sato wrote: > +static inline void * > +get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) > +{ > + unsigned long usp; > + > + /* Default to using normal stack. */ > + usp = rdusp(); > + > + /* This is the X/Open sanctioned signal stack switching. */ > + if (ka->sa.sa_flags & SA_ONSTACK) { > + if (!sas_ss_flags(usp)) > + usp = current->sas_ss_sp + current->sas_ss_size; > + } Use sigsp(), please. Pass ksig to that sucker and it'll become return (void *)((sigsp(rdusp, ksig) - frame_size) & -8UL); > +static void do_signal(struct pt_regs *regs) > + * We want the common case to go fast, which > + * is why we may in certain cases get here from > + * kernel mode. Just return without doing anything > + * if so. > + */ > + if ((regs->ccr & 0x10)) > + return; Can we get there in kernel mode, actually? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/