linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Wrong module .text address in 4.16.0
@ 2018-04-16  5:51 Thomas-Mich Richter
  2018-04-16  6:23 ` Christian Borntraeger
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas-Mich Richter @ 2018-04-16  5:51 UTC (permalink / raw)
  To: Christian Borntraeger, Linux Kernel Mailing List
  Cc: Martin Schwidefsky, Hendrik Brueckner, Heiko Carstens

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
-- 
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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-04-16 15:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-16  5:51 Wrong module .text address in 4.16.0 Thomas-Mich Richter
2018-04-16  6:23 ` Christian Borntraeger
2018-04-16 10:53   ` Christian Borntraeger
2018-04-16 13:43     ` Jessica Yu
2018-04-16 15:13       ` Linus Torvalds
2018-04-16 11:41   ` Thomas-Mich Richter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).