Received: by 10.223.185.116 with SMTP id b49csp3248920wrg; Mon, 5 Mar 2018 17:30:53 -0800 (PST) X-Google-Smtp-Source: AG47ELvlMuQuMmAGubG0u/wg1FBBAkboLdIu0Auamieuho02zTCXNj2KBvkQ5glaMnwgBxxeklfs X-Received: by 2002:a17:902:887:: with SMTP id 7-v6mr14830803pll.89.1520299853784; Mon, 05 Mar 2018 17:30:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520299853; cv=none; d=google.com; s=arc-20160816; b=O8yv0Vg9jOaqkcbTxj5jmTwyjcqWyZMprFmC5YW/1bnDBX3SJVCh5tq+K9FauWEt+F 0mdWFywjvSf8jF8/X82E/gZmL2H37N8o85pCxEzjywQ0NWPOn4tOKmboXcZkIOIcaDah 2mZLGKIMpUaR/bOoPgc5CwklD8dFLsFRNcZmupnzWI4X9pWFgASP1QCaUOFeDOZ1fAFC wV264+QK1dshqVo4n2RETUB1/+hFWhBsjlfQB1vzXfmocYAJw9cGbSA8Kpxt/seiTtO/ iKm7izNvy3zMIxM6dbdWwHKZBXPyOgTskVPeqJ2UGckAzMhd9z7BePXazH+uZvtKGDUs muGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature:dkim-signature:arc-authentication-results; bh=d7I+rhBZDmQBJQ3DR6vbYJEQLY4HLs/E+dxCLHGoJ5s=; b=BNetrHEfmSTZ78+GvuNQjbYe5+HlW2bQAbalGGWSta53Wr4y2KprQDzSYLq8pSxxgV UWwkq+gR2AEVC1AO4rvZlQ8vuSq0G7e5ZqgztJ7kBpWz/H0zP7aOYxC+R5BNY3upS+e6 kpES9PnyR1U4gSqPB7XGDqG8vqi2AfGRm/awbc17QtfTRoscmxXp7/PcHqQTppfFiv5L ciOcdlihCC+TG7OLWl7QcGJDP/2y7BGszY1tBhE7Tg2tMkyhZv9dL6wy3YDnCT2EINIe PC+4OijPbtmANYWXwDWvdTFrPDW6pwD7a+l5YfTOGeiyOWLoh2GiWNOj4GXAm9txaxZV 9jJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=IU7YtVAh; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=HReTB9Or; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5si11080083pfc.337.2018.03.05.17.30.38; Mon, 05 Mar 2018 17:30:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=IU7YtVAh; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=HReTB9Or; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753027AbeCFB31 (ORCPT + 99 others); Mon, 5 Mar 2018 20:29:27 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:51078 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752543AbeCFB3Y (ORCPT ); Mon, 5 Mar 2018 20:29:24 -0500 Received: from pps.filterd (m0109332.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w261O1P8005443; Mon, 5 Mar 2018 17:28:40 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=subject : to : references : cc : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=facebook; bh=d7I+rhBZDmQBJQ3DR6vbYJEQLY4HLs/E+dxCLHGoJ5s=; b=IU7YtVAh4VQfGQrg9u49tIv/ocnafXr8Xey6sluswTuU1jPxsY2aJWYlvmSWeCYMSIem +Iwb7gata90p9vizNYvxRsn1tWUA+9+YEYRUH0B5skilOK8XEnr/oGjS28tBFO3c7MeC PVNVLqeQ6I41cWephguLYkCVNeNBEfw+bd8= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 2ghfg9r93h-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 05 Mar 2018 17:28:39 -0800 Received: from NAM03-DM3-obe.outbound.protection.outlook.com (192.168.183.28) by o365-in.thefacebook.com (192.168.177.23) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 5 Mar 2018 20:28:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=d7I+rhBZDmQBJQ3DR6vbYJEQLY4HLs/E+dxCLHGoJ5s=; b=HReTB9OrAaUYFbGuc3UWQXpW0SowsfBBy186SCQKBFfaba6EgZ/xCumuj4iUmC0iAqoh4m6iNT1FSdvasgWyRQL24FDae6mjb3wgYmVhl146wzCQZr8noMt7Hb8mQBOeXI47n/5CDOE6/MJRguiwX7C4oobkFIbtSSqFERwUChY= Received: from [IPv6:2620:10d:c081:1132::1018] (2620:10d:c090:180::1:2cf2) by BYAPR15MB2501.namprd15.prod.outlook.com (2603:10b6:a02:88::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.548.13; Tue, 6 Mar 2018 01:28:33 +0000 Subject: Re: [PATCH bpf-next 3/5] bpf: introduce BPF_RAW_TRACEPOINT To: Daniel Borkmann , Alexei Starovoitov , References: <20180301041957.399230-1-ast@kernel.org> <20180301041957.399230-4-ast@kernel.org> <56cd9ef9-41b0-dc89-fa49-92a459796515@iogearbox.net> CC: , , , , , , , From: Alexei Starovoitov Message-ID: Date: Mon, 5 Mar 2018 17:28:28 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <56cd9ef9-41b0-dc89-fa49-92a459796515@iogearbox.net> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [2620:10d:c090:180::1:2cf2] X-ClientProxiedBy: CY4PR18CA0030.namprd18.prod.outlook.com (2603:10b6:903:9a::16) To BYAPR15MB2501.namprd15.prod.outlook.com (2603:10b6:a02:88::11) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4e2a6280-c091-4983-1b90-08d583019481 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:BYAPR15MB2501; X-Microsoft-Exchange-Diagnostics: 1;BYAPR15MB2501;3:7wmqtFlMoZconaqjZcq8jPKCybMe6kIerKmq2l+YvqyvORD1KkxiyzhtuLfhDlCiX5csgSz0mFvanYpjph7Y+I24HXu7FtfcYFVF23F6PHmikpSgczM7qpxOmW85uhFN9gohlNyOHXkFiAItI3NEHwGXS0MPwVnylgaoKC9uUBSSsPyrzY3PEq2wYsg4lGm3ENQCy+4olKm9JQjAfwRuhVhXZQ+Fk5TSptEUSFQTxOGZlGI05jcTE6bw25zgkwgK;25:CAfAmrHwOwvakxVZbza+nqGUrPjvEXwR2tBKEvJAI/nuYHu5zay4HeK3OofPRYj+3iEFOrgL224+HmE5V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YW775bn5DABXR;4:5Z7l+FVwRPhC5/4hNkv0sWfL0m/jWYIyvuf9XxeZI4oy6Rq80SkzW4++GpAYh8YAiI6ajEoeosXTfYyo4+FRXiRRYg2bu2BLD8MciYgL/NznpUXvEumACfj6PMg8bPYNeFZD55wnKx3zZLXO5nISO2NAAAqtlLMYv8Ek9c7sq5PlBylS5zf/VAjvMiB5vsilMpXSYNh+yZG1c2AsfIb5owrtzQFvMCwRQeDZAGF/6lcZAJM9eA0QMMrIQISFT5WI0PMZtYCpihuoqSkicQzpR/L+tWRjNWtsdugPYKjjN0rYlViwrFuMOwN804n61M2h X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(21532816269658); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040501)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3231220)(11241501184)(944501244)(52105095)(3002001)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(20161123560045)(6072148)(201708071742011);SRVR:BYAPR15MB2501;BCL:0;PCL:0;RULEID:;SRVR:BYAPR15MB2501; X-Forefront-PRVS: 06036BD506 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(376002)(396003)(346002)(366004)(39380400002)(39860400002)(189003)(199004)(76176011)(52146003)(65806001)(2950100002)(25786009)(47776003)(6116002)(8676002)(31686004)(31696002)(6246003)(53936002)(97736004)(23676004)(1706002)(67846002)(6666003)(52396003)(86362001)(4326008)(2486003)(52116002)(65956001)(65826007)(105586002)(478600001)(58126008)(316002)(386003)(305945005)(68736007)(81166006)(106356001)(5890100001)(7736002)(7416002)(110136005)(230700001)(64126003)(53546011)(81156014)(36756003)(345774005)(59450400001)(46003)(2906002)(229853002)(6486002)(50466002)(5660300001)(16526019)(8936002)(186003)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:BYAPR15MB2501;H:[IPv6:2620:10d:c081:1132::1018];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCWUFQUjE1TUIyNTAxOzIzOnN6dERLWXRjSWRnSC9RczhEWFliNmdUQnMx?= =?utf-8?B?NjdPb3EvaVFtYWhmSkczOFZWTzEzdmZ1UUhlQnlaQ0hhSTBhSGFkWWJDczFm?= =?utf-8?B?TDFpTWlVUXdKWjJHTXVGcWY4VkhKaTA3N0s4cWVOeFRXRFNxUmNUYjFSYllD?= =?utf-8?B?cE92ODBDUlZYalNWR253Z3FDanc4dDg5VkJIS2NYQnVsMkpKVVgwalpLYUtH?= =?utf-8?B?bnZCbjl0VTJ6ODd1VFBaVm5RTzNRM2YxZTVSdm50WXh4Y2dZMnNvdUVmZkZI?= =?utf-8?B?djJIWXd3eW1tZThleUhzNWhOa0xITGRWdHZHbGp6L2JvaDJob0NrSFh5bFB6?= =?utf-8?B?ajBsMHFjajlWdlB1NmZwZHZsRnpENWpPMmd0N2hUZjRSaVQ1cThlMC9YcWd3?= =?utf-8?B?TUJRWm5USGwwVmhnbmFEcnJ4L0RJaWh2SW50M3MvMDVVZ0NnMTdvN0FERTFn?= =?utf-8?B?QjFZNXdxSmlkaXQxSVRMR2xxSVdnOVdBaFo2VGtGNFdXajRoM1JNNmhEeXNi?= =?utf-8?B?eENjQlE5cmxIVDZ1VzkyQVBCS3NqZXo4cHFGck0wWnpwVzRsV2NaQ1BWQ3ds?= =?utf-8?B?V2wzb0lmN0NGVHNITjdvSExvcUgrdUNpUEh0L0dENitYcWhOdXJJUW1zTlhz?= =?utf-8?B?YU1TajdnWWVkRG9jZnd5bENwVEJzVkg3ZHJIeTQzZjdzWlJ1WDNkNVJEckRT?= =?utf-8?B?UmRsWmJWSEtyMzZ4VnlLVVZnd0JsWGhYR0lEVDkveXA1NytBNTB3dUhjYzJZ?= =?utf-8?B?bmF1MEpXVHgvQk1vclRMMy93Q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SUmTtp5uKtPs=;24:iYtJ4iRI0vKOcmWo52mQRXAyfdBwELq5ZlU9aQTrLbyHoyHilUDLQ8baeIdsrPG6/iF43mnRNEW+Du1I10EJdoGAv+2i0BTX9K5u9+2Iar0=;7:Ihfu1ZEHmc4yUqdIyXgdnC7XTaea8uAEEqliDd/BBKcBLCGLizC4QDlpWcoIzB+PGPM/owyfYkGgvgeSfJc7HjyRwYoUXkKJ78pn4VRh6fec17PpNKfSP4pDx4VPeWxLp03TrGag5GIxp3SsJQEW2s03ysxDxfc46NlBvSm8RLL665P8r+MqYdP936ZXwEnM7IgDa+s7Jh/FbnANyNEkVUw17O+ftuqP7+37rE/RbYnEmsKD1KsDDEqBpeAXLDtP SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BYAPR15MB2501;20:aizSLywc1PvVkmO0R4gRtJyiSvVheLnACjyvJwfyid76zlmtj8ERT5dHKPpQu/AXnuFI6wJozuGWYTvoVJqwIerFn3EJlnsaGKJtViUYPK1EJx7dZWJ7nztJDX3Rx1WaNocbKiOlBHVkT85eYGJIWHZYIbhfNWpZP9AyIlIfkmw= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2018 01:28:33.6081 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4e2a6280-c091-4983-1b90-08d583019481 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR15MB2501 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-05_11:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/5/18 3:56 PM, Daniel Borkmann wrote: > On 03/01/2018 05:19 AM, Alexei Starovoitov wrote: >> Introduce BPF_PROG_TYPE_RAW_TRACEPOINT bpf program type to access >> kernel internal arguments of the tracepoints in their raw form. >> >> From bpf program point of view the access to the arguments look like: >> struct bpf_raw_tracepoint_args { >> __u64 args[0]; >> }; >> >> int bpf_prog(struct bpf_raw_tracepoint_args *ctx) >> { >> // program can read args[N] where N depends on tracepoint >> // and statically verified at program load+attach time >> } >> >> kprobe+bpf infrastructure allows programs access function arguments. >> This feature allows programs access raw tracepoint arguments. >> >> Similar to proposed 'dynamic ftrace events' there are no abi guarantees >> to what the tracepoints arguments are and what their meaning is. >> The program needs to type cast args properly and use bpf_probe_read() >> helper to access struct fields when argument is a pointer. >> >> For every tracepoint __bpf_trace_##call function is prepared. >> In assembler it looks like: >> (gdb) disassemble __bpf_trace_xdp_exception >> Dump of assembler code for function __bpf_trace_xdp_exception: >> 0xffffffff81132080 <+0>: mov %ecx,%ecx >> 0xffffffff81132082 <+2>: jmpq 0xffffffff811231f0 >> >> where >> >> TRACE_EVENT(xdp_exception, >> TP_PROTO(const struct net_device *dev, >> const struct bpf_prog *xdp, u32 act), >> >> The above assembler snippet is casting 32-bit 'act' field into 'u64' >> to pass into bpf_trace_run3(), while 'dev' and 'xdp' args are passed as-is. >> All of ~500 of __bpf_trace_*() functions are only 5-10 byte long >> and in total this approach adds 7k bytes to .text and 8k bytes >> to .rodata since the probe funcs need to appear in kallsyms. >> The alternative of having __bpf_trace_##call being global in kallsyms >> could have been to keep them static and add another pointer to these >> static functions to 'struct trace_event_class' and 'struct trace_event_call', >> but keeping them global simplifies implementation and keeps it indepedent >> from the tracing side. >> >> Also such approach gives the lowest possible overhead >> while calling trace_xdp_exception() from kernel C code and >> transitioning into bpf land. > > Awesome work! Just a few comments below. > >> Since tracepoint+bpf are used at speeds of 1M+ events per second >> this is very valuable optimization. >> >> Since ftrace and perf side are not involved the new >> BPF_RAW_TRACEPOINT_OPEN sys_bpf command is introduced >> that returns anon_inode FD of 'bpf-raw-tracepoint' object. >> >> The user space looks like: >> // load bpf prog with BPF_PROG_TYPE_RAW_TRACEPOINT type >> prog_fd = bpf_prog_load(...); >> // receive anon_inode fd for given bpf_raw_tracepoint >> raw_tp_fd = bpf_raw_tracepoint_open("xdp_exception"); >> // attach bpf program to given tracepoint >> bpf_prog_attach(prog_fd, raw_tp_fd, BPF_RAW_TRACEPOINT); >> >> Ctrl-C of tracing daemon or cmdline tool that uses this feature >> will automatically detach bpf program, unload it and >> unregister tracepoint probe. >> >> On the kernel side for_each_kernel_tracepoint() is used >> to find a tracepoint with "xdp_exception" name >> (that would be __tracepoint_xdp_exception record) >> >> Then kallsyms_lookup_name() is used to find the addr >> of __bpf_trace_xdp_exception() probe function. >> >> And finally tracepoint_probe_register() is used to connect probe >> with tracepoint. >> >> Addition of bpf_raw_tracepoint doesn't interfere with ftrace and perf >> tracepoint mechanisms. perf_event_open() can be used in parallel >> on the same tracepoint. >> Also multiple bpf_raw_tracepoint_open("foo") are permitted. >> Each raw_tp_fd allows to attach one bpf program, so multiple >> user space processes can open their own raw_tp_fd with their own >> bpf program. The kernel will execute all tracepoint probes >> and all attached bpf programs. >> >> In the future bpf_raw_tracepoints can be extended with >> query/introspection logic. >> >> Signed-off-by: Alexei Starovoitov ... >> +static int bpf_raw_tracepoint_open(const union bpf_attr *attr) >> +{ >> + struct bpf_raw_tracepoint *raw_tp; >> + struct tracepoint *tp; >> + char tp_name[128]; >> + >> + if (strncpy_from_user(tp_name, u64_to_user_ptr(attr->raw_tracepoint.name), >> + sizeof(tp_name) - 1) < 0) >> + return -EFAULT; >> + tp_name[sizeof(tp_name) - 1] = 0; >> + >> + tp = for_each_kernel_tracepoint(__find_tp, tp_name); >> + if (!tp) >> + return -ENOENT; >> + >> + raw_tp = kmalloc(sizeof(*raw_tp), GFP_USER | __GFP_ZERO); >> + if (!raw_tp) >> + return -ENOMEM; >> + raw_tp->tp = tp; >> + >> + return anon_inode_getfd("bpf-raw-tracepoint", &bpf_raw_tp_fops, raw_tp, >> + O_CLOEXEC); > > When anon_inode_getfd() fails to get you an fd, then you leak raw_tp here. good catch. will fix. >> break; >> + case BPF_RAW_TRACEPOINT_OPEN: >> + err = bpf_raw_tracepoint_open(&attr); > > With regards to above attach_raw_tp() comment, why not having single > BPF_RAW_TRACEPOINT_OPEN command already passing BPF fd along with the > tp name? Is there a concrete reason/use-case why it's split that way? The use case is to attach the same bpf prog to multiple raw_tp, but with your suggestion it will work as well, so yeah will change to that since it simplifies uapi and avoids the race in attach. Thank you for review.