Received: by 10.192.165.148 with SMTP id m20csp145440imm; Thu, 19 Apr 2018 18:09:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx4842hvgtOOhJe54GV3YuQwqvLAfTBbm+c09AgOKAeV1fI5qBdp7KEdRO3dE1RLKjshjnuYz X-Received: by 2002:a17:902:1744:: with SMTP id i62-v6mr3852735pli.267.1524186597562; Thu, 19 Apr 2018 18:09:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524186597; cv=none; d=google.com; s=arc-20160816; b=zQ99VTNO/EEBKaYrvY22cX7nuRRF40ORO22FJNnxZ+x3jSLY2toUiDy5n/wMG21Tzp e52rhRxXRWqtxB/QNn6LUaX5P5vu2cSP88mIm+wwl34PY9lqqb2FCyxqqC1Xik2aMk7Q 5m3+qLsP56tIUtmsNIMjIFCIwTG8NsOwMch/BLGwxu/rNFXKJ4/5Ajsu289jWgG5jiAj lWVBZyoIZqeoVG5NYMgxYZxVxmfY8CBz6WWP96u3A/9zTE1rMj/YSVhI/pgqYVgYzbEG +9PB3JiuKG8tQtGN2p5yrcDCY2AfpY9dgyYhHJfsutMpXYP8H1Qi/v+rMM/QMbcy0Jgx BL1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=/b16CVdXhBr/Swypa8rZOZFSWzejqNATaJCP2N0UGWY=; b=wKMKH8RjLsamXyMe0CXqoQjU/CHKvpfXZ4GgzedB9viTToNnlJyK8TC+PDN/2yrXSU 5gyOEPT/NTrOIzw2t8CElt6c1nRMiqq1WZsBihS/K3byFec1ulWOtVhDhy9Jva7LPPmX UI3DoivrdAI3qCnpVC3J/aONj6tJFEoUMkVn56PSMlixzmv7ccimsAreq408rmCY2teg oicIJu+jZwh2mpKuMhXwJK9K9aJYU2QJnYpIIDtUeJetNF25XPhqAyOfgKv6ONIwH/7c vkW8q0PHqDP8Jh9giWNXHxSItzdTOm4PipGsIfzdL1jNOslHlC+9xLANrrIT/MrgCHE+ VbKA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j73si4429363pfa.297.2018.04.19.18.09.43; Thu, 19 Apr 2018 18:09:57 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754107AbeDTBHE (ORCPT + 99 others); Thu, 19 Apr 2018 21:07:04 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:35773 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753825AbeDTBHB (ORCPT ); Thu, 19 Apr 2018 21:07:01 -0400 Received: from in01.mta.xmission.com ([166.70.13.51]) by out01.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1f9KVw-0003T9-Vj; Thu, 19 Apr 2018 19:07:01 -0600 Received: from [97.119.174.25] (helo=x220.int.ebiederm.org) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1f9KVh-00014u-Hw; Thu, 19 Apr 2018 19:07:00 -0600 From: "Eric W. Biederman" To: linux-arch@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, "Eric W. Biederman" , Vincent Chen , Greentime Hu , Arnd Bergmann Date: Thu, 19 Apr 2018 20:03:55 -0500 Message-Id: <20180420010408.24438-4-ebiederm@xmission.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <878t9ilmhv.fsf@xmission.com> References: <878t9ilmhv.fsf@xmission.com> X-XM-SPF: eid=1f9KVh-00014u-Hw;;;mid=<20180420010408.24438-4-ebiederm@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=97.119.174.25;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX18piH1jbkLUpRAAqTI7RjjE1SfF85JnhGw= X-SA-Exim-Connect-IP: 97.119.174.25 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa07.xmission.com X-Spam-Level: *** X-Spam-Status: No, score=3.5 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,TR_Symld_Words,T_TM2_M_HEADER_IN_MSG,T_TooManySym_01, XMNoVowels,XMSubLong autolearn=disabled version=3.4.1 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.7 XMSubLong Long Subject * 1.5 XMNoVowels Alpha-numberic number with no vowels * 1.5 TR_Symld_Words too many words that have symbols inside * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.4990] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa07 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa07 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ***;linux-arch@vger.kernel.org X-Spam-Relay-Country: X-Spam-Timing: total 15028 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 3.6 (0.0%), b_tie_ro: 2.8 (0.0%), parse: 0.68 (0.0%), extract_message_metadata: 15 (0.1%), get_uri_detail_list: 1.39 (0.0%), tests_pri_-1000: 2.8 (0.0%), tests_pri_-950: 1.16 (0.0%), tests_pri_-900: 0.95 (0.0%), tests_pri_-400: 19 (0.1%), check_bayes: 18 (0.1%), b_tokenize: 6 (0.0%), b_tok_get_all: 4.9 (0.0%), b_comp_prob: 1.52 (0.0%), b_tok_touch_all: 3.7 (0.0%), b_finish: 0.59 (0.0%), tests_pri_0: 143 (1.0%), check_dkim_signature: 0.44 (0.0%), check_dkim_adsp: 3.9 (0.0%), tests_pri_500: 14840 (98.7%), poll_dns_idle: 14828 (98.7%), rewrite_mail: 0.00 (0.0%) Subject: [REVIEW][PATCH 04/17] signal/nds32: Use force_sig in unhandled_interruption and unhandled_exceptions X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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