Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp981051rwb; Wed, 7 Dec 2022 07:18:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf6dR7wQwBwg5dg3G2d5QZBpHRc7VbvRbcHbPhR8UEXQ9jaVFtc/JZQSZwvPPgtcqZAEiBr5 X-Received: by 2002:a63:4423:0:b0:479:18a:83ae with SMTP id r35-20020a634423000000b00479018a83aemr1074324pga.63.1670426280578; Wed, 07 Dec 2022 07:18:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670426280; cv=none; d=google.com; s=arc-20160816; b=S5dTlkEOku1L/sgxoBaaOHhD/Wag3ysbG41xZxVQtQZ8JyqND4gT7ku46ApmVNcAoc hF8azHGmkX2aLImR7banByEu27kV7Vip/BqfSOoPGpPLpk6duvpcXJNPdg+nTWq7nYFr wI4OS++RkrAmr4JSB8mxhJiZzVM4UEEpH0C306q+7tuMhx+I9Ft4dX+PwcWTtVJAJzrN /Z3FttuYyASu6kx3SebDNrLoFoXB7qt/7siLjU1VurFTZXoYlh9T6qkvQoE4ELhnsIGD jdKjjjvY62YIQoXdOsXCqesUgjTRRCupdZV0UO93T9CY/IZhhpOd0nMetUY9u6CfLyIc 0WxA== 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=qgLLD1AmPKqAai8Ygo30PiMsV/3lKBgVy2t7StpKc5Q=; b=fJQEp+ZSsNzSydV1oPdU33fnNKnkc1FDkwtfLQjHtdtc5QOgAU0M96xXGVFIujPYcU J1+KZmsCI6LSTD/rxgOq1QB2hgXojPMby3pBlfc2pm9q4S5Eqd+6WCvZ+Qui5BF7Um2m f3AkDOykl4DsnIHEh0Oxtq1UU0N9kvw1mkGvVjRC6ROWLZ2DJ6pTh0GUSRD+YoxOIKns F2aOPEL3NNwxQHTMmuxbxJKzAJdSySkC2ajKEyoAdAclfwbCqjd8Ffy5RZRO29Pyuk7P ZPRf8oDYdoBriN8FRIAJ7SRjMnvcnlmgepurixqFjM10lCYbhaMW60FHncTAI9DZ4VBo LxXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=H57hPGnK; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t16-20020a170902e85000b00189efa12957si4172235plg.126.2022.12.07.07.17.50; Wed, 07 Dec 2022 07:18:00 -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=@redhat.com header.s=mimecast20190719 header.b=H57hPGnK; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229704AbiLGO7i (ORCPT + 76 others); Wed, 7 Dec 2022 09:59:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229652AbiLGO7F (ORCPT ); Wed, 7 Dec 2022 09:59:05 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC66361BA9 for ; Wed, 7 Dec 2022 06:57:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670425035; 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: in-reply-to:in-reply-to:references:references; bh=qgLLD1AmPKqAai8Ygo30PiMsV/3lKBgVy2t7StpKc5Q=; b=H57hPGnK1rRdYVIBO5+ONvQ2bRSdmm05nmHqozq2GN2WysU388Rr/0ekwOla9y3xXDJDC/ OABTTWGZ80HtqfrylHLWmG6ziTk2zrD7q2K2OKScwnekk1EY5v/b6nAQUIuKHegyyX2qBH AiZmh5vdbl1jLyo2xDpxIBC1+sKOeGQ= Received: from mail-il1-f199.google.com (mail-il1-f199.google.com [209.85.166.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-481-XRo0L6sHPpS0uyB8cQkovA-1; Wed, 07 Dec 2022 09:57:14 -0500 X-MC-Unique: XRo0L6sHPpS0uyB8cQkovA-1 Received: by mail-il1-f199.google.com with SMTP id a11-20020a92c54b000000b003034a80704fso10338464ilj.1 for ; Wed, 07 Dec 2022 06:57:14 -0800 (PST) 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=qgLLD1AmPKqAai8Ygo30PiMsV/3lKBgVy2t7StpKc5Q=; b=xDih3pm+vJyq5dhIGU4fMrAru7+ikQ+WcrwyVSAqQLCckSeyMRHkzi33zoIR0hq+mr LzsUByceEz34P78OKsqFbVhDCCfX9caBEtjPnEYrMXihZ1H41eLjt355tZjjVaLKElFg ilkh+EsqnR1QBlBHeqZ8Wv2G+NsbRoOSBvcwfJ96hKUQlbDNaIjCNteGirGwlR7d1DWk DunBitQEB0KhE/UADyo1dPpjmKr1uOhOnlBAQxdPYfIn2wD3dYSiTgXgFHsdXkbcWLbz 9eLsY/nNI7PnDK2aS4Ug6BNqqbTRdF+3Lj0pWRJxZZeoPWKM4fQmNFHTASDQleSBrDIA UXfg== X-Gm-Message-State: ANoB5pmQNpe8vHn9LCd4eBFLw9mrOC8g5aCR5JSFfOfwUN9Mj7oXgkFv yGi9zH4r0csHJhz4YuL4h90CHOoU59Z2y4lz8kY9cefRQQyFfucN332KqMsXEQm37kJ9AzN5tpl hPY8npxyKr3NEE+HlUQRb3fEAjNmGJgkvy/A2I47A X-Received: by 2002:a05:6602:3945:b0:6df:bfeb:f15d with SMTP id bt5-20020a056602394500b006dfbfebf15dmr14207517iob.122.1670425032753; Wed, 07 Dec 2022 06:57:12 -0800 (PST) X-Received: by 2002:a05:6602:3945:b0:6df:bfeb:f15d with SMTP id bt5-20020a056602394500b006dfbfebf15dmr14207508iob.122.1670425032518; Wed, 07 Dec 2022 06:57:12 -0800 (PST) MIME-Version: 1.0 References: <20221206145936.922196-1-benjamin.tissoires@redhat.com> <20221206145936.922196-2-benjamin.tissoires@redhat.com> In-Reply-To: From: Benjamin Tissoires Date: Wed, 7 Dec 2022 15:57:01 +0100 Message-ID: Subject: Re: [PATCH HID for-next v3 1/5] bpf: do not rely on ALLOW_ERROR_INJECTION for fmod_ret To: Alexei Starovoitov Cc: Jiri Kosina , Florent Revest , Jon Hunter , Daniel Borkmann , Andrii Nakryiko , bpf , Network Development , "open list:HID CORE LAYER" , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 Tue, Dec 6, 2022 at 9:48 PM Alexei Starovoitov wrote: > > On Tue, Dec 6, 2022 at 6:59 AM Benjamin Tissoires > wrote: > > > > The current way of expressing that a non-bpf kernel component is willing > > to accept that bpf programs can be attached to it and that they can change > > the return value is to abuse ALLOW_ERROR_INJECTION. > > This is debated in the link below, and the result is that it is not a > > reasonable thing to do. > > > > Reuse the kfunc declaration structure to also tag the kernel functions > > we want to be fmodret. This way we can control from any subsystem which > > functions are being modified by bpf without touching the verifier. > > > > > > Link: https://lore.kernel.org/all/20221121104403.1545f9b5@gandalf.local.home/ > > Suggested-by: Alexei Starovoitov > > Signed-off-by: Benjamin Tissoires > > BPF CI couldn't do its job because of a merge conflict. > CI only tries to apply the whole series. > But I tested the patch 1 manually. > Everything is green on x86-64 and the patch looks good. > > Acked-by: Alexei Starovoitov > > Please send the set during the merge window. > If not we can take just this patch, > since the series from Viktor Malik would need this patch too. > Thanks a lot for the quick review/tests Alexei. I have now taken this patch and the next into the hid tree. I actually took this patch through a branch attached to our hid.git master branch so compared to Linus, it only has this one patch. I also tagged (and signed) that very same branch with "for-alexei-2022120701" in case you also want to bring this one in through the bpf tree too. Full path is at https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/tree/?h=for-alexei-2022120701 Cheers, Benjamin