sys.c File Reference

Go to the source code of this file.

Defines

#define SET_UNALIGN_CTL(a, b)   (-EINVAL)
#define GET_UNALIGN_CTL(a, b)   (-EINVAL)
#define SET_FPEMU_CTL(a, b)   (-EINVAL)
#define GET_FPEMU_CTL(a, b)   (-EINVAL)
#define SET_FPEXC_CTL(a, b)   (-EINVAL)
#define GET_FPEXC_CTL(a, b)   (-EINVAL)
#define GET_ENDIAN(a, b)   (-EINVAL)
#define SET_ENDIAN(a, b)   (-EINVAL)
#define GET_TSC_CTL(a)   (-EINVAL)
#define SET_TSC_CTL(a)   (-EINVAL)

Functions

 EXPORT_SYMBOL (fs_overflowuid)
 EXPORT_SYMBOL (fs_overflowgid)
 EXPORT_SYMBOL (cad_pid)
static int set_one_prio (struct task_struct *p, int niceval, int error)
 SYSCALL_DEFINE3 (setpriority, int, which, int, who, int, niceval)
 SYSCALL_DEFINE2 (getpriority, int, which, int, who)
void emergency_restart (void)
 emergency_restart - reboot the system
 EXPORT_SYMBOL_GPL (emergency_restart)
void kernel_restart_prepare (char *cmd)
void kernel_restart (char *cmd)
 kernel_restart - reboot the system : pointer to buffer containing command to execute for restart or NULL
 EXPORT_SYMBOL_GPL (kernel_restart)
static void kernel_shutdown_prepare (enum system_states state)
void kernel_halt (void)
 kernel_halt - halt the system
 EXPORT_SYMBOL_GPL (kernel_halt)
void kernel_power_off (void)
 kernel_power_off - power_off the system
 EXPORT_SYMBOL_GPL (kernel_power_off)
 SYSCALL_DEFINE4 (reboot, int, magic1, int, magic2, unsigned int, cmd, void __user *, arg)
static void deferred_cad (struct work_struct *dummy)
void ctrl_alt_del (void)
 SYSCALL_DEFINE2 (setregid, gid_t, rgid, gid_t, egid)
 SYSCALL_DEFINE1 (setgid, gid_t, gid)
static int set_user (struct cred *new)
 SYSCALL_DEFINE2 (setreuid, uid_t, ruid, uid_t, euid)
 SYSCALL_DEFINE1 (setuid, uid_t, uid)
 SYSCALL_DEFINE3 (setresuid, uid_t, ruid, uid_t, euid, uid_t, suid)
 SYSCALL_DEFINE3 (getresuid, uid_t __user *, ruid, uid_t __user *, euid, uid_t __user *, suid)
 SYSCALL_DEFINE3 (setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid)
 SYSCALL_DEFINE3 (getresgid, gid_t __user *, rgid, gid_t __user *, egid, gid_t __user *, sgid)
 SYSCALL_DEFINE1 (setfsuid, uid_t, uid)
 SYSCALL_DEFINE1 (setfsgid, gid_t, gid)
void do_sys_times (struct tms *tms)
 SYSCALL_DEFINE1 (times, struct tms __user *, tbuf)
 SYSCALL_DEFINE2 (setpgid, pid_t, pid, pid_t, pgid)
 SYSCALL_DEFINE1 (getpgid, pid_t, pid)
 SYSCALL_DEFINE1 (getsid, pid_t, pid)
 SYSCALL_DEFINE0 (setsid)
struct group_info * groups_alloc (int gidsetsize)
 EXPORT_SYMBOL (groups_alloc)
void groups_free (struct group_info *group_info)
 EXPORT_SYMBOL (groups_free)
static int groups_to_user (gid_t __user *grouplist, const struct group_info *group_info)
static int groups_from_user (struct group_info *group_info, gid_t __user *grouplist)
static void groups_sort (struct group_info *group_info)
int groups_search (const struct group_info *group_info, gid_t grp)
int set_groups (struct cred *new, struct group_info *group_info)
 set_groups - Change a group subscription in a set of credentials : The newly prepared set of credentials to alter : The group list to install
 EXPORT_SYMBOL (set_groups)
int set_current_groups (struct group_info *group_info)
 set_current_groups - Change current's group subscription : The group list to impose
 EXPORT_SYMBOL (set_current_groups)
 SYSCALL_DEFINE2 (getgroups, int, gidsetsize, gid_t __user *, grouplist)
 SYSCALL_DEFINE2 (setgroups, int, gidsetsize, gid_t __user *, grouplist)
int in_group_p (gid_t grp)
 EXPORT_SYMBOL (in_group_p)
