Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3531729yba; Tue, 7 May 2019 02:50:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyq9HX8mYlAmmcpk8i9vFArbsmVvdPHwF2+tdeJ/+gNMJvXRPqempxzcBMWDf+Ngj3WauOy X-Received: by 2002:a62:1897:: with SMTP id 145mr40611626pfy.122.1557222618081; Tue, 07 May 2019 02:50:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557222618; cv=none; d=google.com; s=arc-20160816; b=aaHus3lIXhv05ptLJR5wrXOw64jjtMQj3G+6Hy2DShjYo+fMYaTx1HF8VNoqIHD0oH izWODsnTkSbLknpKRuyjRhfXyj6bphliS6k0MKAO+iqdaHjV/L2sPgfr6p6TegOOmQdw LafuFSAHfSrZ9EXYDvxz+wJAo/BzysF05BftES7jeQBSJY1f7bad8vFdaHXk5jH2LUap HauD9BooH4MWfhTZHtaCwHdMJBzWflrFjjEY4woKcviGzdB14qpnjpGrk+d3xxHDXmss tjAvRaVpK1UPzZjFPAluHTVGRVaScKpeYVOZLuv8hE1rqacQ3ZIuBRrjtOA/huuOPMmH 2JhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=XAPkXFEJd/9+U7LZM5RTHwLX5SfNQT4uABRWDf3e59U=; b=EtAMkXv8vRDzxYuBGg+LhWM96Nm1MH65wrgn0fd8r1SDe1S5pTXtCmbLtM6+qeus7o S7JuctCFMV3yThsSBCltjG/fE53hrPkeZ8aNs27yatZsUdYruubuZx9uBBFpa+XRFsLH 6fB+37/ftAhjDFOA0leOwDRY4r6XbSJzN1GIB4AI6K6x7Mp46Vhukbq71u2VhM8XO5kw iiJujJdrclROUHf1WlslA/OAyQYtgFRapBqyvo31Rknw7pT8sLaT40s003p2EgmSMOin h+Yt22jKPBI2pPVFn6YJ5ZJGNBhzGd6sdMdVtfZHPVANVgkyCo8dIYlh+IZzUcEYW4bX XGOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=wkcJ5IUL; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w189si17346982pgd.534.2019.05.07.02.49.58; Tue, 07 May 2019 02:50:18 -0700 (PDT) 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=@joelfernandes.org header.s=google header.b=wkcJ5IUL; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727037AbfEGJrp (ORCPT + 99 others); Tue, 7 May 2019 05:47:45 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:34452 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726327AbfEGJro (ORCPT ); Tue, 7 May 2019 05:47:44 -0400 Received: by mail-pf1-f195.google.com with SMTP id b3so8384237pfd.1 for ; Tue, 07 May 2019 02:47:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XAPkXFEJd/9+U7LZM5RTHwLX5SfNQT4uABRWDf3e59U=; b=wkcJ5IULORPol9Ta9jcdQPInjjpcxx2iGSzhbZ7uuBV7xoF7dl3Vy6MmlvysAw/Eqx dZv/7YvXxLRA4xMYaq5vMQvnjq+2pRGGpfpdknVG8mcV+b1I0zwMQo9hwKV/Z+xupRHC W0INIqcGPApsGsSO+eRNhJ/rPEw9aWUlmIZo0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=XAPkXFEJd/9+U7LZM5RTHwLX5SfNQT4uABRWDf3e59U=; b=XP4HhF2ATS0pUj/k+ENfpKVZEkBmohbWF+z2xeSyYFJAoy8exVuwqcvzhms4IpFE1d 8iKhZinwk3MpN3fFroASthbq3SNgMd5acyPErP5B73H7KmVpoAGee6oGg6vsuBvsWLpR kvqhepSqPhhKXrnQvIk1QVo8eSqhU8MYqK6AvcAp0keplxX6DiGrqZVGUtFZviZaReFb lvytk555owwwvPocBAgMM2V0QC5i5fcntvvBJqpFX3NshetDqWNpx1ifeCQuf3fKQmZW diofhNd9tHTrXZPdiG2Lh9nKd/4Q04ry+ZqJoDWb5ZLklEwgYhtqTGmFspCmIJ6+FPFl RKXg== X-Gm-Message-State: APjAAAXMTK1nGxohJwXFTn69M4VfeFIsdOqU7WvwI+2DZHHh/p1ojTJl YItVyxmSSlvS0qhneH/teBnmtQ== X-Received: by 2002:a62:30c2:: with SMTP id w185mr40348063pfw.175.1557222463942; Tue, 07 May 2019 02:47:43 -0700 (PDT) Received: from localhost ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id j16sm15765973pfi.58.2019.05.07.02.47.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 May 2019 02:47:42 -0700 (PDT) Date: Tue, 7 May 2019 05:47:41 -0400 From: Joel Fernandes To: Daniel Borkmann Cc: 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: <20190507094741.GA6659@google.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7e0d07af-79ad-5ff3-74ce-c12b0b9b78cd@iogearbox.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 07, 2019 at 01:10:45AM +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. Sounds great to me, thanks! - Joel