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=-4.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,T_DKIMWL_WL_HIGH, URIBL_BLOCKED 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 61E29C04A6B for ; Wed, 8 May 2019 12:39:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3343020989 for ; Wed, 8 May 2019 12:39:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557319160; bh=xHZf/Oqd/MfTgtCGtWa0Of8XqjVMhgHhLXQ/RCWa0og=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=BFQavDr82llruaUN8DSjeq//S24M1COwjHVwjXxHPeG+vFOVF60a8FWPf/FfkxA6R kwI5+ig/qGI4STx6t0MTlNFT6322YiPR0BOLrrfFz/KuY74Bjf+qfwBWXL7sUAn4Kw 8X9C+tjeT8Uw4Op4NYSeB2+p1osN9jVm53LsELIk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727263AbfEHMjP (ORCPT ); Wed, 8 May 2019 08:39:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:60706 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726515AbfEHMjP (ORCPT ); Wed, 8 May 2019 08:39:15 -0400 Received: from devnote2 (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 825AA20449; Wed, 8 May 2019 12:39:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557319153; bh=xHZf/Oqd/MfTgtCGtWa0Of8XqjVMhgHhLXQ/RCWa0og=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=L/ky04awj3OM+92XX8sXAgkelTdwQo/U/SDn3fARJQ6sYWScqhXesM7NDiQBQDLI2 tfcmuucvGs56FoQoEpl8qWxdJUevBICFgaw+3pqJ++cFqnJK2bAa9HfvmoHUjkpJHN iII7ONJSfXINxuYMH6KOD8bm+DsPDeq/RoVtg+fY= Date: Wed, 8 May 2019 21:39:04 +0900 From: Masami Hiramatsu To: Daniel Borkmann Cc: Joel Fernandes , linux-kernel@vger.kernel.org, Michal Gregorczyk , Adrian Ratiu , Mohammad Husain , Qais Yousef , Srinivas Ramana , duyuchao , Manjo Raja Rao , Karim Yaghmour , Tamir Carmeli , Yonghong Song , Alexei Starovoitov , Brendan Gregg , Masami Hiramatsu , Peter Ziljstra , Andrii Nakryiko , Steven Rostedt , Kees Cook , kernel-team@android.com, bpf@vger.kernel.org, Ingo Molnar , Martin KaFai Lau , netdev@vger.kernel.org, Song Liu Subject: Re: [PATCH v2 1/4] bpf: Add support for reading user pointers Message-Id: <20190508213904.44de50870a54167cc924034e@kernel.org> In-Reply-To: <7e0d07af-79ad-5ff3-74ce-c12b0b9b78cd@iogearbox.net> References: <20190506183116.33014-1-joel@joelfernandes.org> <3c6b312c-5763-0d9c-7c2c-436ee41f9be1@iogearbox.net> <20190506195711.GA48323@google.com> <7e0d07af-79ad-5ff3-74ce-c12b0b9b78cd@iogearbox.net> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, 7 May 2019 01:10:45 +0200 Daniel Borkmann wrote: > On 05/06/2019 09:57 PM, Joel Fernandes wrote: > > On Mon, May 06, 2019 at 09:11:19PM +0200, Daniel Borkmann wrote: > >> On 05/06/2019 08:31 PM, Joel Fernandes (Google) wrote: > >>> The eBPF based opensnoop tool fails to read the file path string passed > >>> to the do_sys_open function. This is because it is a pointer to > >>> userspace address and causes an -EFAULT when read with > >>> probe_kernel_read. This is not an issue when running the tool on x86 but > >>> is an issue on arm64. This patch adds a new bpf function call based > >>> which calls the recently proposed probe_user_read function [1]. > >>> Using this function call from opensnoop fixes the issue on arm64. > >>> > >>> [1] https://lore.kernel.org/patchwork/patch/1051588/ > >>> > >>> Cc: Michal Gregorczyk > >>> Cc: Adrian Ratiu > >>> Cc: Mohammad Husain > >>> Cc: Qais Yousef > >>> Cc: Srinivas Ramana > >>> Cc: duyuchao > >>> Cc: Manjo Raja Rao > >>> Cc: Karim Yaghmour > >>> Cc: Tamir Carmeli > >>> Cc: Yonghong Song > >>> Cc: Alexei Starovoitov > >>> Cc: Brendan Gregg > >>> Cc: Masami Hiramatsu > >>> Cc: Peter Ziljstra > >>> Cc: Andrii Nakryiko > >>> Cc: Steven Rostedt > >>> Cc: Kees Cook > >>> Cc: kernel-team@android.com > >>> Signed-off-by: Joel Fernandes (Google) > >>> --- > >>> Masami, could you carry these patches in the series where are you add > >>> probe_user_read function? > >>> > >>> Previous submissions is here: > >>> https://lore.kernel.org/patchwork/patch/1069552/ > >>> v1->v2: split tools uapi sync into separate commit, added deprecation > >>> warning for old bpf_probe_read function. > >> > >> Please properly submit this series to bpf tree once the base > >> infrastructure from Masami is upstream. > > > > Could you clarify what do you mean by "properly submit this series to bpf > > tree" mean? bpf@vger.kernel.org is CC'd. > > Yeah, send the BPF series to bpf@vger.kernel.org once Masami's patches have > hit mainline, and we'll then route yours as fixes the usual path through > bpf tree. OK, then I focus on my series. Keep this series separated. Thank you! > > >> This series here should > >> also fix up all current probe read usage under samples/bpf/ and > >> tools/testing/selftests/bpf/. > > > > Ok. Agreed, will do that. > > Great, thanks! > Daniel -- Masami Hiramatsu