int in_egroup_p (gid_t grp)
 EXPORT_SYMBOL (in_egroup_p)
 DECLARE_RWSEM (uts_sem)
 SYSCALL_DEFINE1 (newuname, struct new_utsname __user *, name)
 SYSCALL_DEFINE2 (sethostname, char __user *, name, int, len)
 SYSCALL_DEFINE2 (setdomainname, char __user *, name, int, len)
 SYSCALL_DEFINE2 (getrlimit, unsigned int, resource, struct rlimit __user *, rlim)
 SYSCALL_DEFINE2 (setrlimit, unsigned int, resource, struct rlimit __user *, rlim)
static void accumulate_thread_rusage (struct task_struct *t, struct rusage *r)
static void k_getrusage (struct task_struct *p, int who, struct rusage *r)
int getrusage (struct task_struct *p, int who, struct rusage __user *ru)
 SYSCALL_DEFINE2 (getrusage, int, who, struct rusage __user *, ru)
 SYSCALL_DEFINE1 (umask, int, mask)
 SYSCALL_DEFINE5 (prctl, int, option, unsigned long, arg2, unsigned long, arg3, unsigned long, arg4, unsigned long, arg5)
 SYSCALL_DEFINE3 (getcpu, unsigned __user *, cpup, unsigned __user *, nodep, struct getcpu_cache __user *, unused)
static void argv_cleanup (char **argv, char **envp)
int orderly_poweroff (bool force)
 orderly_poweroff - Trigger an orderly system poweroff : force poweroff if command execution fails
 EXPORT_SYMBOL_GPL (orderly_poweroff)

Variables

int overflowuid = DEFAULT_OVERFLOWUID
int overflowgid = DEFAULT_OVERFLOWGID
int fs_overflowuid = DEFAULT_FS_OVERFLOWUID
int fs_overflowgid = DEFAULT_FS_OVERFLOWUID
int C_A_D = 1
struct pid * cad_pid
void(* pm_power_off_prepare )(void)
struct group_info init_groups = { .usage = ATOMIC_INIT(2) }
char poweroff_cmd [POWEROFF_CMD_PATH_LEN] = "/sbin/poweroff"


Define Documentation

#define GET_ENDIAN ( a,
 )     (-EINVAL)

Definition at line 66 of file sys.c.

#define GET_FPEMU_CTL ( a,
 )     (-EINVAL)

Definition at line 57 of file sys.c.

#define GET_FPEXC_CTL ( a,
 )     (-EINVAL)

Definition at line 63 of file sys.c.

#define GET_TSC_CTL (  )     (-EINVAL)

Definition at line 72 of file sys.c.

#define GET_UNALIGN_CTL ( a,
 )     (-EINVAL)

Definition at line 51 of file sys.c.

#define SET_ENDIAN ( a,
 )     (-EINVAL)

Definition at line 69 of file sys.c.

#define SET_FPEMU_CTL ( a,
 )     (-EINVAL)

Definition at line 54 of file sys.c.

#define SET_FPEXC_CTL ( a,
 )     (-EINVAL)

Definition at line 60 of file sys.c.

#define SET_TSC_CTL (  )     (-EINVAL)

Definition at line 75 of file sys.c.

#define SET_UNALIGN_CTL ( a,
 )     (-EINVAL)

Definition at line 48 of file sys.c.


Function Documentation

static void accumulate_thread_rusage ( struct task_struct *  t,
struct rusage *  r 
) [static]

Definition at line 1617 of file sys.c.

static void argv_cleanup ( char **  argv,
char **  envp 
) [static]

Definition at line 1838 of file sys.c.

void ctrl_alt_del ( void   ) 

Definition at line 457 of file sys.c.

DECLARE_RWSEM ( uts_sem   ) 

static void deferred_cad ( struct work_struct *  dummy  )  [static]

Definition at line 447 of file sys.c.

void do_sys_times ( struct tms *  tms  ) 

Definition at line 919 of file sys.c.

void emergency_restart ( void   ) 

emergency_restart - reboot the system

Without shutting down any hardware or taking any locks reboot the system. This is called when we know we are in trouble so this is our best effort to reboot. This is safe to call in interrupt context.

Definition at line 282 of file sys.c.

EXPORT_SYMBOL ( in_egroup_p   ) 

EXPORT_SYMBOL ( in_group_p   ) 

EXPORT_SYMBOL ( set_current_groups   ) 

EXPORT_SYMBOL ( set_groups   ) 

EXPORT_SYMBOL ( groups_free   ) 

EXPORT_SYMBOL ( groups_alloc   ) 

EXPORT_SYMBOL ( cad_pid   ) 

EXPORT_SYMBOL ( fs_overflowgid   ) 

EXPORT_SYMBOL ( fs_overflowuid   ) 

EXPORT_SYMBOL_GPL ( orderly_poweroff   ) 

