From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3E32C47257 for ; Sat, 9 May 2020 03:49:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BEC9721775 for ; Sat, 9 May 2020 03:49:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588996140; bh=Q0CkM/AWUVT8W6ifHxihz7a3YfYK07PSsbfPpaAPOKk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=0azQ702YGD1EMI8X3pZB5uPzPmNXzlsUuurwf4vr8BCv0PjcWlTXk2JO2IATLRlHQ dngHWaVzdT0s1gUYbp3MU8PQBRt5ZBQluZgec9zfiQ+QzexqIOf1Q2Fz2JLdpj/ojW 0KwM+LmwR4tTIGkvUVkqt8CwAQuN0sXGM148SFzU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728757AbgEIDtA (ORCPT ); Fri, 8 May 2020 23:49:00 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:41911 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726415AbgEIDs7 (ORCPT ); Fri, 8 May 2020 23:48:59 -0400 Received: by mail-pg1-f193.google.com with SMTP id r10so1335611pgv.8; Fri, 08 May 2020 20:48:57 -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=hD0R4FU5llXtJjcH0Qaw/mWo7Wc3hOPuTzuuFmKSMr4=; b=ZS5aG6/1kxOHJXVhz2gu1gmYfrZQameu2SkSkabk8a0F+USyoE1XwtoWcxitMpGYHg gm1fHOdgz6LDFLR6Uv8H3OQjMQVB5wextmOFtwDuPAdcRAqSxN7DGSHpTcoUbGGCAyl3 CPunHkKzxA9vF7hnD2azdaqN8BzhXwSO4sxYgmbIk4CYGC1+SHggL836vlFllTJGeL6w U8ay73ewUmf3CyFVJSIPjoVK4JieTWPBRi2ZsZ/mRT8oE2UCMXpaRXKrDPfRB8Td5VZL lcKJIaAQeXSyfpAsSaXNogL1eeKuncBCzPgFCsPb3w9QAoEBFGFIMvx7xsP8ODBwl5Jo Cu3w== X-Gm-Message-State: AGi0PuZLIxiurkFf1n0t9/l0bKEUFyVs5qI4Y94dxlK5Rtn+zPBwfgAR HudqQ2ox62JOYJcnbjxydWc= X-Google-Smtp-Source: APiQypJgqquftLfojmRDQ311OD9XhSFj0W23UlCHJWHNlOTbAGa4+b+T6f+86Ay6aZJLvCi5D/41TA== X-Received: by 2002:a63:dc56:: with SMTP id f22mr4823828pgj.284.1588996137062; Fri, 08 May 2020 20:48:57 -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 6sm3199157pfj.123.2020.05.08.20.48.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 20:48:55 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 642134035F; Sat, 9 May 2020 03:48:54 +0000 (UTC) Date: Sat, 9 May 2020 03:48:54 +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: <20200509034854.GI11244@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> <20200507222558.GA11244@42.do-not-panic.com> <20200508124719.GB367616@optiplex-lnx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200508124719.GB367616@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 Fri, May 08, 2020 at 08:47:19AM -0400, Rafael Aquini wrote: > On Thu, May 07, 2020 at 10:25:58PM +0000, Luis Chamberlain wrote: > > 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. > > > > We might not need an extra taint flag if, perhaps, we could make these > two features mutually exclusive. The idea here is that bitmasks added > via panic_on_taint get filtered out in proc_taint(), so a malicious > user couldn't exploit the latter interface to easily panic the system, > when the first one is also in use. I get it, however I I can still see the person who enables enabling panic-on-tain wanting to know if proc_taint() was used. So even if it was not on their mask, if it was modified that seems like important information for a bug report analysis. Luis From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pg1-f195.google.com ([209.85.215.195]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jXGU1-00027P-0X for kexec@lists.infradead.org; Sat, 09 May 2020 03:49:02 +0000 Received: by mail-pg1-f195.google.com with SMTP id 207so1825149pgc.6 for ; Fri, 08 May 2020 20:48:57 -0700 (PDT) Date: Sat, 9 May 2020 03:48:54 +0000 From: Luis Chamberlain Subject: Re: [PATCH v2] kernel: add panic_on_taint Message-ID: <20200509034854.GI11244@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> <20200507222558.GA11244@42.do-not-panic.com> <20200508124719.GB367616@optiplex-lnx> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200508124719.GB367616@optiplex-lnx> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Rafael Aquini Cc: linux-doc@vger.kernel.org, Takashi Iwai , Jeff Mahoney , bhe@redhat.com, corbet@lwn.net, Laura Abbott , dyoung@redhat.com, Ann Davis , Richard Palethorpe , keescook@chromium.org, Jiri Kosina , cai@lca.pw, Adrian Bunk , Tso Ted , Jessica Yu , Greg Kroah-Hartman , rdunlap@infradead.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, akpm@linux-foundation.org, Linus Torvalds On Fri, May 08, 2020 at 08:47:19AM -0400, Rafael Aquini wrote: > On Thu, May 07, 2020 at 10:25:58PM +0000, Luis Chamberlain wrote: > > 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. > > > > We might not need an extra taint flag if, perhaps, we could make these > two features mutually exclusive. The idea here is that bitmasks added > via panic_on_taint get filtered out in proc_taint(), so a malicious > user couldn't exploit the latter interface to easily panic the system, > when the first one is also in use. I get it, however I I can still see the person who enables enabling panic-on-tain wanting to know if proc_taint() was used. So even if it was not on their mask, if it was modified that seems like important information for a bug report analysis. Luis _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec