Received: by 10.223.176.46 with SMTP id f43csp4698208wra; Tue, 23 Jan 2018 13:10:33 -0800 (PST) X-Google-Smtp-Source: AH8x2268CkgRlTfXgzvDkNJgGcOchNpp69NVZIRDyi9I/AvfclTyEps9TlgnZhPwmY449qMORxsd X-Received: by 10.107.88.7 with SMTP id m7mr5491601iob.162.1516741833098; Tue, 23 Jan 2018 13:10:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516741832; cv=none; d=google.com; s=arc-20160816; b=NkvQcPZQZx+gkZvKlrWULvhSho1ok1uZRS7vhCkzsTbRBiOKFqFYKm/bSiiim0kSXC erLbnbTaWoeqKbIFQVsq2fpmAz/awVrRFEfTWwgEmIEzCS+VzEEb6c7kSW4Z2MpeSov0 o0CVo+Eeus9wKjHgfgkXtXTvcFaR4AFNSqCeYGjwBTtDqEW/DOuAXg8IsZ/+pAfunMgr Av8iNChMpPp1AU7An7UWIuQ9qYAIpICO1mVpjlqi6eUyK78DxqSfBsjPJUSoWat0YHSW GYpDO5SoL1TbdgccTCqdRuofOlyohjFORRdVTY7C3f6v8OGyYFM5NCAszQA9kJnD4ioL tXDw== 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=HAOTVv9afbUlH9MPResYKd8KKSqMaNiLqxRwtmgC648=; b=j7pTJRsBFXUdiTI7p2dOrFHK7fyYtwbJ8WKMM0jjGvbNKY26XUwz+cM7hZLLGqHVkJ R+qQVzKy4+mYPQyfzlMMhRLMNx+bQ/fXp4F0OhL2TfVFyT16BDJat2mKHz3eM3l9WN1d xBOyRbIwLFT9ADi+qK5mPMmttbIII4CduTucNbHsLmhLQeauno1XmC/DDebup1MlP0Zh rfT1Bwi+tvt4q+El5yAiRXxVqD5f4YWLU58elMVl9VGI46ZLVOYxMxIfPa1Y+ed5dhY/ MOCu6MqNL2vFvBmYrwe9PfOzOdjnBSb3ir3RrgemKtiHVDABIKNU7a7ILifIYfreyzLX z6zg== 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 v10si15765539iod.248.2018.01.23.13.10.19; Tue, 23 Jan 2018 13:10:32 -0800 (PST) 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 S932306AbeAWVJU (ORCPT + 99 others); Tue, 23 Jan 2018 16:09:20 -0500 Received: from out01.mta.xmission.com ([166.70.13.231]:46708 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932195AbeAWVJO (ORCPT ); Tue, 23 Jan 2018 16:09:14 -0500 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 1ee5of-0001c2-JG; Tue, 23 Jan 2018 14:09:13 -0700 Received: from 97-121-88-104.omah.qwest.net ([97.121.88.104] 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 1ee5od-0003u7-V5; Tue, 23 Jan 2018 14:09:13 -0700 From: "Eric W. Biederman" To: linux-kernel@vger.kernel.org Cc: Al Viro , Oleg Nesterov , linux-arch@vger.kernel.org, Ram Pai , "Eric W. Biederman" Date: Tue, 23 Jan 2018 15:07:16 -0600 Message-Id: <20180123210719.10456-7-ebiederm@xmission.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <87607s5lra.fsf_-_@xmission.com> References: <87607s5lra.fsf_-_@xmission.com> X-XM-SPF: eid=1ee5od-0003u7-V5;;;mid=<20180123210719.10456-7-ebiederm@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=97.121.88.104;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1+qisxB3gAE3JygMJ4ybSUPUE1yEjc4LnI= X-SA-Exim-Connect-IP: 97.121.88.104 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa06.xmission.com X-Spam-Level: ** X-Spam-Status: No, score=2.0 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,TVD_RCVD_IP,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.0 TVD_RCVD_IP Message was received from an IP address * 0.7 XMSubLong Long Subject * 1.5 XMNoVowels Alpha-numberic number with no vowels * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: **;linux-kernel@vger.kernel.org X-Spam-Relay-Country: X-Spam-Timing: total 1304 ms - load_scoreonly_sql: 0.03 (0.0%), signal_user_changed: 2.5 (0.2%), b_tie_ro: 1.68 (0.1%), parse: 0.70 (0.1%), extract_message_metadata: 10 (0.8%), get_uri_detail_list: 1.87 (0.1%), tests_pri_-1000: 5 (0.4%), tests_pri_-950: 1.13 (0.1%), tests_pri_-900: 0.93 (0.1%), tests_pri_-400: 23 (1.8%), check_bayes: 22 (1.7%), b_tokenize: 8 (0.6%), b_tok_get_all: 6 (0.5%), b_comp_prob: 2.4 (0.2%), b_tok_touch_all: 2.9 (0.2%), b_finish: 0.61 (0.0%), tests_pri_0: 1255 (96.2%), check_dkim_signature: 0.68 (0.1%), check_dkim_adsp: 2.9 (0.2%), tests_pri_500: 3.8 (0.3%), rewrite_mail: 0.00 (0.0%) Subject: [PATCH 07/10] signal/powerpc: Remove unnecessary signal_code parameter of do_send_trap 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 signal_code is always TRAP_HWBKPT Signed-off-by: "Eric W. Biederman" --- arch/powerpc/include/asm/debug.h | 2 +- arch/powerpc/kernel/process.c | 6 +++--- arch/powerpc/kernel/traps.c | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/include/asm/debug.h b/arch/powerpc/include/asm/debug.h index 14e71ff6579e..fc97404de0a3 100644 --- a/arch/powerpc/include/asm/debug.h +++ b/arch/powerpc/include/asm/debug.h @@ -49,7 +49,7 @@ void set_breakpoint(struct arch_hw_breakpoint *brk); void __set_breakpoint(struct arch_hw_breakpoint *brk); #ifdef CONFIG_PPC_ADV_DEBUG_REGS extern void do_send_trap(struct pt_regs *regs, unsigned long address, - unsigned long error_code, int signal_code, int brkpt); + unsigned long error_code, int brkpt); #else extern void do_break(struct pt_regs *regs, unsigned long address, diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 72be0c32e902..bfb48cf56bc3 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -601,11 +601,11 @@ EXPORT_SYMBOL(flush_all_to_thread); #ifdef CONFIG_PPC_ADV_DEBUG_REGS void do_send_trap(struct pt_regs *regs, unsigned long address, - unsigned long error_code, int signal_code, int breakpt) + unsigned long error_code, int breakpt) { siginfo_t info; - current->thread.trap_nr = signal_code; + current->thread.trap_nr = TRAP_HWBKPT; if (notify_die(DIE_DABR_MATCH, "dabr_match", regs, error_code, 11, SIGSEGV) == NOTIFY_STOP) return; @@ -613,7 +613,7 @@ void do_send_trap(struct pt_regs *regs, unsigned long address, /* Deliver the signal to userspace */ info.si_signo = SIGTRAP; info.si_errno = breakpt; /* breakpoint or watchpoint id */ - info.si_code = signal_code; + info.si_code = TRAP_HWBKPT; info.si_addr = (void __user *)address; force_sig_info(SIGTRAP, &info, current); } diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index f2e6e1838952..c93f1e6a9fff 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -1750,34 +1750,34 @@ static void handle_debug(struct pt_regs *regs, unsigned long debug_status) #ifdef CONFIG_PPC_ADV_DEBUG_DAC_RANGE current->thread.debug.dbcr2 &= ~DBCR2_DAC12MODE; #endif - do_send_trap(regs, mfspr(SPRN_DAC1), debug_status, TRAP_HWBKPT, + do_send_trap(regs, mfspr(SPRN_DAC1), debug_status, 5); changed |= 0x01; } else if (debug_status & (DBSR_DAC2R | DBSR_DAC2W)) { dbcr_dac(current) &= ~(DBCR_DAC2R | DBCR_DAC2W); - do_send_trap(regs, mfspr(SPRN_DAC2), debug_status, TRAP_HWBKPT, + do_send_trap(regs, mfspr(SPRN_DAC2), debug_status, 6); changed |= 0x01; } else if (debug_status & DBSR_IAC1) { current->thread.debug.dbcr0 &= ~DBCR0_IAC1; dbcr_iac_range(current) &= ~DBCR_IAC12MODE; - do_send_trap(regs, mfspr(SPRN_IAC1), debug_status, TRAP_HWBKPT, + do_send_trap(regs, mfspr(SPRN_IAC1), debug_status, 1); changed |= 0x01; } else if (debug_status & DBSR_IAC2) { current->thread.debug.dbcr0 &= ~DBCR0_IAC2; - do_send_trap(regs, mfspr(SPRN_IAC2), debug_status, TRAP_HWBKPT, + do_send_trap(regs, mfspr(SPRN_IAC2), debug_status, 2); changed |= 0x01; } else if (debug_status & DBSR_IAC3) { current->thread.debug.dbcr0 &= ~DBCR0_IAC3; dbcr_iac_range(current) &= ~DBCR_IAC34MODE; - do_send_trap(regs, mfspr(SPRN_IAC3), debug_status, TRAP_HWBKPT, + do_send_trap(regs, mfspr(SPRN_IAC3), debug_status, 3); changed |= 0x01; } else if (debug_status & DBSR_IAC4) { current->thread.debug.dbcr0 &= ~DBCR0_IAC4; - do_send_trap(regs, mfspr(SPRN_IAC4), debug_status, TRAP_HWBKPT, + do_send_trap(regs, mfspr(SPRN_IAC4), debug_status, 4); changed |= 0x01; } -- 2.14.1