EXPORT_SYMBOL_GPL ( kernel_power_off   ) 

EXPORT_SYMBOL_GPL ( kernel_halt   ) 

EXPORT_SYMBOL_GPL ( kernel_restart   ) 

EXPORT_SYMBOL_GPL ( emergency_restart   ) 

int getrusage ( struct task_struct *  p,
int  who,
struct rusage __user *  ru 
)

Definition at line 1689 of file sys.c.

struct group_info* groups_alloc ( int  gidsetsize  )  [read]

Definition at line 1132 of file sys.c.

void groups_free ( struct group_info *  group_info  ) 

Definition at line 1171 of file sys.c.

static int groups_from_user ( struct group_info *  group_info,
gid_t __user *  grouplist 
) [static]

Definition at line 1204 of file sys.c.

int groups_search ( const struct group_info *  group_info,
gid_t  grp 
)

Definition at line 1253 of file sys.c.

static void groups_sort ( struct group_info *  group_info  )  [static]

Definition at line 1224 of file sys.c.

static int groups_to_user ( gid_t __user *  grouplist,
const struct group_info *  group_info 
) [static]

Definition at line 1184 of file sys.c.

int in_egroup_p ( gid_t  grp  ) 

Definition at line 1396 of file sys.c.

int in_group_p ( gid_t  grp  ) 

Definition at line 1384 of file sys.c.

static void k_getrusage ( struct task_struct *  p,
int  who,
struct rusage *  r 
) [static]

Definition at line 1627 of file sys.c.

void kernel_halt ( void   ) 

kernel_halt - halt the system

Shutdown everything and perform a clean system halt.

Definition at line 327 of file sys.c.

void kernel_power_off ( void   ) 

kernel_power_off - power_off the system

Shutdown everything and perform a clean system power_off.

Definition at line 342 of file sys.c.

void kernel_restart ( char *  cmd  ) 

kernel_restart - reboot the system : pointer to buffer containing command to execute for restart or NULL

Shutdown everything and perform a clean reboot. This is not safe to call in interrupt context.

Definition at line 304 of file sys.c.

void kernel_restart_prepare ( char *  cmd  ) 

Definition at line 288 of file sys.c.

static void kernel_shutdown_prepare ( enum system_states  state  )  [static]

Definition at line 315 of file sys.c.

int orderly_poweroff ( bool  force  ) 

orderly_poweroff - Trigger an orderly system poweroff : force poweroff if command execution fails

This may be called from any context to trigger a system shutdown. If the orderly shutdown fails, it will force an immediate shutdown.

Definition at line 1850 of file sys.c.

int set_current_groups ( struct group_info *  group_info  ) 

set_current_groups - Change current's group subscription : The group list to impose

Validate a group subscription and, if valid, impose it upon current's task security record.

Definition at line 1307 of file sys.c.

int set_groups ( struct cred *  new,
struct group_info *  group_info 
)

set_groups - Change a group subscription in a set of credentials : The newly prepared set of credentials to alter : The group list to install

Validate a group subscription and, if valid, insert it into a set of credentials.

Definition at line 1283 of file sys.c.

static int set_one_prio ( struct task_struct *  p,
int  niceval,
int  error 
) [static]

Definition at line 123 of file sys.c.

static int set_user ( struct cred *  new  )  [static]

Definition at line 569 of file sys.c.

SYSCALL_DEFINE0 ( setsid   ) 

Definition at line 1096 of file sys.c.

SYSCALL_DEFINE1 ( umask  ,
int  ,
mask   
)

Definition at line 1704 of file sys.c.

SYSCALL_DEFINE1 ( newuname  ,
struct new_utsname __user *  ,
name   
)

Definition at line 1410 of file sys.c.

SYSCALL_DEFINE1 ( getsid  ,
pid_t  ,
pid   
)

Definition at line 1068 of file sys.c.

SYSCALL_DEFINE1 ( getpgid  ,
pid_t  ,
pid   
)

Definition at line 1031 of file sys.c.

SYSCALL_DEFINE1 ( times  ,
struct tms __user *  ,
tbuf   
)

Definition at line 935 of file sys.c.

SYSCALL_DEFINE1 ( setfsgid  ,
gid_t  ,
gid   
)

Definition at line 886 of file sys.c.

SYSCALL_DEFINE1 ( setfsuid  ,
uid_t  ,
uid   
)

Definition at line 849 of file sys.c.

SYSCALL_DEFINE1 ( setuid  ,
uid_t  ,
uid   
)

Definition at line 674 of file sys.c.

SYSCALL_DEFINE1 ( setgid  ,
gid_t  ,
gid   
)

Definition at line 536 of file sys.c.

