LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   How System.map addresses are translated (https://www.linuxquestions.org/questions/linux-kernel-70/how-system-map-addresses-are-translated-4175560481/)

dlevy022 12-02-2015 08:03 PM

How System.map addresses are translated
 
I am new to Kernel development and trying to make sense of things. I am running an Ubuntu 14.04 LTS machine that has the following entry in its System.map file

ffffffff81801400 R sys_call_table

Is the address a virtual memory offset or the actual virtual address where the system call table will reside. I've heard conflicting information from TWO experts - one suggests that it is the exact virtual address of the system call table and the other says I would need to add the kernel base virtual address to that virtual address to locate the system call table. Which one of these people are correct as I am now confused?

smallpond 12-04-2015 10:57 AM

Let's find out:

Code:

cat /proc/2269/stack
[<ffffffff813ab31e>] n_tty_read+0x51e/0xa20
[<ffffffff813a56f7>] tty_read+0xa7/0xf0
[<ffffffff8119e321>] vfs_read+0xb1/0x130
[<ffffffff8119e7af>] SyS_read+0x5f/0xa0
[<ffffffff8160e7f9>] system_call_fastpath+0x16/0x1b
[<ffffffffffffffff>] 0xffffffffffffffff


grep n_tty_read  /boot/System.map-`uname -r`
ffffffff813aae00 t n_tty_read

813aae00 + 51e = 813ab31e

So I guess they are the actual addresses.


All times are GMT -5. The time now is 02:01 PM.