Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1172613rwb; Thu, 1 Dec 2022 13:28:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf4XcmvoniChA9jagedSFBTY2TOyEQBZotLMrNmgN8pkLXnLS1XyzfW1UbEKwjaWAASX5tK3 X-Received: by 2002:a17:902:d192:b0:189:8867:9bd4 with SMTP id m18-20020a170902d19200b0018988679bd4mr23740899plb.68.1669930115446; Thu, 01 Dec 2022 13:28:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669930115; cv=none; d=google.com; s=arc-20160816; b=05VgkRKPKmo3uu/RpFT6rN+cZiBB86OR8JEkyX1AqypTXB6MMqMJ51w7uHrurwDvf6 fCaBj++RscYZ1hHOPnabF1yBSfFJZg51bS30RYjgNbHSmUhR17XPHxECpBfsC2bP080u 0txvvz480e7ZmKwbkdXls6krci39Iwr7YjO/oED1K2hmh5qjRapJBgGIpYrzMpo9B+OZ Gs/KvLT0FfwjV2ovLYy6tFCGeXjx7GWWRd3yE7HC8NTKyYZF2azGgUZJQdCDvqTP6tw2 IOdl8SHgNnRb+aHgeOM8aHG0gFxuqsSfyF7BpnmfwPhzxf5nBQ94sr8q15XAhun33PD0 uRkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=i+Ty/71vBz7a1g1Y5lX48RafM8N+vzJrXXZkn3ZmfZQ=; b=p/plq2ZynryItinKJNcqWM6TmN+GBJUSPO3EXmVBKfa8dxXnPjXfWR5kSqjqt/QQVZ XSNBgQNHLKU6SwuGhwbZ+M4SGcVdg6/wCONpoKRu1/ySHRxcs0+jKeaq4PsK2LPuO/DP 9M+EItUx1hqYc4U7l7I18DbHPWHi9qp3XXiLIhKUuXg55BNqutDevm6UHMT9iO/92B/U xeslVEYeByGI/XsiapqDRRoxEf0850muzsFhCX+lcArsRWaYT/P8bM1QtlL4QRimFp8S 0WqSCw8WjW8Wnz25OjAYffqCZkyxnYV91G94oLHehDQomG/tX0G9rf6dN41bwfv1Hdz+ g7Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Osn2+8Uu; 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 u30-20020a63235e000000b004541962a9basi5174635pgm.701.2022.12.01.13.28.25; Thu, 01 Dec 2022 13:28:35 -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=@linux-foundation.org header.s=google header.b=Osn2+8Uu; 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 S230000AbiLAVN5 (ORCPT + 81 others); Thu, 1 Dec 2022 16:13:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229658AbiLAVNz (ORCPT ); Thu, 1 Dec 2022 16:13:55 -0500 Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACABCA1C1A for ; Thu, 1 Dec 2022 13:13:54 -0800 (PST) Received: by mail-qt1-x82e.google.com with SMTP id fp23so2336906qtb.0 for ; Thu, 01 Dec 2022 13:13:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=i+Ty/71vBz7a1g1Y5lX48RafM8N+vzJrXXZkn3ZmfZQ=; b=Osn2+8UumebclUI0lYV6mJV6O30OJZ2SNqLMtZUA0RJcwnkD+326VktQ4cbdCFv6hD oTJtPRTgmKhiHpOFvxyjO9xtzWzfp3PfHXLyTTnkaPgSQbu7MhMwDoX/1y6PHSvxNQvg ni+9QQtYy8DKEBlVjvrzeegaV5vFE+A3fVHS8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=i+Ty/71vBz7a1g1Y5lX48RafM8N+vzJrXXZkn3ZmfZQ=; b=CuRVQngGOvVNOLvbWCFC2gOWdMjegMCxkNB1rCZMreBajzLnhXFEV1izXQPxMhWwlC rcI3ppy0A4EJVIsxsaDZiDPZ8wBIU9b+/4H5JwzuybCw+wR36HziNx8SICwp9X7mFchL w1Q+GaquvAkGla09y7Omzs26OeAimaCNofTK6hr1D9d+qrfzWMOoGMHnOacNDldg+qIR n2XJ2bXwHmVKF5XEkyEVU6Kim6kRDEtdia/64KtWkqEYA2p6e5A1iimDeUV4fSZoFlX1 j03/KtRPFH5W2a8NgixdsHbRASIuBeW0sr7W32H+dHiX78es0A6hIMFGU0fZvvS+cPPt JChA== X-Gm-Message-State: ANoB5pkCKZnqm2P+PwW9CS83GcCeD3o5mbQV/HPww0NAA+Uh8Bhx5FVh E1Zs3LvUVW3qshwfzjtuKcp9/aEqawXs9g== X-Received: by 2002:ac8:4501:0:b0:3a5:cb81:aff5 with SMTP id q1-20020ac84501000000b003a5cb81aff5mr54045956qtn.662.1669929233478; Thu, 01 Dec 2022 13:13:53 -0800 (PST) Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com. [209.85.160.177]) by smtp.gmail.com with ESMTPSA id u12-20020ac8750c000000b003a622111f2csm3045686qtq.86.2022.12.01.13.13.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Dec 2022 13:13:51 -0800 (PST) Received: by mail-qt1-f177.google.com with SMTP id cg5so2597981qtb.12 for ; Thu, 01 Dec 2022 13:13:51 -0800 (PST) X-Received: by 2002:ac8:688:0:b0:3a5:122:fb79 with SMTP id f8-20020ac80688000000b003a50122fb79mr52533065qth.452.1669929231060; Thu, 01 Dec 2022 13:13:51 -0800 (PST) MIME-Version: 1.0 References: <20221121104403.1545f9b5@gandalf.local.home> <3fa8ec60-dd96-c41f-ea46-8856bf855949@meta.com> <20221122132905.12a8d5ad@gandalf.local.home> <20221130143719.07e36277d1471b83e9a1b627@linux-foundation.org> In-Reply-To: From: Linus Torvalds Date: Thu, 1 Dec 2022 13:13:35 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] error-injection: Add prompt for function error injection To: Alexei Starovoitov Cc: Andrew Morton , Chris Mason , Steven Rostedt , Borislav Petkov , LKML , Masami Hiramatsu , Peter Zijlstra , Kees Cook , Josh Poimboeuf , KP Singh , Mark Rutland , Florent Revest , Greg Kroah-Hartman , Christoph Hellwig , Benjamin Tissoires Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no 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, Dec 1, 2022 at 8:59 AM Alexei Starovoitov wrote: > > The hid-bpf framework depends on it. Ok, this is completely unacceptably disgusting hack. That needs fixing. > Either hid-bpf or bpf core can add > "depends on FUNCTION_ERROR_INJECTION" No, it needs to be narrowed down a lot. Nobody sane wants error injection just because they want some random HID thing. And no, BPF shouldn't need it either. This needs to be narrowed down to the point where HID can say "I want *this* particular call to be able to be a bpf call. Stop this crazy "bpf / hid needs error injection" when that then implies a _lot_ more than that, plus is documented to be something entirely different anyway. I realize that HID has mis-used the "we could just use error injection here to instead insert random bpf code", but that's a complete hack. Plus it seems to happily not even have made it into mainline anyway, and only exists in linux-next. Let's head that disgusting hack off at the pass. I'm going to apply Steven's patch, because honestly, we need to fix this disgusting mess *before* it gets to mainline, rather than say "oh, we already have broken users in next, so let's bend over backwards for that". The code is called "error injection", not "random bpf extension" Linus