Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2643852yba; Mon, 6 May 2019 09:16:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3c3hdfrkaUrAZ0eVylay5hv+OjXrmjhfudWDk5fkVn0tywnWscToD1ljeOyfWaKsdricL X-Received: by 2002:a63:8bc9:: with SMTP id j192mr32541799pge.212.1557159373512; Mon, 06 May 2019 09:16:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557159373; cv=none; d=google.com; s=arc-20160816; b=wM4uiaPPoyQFx/2MzMtalxBu1FV0WVl47VGGONmjCu/4Htkdz8Y4y7chhaH/9yrzxb G7SrMGyDJpq7nuWsumAsscJFNuTMGcHU8pxTVAekqPlIhf/8dDD+JrrbYfRvWqEDJxV1 15o+tG5IThM8MOKQatei1nx+5YfZO0j11V+qeCoMlY1aIfpCorrnvW+Iw62GbkiWu5ot vbPepDfoL7NbD12+ywS3hYOZZ3HeM67igZmuTuCluT3Yr66qsE1+Rb4g2HIPVtfCdU8l t1JO148P7bQnRiHQJwsY8k++o06pRYaNjuUdPzM4bLi8gEZypwlV875GkAcLhnqVGKXI 4AJQ== 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=Z3pUfqa7gd7ssg4ALokCu3zp8vqsQw6UnB3He64S+ro=; b=xrKZwElYGDtH1if50Pd7BERGImuExXK3ar8Wcm9VMHeHXntV+ETSjgp0OXBqAWPQZ0 7hqjcLRSYGhrEsYOMNVRCqnydMlDzFxoPCSmcK9p82awKczsO+FWibUkH2kE3KKv6DHY dDzGj7W6z4Iui4rDRBncSLeD0eNKU08XTRlzp4Zj0Zp+Z9+NFtjV2GC3vSbjbaMkzHFk n3eP2h65jyE0FGW9+GpVPS+btPraMDR4qu02mYIWaEOlJJn06YDm4SomRX9tuySmr0hL 66ew4PcZhVQt1JBG6qEzD8ycsc8FoaWVYhFeyISw3vDRKkJUVBBHOFWzrW6f0fk+78c4 twgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=txS+4YeG; 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 j5si14176069pgq.566.2019.05.06.09.15.54; Mon, 06 May 2019 09:16:13 -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=txS+4YeG; 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 S1726554AbfEFQOp (ORCPT + 99 others); Mon, 6 May 2019 12:14:45 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:45910 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726270AbfEFQOo (ORCPT ); Mon, 6 May 2019 12:14:44 -0400 Received: by mail-pg1-f196.google.com with SMTP id i21so6675889pgi.12 for ; Mon, 06 May 2019 09:14: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=Z3pUfqa7gd7ssg4ALokCu3zp8vqsQw6UnB3He64S+ro=; b=txS+4YeGY/H0S3mICXO5X0wIehkEzXdpri2XdKbPxIONUrrYDOQ/b5DcvhMMPHEY0r KOfyyC3IEmPR2NHWqwych9DXW5MN64WHhTW2lyi1HzI6KRwVPWjbVxDG4Xn06HuG/K/K 6wa6cnUwNwfMqS98pUQElA4gw+kVzawQYbw5Y= 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=Z3pUfqa7gd7ssg4ALokCu3zp8vqsQw6UnB3He64S+ro=; b=udJR2KzNYcZZuiblB8aMTQM40bIHxWZTJgG7Sstn2KHnOAUe8GYTLrp/Ldn60UEZAv NUhZ3LrwiPrh+AyPMFPrgBx7gFAK1ILDb+hO4GfLsab0y3a6tmMXGQZAEX9iIotrFnMR W9FyqlhV1gY3L+2v3C07RcvvShW+I8ZXfwdwmILFwtE+OXVnABo/ano16xPb3GZwwXiU AUBN+19u2/nCBgpAnf7Ds3WEI1EMjzTuqtU8dMdo8BoZrs8wW4wWHfl5OkE5DbBCe8nq rV6xUu8KQRXZc51WCAYE5DWHCfQK2O5a/4BsOT1nx5txq06KNVQJy2uWa2JHUtoxcgmB R57A== X-Gm-Message-State: APjAAAWQu/ABl4Kwu0Gc0IH6u0WkNXkWTnJlhB3QElHKMx6s3BlUq9In bGGA9wKl4V6g436mk1G+KqzMgA== X-Received: by 2002:a63:6b49:: with SMTP id g70mr33374565pgc.340.1557159283609; Mon, 06 May 2019 09:14:43 -0700 (PDT) Received: from localhost ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id h127sm14371516pgc.31.2019.05.06.09.14.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 May 2019 09:14:41 -0700 (PDT) Date: Mon, 6 May 2019 12:14:29 -0400 From: Joel Fernandes To: Masami Hiramatsu 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 , Peter Ziljstra , Steven Rostedt , Kees Cook , kernel-team@android.com, Daniel Borkmann , Ingo Molnar , netdev@vger.kernel.org Subject: Re: [PATCH RFC] bpf: Add support for reading user pointers Message-ID: <20190506161429.GB234965@google.com> References: <20190502204958.7868-1-joel@joelfernandes.org> <20190506234751.65c92139dccbfa025bdfe300@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190506234751.65c92139dccbfa025bdfe300@kernel.org> 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 11:47:51PM +0900, Masami Hiramatsu wrote: > Hi Joel, > > On Thu, 2 May 2019 16:49:58 -0400 > "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/ > > Anyway, this series is still out-of-tree. We have to push this or similar > update into kernel at first. I can resend v7 on the latest -tip tree including > this patch if you update the description. Sounds good. I also have to split it up and add a deprecation for the old API. I will get this done today and then you can include them in your series, thanks! Once I send them, could you CC bpf maintainers on the patches too in the future? thanks. - Joel