From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:60592 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752100AbeCMVry (ORCPT ); Tue, 13 Mar 2018 17:47:54 -0400 Received: from pps.filterd (m0044008.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2DLiDCY015489 for ; Tue, 13 Mar 2018 14:47:53 -0700 Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2gpm2x8myu-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 13 Mar 2018 14:47:53 -0700 From: Song Liu To: , , , CC: , , , Song Liu Subject: [PATCH bpf-next v5 0/2] bpf stackmap with build_id+offset Date: Tue, 13 Mar 2018 14:47:44 -0700 Message-ID: <20180313214747.3675581-1-songliubraving@fb.com> MIME-Version: 1.0 Content-Type: text/plain Sender: netdev-owner@vger.kernel.org List-ID: Changes v4 -> v5: 1. Only allow build_id lookup in non-nmi context. Added comment and commit message to highlight this limitation. 2. Minor fix reported by kbuild test robot. Changes v3 -> v4: 1. Add fallback when build_id lookup failed. In this case, status is set to BPF_STACK_BUILD_ID_IP, and ip of this entry is saved. 2. Handle cases where vma is only part of the file (vma->vm_pgoff != 0). Thanks to Teng for helping me identify this issue! 3. Address feedbacks for previous versions. Song Liu (2): bpf: extend stackmap to save binary_build_id+offset instead of address bpf: add selftest for stackmap with BPF_F_STACK_BUILD_ID include/uapi/linux/bpf.h | 22 ++ kernel/bpf/stackmap.c | 257 +++++++++++++++++++-- tools/include/uapi/linux/bpf.h | 22 ++ tools/testing/selftests/bpf/Makefile | 12 +- tools/testing/selftests/bpf/test_progs.c | 164 ++++++++++++- .../selftests/bpf/test_stacktrace_build_id.c | 60 +++++ tools/testing/selftests/bpf/urandom_read.c | 22 ++ 7 files changed, 535 insertions(+), 24 deletions(-) create mode 100644 tools/testing/selftests/bpf/test_stacktrace_build_id.c create mode 100644 tools/testing/selftests/bpf/urandom_read.c -- 2.9.5