From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eddie.linux-mips.org ([148.251.95.138]:32904 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753006AbcE2VDr (ORCPT ); Sun, 29 May 2016 17:03:47 -0400 Received: from localhost.localdomain ([127.0.0.1]:56664 "EHLO linux-mips.org" rhost-flags-OK-OK-OK-FAIL) by eddie.linux-mips.org with ESMTP id S27039234AbcE2VDoFi8xS (ORCPT + 1 other); Sun, 29 May 2016 23:03:44 +0200 Date: Sun, 29 May 2016 23:03:41 +0200 From: Ralf Baechle To: Harvey Hunt Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, "# 4 . 2 . x-" Subject: Re: [PATCH] MIPS: lib: Mark intrinsics notrace Message-ID: <20160529210340.GA25587@linux-mips.org> References: <20160525100635.22541-1-harvey.hunt@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160525100635.22541-1-harvey.hunt@imgtec.com> Sender: stable-owner@vger.kernel.org List-ID: On Wed, May 25, 2016 at 11:06:35AM +0100, Harvey Hunt wrote: > On certain MIPS32 devices, the ftrace tracer "function_graph" uses > __lshrdi3() during the capturing of trace data. ftrace then attempts to > trace __lshrdi3() which leads to infinite recursion and a stack overflow. > Fix this by marking __lshrdi3() as notrace. Mark the other compiler > intrinsics as notrace in case the compiler decides to use them in the > ftrace path. Makes perfect sense - but I'm wondering how you triggered it. Was this a build with the GCC option -Os that is CONFIG_CC_OPTIMIZE_FOR_SIZE? Usually people build with CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE that is -O2 which results in intrinsics being inlined. Ralf