From mboxrd@z Thu Jan 1 00:00:00 1970 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=-0.9 required=3.0 tests=DKIM_ADSP_ALL,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,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 A72A5C433E0 for ; Tue, 7 Jul 2020 18:40:19 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (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 DD7E4206DF for ; Tue, 7 Jul 2020 18:40:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (4096-bit key) header.d=valentin-vidic.from.hr header.i=@valentin-vidic.from.hr header.b="fIUBoW+5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DD7E4206DF Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=valentin-vidic.from.hr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94) (envelope-from ) id 1jssVD-0007IC-I0; Tue, 07 Jul 2020 14:39:35 -0400 Received: from valentin-vidic.from.hr ([2001:470:1f0b:3b7::1]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1jssVB-0007I2-IN for kernelnewbies@kernelnewbies.org; Tue, 07 Jul 2020 14:39:33 -0400 X-Virus-Scanned: Debian amavisd-new at valentin-vidic.from.hr Received: by valentin-vidic.from.hr (Postfix, from userid 1000) id E4BD62D16; Tue, 7 Jul 2020 20:39:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=valentin-vidic.from.hr; s=2020; t=1594147167; bh=xlVBFs/czh4MxQUx2laGYEWr52suspyB4em/SroDryE=; h=Date:From:To:Subject:References:In-Reply-To:From; b=fIUBoW+5yUyyriJdDW27S7UPX5S3DDoT0QSpAoeDjG5A93qKVXa/2yQ0ljdCJ3UQd J7oE6+Aw+uAkV6b+K2RTtoAi0oKSjV9DODfAuthGDne84WZhio6Ia0v9+At8DHi6Q7 3urVkp47YFWx59Ahim9AoaEhalZYygy+XeX4Zg9DjeEOCAnN4gUPbJ0tqzrWtUA0MV OGulUrhvIb5TAn5Rv9ONFLghLuajeB8ERGt6uATjz7Xgc6wHyA/sXmgAcCvXWXXcOo n8VaqmJh1evBagPQR3yH/cEy/LRETzTqo3XBqpTmNjUDgyFWwjQRE39sYWSw29wTz6 hAOXEVWsNH995I0neF83moSUdb+KjeJ5ZBGQYR18ROMaM3fvcqyMwY2AEXHxzDpIln kPMwvaMkoruiJiMvsggwls67M5CwQzz28b66RRHbiL3CX7Je1DbFLcr85HClfdrP3P iVTpbXaJNOrBODtM58NlxFO1YBJPj+H8O5A9HdYxvwV+hcOECw64HoD2SjU+fcb1gt rjvukIH1umLt7sz2/MH31eBwJ3ZrCT7TKeqOhj1ycrLf4tuPfkilaljO2yf4U651MU XjGTF+kZ2SP2FiVw1b8flV7OTbsDbYeIUlJpHOFLnw08Z2s0eiSJwwIhsWg1xQJniR a8H8MtC4TqhYOQW1SDqeg+6I= Date: Tue, 7 Jul 2020 20:39:27 +0200 From: Valentin =?utf-8?B?VmlkacSH?= To: kernelnewbies@kernelnewbies.org Subject: Re: printk() format %pS wrong symbol Message-ID: <20200707183927.GP6573@valentin-vidic.from.hr> References: <20200704102910.GA6573@valentin-vidic.from.hr> <20200704171433.GD6573@valentin-vidic.from.hr> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Mon, Jul 06, 2020 at 06:06:42PM -0400, William Tambe wrote: > the issue I am having is due to sprint_backtrace() calling > __sprint_symbol() with its argument symbol_offset == -1. > Despite the comment above its definition, it is hard to understand why > sprint_backtrace() calls __sprint_symbol() that way; in our port it > results in printing incorrect symbols. > As a workaround, we have made sprint_backtrace() to be the same as > sprint_symbol(). >From what I understand print_backtrace() tries to handle the case when call is the last instruction in a function: func1: ... ... ... call noret_func3() func2: ... ... ... Return value on the stack points to the next instruction after the call. But in this case a new function already starts on that address so they add -1 to make the address point back to func1. Not sure what goes wrong in your case, could you share an example and more info on the port? -- Valentin _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies