Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4807637rwb; Mon, 21 Nov 2022 12:11:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf6XmhgmwYkqW/5Gr1iLeMmwM1bL7CBZoWd04UAZpHos/0D7gECkfSXPk1FrNCqsvoisHq3J X-Received: by 2002:a17:90b:2809:b0:212:e8da:fc3f with SMTP id qb9-20020a17090b280900b00212e8dafc3fmr27322849pjb.189.1669061486365; Mon, 21 Nov 2022 12:11:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669061486; cv=none; d=google.com; s=arc-20160816; b=ZkXzaNTVEGUOuVnMzgz/KdwymHe/VT5WUn9cLTHfh4mvIrMGtHgac/YgEOfDIfCDpE ZdLg1KbrUJlcK76Oz4IlggD92M/S2A37HJ30kFK7uyzVmyWVPE2tVh1fSR5ZbbJEZIPr T/56PQSWmgF1IXdWjQzakJ936PQTCKG8a5yr+QLPNChcpnOZBDo/TF1RZZv8atOE/EC9 p/+TqFWFtat37qw1VEM6txFO0YyXotdsRqym5krroUinbiqwuRJb4vsM1tjIyW/xpgm2 8qkjIh+XMGn5bPdZ7OW8jeb562h0WNtsso8TXKysO7T/ZAv59/Bv4uh91GRjcGRpTVUe QFZw== 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=HQpY3CQUegTWmCkXgl99eMU+GJMLVl1pHik0VEKN398=; b=J9di+HK5mleUc0Ve6WANKRcJRt+c8lmErN/U8p8CivYX8QvNhU+znlzSXxzYlgeoR2 SBW7jBSnvwdcqh7GfKVtpy/E2ZRJGswXRyqrn1GAg4DQOAieKnwiXK+uQapFXz3d/YoJ jNzrHtnpdWeP6AZ1d9cW8cyv/7Oz3sAABKNMADsbwqK4vtfke/GtVS5RdOGdW5/I1DRe dRDwqVLixrFux7fGFdCezdtFn34+ciN89ldvMU5RQm9KWZO6s5ib62hP3oPSKNzFW8Fs LQIKFlrbKVsCRvLYPB5FeJp7jcI5WCpQclshv4KVJCWykG/GfnI32fG4xm+WEeFanaU9 pU6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=RpyjW+Rn; 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=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i8-20020aa78d88000000b0056e48944895si11176480pfr.317.2022.11.21.12.11.12; Mon, 21 Nov 2022 12:11:26 -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=@alien8.de header.s=dkim header.b=RpyjW+Rn; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230041AbiKUTcZ (ORCPT + 91 others); Mon, 21 Nov 2022 14:32:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229772AbiKUTcY (ORCPT ); Mon, 21 Nov 2022 14:32:24 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9014DB94AE for ; Mon, 21 Nov 2022 11:32:23 -0800 (PST) Received: from zn.tnic (p200300ea9733e725329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e725:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 1776E1EC03EA; Mon, 21 Nov 2022 20:32:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1669059142; 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: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=HQpY3CQUegTWmCkXgl99eMU+GJMLVl1pHik0VEKN398=; b=RpyjW+RnJoei/zRyuH5PLniHkwML66D2kzVkDqU03MjOfwAwSZUcs701swyCcc50YZHq3w Q6P0d4inEnm5SyPxaeRq2FdfyRUWu9JXtk+pqoAfQIqpzzY1sqSpe3ALUZ6SMblKkZ5eWi BlwulgbSmUFNyZ6OUie9wa+fVz8NTUI= Date: Mon, 21 Nov 2022 20:32:18 +0100 From: Borislav Petkov To: Steven Rostedt Cc: LKML , Linus Torvalds , Masami Hiramatsu , Andrew Morton , Peter Zijlstra , Kees Cook , Josh Poimboeuf , KP Singh , Chris Mason , Mark Rutland , Alexei Starovoitov , Florent Revest , Greg Kroah-Hartman , Christoph Hellwig Subject: Re: [PATCH] error-injection: Add prompt for function error injection Message-ID: References: <20221121104403.1545f9b5@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221121104403.1545f9b5@gandalf.local.home> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Mon, Nov 21, 2022 at 10:44:03AM -0500, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The config to be able to inject error codes into any function annotated > with ALLOW_ERROR_INJECTION() is enabled when CONFIG_FUNCTION_ERROR_INJECTION > is enabled. But unfortunately, this is always enabled on x86 when KPROBES > is enabled, and there's no way to turn it off. > > As kprobes is useful for observability of the kernel, it is useful to have > it enabled in production environments. But error injection should be > avoided. Add a prompt to the config to allow it to be disabled even when > kprobes is enabled, and get rid of the "def_bool y". > > This is a kernel debug feature (it's in Kconfig.debug), and should have > never been something enabled by default. > > Cc: stable@vger.kernel.org > Fixes: 540adea3809f6 ("error-injection: Separate error-injection from kprobe") > Signed-off-by: Steven Rostedt (Google) > --- > lib/Kconfig.debug | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) As stated on another thread, debugging production kernels where folks have been injecting errors into functions is not something anyone would like to and have to do. Especially if from looking at system dumps, it is not even clear what has been injected and why, rendering the system unstable and the issue probably unreproducible. Acked-by: Borislav Petkov Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette