**linux/kernel/sys.c**Copyright(C)1991,1992LinusTorvalds*/#include<linux/module.h>#include<linux/mm.h>#include<li
nux/utsname.h>#include<linux/mman.h>#include<linux/smp_lock.h>#include<linux/notifier.h>#include<linux/reboot.h>#
include<linux/prctl.h>#include<linux/init.h>#include<linux/highuid.h>#include<asm/uaccess.h>#include<asm/io.h>/**
thisiswherethesystem-wideoverflowUIDandGIDaredefined,for*architecturesthatnowhave32-bitUID/GIDbutdidn'tinthepast*
/intoverflowuid=DEFAULT_OVERFLOWUID;intoverflowgid=DEFAULT_OVERFLOWGID;/**thesameasabove,butforfilesystemswhichca
nonlystorea16-bit*UIDandGID.assuch,thisisneededonallarchitectures*/intfs_overflowuid=DEFAULT_FS_OVERFLOWUID;intfs
_overflowgid=DEFAULT_FS_OVERFLOWUID;/**thisindicateswhetheryoucanrebootwithctrl-alt-del:thedefaultisyes*/intC_A_D
=1;/**Notifierlistforkernelcodewhichwantstobecalled*atshutdown.ThisisusedtostopanyidlingDMAoperations*andthelike.
*/staticstructnotifier_block*reboot_notifier_list;rwlock_tnotifier_lock=RW_LOCK_UNLOCKED;/***notifier_chain_regis
ter-Addnotifiertoanotifierchain*@list:Pointertorootlistpointer*@n:Newentryinnotifierchain**Addsanotifiertoanotifi
erchain.**Currentlyalwaysreturnszero.*/intnotifier_chain_register(structnotifier_block**list,structnotifier_block
*n){write_lock(&notifier_lock);while(*list){if(n->priority>(*list)->priority)break;list=&((*list)->next);}n->next
=*list;*list=n;write_unlock(&notifier_lock);return0/**linux/kernel/sys.c**Copyright(C)1991,1992LinusTorvalds*/#in
clude<linux/module.h>#include<linux/mm.h>#include<linux/utsname.h>#include<linux/mman.h>#include<linux/smp_lock.h
>#include<linux/notifier.h>#include<linux/reboot.h>#include<linux/prctl.h>#include<linux/init.h>#include<linux/hi
ghuid.h>#include<asm/uaccess.h>#include<asm/io.h>/**thisiswherethesystem-wideoverflowUIDandGIDaredefined,for*arch
itecturesthatnowhave32-bitUID/GIDbutdidn'tinthepast*/intoverflowuid=DEFAULT_OVERFLOWUID;intoverflowgid=DEFAULT_OV
ERFLOWGID;/**thesameasabove,butforfilesystemswhichcanonlystorea16-bit*UIDandGID.assuch,thisisneededonallarchitect
ures*/intfs_overflowuid=DEFAULT_FS_OVERFLOWUID;intfs_overflowgid=DEFAULT_FS_OVERFLOWUID;/**thisindicateswhetheryo
ucanrebootwithctrl-alt-del:thedefaultisyes*/intC_A_D=1;/**Notifierlistforkernelcodewhichwantstobecalled*atshutdow
n.ThisisusedtostopanyidlingDMAoperations*andthelike.*/staticstructnotifier_block*reboot_notifier_list;rwlock_tnot
ifier_lock=RW_LOCK_UNLOCKED;/***notifier_chain_register-Addnotifiertoanotifierchain*@list:Pointertorootlistpointe
r*@n:Newentryinnotifierchain**Addsanotifiertoanotifierchain.**Currentlyalwaysreturnszero.*/intnotifier_chain_regi
ster(structnotifier_block**list,structnotifier_block*n){write_lock(&notifier_lock);while(*list){if(n->priority>(*
list)->priority)break;list=&((*list)->next);}n->next=*list;*list=n;write_unlock(&notifier_lock);return0/**linux/k
ernel/sys.c**Copyright(C)1991,1992LinusTorvalds*/#include<linux/module.h>#include<linux/mm.h>#include<linux/utsna
me.h>#include<linux/mman.h>#include<linux/smp_lock.h>#include<linux/notifier.h>#include<linux/reboot.h>#include<l
inux/prctl.h>#include<linux/init.h>#include<linux/highuid.h>#include<asm/uaccess.h>#include<asm/io.h>/**thisiswhe
rethesystem-wideoverflowUIDandGIDaredefined,for*architecturesthatnowhave32-bitUID/GIDbutdidn'tinthepast*/intoverf
lowuid=DEFAULT_OVERFLOWUID;intoverflowgid=DEFAULT_OVERFLOWGID;/**thesameasabove,butforfilesystemswhichcanonlystor
ea16-bit*UIDandGID.assuch,thisisneededonallarchitectures*/intfs_overflowuid=DEFAULT_FS_OVERFLOWUID;intfs_overflow
gid=DEFAULT_FS_OVERFLOWUID;/**thisindicateswhetheryoucanrebootwithctrl-alt-del:thedefaultisyes*/intC_A_D=1;/**Not
ifierlistforkernelcodewhichwantstobecalled*atshutdown.ThisisusedtostopanyidlingDMAoperations*andthelike.*/statics
tructnotifier_block*reboot_notifier_list;rwlock_tnotifier_lock=RW_LOCK_UNLOCKED;/***notifier_chain_register-Addno
tifiertoanotifierchain*@list:Pointertorootlistpointer*@n:Newentryinnotifierchain**Addsanotifiertoanotifierchain.*
*Currentlyalwaysreturnszero.*/intnotifier_chain_register(structnotifier_block**list,structnotifier_block*n){write
_lock(&notifier_lock);while(*list){if(n->priority>(*list)->priority)break;list=&((*list)->next);}n->next=*list;*l
ist=n;write_unlock(&notifier_lock);return0/**linux/kernel/sys.c**Copyright(C)1991,1992LinusTorvalds*/#include<lin
ux/module.h>#include<linux/mm.h>#include<linux/utsname.h>#include<linux/mman.h>#include<linux/smp_lock.h>#include
<linux/notifier.h>#include<linux/reboot.h>#include<linux/prctl.h>#include<linux/init.h>#include<linux/highuid.h>#
include<asm/uaccess.h>#include<asm/io.h>/**thisiswherethesystem-wideoverflowUIDandGIDaredefined,for*architectures
thatnowhave32-bitUID/GIDbutdidn'tinthepast*/intoverflowuid=DEFAULT_OVERFLOWUID;intoverflowgid=DEFAULT_OVERFLOWGID
;/**thesameasabove,butforfilesystemswhichcanonlystorea16-bit*UIDandGID.assuch,thisisneededonallarchitectures*/int
fs_overflowuid=DEFAULT_FS_OVERFLOWUID;intfs_overflowgid=DEFAULT_FS_OVERFLOWUID;/**thisindicateswhetheryoucanreboo
twithctrl-alt-del:thedefaultisyes*/intC_A_D=1;/**Notifierlistforkernelcodewhichwantstobecalled*atshutdown.Thisisu
sedtostopanyidlingDMAoperations*andthelike.*/staticstructnotifier_block*reboot_notifier_list;rwlock_tnotifier_loc
k=RW_LOCK_UNLOCKED;/***notifier_chain_register-Addnotifiertoanotifierchain*@list:Pointertorootlistpointer*@n:Newe
ntryinnotifierchain**Addsanotifiertoanotifierchain.**Currentlyalwaysreturnszero.*/intnotifier_chain_register(stru
ctnotifier_block**list,structnotifier_block*n){write_lock(&notifier_lock);while(*list){if(n->priority>(*list)->pr
iority)break;list=&((*list)->next);}n->next=*list;*list=n;write_unlock(&notifier_lock);return0/**linux/kernel/sys
.c**Copyright(C)1991,1992LinusTorvalds*/#include<linux/module.h>#include<linux/mm.h>#include<linux/utsname.h>#inc
lude<linux/mman.h>#include<linux/smp_lock.h>#include<linux/notifier.h>#include<linux/reboot.h>#include<linux/prct
l.h>#include<linux/init.h>#include<linux/highuid.h>#include<asm/uaccess.h>#include<asm/io.h>/**thisiswherethesyst
em-wideoverflowUIDandGIDaredefined,for*architecturesthatnowhave32-bitUID/GIDbutdidn'tinthepast*/intoverflowuid=DE
FAULT_OVERFLOWUID;intoverflowgid=DEFAULT_OVERFLOWGID;/**thesameasabove,butforfilesystemswhichcanonlystorea16-bit*