Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1120487ybj; Thu, 7 May 2020 15:29:51 -0700 (PDT) X-Google-Smtp-Source: APiQypLL7sbkuI0B8RpcuJEGuSHapKQS+vSiOzEt7ck0ssoyxQSxVZ8w6f98FmMSrYeCr8AOMDU+ X-Received: by 2002:a17:907:11c5:: with SMTP id va5mr7888980ejb.200.1588890591692; Thu, 07 May 2020 15:29:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588890591; cv=none; d=google.com; s=arc-20160816; b=Ej4s+DxKcMnvZQYcQwOuY4zTabciPUz8T62bi8CThRYZ4jwFxWtA4T4wQXuiBsbDHi Bu3tODtv9NAJ1u95TBEBPFYANmVZuIfaNingYGdEU05fWSngYhoC/DtDVb17R7rLnJIO Iaf5QV45/vvrUsRj3UjQtdE+Odrc65yVyMobIvyuyaCSGfDqSgrXuQHj3Kq7POFLoCFI fZTuIT0ygxi8T2MAKRMLWz3EjCmawWjCoKM/Fbcvldp4h+mJ1giU2LOMjptgSiayuOAM S9KAbKKUN+7uvA1LkMmd9IQL7SYzhIXeBlm01T6GpNW6qy5OBgr+IbXi64GPd8ZnexOL cB2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=DZd2V6aZzC95wLlSgPEBXlyeRSaAQc/BSqmBsSSCJnY=; b=T9z+a7c1xLJFAZXC2Z3HbV6u6wdWthdnobAbu3whCJcEO4Kf8YukF2LnNR2o7uoEQz dkvN4QrxKSZ92GMT4BWT+AUIVvBbid/y2YykhVbrvrs+vzQjOLvneoh7pbKtDVdLLTx4 x4Yv3dxHwwUZhSAtX/7IpM23FeSd+OhPU3q3DEfSNGzu1F8WapGkLdwD5+XZkXGjGnor ou2h/Rg+HUaSdb19k0XuGjlk1UZDpknRRcQ7+JwvHVwhnb/KVBdyVkiIfPmtn5JwNmRw 2ZVYz/p98wCikdVx9z+jY2OrAh6yh7KJdekr/90V+3N/xQR/fgGUmTr1upXeXMUisgKI gqgQ== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o12si3999551edv.257.2020.05.07.15.29.28; Thu, 07 May 2020 15:29:51 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727032AbgEGW0C (ORCPT + 99 others); Thu, 7 May 2020 18:26:02 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:35098 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726579AbgEGW0C (ORCPT ); Thu, 7 May 2020 18:26:02 -0400 Received: by mail-pl1-f195.google.com with SMTP id f8so2666913plt.2; Thu, 07 May 2020 15:26:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=DZd2V6aZzC95wLlSgPEBXlyeRSaAQc/BSqmBsSSCJnY=; b=Mn907trl+04MmBXU84WKRAQT1FD7GWoxusIl9dCBVbp/AahOB7DwgnAQ/kpNIPh4OY s9ICGmGWRFlrgtjzDWo6CRQnq+IxgHaPJdeMr4+iB78w88SgyfklLk8uQ9Z8KYY4ZP4b XfNjUjCayU/bN5L0x2hxqOC6dMNjgZT10UnctORR4Q4kAyOln2mAkKW8tCrg9JHQJlZf eaFg2Bx+/4c2eVqrr/7N/YLbvSVlsyZTB2ruuYTvlibqF18vSI4vQJjjCWLQ7EJJTGaO bqO58PCHIMfSEdHo3TGGdqqzQ3ar+uOnqnlAvVcU8+18JrkVqJDU4jH2p0USaiaR+ivh K7qQ== X-Gm-Message-State: AGi0PuYEDYBPA05+Z+kZr6A1Lk+Sw1zfO8QqtPA7+WmN7BXOAzawfMHd 0yjOSRQ2sCbkbWEmSC1+zDU= X-Received: by 2002:a17:90a:d3cc:: with SMTP id d12mr2582928pjw.158.1588890360942; Thu, 07 May 2020 15:26:00 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id h5sm769234pjv.4.2020.05.07.15.25.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 15:25:59 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 04A1C403EA; Thu, 7 May 2020 22:25:58 +0000 (UTC) Date: Thu, 7 May 2020 22:25:58 +0000 From: Luis Chamberlain To: Rafael Aquini Cc: Tso Ted , Adrian Bunk , Linus Torvalds , Greg Kroah-Hartman , Laura Abbott , Jeff Mahoney , Jiri Kosina , Jessica Yu , Takashi Iwai , Ann Davis , Richard Palethorpe , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, kexec@lists.infradead.org, linux-fsdevel@vger.kernel.org, dyoung@redhat.com, bhe@redhat.com, corbet@lwn.net, keescook@chromium.org, akpm@linux-foundation.org, cai@lca.pw, rdunlap@infradead.org Subject: Re: [PATCH v2] kernel: add panic_on_taint Message-ID: <20200507222558.GA11244@42.do-not-panic.com> References: <20200507180631.308441-1-aquini@redhat.com> <20200507182257.GX11244@42.do-not-panic.com> <20200507184307.GF205881@optiplex-lnx> <20200507184705.GG205881@optiplex-lnx> <20200507203340.GZ11244@42.do-not-panic.com> <20200507220606.GK205881@optiplex-lnx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200507220606.GK205881@optiplex-lnx> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 07, 2020 at 06:06:06PM -0400, Rafael Aquini wrote: > On Thu, May 07, 2020 at 08:33:40PM +0000, Luis Chamberlain wrote: > > I *think* that a cmdline route to enable this would likely remove the > > need for the kernel config for this. But even with Vlastimil's work > > merged, I think we'd want yet-another value to enable / disable this > > feature. Do we need yet-another-taint flag to tell us that this feature > > was enabled? > > > > I guess it makes sense to get rid of the sysctl interface for > proc_on_taint, and only keep it as a cmdline option. That would be easier to support and k3eps this simple. > But the real issue seems to be, regardless we go with a cmdline-only option > or not, the ability of proc_taint() to set any arbitrary taint flag > other than just marking the kernel with TAINT_USER. I think we would have no other option but to add a new TAINT flag so that we know that the taint flag was modified by a user. Perhaps just re-using TAINT_USER when proc_taint() would suffice. Luis