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=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable 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 F0254C43215 for ; Mon, 18 Nov 2019 18:43:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D8636222F0 for ; Mon, 18 Nov 2019 18:43:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726744AbfKRSnk (ORCPT ); Mon, 18 Nov 2019 13:43:40 -0500 Received: from www62.your-server.de ([213.133.104.62]:55840 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726370AbfKRSnj (ORCPT ); Mon, 18 Nov 2019 13:43:39 -0500 Received: from sslproxy06.your-server.de ([78.46.172.3]) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1iWlzt-0003iO-RR; Mon, 18 Nov 2019 19:43:37 +0100 Received: from [178.197.248.45] (helo=pc-9.home) by sslproxy06.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1iWlzt-00062j-HA; Mon, 18 Nov 2019 19:43:37 +0100 Subject: Re: [PATCH rfc bpf-next 5/8] bpf: add jit poke descriptor mock-up for jit images To: Andrii Nakryiko Cc: Alexei Starovoitov , john fastabend , Networking , bpf References: <253496a26ac83e0fe7c830eb27e62ca441a38aff.1573779287.git.daniel@iogearbox.net> From: Daniel Borkmann Message-ID: <10321d85-b9e5-e786-53eb-b4ff6d981e2c@iogearbox.net> Date: Mon, 18 Nov 2019 19:43:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.101.4/25637/Mon Nov 18 10:53:23 2019) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 11/18/19 7:17 PM, Andrii Nakryiko wrote: > On Thu, Nov 14, 2019 at 5:05 PM Daniel Borkmann wrote: >> >> Add initial poke table data structures and management to the BPF >> prog that can later be used by JITs. Also add an instance of poke >> specific data for tail call maps. Plan for later work is to extend >> this also for BPF static keys. >> >> Signed-off-by: Daniel Borkmann >> --- > > looks good, just one more minor naming nit > > Acked-by: Andrii Nakryiko > >> include/linux/bpf.h | 20 ++++++++++++++++++++ >> include/linux/filter.h | 10 ++++++++++ >> kernel/bpf/core.c | 34 ++++++++++++++++++++++++++++++++++ >> 3 files changed, 64 insertions(+) >> >> diff --git a/include/linux/bpf.h b/include/linux/bpf.h >> index 40337fa0e463..0ff06a0d0058 100644 >> --- a/include/linux/bpf.h >> +++ b/include/linux/bpf.h >> @@ -484,6 +484,24 @@ struct bpf_func_info_aux { >> bool unreliable; >> }; >> >> +enum bpf_jit_poke_reason { >> + BPF_POKE_REASON_TAIL_CALL, >> +}; >> + >> +/* Descriptor of pokes pointing /into/ the JITed image. */ >> +struct bpf_jit_poke_descriptor { >> + void *ip; >> + union { >> + struct { >> + struct bpf_map *map; >> + u32 key; >> + } tc; > > tc is a bit overloaded abbreviation, tail_call would be super-clear, though ;) Ok, sure, will include it into the non-rfc version. >> + }; >> + u8 ip_stable; >> + u8 adj_off; >> + u16 reason; >> +}; >> + > > [...] >