Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp566397yba; Wed, 3 Apr 2019 14:35:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNVC5ZhK/6rSaGJpf7HtxcJfAa7wmxMhz+54tGWCRG83BxfcjMm1zEgVbOVOe/oCZpenrr X-Received: by 2002:a62:6490:: with SMTP id y138mr1814496pfb.230.1554327319581; Wed, 03 Apr 2019 14:35:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554327319; cv=none; d=google.com; s=arc-20160816; b=ZlOYUPl5N1VoKWGUJ4I9nLqELh7cXsntFGtuSVLUjq5HlHwOOiDPW/F4qA5vzgAUeG VRLaeU8DLjwjShyXRNDrwAhEAaE3iGJRSiDVyHgacyxL5U2wBpScWQpccfBWTi+FmSUj /VI5IkPfSiGrNfg3p2pTnlyIEL5AcGq0bL4cEd9rv7x87oSEB5XOn2cmua/Y1AmKVpQg QwjNz+3hWzikQRPfviVy2Aowi/S69RssarwNpuw/MZ+pe7fyThTSnZ1vNYE2C7qh54gl vLHOhEz/Pl6vpOXFkGwk08owNSHj8sjKF1nFMsqU7QPE28Lldn/P4KM3Va2D6fTn2Xe6 nVNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature:dkim-signature; bh=ESH9tHX/O07Zu+mzoGeeTfHBqzmY+Ff5uFRZqdthync=; b=Zs2rwJuv575oBe6W+RBtJoSvincISbJxPK8YdgArHZRhvigb4s7VpBwIrfZ4FOGz32 dWBqmHromFyQks9bG0X9NedPi0gqSVk/4dFfwGe41V7mR1K12TC1XFnpiK/aoMJga79b kqBiEOJqo0xwDGK84wOZwClQ2LIc+bFCS74gMUAmNnUyQfMfuhouG8eOXJtk6JRfbA+I JY/jJPPT/nJ3HCr/DVRt4+Qzd+66y8rrZn25ZBGWT+lJ97Z7a9RzcxeONu6m7veL/6Kp 0topaocfLoVCCtNXcna1QLmY28RJJqsB6TKpaZUj8reo6jwA5jkgqmlMlUGKWotvMXjj yOMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=N9aMsrUl; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=T6ndAK23; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v12si14454728pfe.11.2019.04.03.14.35.04; Wed, 03 Apr 2019 14:35:19 -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=@fb.com header.s=facebook header.b=N9aMsrUl; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=T6ndAK23; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726890AbfDCVeL (ORCPT + 99 others); Wed, 3 Apr 2019 17:34:11 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:34848 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726672AbfDCVeJ (ORCPT ); Wed, 3 Apr 2019 17:34:09 -0400 Received: from pps.filterd (m0148461.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x33LN2AG020618; Wed, 3 Apr 2019 14:34:05 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=facebook; bh=ESH9tHX/O07Zu+mzoGeeTfHBqzmY+Ff5uFRZqdthync=; b=N9aMsrUlH6T0t2xfPvMfGKX4tNGDbH+myhld1rzK2OW+j6A7capu2c9x1KXan4LLGWkV R9KhJNN18rbSBABrxhpf9uFcfRE7VZqRFbS53Brwy+MX34OEV6+/hfIOUPiYYE3Ssvko Hih4Yqu8ZwIYk2DAMVLQ19gT5yf0GTTgu88= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2rn1e98vdv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 03 Apr 2019 14:34:05 -0700 Received: from prn-hub06.TheFacebook.com (2620:10d:c081:35::130) by prn-hub05.TheFacebook.com (2620:10d:c081:35::129) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1713.5; Wed, 3 Apr 2019 14:34:04 -0700 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (192.168.54.28) by o365-in.thefacebook.com (192.168.16.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1713.5 via Frontend Transport; Wed, 3 Apr 2019 14:34:04 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ESH9tHX/O07Zu+mzoGeeTfHBqzmY+Ff5uFRZqdthync=; b=T6ndAK236D0PK3cQaDxwBI+SE3Q/INF7h8jhW8MtRjzOzi57LNY1P5sLzUIPHt9rbw5hHkHhNfNXr4Fmwfwqur8s7aJkikXkygQ+Zqdqb21o/lczN8V6h4CoFMQtEZs6E5ZpOnTPO2eLUF+f/g80m1ds/Yr/McnCVs47c/aamug= Received: from MWHPR15MB1165.namprd15.prod.outlook.com (10.175.2.19) by MWHPR15MB1295.namprd15.prod.outlook.com (10.175.3.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1750.16; Wed, 3 Apr 2019 21:34:02 +0000 Received: from MWHPR15MB1165.namprd15.prod.outlook.com ([fe80::5185:8137:2f1d:7171]) by MWHPR15MB1165.namprd15.prod.outlook.com ([fe80::5185:8137:2f1d:7171%2]) with mapi id 15.20.1750.017; Wed, 3 Apr 2019 21:34:02 +0000 From: Song Liu To: Thadeu Lima de Souza Cascardo CC: "linux-kernel@vger.kernel.org" , "acme@kernel.org" Subject: Re: [PATCH] perf annotate: Fix build on 32 bit for BPF annotation Thread-Topic: [PATCH] perf annotate: Fix build on 32 bit for BPF annotation Thread-Index: AQHU6lXFqqa7wYSVLECtJxWqgZqKp6Yq9TyA Date: Wed, 3 Apr 2019 21:34:02 +0000 Message-ID: References: <20190403194452.10845-1-cascardo@canonical.com> In-Reply-To: <20190403194452.10845-1-cascardo@canonical.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.3445.104.8) x-originating-ip: [2620:10d:c090:200::2:1b0d] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5a9d0fd3-02e0-45b6-4935-08d6b87c175a x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600139)(711020)(4605104)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:MWHPR15MB1295; x-ms-traffictypediagnostic: MWHPR15MB1295: x-microsoft-antispam-prvs: x-forefront-prvs: 0996D1900D x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(396003)(376002)(39860400002)(366004)(136003)(189003)(199004)(51914003)(46003)(76176011)(25786009)(14454004)(229853002)(305945005)(106356001)(82746002)(6486002)(8676002)(8936002)(68736007)(6436002)(50226002)(6512007)(6116002)(6916009)(2616005)(446003)(5660300002)(476003)(81156014)(81166006)(54906003)(316002)(71200400001)(6246003)(33656002)(7736002)(186003)(105586002)(256004)(83716004)(2906002)(11346002)(6506007)(53936002)(53546011)(86362001)(71190400001)(99286004)(486006)(57306001)(478600001)(4326008)(97736004)(36756003)(102836004);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR15MB1295;H:MWHPR15MB1165.namprd15.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: fb.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: Ku36PQvIugRDvFJSqRT/zMGZc1lncR3UC3i9AMA92Y9S20/78PERxR+qwKP3JLVUGrdEcDX/NhqSFMwXjbKHsUfoanAELue1uXWSKHlA16ExrFo0/vIlO2w5aBO8hcbCtc/cC6EmrDAve7TQfOjNL0uqTvNyEFRfw1EtZKq0qu4yKZBq1Hto+Kbr9e55BCy1WkxfwwuUVfE5HIErRQrFBEq+56Nwjw56NwRjSjvU1DcgBMlWCQcYna0xCYsdDN54+bPr9rnF/BUjh69u+BlLU9I2IHJULAl/hDx+YgGB7m7zhsUpVUqWAos2pIPkcbCs9OEBzi0A7qOzmiXgRuuTIbt+hRd4b3+RcBIKss9+PSmkYjqZZFeonx+2yCM8tzl6Hc5vU5YWvT1dAqDhS7h4V2MngbbnuHlbx57f51dtpMQ= Content-Type: text/plain; charset="us-ascii" Content-ID: <7418A620AFE5894F87ED1220F5D59344@namprd15.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 5a9d0fd3-02e0-45b6-4935-08d6b87c175a X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Apr 2019 21:34:02.4800 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR15MB1295 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-03_13:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Apr 3, 2019, at 12:44 PM, Thadeu Lima de Souza Cascardo wrote: >=20 > Commit 6987561c9e86 ("perf annotate: Enable annotation of BPF programs") = adds > support for BPF programs annotations but the new code does not build on 3= 2-bit. >=20 > Fixes: 6987561c9e86 ("perf annotate: Enable annotation of BPF programs") > Signed-off-by: Thadeu Lima de Souza Cascardo Acked-by: Song Liu Thanks for the fix! Song > --- > tools/perf/util/annotate.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c > index c8b01176c9e1..09762985c713 100644 > --- a/tools/perf/util/annotate.c > +++ b/tools/perf/util/annotate.c > @@ -1714,8 +1714,8 @@ static int symbol__disassemble_bpf(struct symbol *s= ym, > if (dso->binary_type !=3D DSO_BINARY_TYPE__BPF_PROG_INFO) > return -1; >=20 > - pr_debug("%s: handling sym %s addr %lx len %lx\n", __func__, > - sym->name, sym->start, sym->end - sym->start); > + pr_debug("%s: handling sym %s addr %" PRIx64 " len %" PRIx64 "\n", __fu= nc__, > + sym->name, sym->start, sym->end - sym->start); >=20 > memset(tpath, 0, sizeof(tpath)); > perf_exe(tpath, sizeof(tpath)); > @@ -1740,7 +1740,7 @@ static int symbol__disassemble_bpf(struct symbol *s= ym, > info_linear =3D info_node->info_linear; > sub_id =3D dso->bpf_prog.sub_id; >=20 > - info.buffer =3D (void *)(info_linear->info.jited_prog_insns); > + info.buffer =3D (void *)(uintptr_t)(info_linear->info.jited_prog_insns)= ; > info.buffer_length =3D info_linear->info.jited_prog_len; >=20 > if (info_linear->info.nr_line_info) > @@ -1776,7 +1776,7 @@ static int symbol__disassemble_bpf(struct symbol *s= ym, > const char *srcline; > u64 addr; >=20 > - addr =3D pc + ((u64 *)(info_linear->info.jited_ksyms))[sub_id]; > + addr =3D pc + ((u64 *)(uintptr_t)(info_linear->info.jited_ksyms))[sub_= id]; > count =3D disassemble(pc, &info); >=20 > if (prog_linfo) > --=20 > 2.20.1 >=20