Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1546562ybb; Sat, 11 Apr 2020 06:10:25 -0700 (PDT) X-Google-Smtp-Source: APiQypKQYa8ReVtRxGfFmZHxfkIuzTMWNHriN8z+fPC+3hd7ckdwnJDp9YA5F3nmEMrRsamlDpJR X-Received: by 2002:a0c:ba83:: with SMTP id x3mr9574824qvf.83.1586610625343; Sat, 11 Apr 2020 06:10:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586610625; cv=none; d=google.com; s=arc-20160816; b=q9ku5fx38mCyxwpE8i6YoBO8nj4BQV0fwjk4GLiGNXZHpm6Pf0CU7v9MRxdaetD5/r WYANUOT6PeUoUtXKAVz0cgjkhbT9cq1FiHRfkzVADgSuZW5600aNJA0CF3YUs3BkgFIX tG3fqRUoQRvFbkMffEB6YwPL8Vrzs2LDKl1K1QQwDMviSbU+n91X+FhTMgs6jKO5MPXN /VgtMrynm0RDZWWyBD7nvTIQnRLE5ZBgcKLJ4rw5DsqPSboamIISnfoFNBYJKmWEqrF7 3R/8MiIXuap7qu0UKyQoM0VA/d/3HlYFOEdjnMCjYucnTdqlsX1055+1+Dg91tD8DtN0 DLKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=rSNcnmkr0VCIfJSmFqkl8MO8knmpyhCqzh2SYrJaXdQ=; b=e/GhEw6E4bJzxUntqBUYB3/fAFRqL0VutT0YixtifUuiv0lnRkZ2lPXAlwO/GN1l5+ nvf421Qz4OZerNHM8Isp5Ec1RpPLgN5Hti9jwQ4On3T+BqFfQSuQyDLnOr5wzrdjoizB Hou29LricnMFh6HbIYW6kHsKBLbRb2tRrxkgxq2tLOWUpFFkYFcgIXKK/Hof8r1+6JVm UG4k41k8Lb7mrDG+D03b2DDD/3Gu+5ypimaXOoHQ6+L7yoM3je7LBNBHT+TxoBgf/mG0 xdn+lOcNV/OI3g0Vtk4XTNVF0v8h5wq2U/I4e4Nqevq/IGT2kwGSrEMsiwtuucW5CH6v EO1w== 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 w3si2823681qkd.17.2020.04.11.06.09.57; Sat, 11 Apr 2020 06:10:25 -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 S1726140AbgDKNGt (ORCPT + 99 others); Sat, 11 Apr 2020 09:06:49 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:13153 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726037AbgDKNGt (ORCPT ); Sat, 11 Apr 2020 09:06:49 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id B30933196E5B490457B4; Sat, 11 Apr 2020 21:06:41 +0800 (CST) Received: from use12-sp2.huawei.com (10.67.189.174) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Sat, 11 Apr 2020 21:06:22 +0800 From: Xiaoming Ni To: , , , , CC: , , , , , Subject: [PATCH] parisc: add sysctl file interface panic_on_stackoverflow Date: Sat, 11 Apr 2020 21:06:19 +0800 Message-ID: <1586610379-51745-1-git-send-email-nixiaoming@huawei.com> X-Mailer: git-send-email 1.8.5.6 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.189.174] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The variable sysctl_panic_on_stackoverflow is used in arch/parisc/kernel/irq.c and arch/x86/kernel/irq_32.c, but the sysctl file interface panic_on_stackoverflow only exists on x86. Add sysctl file interface panic_on_stackoverflow for parisc Signed-off-by: Xiaoming Ni --- kernel/sysctl.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 8a176d8..b9ff323 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -994,30 +994,32 @@ static int sysrq_sysctl_handler(struct ctl_table *table, int write, .proc_handler = proc_dointvec, }, #endif -#if defined(CONFIG_X86) + +#if (defined(CONFIG_X86_32) || defined(CONFIG_PARISC)) && \ + defined(CONFIG_DEBUG_STACKOVERFLOW) { - .procname = "panic_on_unrecovered_nmi", - .data = &panic_on_unrecovered_nmi, + .procname = "panic_on_stackoverflow", + .data = &sysctl_panic_on_stackoverflow, .maxlen = sizeof(int), .mode = 0644, .proc_handler = proc_dointvec, }, +#endif +#if defined(CONFIG_X86) { - .procname = "panic_on_io_nmi", - .data = &panic_on_io_nmi, + .procname = "panic_on_unrecovered_nmi", + .data = &panic_on_unrecovered_nmi, .maxlen = sizeof(int), .mode = 0644, .proc_handler = proc_dointvec, }, -#ifdef CONFIG_DEBUG_STACKOVERFLOW { - .procname = "panic_on_stackoverflow", - .data = &sysctl_panic_on_stackoverflow, + .procname = "panic_on_io_nmi", + .data = &panic_on_io_nmi, .maxlen = sizeof(int), .mode = 0644, .proc_handler = proc_dointvec, }, -#endif { .procname = "bootloader_type", .data = &bootloader_type, -- 1.8.5.6