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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C23DEC47089 for ; Thu, 1 Dec 2022 21:11:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229967AbiLAVL5 (ORCPT ); Thu, 1 Dec 2022 16:11:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229921AbiLAVLz (ORCPT ); Thu, 1 Dec 2022 16:11:55 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A08DBEE1A; Thu, 1 Dec 2022 13:11:54 -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 3451B6211F; Thu, 1 Dec 2022 21:11:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89F1AC433D6; Thu, 1 Dec 2022 21:11:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1669929113; bh=3nzk2Hz804l2X5kp1Ia4dfXY8pRJ0AmHiPtOm4v+ijg=; h=Date:To:From:Subject:From; b=EIo8eEp0qBwTZ9qL3rKUbThVgOB01ho/wRFhnrCT6LIJoE6ecMZ9KJGiI5gIAeyWo Dft0C1w+UlxtzYom0fIpUS97FZOGWOxMtB91dZXe/adLzr3cFyrwV1/JXpAk1CeseT kerDq+gk16LiVJDopf5iXew+BFYRrNhq4PLFl2fE= Date: Thu, 01 Dec 2022 13:11:52 -0800 To: mm-commits@vger.kernel.org, stable@vger.kernel.org, revest@chromium.org, peterz@infradead.org, mhiramat@kernel.org, mark.rutland@arm.com, kpsingh@kernel.org, keescook@chromium.org, jpoimboe@redhat.com, hch@infradead.org, gregkh@linuxfoundation.org, bp@suse.de, alexei.starovoitov@gmail.com, rostedt@goodmis.org, akpm@linux-foundation.org From: Andrew Morton Subject: [to-be-updated] error-injection-add-prompt-for-function-error-injection.patch removed from -mm tree Message-Id: <20221201211153.89F1AC433D6@smtp.kernel.org> Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org The quilt patch titled Subject: error-injection: add prompt for function error injection has been removed from the -mm tree. Its filename was error-injection-add-prompt-for-function-error-injection.patch This patch was dropped because an updated version will be merged ------------------------------------------------------ From: "Steven Rostedt (Google)" Subject: error-injection: add prompt for function error injection Date: Mon, 21 Nov 2022 10:44:03 -0500 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. Link: https://lkml.kernel.org/r/20221121104403.1545f9b5@gandalf.local.home Fixes: 540adea3809f6 ("error-injection: Separate error-injection from kprobe") Signed-off-by: Steven Rostedt (Google) Acked-by: Borislav Petkov Acked-by: Masami Hiramatsu (Google) Cc: Alexei Starovoitov Cc: Christoph Hellwig Cc: Florent Revest Cc: Greg Kroah-Hartman Cc: Josh Poimboeuf Cc: Kees Cook Cc: KP Singh Cc: Mark Rutland Cc: Peter Zijlstra Cc: Signed-off-by: Andrew Morton --- lib/Kconfig.debug | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/lib/Kconfig.debug~error-injection-add-prompt-for-function-error-injection +++ a/lib/Kconfig.debug @@ -1875,8 +1875,14 @@ config NETDEV_NOTIFIER_ERROR_INJECT If unsure, say N. config FUNCTION_ERROR_INJECTION - def_bool y + bool "Fault-injections of functions" depends on HAVE_FUNCTION_ERROR_INJECTION && KPROBES + help + Add fault injections into various functions that are annotated with + ALLOW_ERROR_INJECTION() in the kernel. BPF may also modify the return + value of theses functions. This is useful to test error paths of code. + + If unsure, say N config FAULT_INJECTION bool "Fault-injection framework" _ Patches currently in -mm which might be from rostedt@goodmis.org are