1. 程式人生 > >系統呼叫socket 的kernel實現

系統呼叫socket 的kernel實現

linux版本:4.9.51

socket系統呼叫的入口: 

 SYSCALL_DEFINE3(socket, int, family, int, type, int, protocol) -- sock_create -- __sock_create -- inet_create

[   14.962022] [<c0210710>] (unwind_backtrace) from [<c020bb54>] (show_stack+0x10/0x14)
[   14.969878] [<c020bb54>] (show_stack) from [<c04fc69c>] (dump_stack+0x84/0x98)
[   14.977210] [<c04fc69c>] (dump_stack) from [<c08824f4>] (inet_create+0x30/0x2e0)
[   14.984719] [<c08824f4>] (inet_create) from [<c07e4620>] (__sock_create+0xe4/0x180)
[   14.992486] [<c07e4620>] (__sock_create) from [<c07e575c>] (SyS_socket+0x64/0x108)
[   15.000164] [<c07e575c>] (SyS_socket) from [<c0208580>] (ret_fast_syscall+0x0/0x34)