Received: by 10.192.165.148 with SMTP id m20csp147250imm; Thu, 19 Apr 2018 18:12:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx4821G1CeJCs2oKN82BU/2SMvroUGD/TpJ3zw/cgVmzX4ie5W4QzAuCWHNzwt5mDFphpe+RJ X-Received: by 2002:a17:902:6902:: with SMTP id j2-v6mr8003404plk.92.1524186737466; Thu, 19 Apr 2018 18:12:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524186737; cv=none; d=google.com; s=arc-20160816; b=hhJvWdgbrKHs/d4pcC8zyHqi3lX2eArr30DWA2PfWVQZF3LSgoD5Rh+lTUk95ARfMW /wfAaYn0UxzrgIamcaBD3whFRUM9/Z02JzkoyYtyCyUlAQ8Rre8iCq609Lsjmx7haAYy ur+g3Ctl+WxLMKnfvLC9mLElZH1Pj/j0YUDOVTmj+PlAc7W0TDHRU+2h0X5sSLr3pV8L nNgI6rBX9xzvRaDmgiO50gudAhyABsB72iMM/qpRUwDTHrdxS1P/3prjcpfQfdcmr0jm aXYMFCJXwmQOBwQHaZRC1TQAPIHWtHuTM2lyQNOjtN8uB9DiUZAwMJUQaX5F2gpdgAR4 s1hA== 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=zv8lzNIt29sU9bnQBTRG5wiu7hP84bpv7p880+K8+QQ=; b=CRwqSzkS8qKDM6na+kPuRdw4CTjIWSkr8tfE0UK5cXYeR9PfCeIoO8U6ukldm+oBGh Hpu1yUOGUGP13suRnk3hOF8VYjkhlasO2X7XuRIwI5TBi0/JcVEEq5juLnG61pmrf4Lj TubUrLrqMB1WnZFN/72XE30wroCsUUXfZx7/cnj3bwk46pRTTX5oWc4D05+p2nCDsFPB h0k3Ql9NzCrtB/0F40M7GtZJdxME3ImqOOa2m2prNG8UlethrZ7NosN02h/JMqybieTP LHZjP1xPEcG3JO5wUBqrImFvO15QH3XCSNLdn3zrUjMeA5j/Vx9o9QU7KrbmvUOYlOpT hztQ== 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 d12si4033334pgu.663.2018.04.19.18.12.03; Thu, 19 Apr 2018 18:12:17 -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 S1754191AbeDTBJT (ORCPT + 99 others); Thu, 19 Apr 2018 21:09:19 -0400 Received: from out02.mta.xmission.com ([166.70.13.232]:44622 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754095AbeDTBHD (ORCPT ); Thu, 19 Apr 2018 21:07:03 -0400 Received: from in01.mta.xmission.com ([166.70.13.51]) by out02.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1f9KVz-0006Ws-22; Thu, 19 Apr 2018 19:07:03 -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 1f9KVy-00014u-Dk; Thu, 19 Apr 2018 19:07:02 -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:56 -0500 Message-Id: <20180420010408.24438-5-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=1f9KVy-00014u-Dk;;;mid=<20180420010408.24438-5-ebiederm@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=97.119.174.25;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1+Hs5y7g5BPwUrwaAUXgttN6FSv8zCZ5II= 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 sa04.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, T_TooManySym_02,T_TooManySym_03,XMNoVowels,XMSubLong autolearn=disabled version=3.4.1 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 1.5 XMNoVowels Alpha-numberic number with no vowels * 0.7 XMSubLong Long Subject * 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.4768] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa04 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject * 0.0 T_TooManySym_02 5+ unique symbols in subject * 0.0 T_TooManySym_03 6+ unique symbols in subject X-Spam-DCC: XMission; sa04 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ***;linux-arch@vger.kernel.org X-Spam-Relay-Country: X-Spam-Timing: total 204 ms - load_scoreonly_sql: 0.06 (0.0%), signal_user_changed: 3.6 (1.7%), b_tie_ro: 2.4 (1.2%), parse: 1.17 (0.6%), extract_message_metadata: 23 (11.5%), get_uri_detail_list: 1.92 (0.9%), tests_pri_-1000: 11 (5.2%), tests_pri_-950: 1.64 (0.8%), tests_pri_-900: 1.29 (0.6%), tests_pri_-400: 20 (9.6%), check_bayes: 18 (8.9%), b_tokenize: 7 (3.3%), b_tok_get_all: 5 (2.6%), b_comp_prob: 1.92 (0.9%), b_tok_touch_all: 2.3 (1.1%), b_finish: 0.70 (0.3%), tests_pri_0: 131 (63.9%), check_dkim_signature: 0.55 (0.3%), check_dkim_adsp: 3.3 (1.6%), tests_pri_500: 8 (4.1%), poll_dns_idle: 1.61 (0.8%), rewrite_mail: 0.00 (0.0%) Subject: [REVIEW][PATCH 05/17] signal/nds32: Use force_sig(SIGILL) in do_revisn 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 As originally committed do_revisn would deliver a siginfo for SIGILL with an si_code composed of random stack contents. That makes no sense and is not something userspace can depend on. So simplify the code and just use "force_sig(SIG_ILL, current)" instead. 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 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/nds32/kernel/traps.c b/arch/nds32/kernel/traps.c index 65961bf91d64..8e9a5b1f6234 100644 --- a/arch/nds32/kernel/traps.c +++ b/arch/nds32/kernel/traps.c @@ -356,14 +356,11 @@ void do_dispatch_tlb_misc(unsigned long entry, unsigned long addr, void do_revinsn(struct pt_regs *regs) { - siginfo_t si; pr_emerg("Reserved Instruction\n"); show_regs(regs); if (!user_mode(regs)) do_exit(SIGILL); - si.si_signo = SIGILL; - si.si_errno = 0; - force_sig_info(SIGILL, &si, current); + force_sig(SIGILL, current); } #ifdef CONFIG_ALIGNMENT_TRAP -- 2.14.1