Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2831712imm; Thu, 18 Oct 2018 23:56:24 -0700 (PDT) X-Google-Smtp-Source: ACcGV60c8f5c4pbfs6Uoz6sKyDWppNmSOOw9X/VuM7B1f6artxldDZmzAOqYVdCxIh0MP0z1qQdQ X-Received: by 2002:a65:57c4:: with SMTP id q4-v6mr9967649pgr.229.1539932184102; Thu, 18 Oct 2018 23:56:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539932184; cv=none; d=google.com; s=arc-20160816; b=Y6K0mbfxSkOaI2O8jeoww6qubg55/JQ1f+JdHlvMfusNSpAmIRWTyZj5k00QD/l9+v 4PDQz+Mlv8HZz7YXEQFqf7n3LhF+LkLabORhi34eQzuQyyfRwC26qHtf2zT8MEXZjAkL cfXaVFHwhhjShysmNurcL9jBPO4zk9z51Ey/ioTG1IZEq8ln6Sgj6rrIgpPfmj98dtX/ QLotBk//bQGxCtK2tNwWRONlpmgawN8/tLb30dy20zuAReW1vXWTOncdzqDJSHnpqHON LsbbfA84u75e5MV78/AiF+p5o1DiBEUCGj2SVxUkMkI+vO+/EkkKUzMVkMT2BvbnkR5d Tg3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature; bh=DAqbx69w7ptHhxdWldZAA6DzEVOwD/bAFVhv6wEApF8=; b=pXVZbFZ0IKtKPw1vC0CIxRhR1/hAjcFLsdwjAI3NXRIKWrYtVEabr9gd51LmXFOzpD bR7aZCNHq9erph0IeKzS4hdfdz69vXAIdL+GfSgbZnwKxndmA9zvyULtbAlE+nKN3NI1 tfG4+tVd4GKuKkImsHSL4nBqxO3cQhb2sp1RpxEkM7qRvfoD1ltp5YliWs/AGomr3EfZ lRT/4YnXHCwJq2iovEhayrqLi77GWOSuqwHLyajEpLHITLBUXwDSbj1IBuza03eqPFIz eh2dIXX2nKkZS88kvwQciRwIrVfyLVFIcPL1GcLoFF/XjKNAYXkIKbXie0fUcgPdg8Zn s06Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=ONo8PHwm; dkim=pass header.i=@codeaurora.org header.s=default header.b=DmGpfp9q; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h18-v6si21327813pgv.47.2018.10.18.23.56.09; Thu, 18 Oct 2018 23:56:24 -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=@codeaurora.org header.s=default header.b=ONo8PHwm; dkim=pass header.i=@codeaurora.org header.s=default header.b=DmGpfp9q; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727014AbeJSO7C (ORCPT + 99 others); Fri, 19 Oct 2018 10:59:02 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:42046 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726968AbeJSO7B (ORCPT ); Fri, 19 Oct 2018 10:59:01 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id EB1F060B73; Fri, 19 Oct 2018 06:54:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539932057; bh=Sro5rLP1zks4xnLrYUKVViZYycmd0Ebsy4ilLXACb4M=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=ONo8PHwmO4w8Hw9PVeXY6vvmxNesr0Wi1JaZk5hASZe2Z7GDA1ZcOgt0v9Y14nhn9 r4CrOt4u8i9MBJpPUO1LpdeZjcYk9X08uwbon4/cAHKUWkgL58xUWmg9m+MqGtwX/l THWl301yicJmOXvh8saOCNp+upsXa4AcsEPG+KKw= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.43.47] (unknown [223.227.22.91]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: saiprakash.ranjan@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 608A360364; Fri, 19 Oct 2018 06:54:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539932056; bh=Sro5rLP1zks4xnLrYUKVViZYycmd0Ebsy4ilLXACb4M=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=DmGpfp9qDLVUMg8xB7yD/9fZuMmlzkQwDoAfq8suHZrLuLPK5YIdVgOtq1wVVx5Bj ln6sGih37H52X4kRWb2SKww7VhvA8StoenqCt6W4Yao0jO/6CNuhfIJW+zRWYjNh/a b++Wpmz1Bp2WGx02dPnUWX0LgxR8nYax8pr4kdvA= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 608A360364 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=saiprakash.ranjan@codeaurora.org Subject: Re: Crash in msm serial on dragonboard with ftrace bootargs To: Joel Fernandes , Steven Rostedt Cc: Stephen Boyd , Bjorn Andersson , Andy Gross , David Brown , Jiri Slaby , Kees Cook , Geliang Tang , Greg Kroah-Hartman , Pramod Gurav , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Rajendra Nayak , Vivek Gautam , Sibi Sankar References: <472db11e-49a6-a1ee-e298-791ee1bbb10b@codeaurora.org> <20181016141610.639b9000@gandalf.local.home> <20181016144123.24c47b38@gandalf.local.home> <7781815e-cba2-9e36-db6d-268298747876@codeaurora.org> <20181016150328.3450d718@gandalf.local.home> <20181017223334.29ca2837@vmware.local.home> <58d2474c-53cd-e6cb-2d25-db38d1a88da6@codeaurora.org> <20181018091706.62310b38@gandalf.local.home> <20181019041740.GB141835@joelaf.mtv.corp.google.com> From: Sai Prakash Ranjan Message-ID: <8a75f2d5-f1bd-504e-b545-ae2e2f61ca8f@codeaurora.org> Date: Fri, 19 Oct 2018 12:24:05 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181019041740.GB141835@joelaf.mtv.corp.google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/19/2018 9:47 AM, Joel Fernandes wrote: > On Thu, Oct 18, 2018 at 09:17:06AM -0400, Steven Rostedt wrote: >> On Thu, 18 Oct 2018 10:51:18 +0530 >> Sai Prakash Ranjan wrote: >> >>>> So something else is causing an issue besides just msm_read. >>>> >>>> Can you do an objdump -dr of the entire vmlinux binary and gzip it and >>>> post it somewhere. Not sure if it would be too big to email. You could >>>> try sending it to me privately. I'd like to see the binary that you are >>>> using. >>>> >>> >>> I have sent the objdump and dot config to you privately. >> >> Thanks. I don't see anything that pops out, but then again, my arm asm >> foo is very rusty (it has been literally decades since I did any arm >> asm). I wonder if it could simply be a timing issue? >> >> ffff0000086eb538 : >> ffff0000086eb538: a9be7bfd stp x29, x30, [sp,#-32]! >> ffff0000086eb53c: 910003fd mov x29, sp >> ffff0000086eb540: a90153f3 stp x19, x20, [sp,#16] >> ffff0000086eb544: aa0003f4 mov x20, x0 >> ffff0000086eb548: 2a0103f3 mov w19, w1 >> ffff0000086eb54c: aa1e03e0 mov x0, x30 >> ffff0000086eb550: 97e6bae4 bl ffff00000809a0e0 <_mcount> >> >> The above is changed to nop on boot, but then to: >> >> bl ftrace_caller >> >> When ftrace is enabled. >> >> ffff0000086eb554: 8b334280 add x0, x20, w19, uxtw >> ffff0000086eb558: b9400000 ldr w0, [x0] >> ffff0000086eb55c: a94153f3 ldp x19, x20, [sp,#16] >> ffff0000086eb560: a8c27bfd ldp x29, x30, [sp],#32 >> ffff0000086eb564: d65f03c0 ret >> >> >> >> ffff00000809a0e4 : >> ffff00000809a0e4: a9bf7bfd stp x29, x30, [sp,#-16]! >> ffff00000809a0e8: 910003fd mov x29, sp >> ffff00000809a0ec: d10013c0 sub x0, x30, #0x4 >> ffff00000809a0f0: f94003a1 ldr x1, [x29] >> ffff00000809a0f4: f9400421 ldr x1, [x1,#8] >> ffff00000809a0f8: d1001021 sub x1, x1, #0x4 >> >> ffff00000809a0fc : >> ffff00000809a0fc: d503201f nop >> >> The above nop gets patched to: >> >> bl ftrace_ops_no_ops >> >> Which will iterate through all the registered functions. >> >> >> ffff00000809a100 : >> ffff00000809a100: d503201f nop >> >> The above only gets set when function graph tracer is enabled, which it >> is not in this case. >> >> ffff00000809a104: a8c17bfd ldp x29, x30, [sp],#16 >> ffff00000809a108: d65f03c0 ret >> >> >> Anyone see any problems here? > > This seems sane to me, he says in the other thread that he put 'notrace' to > the msm serial functions (which AIUI should prevent ftrace instrumentation) > and he still sees the issue. > Yes I did add notrace to all functions in msm serial and checked the objdump to make sure that those were not instrumented, and yet the target crashed. This doesnt seem like an issue with ftrace but rather with msm early con. Thanks, Sai -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation