Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between T and t in /proc/kallsyms

This is a part of text file from System.map and /proc/kallsyms.

ffffffff8106c260 T leave_mm
ffffffff8106c340 t do_flush_tlb_all
ffffffff8106c390 t flush_tlb_func
ffffffff8106c510 T native_flush_tlb_others
ffffffff8106c540 T flush_tlb_current_task
ffffffff8106c600 T flush_tlb_mm_range
ffffffff8106c770 T flush_tlb_page
ffffffff8106c820 T flush_tlb_all
ffffffff8106c840 T flush_tlb_kernel_range

What is the difference between T and t?
I know that T or t is for text (code) section.

I guessed T could be invoked from kernel module and t couldn't be invoked from kernel module.

Let me know exact meaning and difference between them.

like image 276
elsdy Avatar asked Feb 07 '23 07:02

elsdy


1 Answers

The file /proc/kallsyms holds all the symbols that the kernel knows about and which are therefore accessible to your modules since they share the kernel's codespace.

From man nm:

The symbol value, in the radix selected by options (see below), or hexadecimal by default. The symbol type. At least the following types are used; others are, as well, depending on the object file format. If lowercase, the symbol is usually local; if uppercase, the symbol is global (external). There are however a few lowercase symbols that are shown for special global symbols (u, v and w).

T t The symbol is in the text (code) section.

T means that symbol is globally visible, and can be used in other kernel's code.

like image 194
molivier Avatar answered Feb 08 '23 20:02

molivier