Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp676135rwb; Thu, 1 Dec 2022 07:07:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf4AoNKagNgbk9uQgb3QEuwOG8Ogd/2GTNphhL2++RJ8++djce8tONgODldwAlT6/rHV3rSL X-Received: by 2002:a17:907:c08a:b0:7c0:7b21:c5e4 with SMTP id st10-20020a170907c08a00b007c07b21c5e4mr14777564ejc.317.1669907238543; Thu, 01 Dec 2022 07:07:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669907238; cv=none; d=google.com; s=arc-20160816; b=gz7GZj0C79utSZCqTUSseeq1/CUUG/kIFeHjkskpak43Axlh91JM8tmaFnQyJhK7Eg At58lqFB4uJl3u7xEH5XtNX5Dx1JqQ8bIUC47lOiiRGZFF2bYCsxGvXVRF0EJbFcDfua c5Ib54A3czlGv1UOfgVAbz4W2REnjss6AuYMLMSGimZIh/eGuheO3mGZ4p4EVuduVgVD F13sP1UX8BuEJYH4kYsKhHt0SE9q7jvjfoanj9KugCPnpUpCYKwC4jtgdU85kyzguEI2 gGERI1Oci/CW1C9AqSyP/EoRZYM05/xq1rjWvncBdnLmiOb4aUNOZ37XeD6iM56tj2Zb spxg== 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 :dkim-signature; bh=zHNg+5+b8F/thv/u15AmzQNiHoczD5SBnm6bmtpUuPE=; b=jUyq1TIs1n3qHuGLBRa/76BVc8YukA2upUTKJmjvkEdVnKVOIkD6FPR153ilocjzNz lS7oFpHhxWEzvJXk2wxCpx2wQ5S5N4q1N9p8uMH3ZfcMdLhXSk9slVawu8UHpPrYniJy WfiFS0evDn1UkT4XXcZU+ycmBuusc6duf3PhYTxZ3rXNTLoifs/OQUJKP4XuPy2zHZDp mP+ZJv+L0tJknTvAVhn6pSTALys1xeg3/GjEliPdJrg7Vo55SuxMFrVWtbP8wxW9QI+l 5bnJTsnjguOOFJC5v3PbNQDHo7oHjTaiyAqlF33qmP0nslW6Ue6BRyIdAynJxDWouxXD xT3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sM5HfNIk; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o9-20020a170906974900b00791994dfb9esi4365487ejy.491.2022.12.01.07.06.57; Thu, 01 Dec 2022 07:07:18 -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=@kernel.org header.s=k20201202 header.b=sM5HfNIk; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230382AbiLAOl3 (ORCPT + 83 others); Thu, 1 Dec 2022 09:41:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230159AbiLAOl2 (ORCPT ); Thu, 1 Dec 2022 09:41:28 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D989A8FF5 for ; Thu, 1 Dec 2022 06:41:27 -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 DCB3762036 for ; Thu, 1 Dec 2022 14:41:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C41EC433C1; Thu, 1 Dec 2022 14:41:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669905686; bh=zLnrAXdPNWv4KF6y1QKF5sGGSOuDH+HIqfZx7S9WE5k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=sM5HfNIkmV37FbZ/aIR+v7hpiIbh2JKa7LBIW9BsjwkJ95O5r+PbX6cojgLAbOeq4 WVbXDkj++3whvAdamwA4x1yOwWU4RQRRbwD6CMCrZLqw1aqtEq18iIegvt8Bda8M9R 38wTTDIhjJX+Q//nLrmSS83ZXa+ZUDgIm3ZIF38rYhdANBhtRJn8QHVlzBpaSmNXCV 0DdJO+ghqWMG4oSKYLJgptAWvmTyvU+MdjOBBIeeMWEbBtAJBbviWejf+HZ1EYIRoR TKzmZ1NGzSYcWWo5sHKYTyL5ClF+fgyPPzNht76veQn4QfVIppRBaTd4zXmip12QIY SD3PHXQzWZABg== Date: Thu, 1 Dec 2022 23:41:21 +0900 From: Masami Hiramatsu (Google) To: Chris Mason Cc: Borislav Petkov , Alexei Starovoitov , Steven Rostedt , LKML , Linus Torvalds , Masami Hiramatsu , Andrew Morton , Peter Zijlstra , Kees Cook , Josh Poimboeuf , KP Singh , Mark Rutland , Florent Revest , Greg Kroah-Hartman , Christoph Hellwig Subject: Re: [PATCH] error-injection: Add prompt for function error injection Message-Id: <20221201234121.8925fdf83115747ac4ac116a@kernel.org> In-Reply-To: <3fa8ec60-dd96-c41f-ea46-8856bf855949@meta.com> References: <20221121104403.1545f9b5@gandalf.local.home> <3fa8ec60-dd96-c41f-ea46-8856bf855949@meta.com> X-Mailer: Sylpheed 3.8.0beta1 (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=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, 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 Hi, On Tue, 22 Nov 2022 12:42:33 -0500 Chris Mason wrote: > > - fault injection for testing: we have a stage of qualification that > does error injection against the prod kernel. It helps to have this > against the debug kernel too, but that misses some races etc. I always > just assumed distros and partners did some fault injection tests against > the prod kernel builds? > > - fault injection for debugging: it doesn't happen often but at some > point we run out of ideas and start making different functions fail in > prod to figure out why we're not prodding. For those purpose, isn't it enough to add a taint flag for the fault injection? This will help us to identify that the kernel is possible to be under debug mode. > - overriding return values for security fixes: also not a common thing, > but it's a tool we've used. There are usually better long term fixes, > but it happens. I don't recommend to use the fault injection for this purpose. For fixing the security issue online, you should use livepatch. Thank you, -- Masami Hiramatsu (Google)