lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 31 Aug 2016 09:00:16 +0000
From:   "Zhu, Michael J" <michael.j.zhu@...el.com>
To:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Address field in struct module_sect_attr

I am debugging my kernel module during system boot.  In order to load symbols for my kernel module I tried to get the section name and address in GDB when my module was loaded. I set breakpoint at do_init_module. But when I dump the module_sect_attr I got the following.
 
(gdb) p mod
$31 = (struct module *) 0xffffffffa01ad100
 
(gdb) p mod->sect_attrs
$32 = (struct module_sect_attrs *) 0xffff8801305b2000
 
(gdb) p (struct module_sect_attrs *)mod->sect_attrs
$33 = (struct module_sect_attrs *) 0xffff8801305b2000
 
(gdb) p *(struct module_sect_attrs *)mod->sect_attrs
$34 = {grp = {name = 0xffffffff8186ff16 "sections", is_visible = 0x0 <irq_stack_union>, attrs = 0xffff8801305b2580, bin_attrs = 0x0 <irq_stack_union>}, nsections = 19,
  attrs = 0xffff8801305b2028}
 
(gdb) p (*(struct module_sect_attr *)0xffff8801305b2028)
$40 = {mattr = {attr = {name = 0xffff88003490d080 ".note.gnu.build-id", mode = 292}, show = 0xffffffff810e8a70 <module_sect_show>, store = 0x0 <irq_stack_union>,
    setup = 0x0 <irq_stack_union>, test = 0x0 <irq_stack_union>, free = 0x0 <irq_stack_union>}, name = 0xffff88003490d080 ".note.gnu.build-id", address = 18446744072100687872}
 
(gdb) p (*(struct module_sect_attr *)(0xffff8801305b2028+0x48))
$42 = {mattr = {attr = {name = 0xffff880034bd8a28 ".text", mode = 292}, show = 0xffffffff810e8a70 <module_sect_show>, store = 0x0 <irq_stack_union>, setup = 0x0 <irq_stack_union>,
  test = 0x0 <irq_stack_union>, free = 0x0 <irq_stack_union>}, name = 0xffff880034bd8a28 ".text", address = 18446744072100675584}
 
At here why the section address is "18446744072100675584". Apparently this is not a valid address. How come this happens? And how I can get the correct section address so that I can load the symbol of my kernel module? Thanks.
 
My test system is CentOS 7. The kernel version is 3.10.0-327.el7.x86_64. 
 
Michael
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