From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1AB7CC43141 for ; Fri, 15 Nov 2019 01:04:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E3E0220729 for ; Fri, 15 Nov 2019 01:04:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727338AbfKOBEU (ORCPT ); Thu, 14 Nov 2019 20:04:20 -0500 Received: from www62.your-server.de ([213.133.104.62]:50704 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727112AbfKOBEU (ORCPT ); Thu, 14 Nov 2019 20:04:20 -0500 Received: from 57.248.197.178.dynamic.dsl-lte-bonding.zhbmb00p-msn.res.cust.swisscom.ch ([178.197.248.57] helo=localhost) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1iVQ25-00080O-5I; Fri, 15 Nov 2019 02:04:17 +0100 From: Daniel Borkmann To: ast@kernel.org Cc: john.fastabend@gmail.com, netdev@vger.kernel.org, bpf@vger.kernel.org, Daniel Borkmann Subject: [PATCH rfc bpf-next 0/8] Optimize BPF tail calls for direct jumps Date: Fri, 15 Nov 2019 02:03:54 +0100 Message-Id: X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.101.4/25633/Thu Nov 14 10:50:04 2019) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This gets rid of indirect jumps for BPF tail calls whenever possible. See patch 7/8 for more general details. This is on top of Alexei's '[v4,bpf-next,00/20] Introduce BPF trampoline' series [0]. For non-RFC I'll still massage commit messages a bit and expand the existing set of tail call tests with a few more kselftest cases. Thanks, Daniel [0] https://patchwork.ozlabs.org/project/netdev/list/?series=142923 Daniel Borkmann (8): bpf, x86: generalize and extend bpf_arch_text_poke for direct jumps bpf: add bpf_prog_under_eviction helper bpf: move bpf_free_used_maps into sleepable section bpf: move owner type,jited info into array auxillary data bpf: add jit poke descriptor mock-up for jit images bpf: add poke dependency tracking for prog array maps bpf, x86: emit patchable direct jump as tail call bpf: constant map key tracking for prog array pokes arch/x86/net/bpf_jit_comp.c | 234 ++++++++++++++++++++++++----------- include/linux/bpf.h | 85 +++++++++++-- include/linux/bpf_verifier.h | 1 + include/linux/filter.h | 10 ++ kernel/bpf/arraymap.c | 152 ++++++++++++++++++++++- kernel/bpf/core.c | 73 ++++++++++- kernel/bpf/map_in_map.c | 5 +- kernel/bpf/syscall.c | 41 ++---- kernel/bpf/verifier.c | 98 +++++++++++++++ 9 files changed, 578 insertions(+), 121 deletions(-) -- 2.21.0