Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1608282rwi; Thu, 3 Nov 2022 07:13:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Orm3UqhCC4EFXRa83mdJaAorZKjwixzJHdjWXdZAJohh6wHJoEEwVipj/8rljN3HGh1Po X-Received: by 2002:a63:145d:0:b0:44b:f115:f90f with SMTP id 29-20020a63145d000000b0044bf115f90fmr26564613pgu.157.1667484795269; Thu, 03 Nov 2022 07:13:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667484795; cv=none; d=google.com; s=arc-20160816; b=StRHW8hjVuq41SVUQxI2THM3RAum7RxD+ZbVY7PG9P5oHlfSBFhrU5e9/OCqRe886b z9EPW0xldyzrcUvYX7UbHbaPIHpdXIO9ODAWHqD7djgbrIrsfBsziLRTX3smDBURNyDc Z7mXToe2tkW5LoAeJVeF13xptTuHCkl2ghkph6NoK+nYoXiPORB5DGyzKVDNX7MnUE7P RvYeGqXckBEEf5woJ58OV0MIGaPsFdMRGgs/ehkMljG1LhgzboVSKAmEqXgEI58CUVQH 2jDqbO2xMesWN4C9+NHrANjVcJvat+tJoVfv2Oy2X2eGCLcmPUl78VOAvErvdIUEDBOw fu/w== 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 :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=QHoH/g0hp2AcK8KEIM/W1ZzyrIMHeU4fEZ/Qn6q9kVw=; b=GbI6EzZFF4aj3EEhe95Jax0WzSsuDI/6FfsZA9HhP58pAvRfixehK49j/8drF/x342 SgV7Za4BV9KoAgh9f+OQbw8qAJ25EVRlTg6STNXJ2P6wroq2l0y3MZb/2QosPnBdm7jM PD7pt/8V2S3oPVaka1sHJpIZY2fDQEI+rrnFk3343xDZvYgXddDMvJRP2S2QBQj72rNb 7y1Qs2r74WbSgbdKiN+1U+Xk55pWduDjv5As/YHlWvziPbZot3b8vqF7sS2p8OhuTWoz wWpEeq18XLHgLPwfVSilrL248Uv1x5pJsObcuMNdEpL92vLFp7BkkzKDYxddtAPBjoEJ RrjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lcr6RBe4; 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 w185-20020a6382c2000000b0046feb2759d8si1316068pgd.36.2022.11.03.07.12.59; Thu, 03 Nov 2022 07:13:15 -0700 (PDT) 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=lcr6RBe4; 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 S231785AbiKCNnQ (ORCPT + 97 others); Thu, 3 Nov 2022 09:43:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231778AbiKCNml (ORCPT ); Thu, 3 Nov 2022 09:42:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55D7D18B32; Thu, 3 Nov 2022 06:42:06 -0700 (PDT) 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 E0B0E61EA2; Thu, 3 Nov 2022 13:42:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE18BC433C1; Thu, 3 Nov 2022 13:42:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667482925; bh=3jsKADiAmNuQIC30OLz8RxCZAyyfOwsw/u8r+UDv2c4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=lcr6RBe4JVFUAhdQlwdsSe/GbSv48SgYQ3QilGiO5ItT7LOV08u8eKlDvaUuKF9eU kWcljStfa42fHZ15BPHRXPQK3V5RVHRetc53f8BWVwOVcEuYw7bEoVZ2qL1SBHZ5e0 NaO3gPU0QkGOrnIudOdnUvz5NNzQiWMGxpZcJQj1FXfDMEFuMzEWP5OTva0ubr4QmO oIdHeC1f657NHdB2kuHRZMBG1qc8kEpqSIPFHUkp8sGpCe0kxCtFrrzfzXUss2Vn+t c6AX02t7z23ZpSz6YPmb+ZMzVdrHax8NvMrjikGktTcG/ZJKgoP7IjOWAT/Q79Usl1 /N+UH4CUVBY+w== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: Peter Zijlstra , olsajiri@gmail.com, ast@kernel.org, daniel@iogearbox.net Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, peterz@infradead.org, toke@redhat.com, David.Laight@aculab.com, rostedt@goodmis.org Subject: Re: [PATCH 0/2] bpf: Yet another approach to fix the BPF dispatcher thing In-Reply-To: <20221103120012.717020618@infradead.org> References: <20221103120012.717020618@infradead.org> Date: Thu, 03 Nov 2022 14:42:01 +0100 Message-ID: <875yfwrw7q.fsf@all.your.base.are.belong.to.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.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 Peter Zijlstra writes: > Hi! > > Even thought the __attribute__((patchable_function_entry())) solution to = the > BPF dispatcher woes works, it turns out to not be supported by the whole = range > of ageing compilers we support. Specifically this attribute seems to be G= CC-8 > and later. > > This is another approach -- using static_call() to rewrite the dispatcher > function. I've compile tested this on: > > x86_64 (inline static-call support) > i386 (out-of-line static-call support) > aargh64 (no static-call support) > > A previous version was tested and found working by Bjorn. > > It is split in two patches; first reverting the current approach and then > introducing the new for ease of review. Took it for a spin on x86_64/KVM. For the series: Acked-by: Bj=C3=B6rn T=C3=B6pel Tested-by: Bj=C3=B6rn T=C3=B6pel