SYSCALL_DEFINE2 ( getrusage  ,
int  ,
who  ,
struct rusage __user *  ,
ru   
)

Definition at line 1696 of file sys.c.

SYSCALL_DEFINE2 ( setrlimit  ,
unsigned  int,
resource  ,
struct rlimit __user *  ,
rlim   
)

Definition at line 1531 of file sys.c.

SYSCALL_DEFINE2 ( getrlimit  ,
unsigned  int,
resource  ,
struct rlimit __user *  ,
rlim   
)

Definition at line 1493 of file sys.c.

SYSCALL_DEFINE2 ( setdomainname  ,
char __user *  ,
name  ,
int  ,
len   
)

Definition at line 1470 of file sys.c.

SYSCALL_DEFINE2 ( sethostname  ,
char __user *  ,
name  ,
int  ,
len   
)

Definition at line 1421 of file sys.c.

SYSCALL_DEFINE2 ( setgroups  ,
int  ,
gidsetsize  ,
gid_t __user *  ,
grouplist   
)

Definition at line 1356 of file sys.c.

SYSCALL_DEFINE2 ( getgroups  ,
int  ,
gidsetsize  ,
gid_t __user *  ,
grouplist   
)

Definition at line 1327 of file sys.c.

SYSCALL_DEFINE2 ( setpgid  ,
pid_t  ,
pid  ,
pid_t  ,
pgid   
)

Definition at line 960 of file sys.c.

SYSCALL_DEFINE2 ( setreuid  ,
uid_t  ,
ruid  ,
uid_t  ,
euid   
)

Definition at line 609 of file sys.c.

SYSCALL_DEFINE2 ( setregid  ,
gid_t  ,
rgid  ,
gid_t  ,
egid   
)

Definition at line 485 of file sys.c.

SYSCALL_DEFINE2 ( getpriority  ,
int  ,
which  ,
int  ,
who   
)

Definition at line 214 of file sys.c.

SYSCALL_DEFINE3 ( getcpu  ,
unsigned __user *  ,
cpup  ,
unsigned __user *  ,
nodep  ,
struct getcpu_cache __user *  ,
unused   
)

Definition at line 1824 of file sys.c.

SYSCALL_DEFINE3 ( getresgid  ,
gid_t __user *  ,
rgid  ,
gid_t __user *  ,
egid  ,
gid_t __user *  ,
sgid   
)

Definition at line 830 of file sys.c.

SYSCALL_DEFINE3 ( setresgid  ,
gid_t  ,
rgid  ,
gid_t  ,
egid  ,
gid_t  ,
sgid   
)

Definition at line 787 of file sys.c.

SYSCALL_DEFINE3 ( getresuid  ,
uid_t __user *  ,
ruid  ,
uid_t __user *  ,
euid  ,
uid_t __user *  ,
suid   
)

Definition at line 772 of file sys.c.

SYSCALL_DEFINE3 ( setresuid  ,
uid_t  ,
ruid  ,
uid_t  ,
euid  ,
uid_t  ,
suid   
)

Definition at line 719 of file sys.c.

SYSCALL_DEFINE3 ( setpriority  ,
int  ,
which  ,
int  ,
who  ,
int  ,
niceval   
)

Definition at line 149 of file sys.c.

SYSCALL_DEFINE4 ( reboot  ,
int  ,
magic1  ,
int  ,
magic2  ,
unsigned  int,
cmd  ,
void __user *  ,
arg   
)

Definition at line 361 of file sys.c.

SYSCALL_DEFINE5 ( prctl  ,
int  ,
option  ,
unsigned  long,
arg2  ,
unsigned  long,
arg3  ,
unsigned  long,
arg4  ,
unsigned  long,
arg5   
)

Definition at line 1710 of file sys.c.


Variable Documentation

int C_A_D = 1

Definition at line 107 of file sys.c.

struct pid* cad_pid

Definition at line 109 of file sys.c.

int fs_overflowgid = DEFAULT_FS_OVERFLOWUID

Definition at line 98 of file sys.c.

int fs_overflowuid = DEFAULT_FS_OVERFLOWUID

Definition at line 97 of file sys.c.

struct group_info init_groups = { .usage = ATOMIC_INIT(2) }

Definition at line 1130 of file sys.c.

int overflowgid = DEFAULT_OVERFLOWGID

Definition at line 85 of file sys.c.

int overflowuid = DEFAULT_OVERFLOWUID

Definition at line 84 of file sys.c.

void(* pm_power_off_prepare)(void)

char poweroff_cmd[POWEROFF_CMD_PATH_LEN] = "/sbin/poweroff"

Definition at line 1836 of file sys.c.


Generated on Wed Apr 11 06:39:16 2012 for DDE - The L4 Device Driver Environment by  doxygen 1.5.6