============
- ᇂ148차 시작 위치
- start_kernel 1 ~/init/main.c
- proc_root_init 937 ~/init/main.c
- proc_sys_init 609 ~/fs/proc/root.c
- proc_sys_init 256 ~/fs/proc/internal.h
- sysctl_init 1639 return sysctl_init();
- register_sysctl_table 1690 ~/kernel/sysctl.c
- register_sysctl_paths 1495 return register_sysctl_paths(null_path, table);
- __register_sysctl_paths 1474 return __register_sysctl_paths(&sysctl_table_root.default_set,
- count_subheaders 1402 int nr_subheaders = count_subheaders(table);
- kern_table 1298 // nr_subheaders: 0, entry->child: sysctl_base_table[0].child: kern_table
- calll: start_kernel()
- proc_root_init()
- call: proc_root_init()
- proc_init_inodecache()
- register_filesystem()
- proc_self_init()
- proc_symlink()
- proc_net_init()
- proc_mkdir("sysvipc", NULL);
- proc_mkdir("fs", NULL);
- proc_mkdir("driver", NULL);
- proc_mkdir("fs/nfsd", NULL);
- proc_mkdir("openprom", NULL);
- proc_tty_init()
- proc_device_tree_init();
- proc_mkdir"bus", NULL);
- proc_sys_init()
- call: proc_sys_init()
- proc_sys_root()
- sysctl_init();
- call: sysctl_init()
- register_sysctl_table()
- call: register_sysctl_table()
- register_sysctl_paths()
- call: register_sysctl_paths()
- __register_sysctl_paths()
- call: __register_sysctl_paths()
- count_subheaders()
- call: count_subheaders()
- call: start_kernel()
- proc_root_init()
asmlinkage void __init start_kernel(void)
{
char * command_line;
extern const struct kernel_param __start___param[], __stop___param[];
// ATAG,DTB 정보로 사용
...
proc_caches_init();
// sighand_struct, signal_struct, files_struct, fs_struct, mm_struct, vm_area_struct, nsproxy
// 를 사용하기 위한 kmem_cache 할당자 및 percpu list 초기화 수행
...
vfs_caches_init(totalram_pages);
// virtual file system을 위한 names, dentry, inode, filp, mount cache 생성 후
// file system 을 위한 초기화 수행 및 mount 수행, block, char dev 사용을 위한 초기화 수행
signals_init();
// signal을 사용하기 위한 kmem_cache 를 생성
/* rootfs populating might need page-writeback */
page_writeback_init();
// page writeback을 위한 global_dirty_limit, ratelimit_pages 값을 초기화 수행
#ifdef CONFIG_PROC_FS // CONFIG_PROC_FS=y
proc_root_init();
- calll: start_kernel()
- proc_root_init()
- call: call_root_init()
// ARM10C 20160604
void __init proc_root_init(void)
{
int err;
proc_init_inodecache();
// proc_init_inodecache 에서 한일:
// struct proc_inode 크기 만큼의 메모리를 할당항는 kmem_cache 할당자를 생성함
// proc_inode_cachep: kmem_cache#n#28 (struct proc_inode)
// register_filesystem(&proc_fs_type): 0
err = register_filesystem(&proc_fs_type);
// err: 0
// register_filesystem에서 한일:
// (&bd_type)->next: &proc_fs_type
//
// file system 연결 결과
// file_systems: sysfs_fs_type -> rootfs_fs_type -> shmem_fs_type -> bd_type -> proc_fs_type
// err: 0
if (err)
return;
proc_self_init();
// proc_self_init 에서 한일:
// idr_layer_cache를 사용하여 struct idr_layer 의 메모리 kmem_cache#21-oX를 2 개를 할당 받음
//
// (&(&proc_inum_ida)->idr)->id_free 이 idr object new 1번을 가르킴
// |
// |-> ---------------------------------------------------------------------------------------------------------------------------
// | idr object new 1 | idr object new 0 | idr object 6 | idr object 5 | .... | idr object 0 |
// ---------------------------------------------------------------------------------------------------------------------------
// | ary[0]: idr object new 0 | ary[0]: idr object 6 | ary[0]: idr object 5 | ary[0]: idr object 4 | .... | ary[0]: NULL |
// ---------------------------------------------------------------------------------------------------------------------------
//
// (&(&proc_inum_ida)->idr)->id_free: kmem_cache#21-oX (idr object new 1)
// (&(&proc_inum_ida)->idr)->id_free_cnt: 8
//
// (&(&proc_inum_ida)->idr)->top: kmem_cache#21-oX (struct idr_layer) (idr object 8)
// (&(&proc_inum_ida)->idr)->layers: 1
// (&(&proc_inum_ida)->idr)->id_free: (idr object new 0)
// (&(&proc_inum_ida)->idr)->id_free_cnt: 7
//
// (kmem_cache#27-oX (struct ida_bitmap))->bitmap 의 1 bit를 1로 set 수행
// (kmem_cache#27-oX (struct ida_bitmap))->nr_busy: 2
//
// kmem_cache인 kmem_cache#21 에서 할당한 object인 kmem_cache#21-oX (idr object new 1) 의 memory 공간을 반환함
//
// self_inum: 0xF0000001
// proc_symlink("mounts", NULL, "self/mounts"): kmem_cache#29-oX (struct proc_dir_entry)
proc_symlink("mounts", NULL, "self/mounts");
// proc_symlink 에서 한일:
// struct proc_dir_entry 만큼 메모리를 할당 받음 kmem_cache#29-oX (struct proc_dir_entry)
//
// (kmem_cache#29-oX (struct proc_dir_entry))->name: "mounts"
// (kmem_cache#29-oX (struct proc_dir_entry))->namelen: 6
// (kmem_cache#29-oX (struct proc_dir_entry))->mode: 0120777
// (kmem_cache#29-oX (struct proc_dir_entry))->nlink: 1
// (&(kmem_cache#29-oX (struct proc_dir_entry))->count)->counter: 1
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock을 이용한 spin lock 초기화 수행
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->raw_lock: { { 0 } }
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->magic: 0xdead4ead
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner: 0xffffffff
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner_cpu: 0xffffffff
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->next: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->prev: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
//
// parent: &proc_root
//
// (kmem_cache#29-oX (struct proc_dir_entry))->data: kmem_cache#30-oX: "self/mounts"
//
// idr_layer_cache를 사용하여 struct idr_layer 의 메모리 kmem_cache#21-oX를 1 개를 할당 받음
//
// (&(&proc_inum_ida)->idr)->id_free 이 idr object new 2번을 가르킴
// |
// |-> ---------------------------------------------------------------------------------------------------------------------------
// | idr object new 2 | idr object new 0 | idr object 6 | idr object 5 | .... | idr object 0 |
// ---------------------------------------------------------------------------------------------------------------------------
// | ary[0]: idr object new 0 | ary[0]: idr object 6 | ary[0]: idr object 5 | ary[0]: idr object 4 | .... | ary[0]: NULL |
// ---------------------------------------------------------------------------------------------------------------------------
//
// (&(&proc_inum_ida)->idr)->id_free: kmem_cache#21-oX (idr object new 2)
// (&(&proc_inum_ida)->idr)->id_free_cnt: 8
//
// (&(&proc_inum_ida)->idr)->top: kmem_cache#21-oX (struct idr_layer) (idr object 8)
// (&(&proc_inum_ida)->idr)->layers: 1
// (&(&proc_inum_ida)->idr)->id_free: (idr object new 0)
// (&(&proc_inum_ida)->idr)->id_free_cnt: 7
//
// (kmem_cache#27-oX (struct ida_bitmap))->bitmap 의 2 bit를 1로 set 수행
// (kmem_cache#27-oX (struct ida_bitmap))->nr_busy: 3
//
// kmem_cache인 kmem_cache#21 에서 할당한 object인 kmem_cache#21-oX (idr object new 2) 의 memory 공간을 반환함
//
// (kmem_cache#29-oX (struct proc_dir_entry))->low_ino: 0xF0000002
// (kmem_cache#29-oX (struct proc_dir_entry))->proc_iops: &proc_link_inode_operations
// (kmem_cache#29-oX (struct proc_dir_entry))->next: NULL
// (kmem_cache#29-oX (struct proc_dir_entry))->parent: &proc_root
//
// (&proc_root)->subdir: kmem_cache#29-oX (struct proc_dir_entry)
// proc_net_init(): 0
proc_net_init();
// proc_net_init 에서 한일:
// struct proc_dir_entry 만큼 메모리를 할당 받음 kmem_cache#29-oX (struct proc_dir_entry)
//
// (kmem_cache#29-oX (struct proc_dir_entry))->name: "net"
// (kmem_cache#29-oX (struct proc_dir_entry))->namelen: 3
// (kmem_cache#29-oX (struct proc_dir_entry))->mode: 0120777
// (kmem_cache#29-oX (struct proc_dir_entry))->nlink: 1
// (&(kmem_cache#29-oX (struct proc_dir_entry))->count)->counter: 1
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock을 이용한 spin lock 초기화 수행
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->raw_lock: { { 0 } }
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->magic: 0xdead4ead
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner: 0xffffffff
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner_cpu: 0xffffffff
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->next: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->prev: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
//
// parent: &proc_root
//
// (kmem_cache#29-oX (struct proc_dir_entry))->data: kmem_cache#30-oX: "self/net"
//
// idr_layer_cache를 사용하여 struct idr_layer 의 메모리 kmem_cache#21-oX를 1 개를 할당 받음
//
// (&(&proc_inum_ida)->idr)->id_free 이 idr object new 3번을 가르킴
// |
// |-> ---------------------------------------------------------------------------------------------------------------------------
// | idr object new 3 | idr object new 0 | idr object 6 | idr object 5 | .... | idr object 0 |
// ---------------------------------------------------------------------------------------------------------------------------
// | ary[0]: idr object new 0 | ary[0]: idr object 6 | ary[0]: idr object 5 | ary[0]: idr object 4 | .... | ary[0]: NULL |
// ---------------------------------------------------------------------------------------------------------------------------
//
// (&(&proc_inum_ida)->idr)->id_free: kmem_cache#21-oX (idr object new 3)
// (&(&proc_inum_ida)->idr)->id_free_cnt: 8
//
// (&(&proc_inum_ida)->idr)->top: kmem_cache#21-oX (struct idr_layer) (idr object 8)
// (&(&proc_inum_ida)->idr)->layers: 1
// (&(&proc_inum_ida)->idr)->id_free: (idr object new 0)
// (&(&proc_inum_ida)->idr)->id_free_cnt: 7
//
// (kmem_cache#27-oX (struct ida_bitmap))->bitmap 의 3 bit를 1로 set 수행
// (kmem_cache#27-oX (struct ida_bitmap))->nr_busy: 4
//
// kmem_cache인 kmem_cache#21 에서 할당한 object인 kmem_cache#21-oX (idr object new 3) 의 memory 공간을 반환함
//
// (kmem_cache#29-oX (struct proc_dir_entry))->low_ino: 0xF0000003
// (kmem_cache#29-oX (struct proc_dir_entry))->proc_iops: &proc_link_inode_operations
// (kmem_cache#29-oX (struct proc_dir_entry))->next: NULL
// (kmem_cache#29-oX (struct proc_dir_entry))->parent: &proc_root
//
// (&proc_root)->subdir: kmem_cache#29-oX (struct proc_dir_entry)
//
// list head 인 &pernet_list 에 &(&proc_net_ns_ops)->list 을 tail로 추가함
#ifdef CONFIG_SYSVIPC // CONFIG_SYSVIPC=y
// proc_mkdir("sysvipc", NULL): kmem_cache#29-oX (struct proc_dir_entry)
proc_mkdir("sysvipc", NULL);
// proc_mkdir 에서 한일:
// struct proc_dir_entry 만큼 메모리를 할당 받음 kmem_cache#29-oX (struct proc_dir_entry)
//
// (kmem_cache#29-oX (struct proc_dir_entry))->name: "sysvipc"
// (kmem_cache#29-oX (struct proc_dir_entry))->namelen: 7
// (kmem_cache#29-oX (struct proc_dir_entry))->mode: 0040555
// (kmem_cache#29-oX (struct proc_dir_entry))->nlink: 2
// (&(kmem_cache#29-oX (struct proc_dir_entry))->count)->counter: 1
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock을 이용한 spin lock 초기화 수행
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->raw_lock: { { 0 } }
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->magic: 0xdead4ead
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner: 0xffffffff
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner_cpu: 0xffffffff
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->next: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->prev: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
//
// parent: &proc_root
#endif
// proc_mkdir("fs", NULL): kmem_cache#29-oX (struct proc_dir_entry)
proc_mkdir("fs", NULL);
// proc_mkdir 에서 한일:
// struct proc_dir_entry 만큼 메모리를 할당 받음 kmem_cache#29-oX (struct proc_dir_entry)
//
// (kmem_cache#29-oX (struct proc_dir_entry))->name: "fs"
// (kmem_cache#29-oX (struct proc_dir_entry))->namelen: 2
// (kmem_cache#29-oX (struct proc_dir_entry))->mode: 0040555
// (kmem_cache#29-oX (struct proc_dir_entry))->nlink: 2
// (&(kmem_cache#29-oX (struct proc_dir_entry))->count)->counter: 1
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock을 이용한 spin lock 초기화 수행
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->raw_lock: { { 0 } }
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->magic: 0xdead4ead
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner: 0xffffffff
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner_cpu: 0xffffffff
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->next: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->prev: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
//
// parent: &proc_root
// proc_mkdir("driver", NULL): kmem_cache#29-oX (struct proc_dir_entry)
proc_mkdir("driver", NULL);
// proc_mkdir 에서 한일:
// struct proc_dir_entry 만큼 메모리를 할당 받음 kmem_cache#29-oX (struct proc_dir_entry)
//
// (kmem_cache#29-oX (struct proc_dir_entry))->name: "driver"
// (kmem_cache#29-oX (struct proc_dir_entry))->namelen: 6
// (kmem_cache#29-oX (struct proc_dir_entry))->mode: 0040555
// (kmem_cache#29-oX (struct proc_dir_entry))->nlink: 2
// (&(kmem_cache#29-oX (struct proc_dir_entry))->count)->counter: 1
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock을 이용한 spin lock 초기화 수행
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->raw_lock: { { 0 } }
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->magic: 0xdead4ead
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner: 0xffffffff
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner_cpu: 0xffffffff
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->next: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->prev: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
//
// parent: &proc_root
// proc_mkdir("fs/nfsd", NULL): kmem_cache#29-oX (struct proc_dir_entry)
proc_mkdir("fs/nfsd", NULL); /* somewhere for the nfsd filesystem to be mounted */
// proc_mkdir 에서 한일:
// struct proc_dir_entry 만큼 메모리를 할당 받음 kmem_cache#29-oX (struct proc_dir_entry)
//
// (kmem_cache#29-oX (struct proc_dir_entry))->name: "fs/nfsd"
// (kmem_cache#29-oX (struct proc_dir_entry))->namelen: 7
// (kmem_cache#29-oX (struct proc_dir_entry))->mode: 0040555
// (kmem_cache#29-oX (struct proc_dir_entry))->nlink: 2
// (&(kmem_cache#29-oX (struct proc_dir_entry))->count)->counter: 1
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock을 이용한 spin lock 초기화 수행
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->raw_lock: { { 0 } }
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->magic: 0xdead4ead
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner: 0xffffffff
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner_cpu: 0xffffffff
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->next: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->prev: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
//
// parent: &proc_root
#if defined(CONFIG_SUN_OPENPROMFS) || defined(CONFIG_SUN_OPENPROMFS_MODULE) // CONFIG_SUN_OPENPROMFS=n, CONFIG_SUN_OPENPROMFS_MODULE=n
/* just give it a mountpoint */
proc_mkdir("openprom", NULL);
#endif
proc_tty_init();
// proc_tty_init 에서 한일:
// struct proc_dir_entry 만큼 메모리를 할당 받음 kmem_cache#29-oX (struct proc_dir_entry)
//
// (kmem_cache#29-oX (struct proc_dir_entry))->name: "tty"
// (kmem_cache#29-oX (struct proc_dir_entry))->namelen: 3
// (kmem_cache#29-oX (struct proc_dir_entry))->mode: 0040555
// (kmem_cache#29-oX (struct proc_dir_entry))->nlink: 2
// (&(kmem_cache#29-oX (struct proc_dir_entry))->count)->counter: 1
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock을 이용한 spin lock 초기화 수행
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->raw_lock: { { 0 } }
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->magic: 0xdead4ead
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner: 0xffffffff
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner_cpu: 0xffffffff
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->next: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->prev: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
//
// parent: &proc_root
//
// struct proc_dir_entry 만큼 메모리를 할당 받음 kmem_cache#29-oX (struct proc_dir_entry)
//
// (kmem_cache#29-oX (struct proc_dir_entry))->name: "tty/ldisc"
// (kmem_cache#29-oX (struct proc_dir_entry))->namelen: 9
// (kmem_cache#29-oX (struct proc_dir_entry))->mode: 0040555
// (kmem_cache#29-oX (struct proc_dir_entry))->nlink: 2
// (&(kmem_cache#29-oX (struct proc_dir_entry))->count)->counter: 1
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock을 이용한 spin lock 초기화 수행
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->raw_lock: { { 0 } }
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->magic: 0xdead4ead
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner: 0xffffffff
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner_cpu: 0xffffffff
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->next: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->prev: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
//
// parent: &proc_root
//
// struct proc_dir_entry 만큼 메모리를 할당 받음 kmem_cache#29-oX (struct proc_dir_entry)
//
// (kmem_cache#29-oX (struct proc_dir_entry))->name: "tty/driver"
// (kmem_cache#29-oX (struct proc_dir_entry))->namelen: 10
// (kmem_cache#29-oX (struct proc_dir_entry))->mode: 00500
// (kmem_cache#29-oX (struct proc_dir_entry))->nlink: 2
// (&(kmem_cache#29-oX (struct proc_dir_entry))->count)->counter: 1
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock을 이용한 spin lock 초기화 수행
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->raw_lock: { { 0 } }
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->magic: 0xdead4ead
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner: 0xffffffff
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner_cpu: 0xffffffff
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->next: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->prev: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
//
// parent: &proc_root
//
// struct proc_dir_entry 만큼 메모리를 할당 받음 kmem_cache#29-oX (struct proc_dir_entry)
//
// (kmem_cache#29-oX (struct proc_dir_entry))->name: "tty/ldiscs"
// (kmem_cache#29-oX (struct proc_dir_entry))->namelen: 10
// (kmem_cache#29-oX (struct proc_dir_entry))->mode: 0100444
// (kmem_cache#29-oX (struct proc_dir_entry))->nlink: 1
// (&(kmem_cache#29-oX (struct proc_dir_entry))->count)->counter: 1
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock을 이용한 spin lock 초기화 수행
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->raw_lock: { { 0 } }
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->magic: 0xdead4ead
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner: 0xffffffff
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner_cpu: 0xffffffff
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->next: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->prev: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
//
// parent: &proc_root
//
// (kmem_cache#29-oX (struct proc_dir_entry))->proc_fops: &tty_ldiscs_proc_fops
// (kmem_cache#29-oX (struct proc_dir_entry))->data: NULL
//
// idr_layer_cache를 사용하여 struct idr_layer 의 메모리 kmem_cache#21-oX를 1 개를 할당 받음
//
// (&(&proc_inum_ida)->idr)->id_free 이 idr object new 4번을 가르킴
// |
// |-> ---------------------------------------------------------------------------------------------------------------------------
// | idr object new 4 | idr object new 0 | idr object 6 | idr object 5 | .... | idr object 0 |
// ---------------------------------------------------------------------------------------------------------------------------
// | ary[0]: idr object new 0 | ary[0]: idr object 6 | ary[0]: idr object 5 | ary[0]: idr object 4 | .... | ary[0]: NULL |
// ---------------------------------------------------------------------------------------------------------------------------
//
// (&(&proc_inum_ida)->idr)->id_free: kmem_cache#21-oX (idr object new 4)
// (&(&proc_inum_ida)->idr)->id_free_cnt: 8
//
// (&(&proc_inum_ida)->idr)->top: kmem_cache#21-oX (struct idr_layer) (idr object 8)
// (&(&proc_inum_ida)->idr)->layers: 1
// (&(&proc_inum_ida)->idr)->id_free: (idr object new 0)
// (&(&proc_inum_ida)->idr)->id_free_cnt: 7
//
// (kmem_cache#27-oX (struct ida_bitmap))->bitmap 의 4 bit를 1로 set 수행
// (kmem_cache#27-oX (struct ida_bitmap))->nr_busy: 5
//
// kmem_cache인 kmem_cache#21 에서 할당한 object인 kmem_cache#21-oX (idr object new 4) 의 memory 공간을 반환함
//
// (kmem_cache#29-oX (struct proc_dir_entry))->low_ino: 0xF0000004
// (kmem_cache#29-oX (struct proc_dir_entry))->proc_iops: &proc_file_inode_operations
// (kmem_cache#29-oX (struct proc_dir_entry))->next: NULL
// (kmem_cache#29-oX (struct proc_dir_entry))->parent: &proc_root
//
// (&proc_root)->subdir: kmem_cache#29-oX (struct proc_dir_entry)
//
// struct proc_dir_entry 만큼 메모리를 할당 받음 kmem_cache#29-oX (struct proc_dir_entry)
//
// (kmem_cache#29-oX (struct proc_dir_entry))->name: "tty/drivers"
// (kmem_cache#29-oX (struct proc_dir_entry))->namelen: 11
// (kmem_cache#29-oX (struct proc_dir_entry))->mode: 0100444
// (kmem_cache#29-oX (struct proc_dir_entry))->nlink: 1
// (&(kmem_cache#29-oX (struct proc_dir_entry))->count)->counter: 1
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock을 이용한 spin lock 초기화 수행
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->raw_lock: { { 0 } }
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->magic: 0xdead4ead
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner: 0xffffffff
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner_cpu: 0xffffffff
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->next: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->prev: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
//
// parent: &proc_root
//
// (kmem_cache#29-oX (struct proc_dir_entry))->proc_fops: &proc_tty_drivers_operations
// (kmem_cache#29-oX (struct proc_dir_entry))->data: NULL
//
// idr_layer_cache를 사용하여 struct idr_layer 의 메모리 kmem_cache#21-oX를 1 개를 할당 받음
//
// (&(&proc_inum_ida)->idr)->id_free 이 idr object new 5번을 가르킴
// |
// |-> ---------------------------------------------------------------------------------------------------------------------------
// | idr object new 5 | idr object new 0 | idr object 6 | idr object 5 | .... | idr object 0 |
// ---------------------------------------------------------------------------------------------------------------------------
// | ary[0]: idr object new 0 | ary[0]: idr object 6 | ary[0]: idr object 5 | ary[0]: idr object 4 | .... | ary[0]: NULL |
// ---------------------------------------------------------------------------------------------------------------------------
//
// (&(&proc_inum_ida)->idr)->id_free: kmem_cache#21-oX (idr object new 5)
// (&(&proc_inum_ida)->idr)->id_free_cnt: 8
//
// (&(&proc_inum_ida)->idr)->top: kmem_cache#21-oX (struct idr_layer) (idr object 8)
// (&(&proc_inum_ida)->idr)->layers: 1
// (&(&proc_inum_ida)->idr)->id_free: (idr object new 0)
// (&(&proc_inum_ida)->idr)->id_free_cnt: 7
//
// (kmem_cache#27-oX (struct ida_bitmap))->bitmap 의 5 bit를 1로 set 수행
// (kmem_cache#27-oX (struct ida_bitmap))->nr_busy: 6
//
// kmem_cache인 kmem_cache#21 에서 할당한 object인 kmem_cache#21-oX (idr object new 5) 의 memory 공간을 반환함
//
// (kmem_cache#29-oX (struct proc_dir_entry))->low_ino: 0xF0000005
// (kmem_cache#29-oX (struct proc_dir_entry))->proc_iops: &proc_file_inode_operations
// (kmem_cache#29-oX (struct proc_dir_entry))->next: NULL
// (kmem_cache#29-oX (struct proc_dir_entry))->parent: &proc_root
//
// (&proc_root)->subdir: kmem_cache#29-oX (struct proc_dir_entry)
#ifdef CONFIG_PROC_DEVICETREE // CONFIG_PROC_DEVICETREE=y
proc_device_tree_init();
// proc_device_tree_init 에서 한일:
// struct proc_dir_entry 만큼 메모리를 할당 받음 kmem_cache#29-oX (struct proc_dir_entry)
//
// (kmem_cache#29-oX (struct proc_dir_entry))->name: "device-tree"
// (kmem_cache#29-oX (struct proc_dir_entry))->namelen: 11
// (kmem_cache#29-oX (struct proc_dir_entry))->mode: 0040555
// (kmem_cache#29-oX (struct proc_dir_entry))->nlink: 2
// (&(kmem_cache#29-oX (struct proc_dir_entry))->count)->counter: 1
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock을 이용한 spin lock 초기화 수행
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->raw_lock: { { 0 } }
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->magic: 0xdead4ead
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner: 0xffffffff
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner_cpu: 0xffffffff
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->next: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->prev: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
//
// parent: &proc_root
//
// unflatten_device_tree 에서 만든 tree의 root node 의 값을 사용하여proc device tree를 만드는 작업을 수행
#endif
proc_mkdir("bus", NULL);
// proc_mkdir 에서 한일:
// struct proc_dir_entry 만큼 메모리를 할당 받음 kmem_cache#29-oX (struct proc_dir_entry)
//
// (kmem_cache#29-oX (struct proc_dir_entry))->name: "bus"
// (kmem_cache#29-oX (struct proc_dir_entry))->namelen: 3
// (kmem_cache#29-oX (struct proc_dir_entry))->mode: 0040555
// (kmem_cache#29-oX (struct proc_dir_entry))->nlink: 2
// (&(kmem_cache#29-oX (struct proc_dir_entry))->count)->counter: 1
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock을 이용한 spin lock 초기화 수행
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->raw_lock: { { 0 } }
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->magic: 0xdead4ead
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner: 0xffffffff
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner_cpu: 0xffffffff
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->next: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->prev: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
//
// parent: &proc_root
proc_sys_init();
- calll: start_kernel()
- proc_root_init()
- call: proc_root_init()
- proc_init_inodecache()
- register_filesystem()
- proc_self_init()
- proc_symlink()
- proc_net_init()
- proc_mkdir("sysvipc", NULL);
- proc_mkdir("fs", NULL);
- proc_mkdir("driver", NULL);
- proc_mkdir("fs/nfsd", NULL);
- proc_mkdir("openprom", NULL);
- proc_tty_init()
- proc_device_tree_init();
- proc_mkdir"bus", NULL);
- proc_sys_init()
- call: proc_sys_init()
// ARM10C 20160611
int __init proc_sys_init(void)
{
struct proc_dir_entry *proc_sys_root;
// proc_mkdir("sys", NULL): kmem_cache#29-oX (struct proc_dir_entry)
proc_sys_root = proc_mkdir("sys", NULL);
// proc_sys_root: kmem_cache#29-oX (struct proc_dir_entry)
// proc_mkdir 에서 한일:
// struct proc_dir_entry 만큼 메모리를 할당 받음 kmem_cache#29-oX (struct proc_dir_entry)
//
// (kmem_cache#29-oX (struct proc_dir_entry))->name: "sys"
// (kmem_cache#29-oX (struct proc_dir_entry))->namelen: 3
// (kmem_cache#29-oX (struct proc_dir_entry))->mode: 0040555
// (kmem_cache#29-oX (struct proc_dir_entry))->nlink: 2
// (&(kmem_cache#29-oX (struct proc_dir_entry))->count)->counter: 1
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock을 이용한 spin lock 초기화 수행
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->raw_lock: { { 0 } }
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->magic: 0xdead4ead
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner: 0xffffffff
// ((&(kmem_cache#29-oX (struct proc_dir_entry))->pde_unload_lock)->rlock)->owner_cpu: 0xffffffff
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->next: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
// &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list->prev: &(kmem_cache#29-oX (struct proc_dir_entry))->pde_openers->i_sb_list
//
// parent: &proc_root
// proc_sys_root->proc_iops: (kmem_cache#29-oX (struct proc_dir_entry))->proc_iops
proc_sys_root->proc_iops = &proc_sys_dir_operations;
// proc_sys_root->proc_iops: (kmem_cache#29-oX (struct proc_dir_entry))->proc_iops: &proc_sys_dir_operations
// proc_sys_root->proc_fops: (kmem_cache#29-oX (struct proc_dir_entry))->proc_fops
proc_sys_root->proc_fops = &proc_sys_dir_file_operations;
// proc_sys_root->proc_fops: (kmem_cache#29-oX (struct proc_dir_entry))->proc_fops: &proc_sys_dir_file_operations
// proc_sys_root->nlink: (kmem_cache#29-oX (struct proc_dir_entry))->nlink: 2
proc_sys_root->nlink = 0;
// proc_sys_root->nlink: (kmem_cache#29-oX (struct proc_dir_entry))->nlink: 0
return sysctl_init();
}
- calll: start_kernel()
- proc_root_init()
- call: proc_root_init()
- proc_init_inodecache()
- register_filesystem()
- proc_self_init()
- proc_symlink()
- proc_net_init()
- proc_mkdir("sysvipc", NULL);
- proc_mkdir("fs", NULL);
- proc_mkdir("driver", NULL);
- proc_mkdir("fs/nfsd", NULL);
- proc_mkdir("openprom", NULL);
- proc_tty_init()
- proc_device_tree_init();
- proc_mkdir"bus", NULL);
- proc_sys_init()
- call: proc_sys_init()
- proc_sys_root()
- sysctl_init();
- call: sysctl_init()
// ARM10C 20160611
int __init sysctl_init(void)
{
struct ctl_table_header *hdr;
hdr = register_sysctl_table(sysctl_base_table);
- calll: start_kernel()
- proc_root_init()
- call: proc_root_init()
- proc_init_inodecache()
- register_filesystem()
- proc_self_init()
- proc_symlink()
- proc_net_init()
- proc_mkdir("sysvipc", NULL);
- proc_mkdir("fs", NULL);
- proc_mkdir("driver", NULL);
- proc_mkdir("fs/nfsd", NULL);
- proc_mkdir("openprom", NULL);
- proc_tty_init()
- proc_device_tree_init();
- proc_mkdir"bus", NULL);
- proc_sys_init()
- call: proc_sys_init()
- proc_sys_root()
- sysctl_init();
- call: sysctl_init()
- register_sysctl_table()
- call: register_sysctl_table()
// ARM10C 20160611
// sysctl_base_table
struct ctl_table_header *register_sysctl_table(struct ctl_table *table)
{
static const struct ctl_path null_path[] = { {} };
// table: sysctl_base_table
return register_sysctl_paths(null_path, table);
}
EXPORT_SYMBOL(register_sysctl_table);
- calll: start_kernel()
- proc_root_init()
- call: proc_root_init()
- proc_init_inodecache()
- register_filesystem()
- proc_self_init()
- proc_symlink()
- proc_net_init()
- proc_mkdir("sysvipc", NULL);
- proc_mkdir("fs", NULL);
- proc_mkdir("driver", NULL);
- proc_mkdir("fs/nfsd", NULL);
- proc_mkdir("openprom", NULL);
- proc_tty_init()
- proc_device_tree_init();
- proc_mkdir"bus", NULL);
- proc_sys_init()
- call: proc_sys_init()
- proc_sys_root()
- sysctl_init();
- call: sysctl_init()
- register_sysctl_table()
- call: register_sysctl_table()
- register_sysctl_paths()
- call: register_sysctl_paths()
// ARM10C 20160611
// null_path, table: sysctl_base_table
struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path,
struct ctl_table *table)
{
// path: null_path, table: sysctl_base_table
return __register_sysctl_paths(&sysctl_table_root.default_set,
path, table);
}
EXPORT_SYMBOL(register_sysctl_paths);
- calll: start_kernel()
- proc_root_init()
- call: proc_root_init()
- proc_init_inodecache()
- register_filesystem()
- proc_self_init()
- proc_symlink()
- proc_net_init()
- proc_mkdir("sysvipc", NULL);
- proc_mkdir("fs", NULL);
- proc_mkdir("driver", NULL);
- proc_mkdir("fs/nfsd", NULL);
- proc_mkdir("openprom", NULL);
- proc_tty_init()
- proc_device_tree_init();
- proc_mkdir"bus", NULL);
- proc_sys_init()
- call: proc_sys_init()
- proc_sys_root()
- sysctl_init();
- call: sysctl_init()
- register_sysctl_table()
- call: register_sysctl_table()
- register_sysctl_paths()
- call: register_sysctl_paths()
- __register_sysctl_paths()
- call: __register_sysctl_paths()
// ARM10C 20160611
// &sysctl_table_root.default_set, path: null_path, table: sysctl_base_table
struct ctl_table_header *__register_sysctl_paths(
struct ctl_table_set *set,
const struct ctl_path *path, struct ctl_table *table)
{
// table: sysctl_base_table
struct ctl_table *ctl_table_arg = table;
// ctl_table_arg: sysctl_base_table
// table: sysctl_base_table
int nr_subheaders = count_subheaders(table);
- calll: start_kernel()
- proc_root_init()
- call: proc_root_init()
- proc_init_inodecache()
- register_filesystem()
- proc_self_init()
- proc_symlink()
- proc_net_init()
- proc_mkdir("sysvipc", NULL);
- proc_mkdir("fs", NULL);
- proc_mkdir("driver", NULL);
- proc_mkdir("fs/nfsd", NULL);
- proc_mkdir("openprom", NULL);
- proc_tty_init()
- proc_device_tree_init();
- proc_mkdir"bus", NULL);
- proc_sys_init()
- call: proc_sys_init()
- proc_sys_root()
- sysctl_init();
- call: sysctl_init()
- register_sysctl_table()
- call: register_sysctl_table()
- register_sysctl_paths()
- call: register_sysctl_paths()
- __register_sysctl_paths()
- call: __register_sysctl_paths()
- count_subheaders()
- call: count_subheaders()
// ARM10C 20160611
// table: sysctl_base_table
static int count_subheaders(struct ctl_table *table)
{
int has_files = 0;
// has_files: 0
int nr_subheaders = 0;
// nr_subheaders: 0
struct ctl_table *entry;
/* special case: no directory and empty directory */
// table: sysctl_base_table, table->procname: sysctl_base_table[0].procname: "kernel"
if (!table || !table->procname)
return 1;
// 2016/06/11 종료
// table: sysctl_base_table, entry: sysctl_base_table, entry->procname: sysctl_base_table[0].procname: "kernel"
for (entry = table; entry->procname; entry++) {
// entry->child: sysctl_base_table[0].child: kern_table
if (entry->child)
// nr_subheaders: 0, entry->child: sysctl_base_table[0].child: kern_table
nr_subheaders += count_subheaders(entry->child);
else
has_files = 1;
}
return nr_subheaders + has_files;
}
- calll: start_kernel()
- proc_root_init()
- call: proc_root_init()
- proc_init_inodecache()
- register_filesystem()
- proc_self_init()
- proc_symlink()
- proc_net_init()
- proc_mkdir("sysvipc", NULL);
- proc_mkdir("fs", NULL);
- proc_mkdir("driver", NULL);
- proc_mkdir("fs/nfsd", NULL);
- proc_mkdir("openprom", NULL);
- proc_tty_init()
- proc_device_tree_init();
- proc_mkdir"bus", NULL);
- proc_sys_init()
- call: proc_sys_init()
- proc_sys_root()
- sysctl_init();
- call: sysctl_init()
- register_sysctl_table()
- call: register_sysctl_table()
- register_sysctl_paths()
- call: register_sysctl_paths()
- __register_sysctl_paths()
- call: __register_sysctl_paths()
- count_subheaders()
- call: count_subheaders()
- count_subheaders()
- self_call (재귀적 함수)이다.
- [f1]
- entry->child : sysctl_base_table[0].child: kern_table
- count_subheaders(kern_table) : 2
- nr_subheaders : 2
- [f2]
- entry->child : sysctl_base_table[1].child: vm_table
- count_subheaders(kern_table) : 0
- nr_subheaders : 2
- [f3]
- entry->child : sysctl_base_table[2].child: fs_table
- count_subheaders(kern_table) : 0
- nr_subheaders : 2
- [f4]
- entry->child : sysctl_base_table[2].child: debug_table
- count_subheaders(kern_table) : 0
- nr_subheaders : 2
- [f5]
- entry->child : sysctl_base_table[2].child: device_table
- count_subheaders(kern_table) : 0
- nr_subheaders : 2
- return: __register_sysctl_paths()
- calll: start_kernel()
- proc_root_init()
- call: proc_root_init()
- proc_init_inodecache()
- register_filesystem()
- proc_self_init()
- proc_symlink()
- proc_net_init()
- proc_mkdir("sysvipc", NULL);
- proc_mkdir("fs", NULL);
- proc_mkdir("driver", NULL);
- proc_mkdir("fs/nfsd", NULL);
- proc_mkdir("openprom", NULL);
- proc_tty_init()
- proc_device_tree_init();
- proc_mkdir"bus", NULL);
- proc_sys_init()
- call: proc_sys_init()
- proc_sys_root()
- sysctl_init();
- call: sysctl_init()
- register_sysctl_table()
- call: register_sysctl_table()
- register_sysctl_paths()
- call: register_sysctl_paths()
- __register_sysctl_paths()
- call: __register_sysctl_paths()
- count_subheaders()
- call: count_subheaders()
- count_subheaders()
- self_call (재귀적 함수)이다.
- return: __register_sysctl_paths()
- count_subheaders()
// ARM10C 20160611
// &sysctl_table_root.default_set, path: null_path, table: sysctl_base_table
struct ctl_table_header *__register_sysctl_paths(
struct ctl_table_set *set,
const struct ctl_path *path, struct ctl_table *table)
{
// table: sysctl_base_table
struct ctl_table *ctl_table_arg = table;
// ctl_table_arg: sysctl_base_table
// table: sysctl_base_table
int nr_subheaders = count_subheaders(table);
struct ctl_table_header *header = NULL, **subheaders, **subheader;
const struct ctl_path *component;
char *new_path, *pos;
pos = new_path = kmalloc(PATH_MAX, GFP_KERNEL);
b16256d..dcd7815 master -> origin/master
Merge made by the 'recursive' strategy.
drivers/char/random.c | 1 +
fs/proc/proc_sysctl.c | 210 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
include/linux/gfp.h | 1 +
include/linux/rbtree.h | 1 +
include/linux/slab.h | 8 +++++
include/linux/sysctl.h | 9 ++++++
include/linux/types.h | 1 +
include/uapi/asm-generic/errno-base.h | 1 +
include/uapi/asm-generic/errno.h | 2 ++
include/uapi/linux/limits.h | 1 +
kernel/kmod.c | 1 +
kernel/sysctl.c | 128 +++++++++++++++++++++++++++++++++++++++++---------------------------------------
12 files changed, 300 insertions(+), 64 deletions(-)