Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2871887yba; Mon, 6 May 2019 12:59:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzxwccUsYQRxV2cs/msm8u1iAAUaTiMjRWOR6Vi9yv1NsAdgCRoT/xyFUZ/ufqfjjcRVL16 X-Received: by 2002:a17:902:6b8b:: with SMTP id p11mr34283000plk.225.1557172785202; Mon, 06 May 2019 12:59:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557172785; cv=none; d=google.com; s=arc-20160816; b=ns6WLtPccjFp5NRLh9iPDbbCSBZN4U/oFDaz0ILOTeO9TVPQiPDqy5AxjbTVupYDiM b9vy7lwWRL3C6eLlSLVhvw9siVDYGzZgZjRsUinnxhKZkXR6KC+Tc/ZmoG69XRzVT5G3 X1gLaFdOp4IvZpFKTdlhuGU1BgkWnj1DRJzhEtzSIPK4sfDEg6b5slsIhIei2oamwDoH yrPXysjQeH9Odd6Ltp8Cqty+7m32WfLQJMW2g716OyKKwU7ei9/4PRf5Dp/vukLH5et9 DIBfPIdwyVy7OHFte2l0sWa6q3uJ8f9Gomdv2iQ4FjlDOQpOH2ZTOOtDneJ2eaCbe0vS M+JQ== 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=CLvXgkmEF2HuuDRz+thRTXD1OtlI2uKzA2+jsYBonhs=; b=0LNSp25honeVdwPx/c9FgiAMdG7foPDt7uNg88X0y+1XZNl6wQPz7gr7crErCdRyX6 18rX5bA83eYYuCyaTqQLZJVyh0LdY2Y1tpoYGpFSF46dZzd1D0F7at3AMMaYePHuoyVs OO24/UwFaMn1FneLmil4T6RQH1I/0hfR00nJo7WemDNRxeF+cx9vH9QpcTcmxD0IWu9J WmFdNbY5pZ4ZvwxsnKyliWwe8LsomGO+Y9K88Y9SH3bGXNJ05b9XSpD37kS722wjkiWm sk7GsiutfvTSUPE7fkJbcF2fVJTrtcCpZ1ZLgiS9oYG8NeoXDmJQpia4qscgdi6CR1D1 NRqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=S6iea+gw; 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 b6si85713pgk.279.2019.05.06.12.59.29; Mon, 06 May 2019 12:59:45 -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=S6iea+gw; 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 S1726659AbfEFT5P (ORCPT + 99 others); Mon, 6 May 2019 15:57:15 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:40207 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726282AbfEFT5O (ORCPT ); Mon, 6 May 2019 15:57:14 -0400 Received: by mail-pf1-f195.google.com with SMTP id u17so7324116pfn.7 for ; Mon, 06 May 2019 12:57:14 -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=CLvXgkmEF2HuuDRz+thRTXD1OtlI2uKzA2+jsYBonhs=; b=S6iea+gwnFA7+UtQ38F/1k2BteEzmNzXl+aCRycK15pGhNFpdyCe6rhOEQHexmbGnQ e2CB8RFbWcPDfBoW2UNpy6UNA1V6tEYjkD1QsWLAowhee9HO2z/IKHMNWHNqjuT8lG2x O75FFPOK/kakEUTjZK1qAzPGXtVUQXnbi1kU4= 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=CLvXgkmEF2HuuDRz+thRTXD1OtlI2uKzA2+jsYBonhs=; b=U3ZgTkN8cKqFm1zDUijod13IarJWue3WO2TPMLjio5tkcfY+X1JVNQIot7CO91B91M Z4hbf7ynvqWpIoPt7hL9D0fVuKrRosftMHrMI26J/dxAQEKgia06x974md/3JuUFUdT8 qjKMIIY5qSHc9zsusc9v7Q1+2JvJF13m1Hgf1+8L6u9iZKtSlAX6ZQHglzWiAuWOnq0n MimDRc6Ckw11LUCTIOkvgD9fp9E0QmWJH4jAxgKsn5gS3iUB5FWlfkpvB0MT5+ZsTsrU quJv6oQhz5dK4YYCIe+Qn2yOD3MZpdztQCdvylZ2yqEJiD1RA2xPO5e7rkW1Q3bzQ41b bxDQ== X-Gm-Message-State: APjAAAVEdqwR08oPF7dcoo0bDrG+UlfHFihikSVdxITPMs3URZOsPIpa KKBhcaxJX/R7fH+fnCfgK1G90w== X-Received: by 2002:aa7:8b8b:: with SMTP id r11mr35947156pfd.130.1557172633764; Mon, 06 May 2019 12:57:13 -0700 (PDT) Received: from localhost ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id 128sm13713965pgb.47.2019.05.06.12.57.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 May 2019 12:57:12 -0700 (PDT) Date: Mon, 6 May 2019 15:57:11 -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: <20190506195711.GA48323@google.com> References: <20190506183116.33014-1-joel@joelfernandes.org> <3c6b312c-5763-0d9c-7c2c-436ee41f9be1@iogearbox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3c6b312c-5763-0d9c-7c2c-436ee41f9be1@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 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. > 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. thanks, - Joel