From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754925AbbGNKNb (ORCPT ); Tue, 14 Jul 2015 06:13:31 -0400 Received: from mail-db3on0080.outbound.protection.outlook.com ([157.55.234.80]:33983 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753168AbbGNKMv convert rfc822-to-8bit (ORCPT ); Tue, 14 Jul 2015 06:12:51 -0400 From: Gil Fruchter To: Steven Rostedt CC: "mingo@redhat.com" , "linux-kernel@vger.kernel.org" , Gilad Ben Yossef , "Chris Metcalf" , Noam Camus Subject: RE: [PATCH v2 2/2] tracing: Fix for non-continuous cpu ids Thread-Topic: [PATCH v2 2/2] tracing: Fix for non-continuous cpu ids Thread-Index: AQHQooaqxJMjNNLn4Ue3H5tPAArFSJ3ZyEcAgAEgriA= Date: Tue, 14 Jul 2015 10:12:47 +0000 Message-ID: References: <1433251589-21013-1-git-send-email-gilf@ezchip.com> <1433835155-6894-3-git-send-email-gilf@ezchip.com> <20150713121208.3712313a@gandalf.local.home> In-Reply-To: <20150713121208.3712313a@gandalf.local.home> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: goodmis.org; dkim=none (message not signed) header.d=none; x-originating-ip: [212.179.42.66] x-microsoft-exchange-diagnostics: 1;AM2PR02MB0418;5:Ecjhxvv7j0bPgQgC/WruK5ugLBMshv07TNdmBb4qzoxgITgo6H2AVI8OJNwBGX/IhTCulikG1Ov9YPMZtORI5pe4Zi3B56XDOSqz+V8EaxPGuqYZqGcnWU5Z7/6CNZq3Jn7XDeUGjIWQRUltwHbE8Q==;24:OVgr4/OnxgSLtkoyaef2W3sTEAzEsshh2hl/605/x3ckABAnyTkfDYrodUssYF7p4o961NIV2gKFbIwp09mSoFDoKTFF63emioMkFokuIjQ=;20:yXe23k48BP1KDZwrkn/1X9njkWBkTirC50xAolz5GUDf/buf2+Z+dtKhr1mBq+WoLETMRJzBOCfEdOkQzU4nig== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM2PR02MB0418; am2pr02mb0418: X-MS-Exchange-Organization-RulesExecuted x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:AM2PR02MB0418;BCL:0;PCL:0;RULEID:;SRVR:AM2PR02MB0418; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(24454002)(377454003)(51704005)(46102003)(107886002)(62966003)(102836002)(110136002)(76176999)(77096005)(50986999)(66066001)(54356999)(76576001)(106116001)(189998001)(5001960100002)(2950100001)(2900100001)(19580395003)(19580405001)(86362001)(87936001)(575784001)(5003600100002)(2656002)(92566002)(5002640100001)(77156002)(33656002)(74316001)(40100003)(4001430100001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM2PR02MB0418;H:AM2PR02MB0626.eurprd02.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jul 2015 10:12:47.5663 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0fc16e0a-3cd3-4092-8b2f-0a42cff122c3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR02MB0418 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, July 13, 2015 7:12 PM Steven Rostedt wrote: > On Tue, 9 Jun 2015 10:32:35 +0300 > Gil Fruchter wrote: > > > Currently exception occures due to access beyond buffer_iter range > > while using index of cpu bigger than num_possible_cpus(). > > Below there is an example for such exception when we use cpus > > 0,1,16,17. > > > > In order to fix buffer allocation size for non-continuous cpu ids we > > allocate according to the max cpu id and not according to the amount > > of possible cpus. > > > > Example: > > $ cat /sys/kernel/debug/tracing/per_cpu/cpu1/trace > > Path: /bin/busybox > > CPU: 0 PID: 82 Comm: cat Not tainted 4.0.0 #29 > > task: 80734c80 ti: 80012000 task.ti: 80012000 > > > > [ECR ]: 0x00220100 => Invalid Read @ 0x00000000 by insn @ 0x800abafc > > [EFA ]: 0x00000000 > > [BLINK ]: ring_buffer_read_finish+0x24/0x64 > > [ERET ]: rb_check_pages+0x20/0x188 > > [STAT32]: 0x00001a00 : > > BTA: 0x800abafc SP: 0x80013f0c FP: 0x57719cf8 > > LPS: 0x200036b4 LPE: 0x200036b8 LPC: 0x00000000 > > r00: 0x8002aca0 r01: 0x00001606 r02: 0x00000000 > > r03: 0x00000001 r04: 0x00000000 r05: 0x804b4954 > > r06: 0x00030003 r07: 0x8002a260 r08: 0x00000286 > > r09: 0x00080002 r10: 0x00001006 r11: 0x807351a4 > > r12: 0x00000001 > > > > Stack Trace: > > rb_check_pages+0x20/0x188 > > ring_buffer_read_finish+0x24/0x64 > > tracing_release+0x4e/0x170 > > __fput+0x62/0x158 > > task_work_run+0xa2/0xd4 > > do_notify_resume+0x52/0x7c > > resume_user_mode_begin+0xdc/0xe0 > > > > Signed-off-by: Noam Camus > > Why Noam's SoB tag? Did he author it? > > -- Steve > He didn't author it, but we worked on this issue together. Gil.