Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp588809pxb; Thu, 30 Sep 2021 12:29:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwi11+wr8WWT99gwfstzcxni99j8ACsxCE27W9Z4nPRTwRR97c/qw+YyYE4IT431ZPH4HvH X-Received: by 2002:a17:907:7790:: with SMTP id ky16mr1207312ejc.490.1633030188221; Thu, 30 Sep 2021 12:29:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633030188; cv=none; d=google.com; s=arc-20160816; b=03op2NbzDR82As4bukgDxAj3aL6I4zIh6n/fJ+ICdoqBmBBjdNCSHOlY9e1OM137Mo o8a5Ao2Wnq3sEydsZNDi8PslTYEFSUDyvHP9A2PuA78TnS21sB9/TsqFkuhQjKoYnLr2 2UMl2VauMWlItaCt/2gyhKFgbiLKgsfcUmOAHa2Lbm2wAXW9iKO8nPBjMhakzTP680g3 ctMJuXV7Ktj4nGe95bTeCXJptZSWqV62v2pN7rKGdVFRnI72kckD3ANL4G2Xa/WXyJlk IRr/YWN9A8AvcUl6iq6huK4pK7ErNtAqgJ+0hCC4ZvauV83YJgmKeCqdMfzzlCwJZ1yo 175A== 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=/gsG+dDfg+OEmiWFR9f128A++n69MzAw+gEWwpvDIp8=; b=ADKf78DFxfwctRJKbOPi9ULMZFkzF3wPRvCBpQBUK1Syp/oMzCtZ2UpX7Mul4XwGrg nZqCTbLPFDAcP3XscddhYpUYqr1/508lKnP0evzkaRinfGrz7nG2rObgH+pUL/VeHI1/ v9UZFa9reCnEQrvgrk+Aameo75Gi9vezHgGQnkSFuJ3dcfYpnWXd6EEL4TD91wK/ajo6 5050KZ6Z4RBcRmrf2YhnwKiIy3GM3cVbK0D2odkYdXXNycMSI+kfzKZQzC5VJ+p4GGTd OSPjTovjHjC84A+4+2Z8/8kckDXRAkcC3d1u6QTWszkKl8gZeRJ0726Rqu4GL5IzcbIH 1uAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="VNu/trbh"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h19si4255162ejt.292.2021.09.30.12.29.22; Thu, 30 Sep 2021 12:29:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="VNu/trbh"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1344051AbhI3SiN (ORCPT + 99 others); Thu, 30 Sep 2021 14:38:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344049AbhI3SiL (ORCPT ); Thu, 30 Sep 2021 14:38:11 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CED9C06176C for ; Thu, 30 Sep 2021 11:36:28 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id k17so5776010pff.8 for ; Thu, 30 Sep 2021 11:36:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/gsG+dDfg+OEmiWFR9f128A++n69MzAw+gEWwpvDIp8=; b=VNu/trbhf4rcGgiRp4aVF6Dbtrkt79akhd6yrEfkZfun1GP5HxZ0L6MkNb3GGdZzqD D5qqS5NprqVDLe0eu1PukY8wmYjZcN5LiSA5bCPShIME6izBkbl72ztJ9Kh79ZmmwOw1 aDflBwa5WWuEn0hC8XbqsTIRC7nfRnQMNAJGo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/gsG+dDfg+OEmiWFR9f128A++n69MzAw+gEWwpvDIp8=; b=IN4iAD/dCVrdYdB1rFAPrhAPPux/Gv9zx9YGC+5BBwK/eGA0L5gMunj9LoqcuntBUZ YC1IcNetH+CfwgOCKqhPIrv8LIf/+iE0Kfr/z4Qk7EMDmYd65W7YCA+Yt6WGBperQfch LY+w9fQRD9co1up4kdUTLzeMCU3ZlNU6Irr5vMBamdOfKhplNbQMb2DHfJyBUYzMIDfg oEqMZ2QmADJm6VnxKChw4flRhHFfsi0Qj5eJVSDWk/KPl1LrHI0g/6XWDS605xnSYX2r c/G53wngh9wmpU2KhWLMkQfw4ObJVHe7ZUo1T3dmMMBKkh6PdQcYVapSzUY9Z2p1n7gs +Kxg== X-Gm-Message-State: AOAM5322GBKIozrDX++a6xvg+G8xw0nXVgaUn9Qgb0EgSEnS+IQCsT4v S6EpTMmuZOaMNZ+a5HqiT932+Q== X-Received: by 2002:a62:3893:0:b0:44b:9369:5de5 with SMTP id f141-20020a623893000000b0044b93695de5mr5707789pfa.40.1633026987872; Thu, 30 Sep 2021 11:36:27 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id o14sm3781682pfh.145.2021.09.30.11.36.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 11:36:27 -0700 (PDT) Date: Thu, 30 Sep 2021 11:36:26 -0700 From: Kees Cook To: Alexander Popov Cc: Andrew Morton , Jonathan Corbet , Paul McKenney , Thomas Gleixner , Peter Zijlstra , Joerg Roedel , Maciej Rozycki , Muchun Song , Viresh Kumar , Robin Murphy , Randy Dunlap , Lu Baolu , Petr Mladek , Luis Chamberlain , Wei Liu , John Ogness , Andy Shevchenko , Alexey Kardashevskiy , Christophe Leroy , Jann Horn , Greg Kroah-Hartman , Mark Rutland , Andy Lutomirski , Dave Hansen , Steven Rostedt , Will Deacon , David S Miller , Borislav Petkov , kernel-hardening@lists.openwall.com, linux-hardening@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, notify@kernel.org Subject: Re: [PATCH] Introduce the pkill_on_warn boot parameter Message-ID: <202109301132.E29DB764E8@keescook> References: <20210929185823.499268-1-alex.popov@linux.com> <20210929163143.aa8b70ac9d5cf0b628823370@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 30, 2021 at 09:27:43PM +0300, Alexander Popov wrote: > On 30.09.2021 02:31, Andrew Morton wrote: > > On Wed, 29 Sep 2021 22:01:33 +0300 Alexander Popov wrote: > > > >> On 29.09.2021 21:58, Alexander Popov wrote: > >> [...] > >> If you are fine with this approach, I will prepare a patch adding the > >> pkill_on_warn sysctl. > > > > Why do we need a boot parameter? Isn't a sysctl all we need for this > > feature? > > I would say we need both sysctl and boot parameter for pkill_on_warn. > That would be consistent with panic_on_warn, ftrace_dump_on_oops and > oops/panic_on_oops. If you want to change it at runtime, just make a sysctl: it will be available as a bootparam since v5.8. See commit 3db978d480e2 ("kernel/sysctl: support setting sysctl parameters from kernel command line") -- Kees Cook