Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1389361rwb; Thu, 1 Dec 2022 17:02:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf5TRNRv/7Ubu2VdpLEx55yS7E7mfwb1tZ3rDVgB0K8bkX18X1nrZVHw68GtfNFla/mUzxEj X-Received: by 2002:aa7:dc0c:0:b0:461:6f87:20bb with SMTP id b12-20020aa7dc0c000000b004616f8720bbmr62057394edu.300.1669942945237; Thu, 01 Dec 2022 17:02:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669942945; cv=none; d=google.com; s=arc-20160816; b=GRHztFViJ9HyKxVwwBL+nXfsuKBsFNITgkI/+AyCONesAY4FlPZvK7tklR76hvMRl7 D3Q8KxRVNhXTwMxa9jJZFCuphqf3JQOdlQtJ7ANPRA/aDb6J3SuM+eCmm6Z1xgcrvvqi 3aHPCDw/gdljSnpcsPHOZ0A3cY3z9hQGg7qhfn6f4wcbKq9sY+nDSLhcXFJ5Ord6EuBC gXIAkmaOdIJnR5kRqrFCEL/OQZ4seKODDwRFTuq43xo2dKoSKDKu1ujsyQCm/9BQFsmZ 75gEFVwjUxAcEWLLFQ3GZjXtJIVhfjHklqFuJTDoiztzduBUlSGskOK+bqRj6CyRcUp2 FcZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=hZE2eD6M/XDZKcsXZL3ZTQSdiXTcFPXhDCgi0tdo16I=; b=MmGXnIXIe8rWhF4ivT636R+nwYlpQixNo7tqbW3Mk/2uNbaf0nLK42aOUoTmrcq12I P4+1k9UC5x0He103K/L8baBPbBMd3ugpOR8mjYOgrty6MzjYfgnOaB1YKd4PAYwElnWy nSaln1luUuTytj22NUQXN9AaObRaoshqFP1ykqh0jDXAXpxKtR+F3HSub4mLb/cY/QYP vGAzmwZPxd1RaSWLyXE4sThjhjCoHHpti/1W2x5L3tW6QCWgJ73R+oXtrsr7j9i0C4X7 4XYPWLBnJI/Kzc9yVhA88BFajbR45FN40z07n13ioq2z8AiOGBmdQg5HZnsSIjjuIMQN sAAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="QThmY0/Q"; 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 hb35-20020a170907162300b0078d9be7f100si4971550ejc.852.2022.12.01.17.02.05; Thu, 01 Dec 2022 17:02:25 -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="QThmY0/Q"; 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 S231722AbiLBAqt (ORCPT + 81 others); Thu, 1 Dec 2022 19:46:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231655AbiLBAqr (ORCPT ); Thu, 1 Dec 2022 19:46:47 -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 D479B16583 for ; Thu, 1 Dec 2022 16:46:46 -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 622EA621D5 for ; Fri, 2 Dec 2022 00:46:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8DFDAC433D6; Fri, 2 Dec 2022 00:46:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669942005; bh=t6IQZOYkxcblDL+267tdpgvLUiNLdayCJqmW3yn9GV0=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=QThmY0/Q5r1Iq0hGXIQIyyxY6p9iLIiEnq4RUO4anNCtbAx4jiWBcz5xKp+Og+ar3 OzUc3ItpXMox1LBxzgVkhHmOl7n6fuMumrMC029dWSZIaOozVCprPUIta+5jPGRc+9 dZWEkS6PKXuc8EzcBecQcYDVRIiMQa/vFCnPtRmuuZz1+8cWcoH+giGU3IouH86rhZ 3M+ceqIaWbLuPND5ef+vDSNyO3YnKWYzENr4+CZsEd24716rqX8M+7uat1EQNpGWhA CMovlfhKKyRkm4rLPpGU6ymSprLyi6zbeZoQqQPSDYGYgCrWzA1KDt7ZEnl//fis4q LympGstGpG4Hg== Date: Fri, 2 Dec 2022 01:46:39 +0100 (CET) From: Jiri Kosina To: Linus Torvalds cc: Alexei Starovoitov , 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 Subject: Re: [PATCH] error-injection: Add prompt for function error injection In-Reply-To: Message-ID: References: <20221121104403.1545f9b5@gandalf.local.home> <3fa8ec60-dd96-c41f-ea46-8856bf855949@meta.com> <20221122132905.12a8d5ad@gandalf.local.home> <20221130143719.07e36277d1471b83e9a1b627@linux-foundation.org> User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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, Linus Torvalds 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" Seems like quite a few parallel threads are currently going on about this, so it's a little bit hard to catch up for me as I am apparently CCed only on some of them. Anyway, I believe [1] that ERROR_INJECTION has been designed as a debugging feature in the first place, and should stay so. After figuring out now that HID-BPF actually has hard dependence on it, I fully agree [2] that the series should be ditched for 6.2 and will work with Benjamin to have it removed from current hid.git#for-next. [1] https://lore.kernel.org/all/nycvar.YEU.7.76.2211211716270.27249@gjva.wvxbf.pm/ [2] https://lore.kernel.org/lkml/nycvar.YFH.7.76.2212020135390.6045@cbobk.fhfr.pm/ -- Jiri Kosina SUSE Labs