Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1206542rwb; Thu, 1 Dec 2022 14:01:59 -0800 (PST) X-Google-Smtp-Source: AA0mqf4IUzMitKLQ380YzC1OgIRLzIuh8g1eTUtCTR6YLCy3nM2UTgXcx/d35fW1rxZry15E+94c X-Received: by 2002:a17:903:2154:b0:189:98b0:8842 with SMTP id s20-20020a170903215400b0018998b08842mr17211572ple.103.1669932119310; Thu, 01 Dec 2022 14:01:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669932119; cv=none; d=google.com; s=arc-20160816; b=vJhmWHzQsRBOa7ls/dnaKZ6HNQfjp03BODu6RvPSUJRl42/B2+gUOMzGnhqINFD2eC /KfCewRsWyQdtQkl4kGo1/aFUcS47M6GZVBln6BSHFNEcNcGjifW7icJYyJCp75mpYmL xnygPK6+QcepKkzaiWSmnvwsliOGmdWdzBw1ypQR21SOSIcFxQueFz9DeurbZNLeSjod YysD+plQn0k5V0frTFXLd+1j6JeInEqEM6xpX+UjqRDUHSqT+nvLRxc171MKzZGas38i y9kpB1NkZC0x7DciL31YqP6rR3+aV8bI8dcQrOTdOkusL58Ku1XM9pnmSlGXzBJZPp/K GmGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=h73rzqzYtxYL1hP+RpRQGycEYT2YpbcVFVSmceagVNs=; b=ei0qW+8ysbtn5SInFNvT6hekGIRGQPy2tjN3qqraRMMHtPPGanc0Bd7uQ/xhzSiMhM nxdGeKGf2EMIzDnqrQ7XzMTDUowxQlmdkndptPLkFnaPOli29929WGpJMZ/yvGIMX7ia JeRlv/A0C3Bv2r3VtFFyJH8SaRySv6VOPhoeNTwFDmW/KQgqP50UdpJ67vBhPnp6vRcn FSIaCE9G2W03ds++toxavAwzjgFMoxcpX4z+zO7Qk5UFORktpdehBpQ3e+Q5TDOoUugy PcLLyPraeoH9vAlDJPhiNXiQDoZOkQxGx8u8Q+aYhpFqanjy3b+m9fY1i0+8Z0mlrbRi yLIQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w10-20020a63474a000000b004776762655fsi5433494pgk.606.2022.12.01.14.01.48; Thu, 01 Dec 2022 14:01:59 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230059AbiLAVZd (ORCPT + 81 others); Thu, 1 Dec 2022 16:25:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229571AbiLAVZb (ORCPT ); Thu, 1 Dec 2022 16:25:31 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83BDFC1BF6 for ; Thu, 1 Dec 2022 13:25:30 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 21CF96212D for ; Thu, 1 Dec 2022 21:25:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7401C433D6; Thu, 1 Dec 2022 21:25:27 +0000 (UTC) Date: Thu, 1 Dec 2022 16:25:26 -0500 From: Steven Rostedt To: Chris Mason Cc: Kees Cook , "Masami Hiramatsu (Google)" , LKML , Borislav Petkov , Alexei Starovoitov , Linus Torvalds , Andrew Morton , Peter Zijlstra , Josh Poimboeuf , KP Singh , Mark Rutland , Florent Revest , Greg Kroah-Hartman , Christoph Hellwig Subject: Re: [RFC PATCH] panic: Add new taint flag for fault injection Message-ID: <20221201162526.2fdfd65d@gandalf.local.home> In-Reply-To: <78b7a67f-8c5b-6b2e-7fb5-01c47d75c104@meta.com> References: <20221201234121.8925fdf83115747ac4ac116a@kernel.org> <166991263326.311919.16890937584677289681.stgit@devnote3> <202212010838.B0B109DA@keescook> <20221201114848.13a87aca@gandalf.local.home> <202212010852.6D4B542@keescook> <20221201141426.08411b29@gandalf.local.home> <78b7a67f-8c5b-6b2e-7fb5-01c47d75c104@meta.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,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 On Thu, 1 Dec 2022 16:00:03 -0500 Chris Mason wrote: > On 12/1/22 2:14 PM, Steven Rostedt wrote: > > On Thu, 1 Dec 2022 08:53:02 -0800 > > Kees Cook wrote: > > > >>> Have you not been reading this thread? > >> > >> I skimmed it -- trying to catch up from turkey week. If this was already > >> covered, then please ignore me. It just wasn't obvious from the commit > >> log why it was included. > > > > That's a better request :-) > > > > That is, please add why this is needed for BPF (and also include a Link: > > tag to this thread). > > Sorry, I'm completely failing to parse. Is this directed at Kees or > Benjamin? I'm also not sure what the this is in "why this is needed for > BPF"? > It was directed towards Kees. I don't even know who "Benjamin" is. I don't see a "Benjamin" in the Cc list. And "this" is for: --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c @@ -2137,6 +2137,8 @@ int perf_event_attach_bpf_prog(struct perf_event *event, goto unlock; /* set the new array to event->tp_event and set event->prog */ + if (prog->kprobe_override) + add_taint(TAINT_FAULT_INJECTED, LOCKDEP_NOW_UNRELIABLE); event->prog = prog; event->bpf_cookie = bpf_cookie; rcu_assign_pointer(event->tp_event->prog_array, new_array); -- Steve