Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60B87C0650E for ; Wed, 3 Jul 2019 19:15:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2CD81218A4 for ; Wed, 3 Jul 2019 19:15:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZuH+NAoj"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="xyW8QSTe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2CD81218A4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8cU1X1GTVms0MOTDpJBzdHmWIdmftk6NCtcKpY+6Zzo=; b=ZuH+NAoj48Psbw wb0UYNHi12TBZLYiYctNMPAAjlICwuJRUCBIEBIatNkw88L0allnhJy/BE934fhvu1+xQZrCIYaqy +rBRGahV5l7BPCxxuAgS7RBPvv1Iwuem3WoAixKXgEmvPHrCsPSmVmzvUClNqIKpx02zWnWuS/O1H WKkeV/ogyHqkAH5f2E3qxu+E7SNGUjR+sfc36N1r/91p7Xh0SVa1tS5n0iAgdh0lCqS5eZFDgiGpn LsVYKhKtlsAUI37b0GgZT93ZvoLscV4pzB5lZDR1g1c4sYDohtgs3kCUkCg7pKgmvBOTq9iwnSdMd C8n8NQ4YfZB9Odlhvalw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hikiu-0000j8-0j; Wed, 03 Jul 2019 19:15:20 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hikiG-0007Ob-04 for linux-arm-kernel@lists.infradead.org; Wed, 03 Jul 2019 19:14:41 +0000 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 11E37218A4; Wed, 3 Jul 2019 19:14:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562181279; bh=WKLYhYNxW7wVPC1nOdAMMczALKpFQx7zZiWvjiMYvjI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xyW8QSTeDgMRJHh1dv18CgJI7psKvwNWT3KCMg1pdzE7WpoPcRQdP/1qtosWTdsO1 NpC7bYoOEyLWHzOMfU9wHozxv1BjylknHRx8Shrj5jfBn39VCwCyQB8e6fAZSTbWtH yd7Nfoz8BN5R5q/yYYnKH6KFuIBB3QXP7OJVNC2I= Date: Wed, 3 Jul 2019 21:14:36 +0200 From: Greg KH To: Mathieu Poirier Subject: Re: [PATCH 1/5] coresight: tmc-etr: Do not call smp_processor_id() from preemptible Message-ID: <20190703191436.GB17519@kroah.com> References: <20190620221237.3536-1-mathieu.poirier@linaro.org> <20190620221237.3536-2-mathieu.poirier@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190620221237.3536-2-mathieu.poirier@linaro.org> User-Agent: Mutt/1.12.1 (2019-06-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190703_121440_121797_3938216F X-CRM114-Status: GOOD ( 12.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jun 20, 2019 at 04:12:33PM -0600, Mathieu Poirier wrote: > From: Suzuki K Poulose > > During a perf session we try to allocate buffers on the "node" associated > with the CPU the event is bound to. If it's not bound to a CPU, we use > the current CPU node, using smp_processor_id(). However this is unsafe > in a pre-emptible context and could generate the splats as below : > > BUG: using smp_processor_id() in preemptible [00000000] code: perf/1743 > caller is alloc_etr_buf.isra.6+0x80/0xa0 > CPU: 1 PID: 1743 Comm: perf Not tainted 5.1.0-rc6-147786-g116841e #344 > Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno Development Platform, BIOS EDK II Feb 1 2019 > Call trace: > dump_backtrace+0x0/0x150 > show_stack+0x14/0x20 > dump_stack+0x9c/0xc4 > debug_smp_processor_id+0x10c/0x110 > alloc_etr_buf.isra.6+0x80/0xa0 > tmc_alloc_etr_buffer+0x12c/0x1f0 > etm_setup_aux+0x1c4/0x230 > rb_alloc_aux+0x1b8/0x2b8 > perf_mmap+0x35c/0x478 > mmap_region+0x34c/0x4f0 > do_mmap+0x2d8/0x418 > vm_mmap_pgoff+0xd0/0xf8 > ksys_mmap_pgoff+0x88/0xf8 > __arm64_sys_mmap+0x28/0x38 > el0_svc_handler+0xd8/0x138 > el0_svc+0x8/0xc > > Use NUMA_NO_NODE hint instead of using the current node for events > not bound to CPUs. > > Fixes: 855ab61c16bf70b646 ("coresight: tmc-etr: Refactor function tmc_etr_setup_perf_buf()") This should be: Fixes: 855ab61c16bf ("coresight: tmc-etr: Refactor function tmc_etr_setup_perf_buf()") Add: [core] abbrev = 12 to your .gitconfig file, we only need 12 in the kernel tree. For now :) thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel