Return-Path: Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:36340 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752760AbeDRHWj (ORCPT ); Wed, 18 Apr 2018 03:22:39 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3I7LwAg062674 for ; Wed, 18 Apr 2018 03:22:39 -0400 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hdx30gk5f-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Wed, 18 Apr 2018 03:22:39 -0400 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 18 Apr 2018 08:22:36 +0100 Subject: Re: [PATCH v3] module: Fix display of wrong module .text address To: "Tobin C. Harding" Cc: jeyu@kernel.org, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, borntraeger@de.ibm.com, schwidefsky@de.ibm.com, brueckner@linux.vnet.ibm.com, heiko.carstens@de.ibm.com, peterz@infradead.org, acme@kernel.org, keescook@chromium.org, stable@vger.kernel.org References: <20180418071436.21392-1-tmricht@linux.ibm.com> <20180418071724.GA6892@eros> From: Thomas-Mich Richter Date: Wed, 18 Apr 2018 09:22:31 +0200 MIME-Version: 1.0 In-Reply-To: <20180418071724.GA6892@eros> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Message-Id: <72461e74-2229-bf33-cbce-9a016bef4df9@linux.ibm.com> Sender: stable-owner@vger.kernel.org List-ID: On 04/18/2018 09:17 AM, Tobin C. Harding wrote: > On Wed, Apr 18, 2018 at 09:14:36AM +0200, Thomas Richter wrote: >> Reading file /proc/modules shows the correct address: >> [root@s35lp76 ~]# cat /proc/modules | egrep '^qeth_l2' >> qeth_l2 94208 1 - Live 0x000003ff80401000 >> >> and reading file /sys/module/qeth_l2/sections/.text >> [root@s35lp76 ~]# cat /sys/module/qeth_l2/sections/.text >> 0x0000000018ea8363 >> displays a random address. >> >> This breaks the perf tool which uses this address on s390 >> to calculate start of .text section in memory. >> >> Fix this by printing the correct (unhashed) address. >> >> Thanks to Jessica Yu for helping on this. >> >> Fixes: ef0010a30935 ("vsprintf: don't use 'restricted_pointer()' when not restricting") >> Cc: # v4.15+ >> Suggested-by: Linus Torvalds >> Signed-off-by: Thomas Richter >> Cc: Jessica Yu >> --- > > What's changed in each version please? > > > thanks, > Tobin. > V2: Changed sprintf format string from %#lx to 0x%px (suggested by Kees Cook). V3: Changed sprintf agrument from 0 to NULL to avoid sparse warning. -- Thomas Richter, Dept 3303, IBM LTC Boeblingen Germany -- Vorsitzende des Aufsichtsrats: Martina Koederitz Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294