From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753224AbcE2VDs (ORCPT ); Sun, 29 May 2016 17:03:48 -0400 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 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> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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