Received: by 10.213.65.68 with SMTP id h4csp1537395imn; Thu, 15 Mar 2018 02:30:27 -0700 (PDT) X-Google-Smtp-Source: AG47ELtCRZCYXGgn9CgJO+0aboao9ePnkyeKAVHMsnb0fjIDI6bFGRBbWYeLzEc2EQ4wHItRQzFh X-Received: by 10.98.13.211 with SMTP id 80mr7185634pfn.69.1521106226992; Thu, 15 Mar 2018 02:30:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521106226; cv=none; d=google.com; s=arc-20160816; b=yThS5CJAszC/VASyZDiqETsExpaYLxxVW21kYjp8Scz4BG2j526WDSAUaqQ1B2nfMG dXJZ9f7k9ghJhGzky3UuhkpFr+3FR/Vc3hlH5hI5RgVTCQAEzjaSeqqw0Vu6VrBxj4t6 0yNDioyutaIQrZHpQ6+Z6hNNA+DdxwZJj1bGfDuSO8WZeQnDNa1sALZRolK9vnS32kcS gfhxuChj+v+qjN0oaX+1APAXocWzfRhzLyabghtx2eqRL1ee/7qhg7KH8jiZWouKLdp3 B6dVptrPdZfDiJrCLX46DP7XpeijGyiRXFYxL3msMo/4wWz/XXJBiwYMr/cIaBZ33CFn pflw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dmarc-filter:arc-authentication-results; bh=WeH4jYwG33TXiPSAXoka/DgpZzMO8PoWauOkGNR2AkY=; b=SJzDLCJqQM0pzMCpnZD7FI9NnNYFZ1UuHTGLt7fFLnqMqlv9FQeE2Q1fOVtelcUZux vsS5EXg8O0TUsp6SYF8l1nVUeekE+RXoHKl71uW27eikSQ7wkeDmX1VG5EilOQ3Cdm4/ C1P3xIJV78eGh/+yFdi/fxqiWx4235rsmpzJUlUnkubeWvWDyIwlbWFQeJixQx029cGu 1vtu2+skHCPDDbSKmhWwBGk4W+lSjvxa8DP0CBvy/Z9PgcRiXT8nqTmTAEyYgAcWJK1c A30RLLFAxELw+IIr/1tkiUcdu9BZALxRx9mu2X1Ia4t15ff3xVfk5Ad5bE5Uchz1K9TZ 7UHA== ARC-Authentication-Results: i=1; mx.google.com; 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 r59-v6si3693847plb.69.2018.03.15.02.30.11; Thu, 15 Mar 2018 02:30:26 -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; 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 S1751526AbeCOJ3T (ORCPT + 99 others); Thu, 15 Mar 2018 05:29:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:38050 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750731AbeCOJ3S (ORCPT ); Thu, 15 Mar 2018 05:29:18 -0400 Received: from devbox (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 14C5620779; Thu, 15 Mar 2018 09:29:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 14C5620779 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mhiramat@kernel.org Date: Thu, 15 Mar 2018 18:29:14 +0900 From: Masami Hiramatsu To: Ravi Bangoria Cc: rostedt@goodmis.org, linux-kernel@vger.kernel.org, keescook@chromium.org, wangnan0@huawei.com, mingo@redhat.com, srikar@linux.vnet.ibm.com, oleg@redhat.com, mhiramat@kernel.org, namhyung@kernel.org Subject: Re: [PATCH v2 1/2] trace_uprobe: Use %lx to display offset Message-Id: <20180315182914.ec9640e5272abfd516141bc2@kernel.org> In-Reply-To: <20180315082756.9050-1-ravi.bangoria@linux.vnet.ibm.com> References: <20180315082756.9050-1-ravi.bangoria@linux.vnet.ibm.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 15 Mar 2018 13:57:55 +0530 Ravi Bangoria wrote: > tu->offset is unsigned long, not a pointer, thus %lx should > be used to print it, not the %px. > This looks good to me. Acked-by: Masami Hiramatsu Thanks, > Fixes: 0e4d819d0893 ("trace_uprobe: Display correct offset in uprobe_events") > Suggested-by: Kees Cook > Signed-off-by: Ravi Bangoria > --- > v2 changelog: > - Keep prefixed 0s as is. > > kernel/trace/trace_uprobe.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c > index 2014f4351ae0..0298bd15be83 100644 > --- a/kernel/trace/trace_uprobe.c > +++ b/kernel/trace/trace_uprobe.c > @@ -608,7 +608,7 @@ static int probes_seq_show(struct seq_file *m, void *v) > > /* Don't print "0x (null)" when offset is 0 */ > if (tu->offset) { > - seq_printf(m, "0x%px", (void *)tu->offset); > + seq_printf(m, "0x%0*lx", (int)(sizeof(void *) * 2), tu->offset); > } else { > switch (sizeof(void *)) { > case 4: > -- > 2.13.6 > -- Masami Hiramatsu