From patchwork Wed Dec 21 12:50:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 35355 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp3504276wrn; Wed, 21 Dec 2022 04:51:04 -0800 (PST) X-Google-Smtp-Source: AMrXdXtIe7ZL0enoAMC5m4ltc/NOhsUJYDyoSVHO9meBnyCEiizDbbg/jCmbuTys0WkJ/E7etK4k X-Received: by 2002:a50:8e5d:0:b0:46f:a73d:6bdb with SMTP id 29-20020a508e5d000000b0046fa73d6bdbmr1209926edx.25.1671627063767; Wed, 21 Dec 2022 04:51:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671627063; cv=none; d=google.com; s=arc-20160816; b=KOsLn+KyzHFRl0rWGSlBVZwv+0tJWB5XrH+y/ZEZmLEqAanhyHn22DR4mMTbR4EJjO 8kDTcHXQEi5oMQfGh99aL6hL0k36u6UXi3Ojv95SUDe2p/O6JGlt+EszfjWtI2MOqDc9 lM5lvpya6UNAsiZHQKGVRPCm6t8srf1T3pYY/MOx3vzJjARW20fJdHC/yKzeQyZo/xVV 8cHvAVuv2X3Bo3DAvQe2Q9mSsys3z5vPkcpKLL6NUZogXF0R5Zq97djRfZwKkO42biWS KVEG3zptrsHfNj4/pesknQo3wCCUCt6UCHeYYkDKkZ58YBAbGSuZpCmPTjswM+whmEEd lFMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=xv7lgqcsWR7csyQW/ua9GbEMjmdKQM2eL6DIBrKZNHc=; b=wtq16U5W4wUHFO6hBhVPLRaH+q9AG1aKNeRyDV7prir23dhz3QEfB98RilmxjRYlxq qtxHRXTX5BTkAy2IEocoR71pzDwbGAcGwP7iivZUgbgI4XlpAqLI6CStnsuKGR4HZKX9 T6ozETryFF1bsabRexhfDTidvE/QzZUZtZC363rFeDwwiqznFQz+puo/0UcOMpakdU6U dX9tKvPjdChb4JiO8pdZSmBPmbTjD6Bw5soTUAE+5zvL4TUdPsBmKXvxRl/0Gf1xgJcD +Tsq0XYL9OVup+QePanujYoLX4xJRjncYvmrgB7FUDciK8BLKn8FtTrmvxfBy1C/SgNq GvbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Yqff2tBr; 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=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y2-20020a056402134200b0046abbd721e4si2654599edw.300.2022.12.21.04.50.38; Wed, 21 Dec 2022 04:51:03 -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=@chromium.org header.s=google header.b=Yqff2tBr; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232153AbiLUMuY (ORCPT + 99 others); Wed, 21 Dec 2022 07:50:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231703AbiLUMuT (ORCPT ); Wed, 21 Dec 2022 07:50:19 -0500 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F10723149 for ; Wed, 21 Dec 2022 04:50:18 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id t17so36617045eju.1 for ; Wed, 21 Dec 2022 04:50:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=xv7lgqcsWR7csyQW/ua9GbEMjmdKQM2eL6DIBrKZNHc=; b=Yqff2tBr9mLzDgQy6wO8YkbyyU+hHsOTHxduzuz6EKnfOR0lu8sqfmQfLshamlMj55 iVAA8EaJYdBcbzRiPidRkXcu9oG8mq3AKJFuILif+Qw5A9t1mVC0Io31aqbNxssySPHC RX9QCUpEarJByBTn6wamfkTD4mjw446EQSC80= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xv7lgqcsWR7csyQW/ua9GbEMjmdKQM2eL6DIBrKZNHc=; b=RlFgxlxZvkrynGFc6uywa4aEJoRPMZe+ZYi8ycBawMDKCjuinavLaRM4U4pdxRKoB8 skaIuNIa+MNlEJPngcp0j3tkXM1JTdTSFj3yNs5Jnv/TMmV+u+pLRJI/i0cNjw3EoGoq 390JR7IskzyehsiMUuEHgU+raHEkxoZgOJRV+PgY+sKwrrnFKclTkeujk56fcUnsbnGR jfrDENxFKUY/s26qbCnQChPGX8CnvCoCreNf7woYnS6fNGoPUYtQD3zIz+4SXEtw1WL4 INvI8QIQL2aojzpiowMIKDFy/eVRpl24aFYvBmie6TIlJ9lO7s4jIhNTm4OciBkUxSHe cEhQ== X-Gm-Message-State: AFqh2kqEpfHyktvEkYQxm+8n+OlB/9uO+8msAiI3k5tya65I+g1p/uk4 jgRm0OOCS6WZyere3eMVhG+Y/w== X-Received: by 2002:a17:907:a784:b0:78d:f454:ba4c with SMTP id vx4-20020a170907a78400b0078df454ba4cmr1126807ejc.75.1671627016899; Wed, 21 Dec 2022 04:50:16 -0800 (PST) Received: from alco.roam.corp.google.com ([2620:0:1059:10:4b82:b1f8:cb4f:fbbd]) by smtp.gmail.com with ESMTPSA id w7-20020a170906b18700b007c0b28b85c5sm7039250ejy.138.2022.12.21.04.50.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Dec 2022 04:50:16 -0800 (PST) From: Ricardo Ribalda Date: Wed, 21 Dec 2022 13:50:01 +0100 Subject: [PATCH v4 1/3] Documentation: sysctl: Correct kexec_load_disabled MIME-Version: 1.0 Message-Id: <20221114-disable-kexec-reset-v4-1-ab809c8d988c@chromium.org> References: <20221114-disable-kexec-reset-v4-0-ab809c8d988c@chromium.org> In-Reply-To: <20221114-disable-kexec-reset-v4-0-ab809c8d988c@chromium.org> To: Jonathan Corbet , Philipp Rudo , Eric Biederman , "Guilherme G. Piccoli" Cc: kexec@lists.infradead.org, Ricardo Ribalda , Ross Zwisler , Steven Rostedt , "Joel Fernandes (Google)" , Sergey Senozhatsky , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org X-Mailer: b4 0.11.0-dev-696ae X-Developer-Signature: v=1; a=openpgp-sha256; l=1258; i=ribalda@chromium.org; h=from:subject:message-id; bh=U6cVA0f3MVv7jTHbprLKEENRfx9C5MeH7N8/eIFjhzo=; b=owEBbQKS/ZANAwAKAdE30T7POsSIAcsmYgBjowEB2GKKde5eall1LO2Pukz0oHPGS78uqBtODlWc 0ycx3AKJAjMEAAEKAB0WIQREDzjr+/4oCDLSsx7RN9E+zzrEiAUCY6MBAQAKCRDRN9E+zzrEiNpsD/ 4/Jd6hh8jIzj6DeUtxGlMzPF8D5zTmDrn/O1OymQxG1FrMk5siVZtOH5aFCarWFYcAhrpdhW4IyzQG x0LSbJOT9jtwz5WKENrU42nTbpshboubcK+byC6h9iFYohm+qqWd0DVMtYej85mKcLmBHuT4dp4MoI LPkqfifmzf9blmrz2nDD2uArhMxRsApVCT68UqoZcDIALczol/keRjGKk9vZd8N12QMeUEfCZ+uMs3 dT+AIpxtpZ1NWQpzgdypP9qzvi5ORxV+fA/DkV2ebJ42YUgHdi2NXRE8m7srVCBOLaHJfRSWo0zkGK DCjmmjzjvEjbxg2w0zqkQrQXtKge17NMqdFNrorlc3zOootGjCl32IWvL8oLVI4h6GCBzcDSasVvNT S2D1C3y/IMgOq+cxa3gwXY9Iq0QKA3eSKGvF211pYJYSXSRfjyx72V2VldqDwD/4XS+8lpJ90Ilwn3 txPAfh70ipePz0zVIlvic1kAGXOhxdsXlGVQ+azTd6eBL0e40YuhKA6xogOKxMcMsFD5CZNwZdhGQ1 JkYCGDuyvx5Abq4eX6KsYYAjWrWQ/vOurA90O4gF7DngsY7OB0vWT2T5FJbneNNtj9Nsg/b2HtjoTP PpkbxvNdPTJleHpZEy3DIrOPpkM8bU2jp5zQi/q/mxk7hruVcHMZhsZd/x/Q== X-Developer-Key: i=ribalda@chromium.org; a=openpgp; fpr=9EC3BB66E2FC129A6F90B39556A0D81F9F782DA9 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752828020049342966?= X-GMAIL-MSGID: =?utf-8?q?1752828020049342966?= kexec_load_disabled affects both ``kexec_load`` and ``kexec_file_load`` syscalls. Make it explicit. Signed-off-by: Ricardo Ribalda --- Documentation/admin-guide/sysctl/kernel.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst index 98d1b198b2b4..97394bd9d065 100644 --- a/Documentation/admin-guide/sysctl/kernel.rst +++ b/Documentation/admin-guide/sysctl/kernel.rst @@ -450,9 +450,10 @@ this allows system administrators to override the kexec_load_disabled =================== -A toggle indicating if the ``kexec_load`` syscall has been disabled. -This value defaults to 0 (false: ``kexec_load`` enabled), but can be -set to 1 (true: ``kexec_load`` disabled). +A toggle indicating if the syscalls ``kexec_load`` and +``kexec_file_load`` have been disabled. +This value defaults to 0 (false: ``kexec_*load`` enabled), but can be +set to 1 (true: ``kexec_*load`` disabled). Once true, kexec can no longer be used, and the toggle cannot be set back to false. This allows a kexec image to be loaded before disabling the syscall,