Received: by 10.223.185.116 with SMTP id b49csp2986446wrg; Mon, 5 Mar 2018 12:00:21 -0800 (PST) X-Google-Smtp-Source: AG47ELufxr7QSm+ycj0VeRMNDPptQ1l9hmPUsRu+4VFg7ns1o8VCUIalH5F32172DHXsweA+5A8m X-Received: by 10.98.144.65 with SMTP id a62mr16330134pfe.96.1520280021666; Mon, 05 Mar 2018 12:00:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520280021; cv=none; d=google.com; s=arc-20160816; b=xDDi75r+Mg5rGyPDyhL+wKdD4/+kj0Se4LovqYOMVhnOBJ0VtxZn2rNv9MUGgw5cF+ gkScl2Le/2fcgjFJOV8jnjwVFwsRTisMxknvJS+tNM4xqQzdhQodRgSJGEX2vZUf5grM Ziy1aXHjNmkeNSXA/F/0MMGApLvw7K/lA03iRcXOeIeBirjhd41BqwqZr0eKIl/Srlto bYEnsZtnHiOGv3UcOyGlRQ1KrhtVX0fq2O6SopxPYD8wn9im+5pNdp0jLYkA59iv4WCY 17hq8o6xl3mC2cwZs8fL/X21Dc/eMS0hpN3XwZWsDazv1cXdbl9kPNurXhB4/nf4FOzg VV1Q== 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:arc-authentication-results; bh=gPXTMtVAmPDl0/FW9o46wW54tauzwRMZ4K7kYlSzwOE=; b=mShOFHbRYI7opcEj2MUA03RHPGpw/GYm+pq8zRAKrwqpS5HClRDe6zXzCt9CoKtm8r dia/5y3d2l5qID44XmcqpS1KgPXv1beJOCSk1RFmK6s8LrmXJF3G7WjRBsuOmV1XX1Ve bSL1Cv8hmziwWZKhnBE26a9gqZHZ7VDlT7BPNyocJjV1EkpXaVrj7jt1KC+W46cdQJO1 inFtwRG7oYS8KF9iMF3WrEMxBuFg0Ff3t6a5WQPSpPMjkzCr8C+EP7Mk7DP8SwuW8UdN q8QRDsgI04XPkk4sreoMmhSLyTNQFIqUUGROeQuQcS+/vBuFx1bK2VW5eDACBMeSdIic X0uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b=c8tRw0PY; 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 92-v6si9795414pli.623.2018.03.05.12.00.06; Mon, 05 Mar 2018 12:00:21 -0800 (PST) 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=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b=c8tRw0PY; 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 S932228AbeCET7J (ORCPT + 99 others); Mon, 5 Mar 2018 14:59:09 -0500 Received: from mail-qk0-f196.google.com ([209.85.220.196]:34973 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751779AbeCET7H (ORCPT ); Mon, 5 Mar 2018 14:59:07 -0500 Received: by mail-qk0-f196.google.com with SMTP id s188so22120863qkb.2 for ; Mon, 05 Mar 2018 11:59:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=gPXTMtVAmPDl0/FW9o46wW54tauzwRMZ4K7kYlSzwOE=; b=c8tRw0PYrzVPHghznJKeXlm3XgnedfAltnOtTJ7+0PQIaoCQ/MT9pESNcSbcZn16aS 0KTmhQn5VAPtHbcsc8Rsw8/VfGO2MyAN276z3OGh8braE8TOLH/KjC0XXAW3/2bY1gVY pTn5tcLAw/jr47kgZ1fRosxwihuTRQaG/xr4ef0AiGXEPBnDsgujpCr4HA9ut2N0YwLf EgmYUJ4QuBjV9SZMagsnXEbxNZXlIAXqw4ksBCkBzixHDD0ZQWAtmt71dXsjeGWWw0Fb 75GFN/fbV7j5eZJdthFJZNu1F1JfpWuXrwMCBrvztFDBET6Zgr7tzYKrEUo/ECdlOZzU 6Lbg== 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=gPXTMtVAmPDl0/FW9o46wW54tauzwRMZ4K7kYlSzwOE=; b=Kj1dRnrzaeHRm0FuF9GzGukEnwPXEQIc1cWm6WQntbXVs0EgXn+c9hL5ifFamxdKd/ 4/xMutFCPeHXYyZ7Eq5F67k6/qTyCJFfGRmFgejwIw1AH0P2E6L95ia+USB6twPbkvrQ W1OkukuTwbjxUD9uBh8HNKwwuxVh7JgU15tx373uroC/6A5pFtLfIC84jB1jT4Wu67XP 5CIxclHpUHY17SYtnfijaKlvyU9aom0ngv2hdK131cBy6txKj1gcGihYK05ivLf7zlic ykehnqhYM/fkqglqaSwT+x2fzXu25Y5Wzo1zfkwve2llyylhUzv9vE9b/1XiXeg0gveK Ra5g== X-Gm-Message-State: APf1xPBYNGFTbJqZtrqPRpmJIyIg0OaADuLT3W+VtYnW9P7JVdQsEEVi 0fbJ4ag3EW607HvvE4CgSCjSPQ== X-Received: by 10.55.133.7 with SMTP id h7mr24244226qkd.130.1520279947255; Mon, 05 Mar 2018 11:59:07 -0800 (PST) Received: from localhost (cpe-2606-A000-4381-1201-225-22FF-FEB3-E51A.dyn6.twc.com. [2606:a000:4381:1201:225:22ff:feb3:e51a]) by smtp.gmail.com with ESMTPSA id o98sm9910364qkh.82.2018.03.05.11.59.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Mar 2018 11:59:06 -0800 (PST) Date: Mon, 5 Mar 2018 14:59:05 -0500 From: Josef Bacik To: Howard McLauchlan Cc: linux-kernel@vger.kernel.org, Steven Rostedt , Ingo Molnar , kernel-team@fb.com, Yonghong Song , Josef Bacik , Omar Sandoval Subject: Re: [PATCH] uprobe: add support for overlayfs Message-ID: <20180305195904.sliaqqv4dzuebque@destiny> References: <20180228004014.445-1-hmclauchlan@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180228004014.445-1-hmclauchlan@fb.com> User-Agent: NeoMutt/20170714 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 27, 2018 at 04:40:14PM -0800, Howard McLauchlan wrote: > uprobes cannot successfully attach to binaries located in a directory > mounted with overlayfs. > > To verify, create directories for mounting overlayfs > (upper,lower,work,merge), move some binary into merge/ and use readelf > to obtain some known instruction of the binary. I used /bin/true and the > entry instruction(0x13b0): > > $ mount -t overlay overlay -o lowerdir=lower,upperdir=upper,workdir=work merge > $ cd /sys/kernel/debug/tracing > $ echo 'p:true_entry PATH_TO_MERGE/merge/true:0x13b0' > uprobe_events > $ echo 1 > events/uprobes/true_entry/enable > > This returns 'bash: echo: write error: Input/output error' and dmesg > tells us 'event trace: Could not enable event true_entry' > > This change makes create_trace_uprobe() look for the real inode of a > dentry. In the case of normal filesystems, this simplifies to just > returning the inode. In the case of overlayfs(and similar fs) we will > obtain the underlying dentry and corresponding inode, upon which uprobes > can successfully register. > > Running the example above with the patch applied, we can see that the > uprobe is enabled and will output to trace as expected. > > Signed-off-by: Howard McLauchlan Reviewed-by: Josef Bacik Thanks, Josef