Received: by 10.192.165.156 with SMTP id m28csp708038imm; Mon, 16 Apr 2018 07:29:33 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+vO9a7lxDOpZw6hf7TKcdcaSl/O+Nclkh40p2PNb6GOfxxSoQaU09aJHyaSYyL3bLNPB9t X-Received: by 2002:a17:902:988d:: with SMTP id s13-v6mr15282051plp.30.1523888973440; Mon, 16 Apr 2018 07:29:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523888973; cv=none; d=google.com; s=arc-20160816; b=Y/Sz5/2RTTnFqPp7CgxtNLks5YZn1t0Z8R17zbVy48DM+vWu3Rgiyr1IdOTRXv/c1G CJZTKt7zgawcSb9nScE2ovSHWWdq4DV75yPWOjSM72xgYf9WzNm2czH10f2dN3PPDpPU 78hDmxevIay9q5hAosSpD6T+adCeC+CskvwHMQVCaioFy+BPjkUMtDwmsH8jnZ/A0PZK Wf21z+XombWlHJdYaNe8rUXDo+0aDK7FYcSBVN8tCEgyjsB77031EKR9/HL8ywrC6q/J UnmDBDu/wnhXe637tJ+Cn5TOMrGwrtdckD6EBC8UA1xhio+iJwJb8/9wvF+U3JmsKpkX bFPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:openpgp :references:cc:to:from:subject:arc-authentication-results; bh=NusxLY6Sd2wagu0JXvQWxs/oK+5tNB4BW4h9X4i6e1s=; b=obWfmy6VwRf/UHr8T2i3fJsJZBua81uiDjFGPTFHcyUqvuL0KEMNStChDSKgJhD7Ft jWgxirkT+p8ovS5QGAd7bu6m/n132rT4VlWIztreWoq5u0OKsqUiRahTeF4VYpVadVlW ydB3RbfhCsPu10EpyJuYVcHRU/pzf3h6Zl7+vyxSS9Srb1HZ4OOpQwD7kl0tZWbpu7gN g3zDppFZGzFOG3LP8WxEIIhbkI+kK7Q/HBMeHiEaVNq3Tuza7tPgYf7DuC6Ec3ChBeIQ T9sse6ERqB4drcYrfoxwpIM9VEl2+/26++bLZrzZAQqXZQl+BwqpMC2lk55hvmZ7AhfY O69g== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t16si10959750pfj.10.2018.04.16.07.29.18; Mon, 16 Apr 2018 07:29:33 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754284AbeDPKxc (ORCPT + 99 others); Mon, 16 Apr 2018 06:53:32 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:46762 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754094AbeDPKxb (ORCPT ); Mon, 16 Apr 2018 06:53:31 -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 w3GAnMCp103332 for ; Mon, 16 Apr 2018 06:53:30 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hcq6w979n-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Mon, 16 Apr 2018 06:53:30 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 16 Apr 2018 11:53:28 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 16 Apr 2018 11:53:25 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3GArPeg11469248; Mon, 16 Apr 2018 10:53:25 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D312AA4057; Mon, 16 Apr 2018 11:45:35 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8F333A404D; Mon, 16 Apr 2018 11:45:35 +0100 (BST) Received: from oc7330422307.ibm.com (unknown [9.152.224.46]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 16 Apr 2018 11:45:35 +0100 (BST) Subject: Re: Wrong module .text address in 4.16.0 From: Christian Borntraeger To: Thomas-Mich Richter , Linux Kernel Mailing List Cc: Martin Schwidefsky , Hendrik Brueckner , Heiko Carstens , Peter Zijlstra , Arnaldo Carvalho de Melo , Jessica Yu , Linus Torvalds References: <7e17e3b1-25c3-cb61-ae94-dcbb1bf3473e@linux.ibm.com> <3836add7-8691-77c1-33d2-0fbee7051795@de.ibm.com> Openpgp: preference=signencrypt Date: Mon, 16 Apr 2018 12:53:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <3836add7-8691-77c1-33d2-0fbee7051795@de.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18041610-0044-0000-0000-00000548B926 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18041610-0045-0000-0000-00002888C00B Message-Id: <2dc648ad-0a6b-ba79-5d6a-fb3e3029994f@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-16_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804160103 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Can this be related to commit ef0010a30935de4e0211cbc7bdffc30446cdee9b vsprintf: don't use 'restricted_pointer()' when not restricting and related commits? To me it looks like %pk is always printing the hash, but never the real pointer - no matter what kernel.kptr_restrict says. On 04/16/2018 08:23 AM, Christian Borntraeger wrote: > FWIW, this breaks at least perf capability to resolve module symbols. > Adding some more CCs for perf and module. > > > On 04/16/2018 07:51 AM, Thomas-Mich Richter wrote: >> I just installed 4.16.0 and discovered the module .text address is >> wrong. It happens on s390 and x86 platforms. I have not tested others. >> >> Here is the issue, I have used module qeth_l2 on s390 which is the >> ethernet device driver: >> >> root@s35lp76 ~]# lsmod >> Module Size Used by >> qeth_l2 94208 1 >> ... >> >> [root@s35lp76 ~]# cat /proc/modules | egrep '^qeth_l2' >> qeth_l2 94208 1 - Live 0x000003ff80401000 <---- This is the correct address in memory >> [root@s35lp76 ~]# cat /sys/module/qeth_l2/sections/.text >> 0x0000000018ea8363 <---- This is the wrong address >> [root@s35lp76 ~]# >> >> File /sys/module/qeth_l2/sections/.text displays a very strange >> address which is definitely wrong. It should be something like >> 0x000003ff80401xxx. >> >> Same on x86. >> >> I have checked file kernel/module.c function add_sect_attrs() >> and it calls module_sect_show() when the sysfs file is read. >> And module_sect_show() uses >> >> sprintf(buf, "0x%pK\n", (void *)sattr->address); >> >> and my sysctl setting should be correct: >> [root@s35lp76 linux]# sysctl -a | fgrep kernel.kptr_restrict >> kernel.kptr_restrict = 0 >> [root@s35lp76 linux]# >> >> I wonder if somebody else has seen this issue? >> Ideas how to fix this? >> >> Thanks >>