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 EA46AC433DF for ; Sat, 4 Jul 2020 10:29:44 +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 4CE7620870 for ; Sat, 4 Jul 2020 10:29:44 +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="dVAMuILP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4CE7620870 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 1jrfQ7-00042c-4C; Sat, 04 Jul 2020 06:29:19 -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 1jrfQ2-00042I-RZ for kernelnewbies@kernelnewbies.org; Sat, 04 Jul 2020 06:29:15 -0400 X-Virus-Scanned: Debian amavisd-new at valentin-vidic.from.hr Received: by valentin-vidic.from.hr (Postfix, from userid 1000) id 054BF2F2B; Sat, 4 Jul 2020 12:29:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=valentin-vidic.from.hr; s=2020; t=1593858551; bh=RiKvcMVYKHsrQKduP72YZFT0Q2MBH9gJM+FPtSF5EAc=; h=Date:From:To:Subject:References:In-Reply-To:From; b=dVAMuILP+9UoUEtx1WrChN8bKn7XvVYCTir8tFJ5cxqy+e5qeoB4YKA+fqbuQi96q g2mXUub//kgSAvzmO3jJsX0Y17FTqj3jF0eOqsUSwjtP7/zQ4hzyVRD4rqxpsgS1br HL6nYVSFZnU2iHfC7XUrkb8hcpaT2PMV0t/+CX73UhRHHFzCLBQofGeTjm8Z4oIfMu MDnAACKJGL3bG23IPfFDt9R8pz8wEFVGvERiBxQCLZ2lwizgs5U1SU6L5kEctLDgh8 lawRvjqbQyLjq2dTTWSSZ+dqOHEuJuTyjyYnreLqpmElBiEEqbWszsP9dWTFBTKdUh uSYOtF1ROlzXAG4qIMbMaW24R03eofz8CXbypJMyFGoOQAWLbm3Ewlkwae55Ai7MhM MZoPCTldSwzn3rR/qRIWVgtdQGECslgAYEkpy+BejPdmKZiAAqkAIPpQDmU1STbDeW KJZWBf/L5KvdbGNjJhw+QvMV6WggWrvPNU605B+QwSalbbIWjr/lcxurWImLLA3MnP 01F1iPkkNkWrqPMbbwWYndtXB/kjuGg0cJuzqO5JhJ2MgE4X6uLW8on66O8DrpErUK +ysS3rzlCsKb46cqE1VCtBlSEjpVC7FIzwRXCVUiE9NctLFCxVuahulBrZ5GCLGeUC GN2qsIKF5XDxl51DkDDTPQOo= Date: Sat, 4 Jul 2020 12:29:10 +0200 From: Valentin =?utf-8?B?VmlkacSH?= To: kernelnewbies@kernelnewbies.org Subject: Re: printk() format %pS wrong symbol Message-ID: <20200704102910.GA6573@valentin-vidic.from.hr> References: 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 Sat, Jul 04, 2020 at 06:11:19AM -0400, William Tambe wrote: > I am seeing an issue in our Linux port where printk() format %pS will print > a symbol as: > kernel_init+0x120/0x120 > where the offset within the function 0x120, is the same as the function > size 0x120; in fact, the largest offset within the function should be 0x11f. > > When printing above symbol+offset in gdb, the correct symbol is > displayed as follow: > > (gdb) p (void*)(kernel_init+0x120) > $1 = (void *) 0x589a28 > > What could be the cause of printk() format %pS printing an incorrect symbol. > > Where can I find in the Linux source code, the function handling the format > %pS ? Check lib/vsprintf.c -- Valentin _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies