Message ID | 20230124185110.143857-13-ebiggers@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2318804wrn; Tue, 24 Jan 2023 10:53:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXvbjkGD0gjVrwyQqfKb7jg/JMc2r0pqEDSlX+/zWnmbOVuzDarDaQ+9fKQImcQ39PYyCNAk X-Received: by 2002:aa7:8204:0:b0:58b:9473:7ae0 with SMTP id k4-20020aa78204000000b0058b94737ae0mr30096710pfi.32.1674586396844; Tue, 24 Jan 2023 10:53:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674586396; cv=none; d=google.com; s=arc-20160816; b=UJGxQHej85o43+JlMUkrvXr2ud7eYYXL4ezJdYolvqlrqaOkQul/4UipjTXSKaZK+2 OWBmyLiNZ6gj2o67Vmb+l0zPoj3vn3AZJTG8QnLHJU2UK5Dhdu0b8QcMm/Q0ZeR3d6kT rgW1VuvlDPu7I6U2IkNbjI61uc3g4iz23H6mWRkPbC0vb4oVKq1BXCCGEWN1fgLFC/ef gIKsxA/eWJB8T6kpBKAgE8y8SzDOyWRWOQ4Z3gUHuqH8SQJmu8Nvfb7/2FjsVlXOxXro TfJZ/rfAMDAlNLunR5VXtIGWU2xbmwH5f1SC0YjtmaKIh9ojWCsLSOo0A+DFrDtAphDi YFsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=j7euGvUOF5JKEjl5e0oDFWpNjvltUWCDrRHm8Oma1ts=; b=zxDkgXeiJp+irICynbgSfqlc5ezy1TbW+hFCLVbrIIVh7YLPgdLjFN6JoqfapKVlKj 9wpQlZqzUUCaPXCBuoCRhQMehaK5gTfnbkmLrnPICp/j557ocLUGMzGjItPvIrYsXF9E BNp7R/1VZDYtdIIr3CKJMgaQr8WFAa7kaoFPhE2VO0M5KkbHJFh+pbE1sh4jwOII90nA XotURjia0knBqcgujOAR2M6Gi3pUd45G3KXJ0mrbBLpdaQnRJwNmL+PxtQTLOQw4fgll rq0YWJBl3IhJc5w5NkgRxyBR6O9FfIJI43I7l2xoyFj/RSXC2KxScgbkCq97QFTVIijq gMEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oMhNbTOo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h67-20020a625346000000b00585070b8dbcsi3136185pfb.315.2023.01.24.10.53.04; Tue, 24 Jan 2023 10:53:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oMhNbTOo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234234AbjAXSwk (ORCPT <rfc822;rust.linux@gmail.com> + 99 others); Tue, 24 Jan 2023 13:52:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234158AbjAXSw0 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 24 Jan 2023 13:52:26 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 053E644BD1; Tue, 24 Jan 2023 10:52:08 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7EE5B61326; Tue, 24 Jan 2023 18:52:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0595C4339E; Tue, 24 Jan 2023 18:52:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674586328; bh=elP5tUEwCrTY71huuet3T+Fo7FOpVMVZKiKxptHmsR4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oMhNbTOoyCDWwXiAn3txe/olFH7txY1maX+VNuyaiVCUGgq8yHK4Yh7bsc6g9nDAI CVehe8kFo7Ejy94Vcsm4aZqGa10U36KOpVzziSfsG0GSV+rB5gC0Ks2H22Zu5gWLUg 9H2MUSixcgU0w2N31sRebxKNzBxwZ4HRHnRpm21KdWOmfxiymSGabPzrkTeVbsBccv SD6gUbg4rafkFlPqYMVmdwS8SQj9HP3iISVGTxQgXNUotFVkJD41L84JiDlbzMjeZD n9g4tEomI3y7KhB809iIcWkmRbRmfi8DJfzT6ci7EGl65wGmfQHaret1HXC4cS4hh5 DOQs8N3Bum7UA== From: Eric Biggers <ebiggers@kernel.org> To: stable@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Kees Cook <keescook@chromium.org>, SeongJae Park <sj@kernel.org>, Seth Jenkins <sethjenkins@google.com>, Jann Horn <jannh@google.com>, "Eric W . Biederman" <ebiederm@xmission.com>, linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, Petr Mladek <pmladek@suse.com>, Andrew Morton <akpm@linux-foundation.org>, tangmeng <tangmeng@uniontech.com>, "Guilherme G. Piccoli" <gpiccoli@igalia.com>, Tiezhu Yang <yangtiezhu@loongson.cn>, Sebastian Andrzej Siewior <bigeasy@linutronix.de>, Luis Chamberlain <mcgrof@kernel.org> Subject: [PATCH 5.15 12/20] panic: Separate sysctl logic from CONFIG_SMP Date: Tue, 24 Jan 2023 10:51:02 -0800 Message-Id: <20230124185110.143857-13-ebiggers@kernel.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230124185110.143857-1-ebiggers@kernel.org> References: <20230124185110.143857-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755931105624494082?= X-GMAIL-MSGID: =?utf-8?q?1755931105624494082?= |
Series |
Backport oops_limit to 5.15
|
|
Commit Message
Eric Biggers
Jan. 24, 2023, 6:51 p.m. UTC
From: Kees Cook <keescook@chromium.org> commit 9360d035a579d95d1e76c471061b9065b18a0eb1 upstream. In preparation for adding more sysctls directly in kernel/panic.c, split CONFIG_SMP from the logic that adds sysctls. Cc: Petr Mladek <pmladek@suse.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: tangmeng <tangmeng@uniontech.com> Cc: "Guilherme G. Piccoli" <gpiccoli@igalia.com> Cc: Tiezhu Yang <yangtiezhu@loongson.cn> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Luis Chamberlain <mcgrof@kernel.org> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20221117234328.594699-1-keescook@chromium.org Signed-off-by: Eric Biggers <ebiggers@google.com> --- kernel/panic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/panic.c b/kernel/panic.c index 5ed1ad06f9a34..0b560312878c5 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -73,8 +73,9 @@ ATOMIC_NOTIFIER_HEAD(panic_notifier_list); EXPORT_SYMBOL(panic_notifier_list); -#if defined(CONFIG_SMP) && defined(CONFIG_SYSCTL) +#ifdef CONFIG_SYSCTL static struct ctl_table kern_panic_table[] = { +#ifdef CONFIG_SMP { .procname = "oops_all_cpu_backtrace", .data = &sysctl_oops_all_cpu_backtrace, @@ -84,6 +85,7 @@ static struct ctl_table kern_panic_table[] = { .extra1 = SYSCTL_ZERO, .extra2 = SYSCTL_ONE, }, +#endif { } };