Received: by 10.192.165.148 with SMTP id m20csp148247imm; Thu, 19 Apr 2018 18:13:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx49QvBqjxGENoz71WmypagIr/NDh+bMrzMtROaWFXY6SpSXnNT8NdcigNdUKobGRKHK0fr6t X-Received: by 10.101.74.138 with SMTP id b10mr6848708pgu.22.1524186826446; Thu, 19 Apr 2018 18:13:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524186826; cv=none; d=google.com; s=arc-20160816; b=Jx8hvuypsXKd3HaDm1VYdw31kmuBr8uoY91rw/fdBxWWyKQa9hZhU0c9KKHet6MU58 nD1Sif/C4ihg6vCXm50C9MaINKZvuvJbV+pdW/Gk1n2V8j2a7h1lAJXBYXsjRD97sFAV 3Wg7I6bAkU/IExNTMsgfPyZSVdXYopeT8JvBNMErR1EnisWBqY4dP32dAlAdB1YQfn0r G6Do2+y6W4n+EEYoiBDpvn1KAftl5uWtN/vAbYRrW33Rb5S1DxPiD1E3D8sNSMICvTFw hb80Pn9xYVBmeREmQvvQsFfeyCM8xqppgj21wJ7dbC9UKmIuK89w9tNHtT2bRhcwuIM/ XZJw== 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=ivUmjvpVpjLtSy0PgUA6WHRPE9WO2Bp7coerJ3XrfAs=; b=iY86qiiB0xuFrlLWCZvJ8+eEJ2UpCuQULQ1tMT+a7zzEpG12SwNjB/zejEnNnn8t6n Y3JKetNQSar2MZ0vSq1BsfjflTODVCATcy6256O9Joe4THjUlGvWy6/ZIs13Gi7yDPF6 4osjYaTaoLLeZbFYnEGPsA72JxR+4ByHIhPwNTLdYeXfDfMD7joR/EN4EL3x8rGMxOI0 R4kIgZhyjFKTsiXrTR5KxdfdivpfPBkq31VGyTYGQ0BuQwKeOUr0+vEq2GEom50wjeWk 7+4Q+mYFCG7WAtNbubUy6prRJjOoCdqyWsyiS64xXT7biPn9GBRUwUXJLeoumoAggD6O T5Nw== 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 u9si4369368pfa.293.2018.04.19.18.13.32; Thu, 19 Apr 2018 18:13:46 -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 S1754207AbeDTBM0 (ORCPT + 99 others); Thu, 19 Apr 2018 21:12:26 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:36120 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753862AbeDTBMJ (ORCPT ); Thu, 19 Apr 2018 21:12:09 -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 1f9Kav-0003tz-5H; Thu, 19 Apr 2018 19:12:09 -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 1f9KXJ-00014u-FW; Thu, 19 Apr 2018 19:08:25 -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" , linux-alpha@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Thu, 19 Apr 2018 20:04:06 -0500 Message-Id: <20180420010408.24438-15-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=1f9KXJ-00014u-FW;;;mid=<20180420010408.24438-15-ebiederm@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=97.119.174.25;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1+Eueji5jcUQvxdobsmkfkhKP9mKJZa87Y= 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=6.0 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,SUSPICIOUS_RECIPS,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 * 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 * 2.5 SUSPICIOUS_RECIPS Similar addresses in recipient list * 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.4999] * -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 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 196 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 2.5 (1.3%), b_tie_ro: 1.75 (0.9%), parse: 0.76 (0.4%), extract_message_metadata: 12 (6.3%), get_uri_detail_list: 1.61 (0.8%), tests_pri_-1000: 7 (3.8%), tests_pri_-950: 1.14 (0.6%), tests_pri_-900: 0.94 (0.5%), tests_pri_-400: 18 (9.0%), check_bayes: 17 (8.6%), b_tokenize: 6 (3.1%), b_tok_get_all: 5 (2.8%), b_comp_prob: 1.55 (0.8%), b_tok_touch_all: 2.1 (1.1%), b_finish: 0.52 (0.3%), tests_pri_0: 144 (73.6%), check_dkim_signature: 0.47 (0.2%), check_dkim_adsp: 2.8 (1.4%), tests_pri_500: 6 (3.2%), rewrite_mail: 0.00 (0.0%) Subject: [REVIEW][PATCH 15/17] signal: Add TRAP_UNK si_code for undiagnosted trap 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 Both powerpc and alpha have cases where they wronly set si_code to 0 in combination with SIGTRAP and don't mean SI_USER. About half the time this is because the architecture can not report accurately what kind of trap exception triggered the trap exception. The other half the time it looks like no one has bothered to figure out an appropriate si_code. For the cases where the architecture does not have enough information or is too lazy to figure out exactly what kind of trap exception it is define TRAP_UNK. Cc: linux-api@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-alpha@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: "Eric W. Biederman" --- arch/x86/kernel/signal_compat.c | 2 +- include/uapi/asm-generic/siginfo.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/signal_compat.c b/arch/x86/kernel/signal_compat.c index 14c057f29979..9ccbf0576cd0 100644 --- a/arch/x86/kernel/signal_compat.c +++ b/arch/x86/kernel/signal_compat.c @@ -29,7 +29,7 @@ static inline void signal_compat_build_tests(void) BUILD_BUG_ON(NSIGFPE != 15); BUILD_BUG_ON(NSIGSEGV != 7); BUILD_BUG_ON(NSIGBUS != 5); - BUILD_BUG_ON(NSIGTRAP != 4); + BUILD_BUG_ON(NSIGTRAP != 5); BUILD_BUG_ON(NSIGCHLD != 6); BUILD_BUG_ON(NSIGSYS != 1); diff --git a/include/uapi/asm-generic/siginfo.h b/include/uapi/asm-generic/siginfo.h index 558b902f18d4..80e2a7227205 100644 --- a/include/uapi/asm-generic/siginfo.h +++ b/include/uapi/asm-generic/siginfo.h @@ -249,7 +249,8 @@ typedef struct siginfo { #define TRAP_TRACE 2 /* process trace trap */ #define TRAP_BRANCH 3 /* process taken branch trap */ #define TRAP_HWBKPT 4 /* hardware breakpoint/watchpoint */ -#define NSIGTRAP 4 +#define TRAP_UNK 5 /* undiagnosed trap */ +#define NSIGTRAP 5 /* * There is an additional set of SIGTRAP si_codes used by ptrace -- 2.14.1