Received: by 10.192.165.148 with SMTP id m20csp621388imm; Wed, 25 Apr 2018 05:16:14 -0700 (PDT) X-Google-Smtp-Source: AIpwx49STKweDAtKdkwwk5E7PVQU0EHkNKz0OEotV+IouCK0aEzffnU+T/x23bu9lssTcrn4bN3H X-Received: by 10.98.108.69 with SMTP id h66mr27740247pfc.43.1524658574716; Wed, 25 Apr 2018 05:16:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524658574; cv=none; d=google.com; s=arc-20160816; b=fBucGqq2xatsxbkdl76qzvDa6FwLpX+PNwSPgHMVuR7aH+ybD4pOBUfz1uFcw3ij1+ LD1JKW9LcataHMzZi7C1jjjWA5uXGwhewt4F8aCcfCmyVDb6wANfyn9adCcDh63cvo97 qwV/qpbs62a7KySMHdUp85gFdW+89KylLs0DbySZ84DtxN3DC7LZbb6n7KgL34ci0i52 Ly9iHNjxIqIVCDlr7ySdDenyvo9UQMQUred9Ee8SUP4FzAj5O30JAeVlZHhi5dn3xLDv EN6zyJrikGAmvJvNBPf++xGAeG/04oQPB0Z964h7/DeLBrKOzg5u26Ua8dPVUUS9cdnH LaVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=nUbCeI0zbRC5Gfuakh20Mo5P3153/COR9tojN4Hyb1g=; b=CaGOawaZJIDzr3jC6TDEIkkRATt+YnvFHLdujMPWJAaMMbki6okGGLFG+jxlSOxcWL 5J8HM0CmoqaKQ4CNKIC6XXRn668Vv5PwIAd5YfLe4WVxbTUzIxgj/FjFGQ4CEK1Y3BEK wQuWJkBZCn3Uf+9muCUiilHg1mXpbHM1jeD0Az21jA153efl11qMDDjF+xBtaj5hMI1+ 6JQzMwJViJdrXJ6R85kJMubO2a6I/A6n0G5RKPYE8MzE+Rqsce1RNBB6SZbyay6anR7m 76jIRWhKcIyZnFOvNNzpZMi0K7SXTvjsC6HCpi9ZQY8LJoCRyhcAbvNBbeyao2dXnY7P IXcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W2d65Rsx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k2-v6si16218570plt.406.2018.04.25.05.16.00; Wed, 25 Apr 2018 05:16:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W2d65Rsx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753603AbeDYMO2 (ORCPT + 99 others); Wed, 25 Apr 2018 08:14:28 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:40692 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751487AbeDYMO0 (ORCPT ); Wed, 25 Apr 2018 08:14:26 -0400 Received: by mail-io0-f193.google.com with SMTP id t123-v6so26535734iof.7; Wed, 25 Apr 2018 05:14:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=nUbCeI0zbRC5Gfuakh20Mo5P3153/COR9tojN4Hyb1g=; b=W2d65RsxVqDKLncNM7b8agxUYW+BTHW7MGksVwCPsDJvmTydi+zE+cgWSmMsc2cEkQ YH9GG5h/OBUGd33OYVl6iELhEm89qyfca/Dszzp6dePg0+Ubcbz5ibUnYhVBXWzL2clE FjEvJkJ1GWmUoetolulKR7mIa/bZkvXaxxltyDdsO47A8BLb//mheFKMOW+eFPUnh0iN 8wQaiQZvpBYb38keTjw3YqoeOP068C8wuJ+ObMQGVBVHS9nGX25j0F3JGzBb2fUYbPsh igKcBCYXR2XJ1WhVv/1W9unoYqEwhBYzNlzMXfNqD2EsX4ZWXHEkyUxddiDVsiHixHK4 lVGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=nUbCeI0zbRC5Gfuakh20Mo5P3153/COR9tojN4Hyb1g=; b=VJINJqZaCN538YRWNGRGzwjFmYlvQ5bwwqt0vgdEd05nAt5L4HPB0TdlEKfApUtHkk rByiywv/YXaG+KBFLGbrIASuCtCAnKCfbHsmRcmy0YYOJGKaAUk4tWYEjhXLDWkqA192 FQyNPsn2qdc0jezUsJY9hM8lB1HMignU+Q2LrIwUZCA6QjUAzEhmnNPKmJXmxw/L+0Bi NpNS7p8zaAPLXuVUOVPqCIDlF7g4kZEWjnJiHWjwx1g0cFHGueRc4AH9T3SXm5kJZ7eI BZ47kMR81Pla5oGUncDMZYQ5Jf5gNqs550LLhax50w34k4OhXnBmwMIQG6YiBAx+3bhK fMAw== X-Gm-Message-State: ALQs6tDTL55QMP638KfGegU0FPD/CuN4d4eevbCbNrgt6wfRpa4Q4UG/ M6WnL2MGvNV3qwCRSRnuuNMp3tvkax0pWgyNBIs= X-Received: by 2002:a6b:8753:: with SMTP id j80-v6mr29106330iod.14.1524658465637; Wed, 25 Apr 2018 05:14:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.29.132 with HTTP; Wed, 25 Apr 2018 05:14:25 -0700 (PDT) In-Reply-To: <20180420010408.24438-4-ebiederm@xmission.com> References: <878t9ilmhv.fsf@xmission.com> <20180420010408.24438-4-ebiederm@xmission.com> From: Vincent Chen Date: Wed, 25 Apr 2018 20:14:25 +0800 Message-ID: Subject: Re: [REVIEW][PATCH 04/17] signal/nds32: Use force_sig in unhandled_interruption and unhandled_exceptions To: "Eric W. Biederman" Cc: linux-arch , Linux Kernel Mailing List , linux-api@vger.kernel.org, Vincent Chen , Greentime Hu , Arnd Bergmann Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-04-20 9:03 GMT+08:00 Eric W. Biederman : > Neither unhandled_interrupt nor unhandled_exceptions fills in any of the > siginfo fields whend sending SIGKILL. Further because it is SIGKILL > even if all of the fields were filled out appropriately it would be impossible > for the process to read any of the siginfo fields. So simplfy things and > just use force_sig instead of force_sig_info. > > Fixes: 2923f5ea7738 ("nds32: Exception handling") > Cc: Vincent Chen > Cc: Greentime Hu > Cc: Arnd Bergmann > Signed-off-by: "Eric W. Biederman" > --- > arch/nds32/kernel/traps.c | 11 ++--------- > 1 file changed, 2 insertions(+), 9 deletions(-) > > diff --git a/arch/nds32/kernel/traps.c b/arch/nds32/kernel/traps.c > index 6e34eb9824a4..65961bf91d64 100644 > --- a/arch/nds32/kernel/traps.c > +++ b/arch/nds32/kernel/traps.c > @@ -318,29 +318,22 @@ void do_debug_trap(unsigned long entry, unsigned long addr, > > void unhandled_interruption(struct pt_regs *regs) > { > - siginfo_t si; > pr_emerg("unhandled_interruption\n"); > show_regs(regs); > if (!user_mode(regs)) > do_exit(SIGKILL); > - si.si_signo = SIGKILL; > - si.si_errno = 0; > - force_sig_info(SIGKILL, &si, current); > + force_sig(SIGKILL, current); > } > > void unhandled_exceptions(unsigned long entry, unsigned long addr, > unsigned long type, struct pt_regs *regs) > { > - siginfo_t si; > pr_emerg("Unhandled Exception: entry: %lx addr:%lx itype:%lx\n", entry, > addr, type); > show_regs(regs); > if (!user_mode(regs)) > do_exit(SIGKILL); > - si.si_signo = SIGKILL; > - si.si_errno = 0; > - si.si_addr = (void *)addr; > - force_sig_info(SIGKILL, &si, current); > + force_sig(SIGKILL, current); > } > > extern int do_page_fault(unsigned long entry, unsigned long addr, > -- > 2.14.1 > Acked-by Vincent Chen