Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7152181rwl; Mon, 9 Jan 2023 19:04:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXuaV70h/vezSXc8ZM06nnWB+mzCZXIKLrzntxVJkanUfne8wSRnXR/T8XgZctq8UAKlO5P1 X-Received: by 2002:a05:6a20:a888:b0:af:758e:5923 with SMTP id ca8-20020a056a20a88800b000af758e5923mr75762237pzb.21.1673319849309; Mon, 09 Jan 2023 19:04:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673319849; cv=none; d=google.com; s=arc-20160816; b=RpZOsULS3mvVbeYRc7X5n21aua8Gm1RO1YgNOlbvlKL7lEYXQrHEta9vEPdwX/vTsu CazDhkV2uesg3dFmSHquK3sokITB6NuD5Enj5JU9namuQaX5J7yBeJDjmPoI7o2nkKPd y3nFE/J3F4JfpV3LqFVHiB+xfY+t0pWQPCGNO1K/IMDefty8hGLIu2Q0weczVVQxYv5C sYdf0sQ4Ru2TeO/eb7572Y3OunENyuhdzUTK8xBnllZa22NiYa3D2eQzc6lQaO8RYVpg BygwV/0AfzGSm6MUepKAEBnXxJ2Eqt/iOBQ80b6Q6U0Ba2FwWNyNZYIhX0KBCUEqcLve hObA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=l94HaeBEBiFD5ilSjwcw6DDx5RLDQlnkVXrKy/YYH8k=; b=ezp9qcuyV3JGrC7kYrTKZPvRF0/kxGPP4PjkVaKrESIHNqC+Qr3WsgcJdPseMK2/oi CzrIYFkkdnByiwdJ5uFMe5X9lC1LMUbSkk2cA8ABewCCDzRmXQ8crZWMMVwbZZwwyeEG h3utbKFnBpz1fJMfY2+/b78OgNEo1vQdw8ENxJml3P0NtrbZEAq9KwZbR7w0R/kFjde9 1gOEX3t83NibCjS1H3h1JAqysPA2SOVDkFHo343MhAIvbTtcp1AmPUujTtDepFo0xMtN M90QM9YPan+OE0TR5FhoR/y+MyUyVoTh/fexnN8EvYqeAt1yeoWCu8jkLrrhGbOJnmhq acDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DsuSJQUl; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d8-20020a634f08000000b004b124f7a60asi7162326pgb.610.2023.01.09.19.04.01; Mon, 09 Jan 2023 19:04:09 -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=@redhat.com header.s=mimecast20190719 header.b=DsuSJQUl; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229762AbjAJCdj (ORCPT + 53 others); Mon, 9 Jan 2023 21:33:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbjAJCdh (ORCPT ); Mon, 9 Jan 2023 21:33:37 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 846551839D for ; Mon, 9 Jan 2023 18:32:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673317976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=l94HaeBEBiFD5ilSjwcw6DDx5RLDQlnkVXrKy/YYH8k=; b=DsuSJQUlMksNHCDxPzgG9WcaVn98J4OjZnjdxnVi5vL7wjGY4y6zw/opXet0BPmrhJDjUt Ko5ffxbHQy41enavTK66fvbSDGBZyze4/qGs6Tt7p3tHx4KcgqUSDEv2WolP7dx6HOuUD+ cKqk82JMxcSzXfilITJaGjJEO/z9XpE= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-142-tXc1h2RJOnCvWpTl6LAxOg-1; Mon, 09 Jan 2023 21:32:55 -0500 X-MC-Unique: tXc1h2RJOnCvWpTl6LAxOg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A42F33804062; Tue, 10 Jan 2023 02:32:54 +0000 (UTC) Received: from localhost (ovpn-12-27.pek2.redhat.com [10.72.12.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CBCFF2166B26; Tue, 10 Jan 2023 02:32:53 +0000 (UTC) Date: Tue, 10 Jan 2023 10:32:49 +0800 From: Baoquan He To: Ricardo Ribalda , akpm@linux-foundation.org Cc: Philipp Rudo , Eric Biederman , "Guilherme G. Piccoli" , Jonathan Corbet , linux-doc@vger.kernel.org, Sergey Senozhatsky , "Joel Fernandes (Google)" , Petr Tesarik , kexec@lists.infradead.org, Bagas Sanjaya , Steven Rostedt , linux-kernel@vger.kernel.org, Ross Zwisler Subject: Re: [PATCH v6 0/3] kexec: Add new parameter to limit the access to kexec Message-ID: References: <20221114-disable-kexec-reset-v6-0-6a8531a09b9a@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221114-disable-kexec-reset-v6-0-6a8531a09b9a@chromium.org> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 On 01/04/23 at 03:38pm, Ricardo Ribalda wrote: > Add two parameter to specify how many times a kexec kernel can be loaded. > > These parameter allow hardening the system. > > While we are at it, fix a documentation issue and refactor some code. The whole series looks good to me, thx. Acked-by: Baoquan He > > To: Jonathan Corbet > To: Eric Biederman > Cc: linux-doc@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Cc: kexec@lists.infradead.org > Cc: Joel Fernandes (Google) > Cc: Sergey Senozhatsky > Cc: Steven Rostedt > Cc: Ross Zwisler > To: Philipp Rudo > To: Guilherme G. Piccoli > Cc: Bagas Sanjaya > Cc: Petr Tesarik > Cc: Baoquan He > Signed-off-by: Ricardo Ribalda > > --- > Changes in v6: > - Fix kexec type on kexec_file > - Match the length of the table borders to the sections underline (Thanks Bagas!) > - Fix typo on kexec_load_limit_reboot (Thanks Petr!) > - Improve commit message (Thanks Baoquan!) > - Link to v5: https://lore.kernel.org/r/20221114-disable-kexec-reset-v5-0-1bd37caf3c75@chromium.org > > Changes in v5: > - Remove maxlen from ctl_table. Thanks Steven! > - Link to v4: https://lore.kernel.org/r/20221114-disable-kexec-reset-v4-0-ab809c8d988c@chromium.org > > Changes in v4 (Thanks Steven!): > - Uses sysctl instead or module_parameters > - Pass image type instead of boolean to permitted > - Fix typo on flag handling > - Return -EINVAL for values that does not change the current value. > - Link to v3: https://lore.kernel.org/r/20221114-disable-kexec-reset-v3-0-4ef4e929adf6@chromium.org > > Changes in v3: > - s/paramter/parameter/ Thanks Ghilherme! > - s/permited/permitted/ Thanks Joel! > - Link to v2: https://lore.kernel.org/r/20221114-disable-kexec-reset-v2-0-c498313c1bb5@chromium.org > > Changes in v2: > - Instead of kexec_reboot_disabled, add two new counters (Thanks Philipp!) > - Link to v1: https://lore.kernel.org/r/20221114-disable-kexec-reset-v1-0-fb51d20cf871@chromium.org > > --- > Ricardo Ribalda (3): > Documentation: sysctl: Correct kexec_load_disabled > kexec: Factor out kexec_load_permitted > kexec: Introduce sysctl parameters kexec_load_limit_* > > Documentation/admin-guide/sysctl/kernel.rst | 25 +++++++- > include/linux/kexec.h | 3 +- > kernel/kexec.c | 4 +- > kernel/kexec_core.c | 94 ++++++++++++++++++++++++++++- > kernel/kexec_file.c | 11 ++-- > 5 files changed, 127 insertions(+), 10 deletions(-) > --- > base-commit: 479174d402bcf60789106eedc4def3957c060bad > change-id: 20221114-disable-kexec-reset-19b7e117338f > > Best regards, > -- > Ricardo Ribalda >