diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/posix-timers.h | 2 | ||||
-rw-r--r-- | include/linux/resource.h | 9 | ||||
-rw-r--r-- | include/linux/security.h | 9 | ||||
-rw-r--r-- | include/linux/syscalls.h | 4 |
4 files changed, 20 insertions, 4 deletions
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h index 4f71bf4e628c..3e23844a6990 100644 --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h | |||
@@ -117,6 +117,6 @@ void set_process_cpu_timer(struct task_struct *task, unsigned int clock_idx, | |||
117 | 117 | ||
118 | long clock_nanosleep_restart(struct restart_block *restart_block); | 118 | long clock_nanosleep_restart(struct restart_block *restart_block); |
119 | 119 | ||
120 | void update_rlimit_cpu(unsigned long rlim_new); | 120 | void update_rlimit_cpu(struct task_struct *task, unsigned long rlim_new); |
121 | 121 | ||
122 | #endif | 122 | #endif |
diff --git a/include/linux/resource.h b/include/linux/resource.h index f1e914eefeab..88d36f9145ba 100644 --- a/include/linux/resource.h +++ b/include/linux/resource.h | |||
@@ -43,6 +43,13 @@ struct rlimit { | |||
43 | unsigned long rlim_max; | 43 | unsigned long rlim_max; |
44 | }; | 44 | }; |
45 | 45 | ||
46 | #define RLIM64_INFINITY (~0ULL) | ||
47 | |||
48 | struct rlimit64 { | ||
49 | __u64 rlim_cur; | ||
50 | __u64 rlim_max; | ||
51 | }; | ||
52 | |||
46 | #define PRIO_MIN (-20) | 53 | #define PRIO_MIN (-20) |
47 | #define PRIO_MAX 20 | 54 | #define PRIO_MAX 20 |
48 | 55 | ||
@@ -73,6 +80,8 @@ struct rlimit { | |||
73 | struct task_struct; | 80 | struct task_struct; |
74 | 81 | ||
75 | int getrusage(struct task_struct *p, int who, struct rusage __user *ru); | 82 | int getrusage(struct task_struct *p, int who, struct rusage __user *ru); |
83 | int do_prlimit(struct task_struct *tsk, unsigned int resource, | ||
84 | struct rlimit *new_rlim, struct rlimit *old_rlim); | ||
76 | 85 | ||
77 | #endif /* __KERNEL__ */ | 86 | #endif /* __KERNEL__ */ |
78 | 87 | ||
diff --git a/include/linux/security.h b/include/linux/security.h index 5bcb395a49d4..a22219afff09 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -1499,7 +1499,8 @@ struct security_operations { | |||
1499 | int (*task_setnice) (struct task_struct *p, int nice); | 1499 | int (*task_setnice) (struct task_struct *p, int nice); |
1500 | int (*task_setioprio) (struct task_struct *p, int ioprio); | 1500 | int (*task_setioprio) (struct task_struct *p, int ioprio); |
1501 | int (*task_getioprio) (struct task_struct *p); | 1501 | int (*task_getioprio) (struct task_struct *p); |
1502 | int (*task_setrlimit) (unsigned int resource, struct rlimit *new_rlim); | 1502 | int (*task_setrlimit) (struct task_struct *p, unsigned int resource, |
1503 | struct rlimit *new_rlim); | ||
1503 | int (*task_setscheduler) (struct task_struct *p, int policy, | 1504 | int (*task_setscheduler) (struct task_struct *p, int policy, |
1504 | struct sched_param *lp); | 1505 | struct sched_param *lp); |
1505 | int (*task_getscheduler) (struct task_struct *p); | 1506 | int (*task_getscheduler) (struct task_struct *p); |
@@ -1749,7 +1750,8 @@ void security_task_getsecid(struct task_struct *p, u32 *secid); | |||
1749 | int security_task_setnice(struct task_struct *p, int nice); | 1750 | int security_task_setnice(struct task_struct *p, int nice); |
1750 | int security_task_setioprio(struct task_struct *p, int ioprio); | 1751 | int security_task_setioprio(struct task_struct *p, int ioprio); |
1751 | int security_task_getioprio(struct task_struct *p); | 1752 | int security_task_getioprio(struct task_struct *p); |
1752 | int security_task_setrlimit(unsigned int resource, struct rlimit *new_rlim); | 1753 | int security_task_setrlimit(struct task_struct *p, unsigned int resource, |
1754 | struct rlimit *new_rlim); | ||
1753 | int security_task_setscheduler(struct task_struct *p, | 1755 | int security_task_setscheduler(struct task_struct *p, |
1754 | int policy, struct sched_param *lp); | 1756 | int policy, struct sched_param *lp); |
1755 | int security_task_getscheduler(struct task_struct *p); | 1757 | int security_task_getscheduler(struct task_struct *p); |
@@ -2311,7 +2313,8 @@ static inline int security_task_getioprio(struct task_struct *p) | |||
2311 | return 0; | 2313 | return 0; |
2312 | } | 2314 | } |
2313 | 2315 | ||
2314 | static inline int security_task_setrlimit(unsigned int resource, | 2316 | static inline int security_task_setrlimit(struct task_struct *p, |
2317 | unsigned int resource, | ||
2315 | struct rlimit *new_rlim) | 2318 | struct rlimit *new_rlim) |
2316 | { | 2319 | { |
2317 | return 0; | 2320 | return 0; |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 2ab198a1e38d..1b67bd333b5e 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -35,6 +35,7 @@ struct oldold_utsname; | |||
35 | struct old_utsname; | 35 | struct old_utsname; |
36 | struct pollfd; | 36 | struct pollfd; |
37 | struct rlimit; | 37 | struct rlimit; |
38 | struct rlimit64; | ||
38 | struct rusage; | 39 | struct rusage; |
39 | struct sched_param; | 40 | struct sched_param; |
40 | struct sel_arg_struct; | 41 | struct sel_arg_struct; |
@@ -644,6 +645,9 @@ asmlinkage long sys_old_getrlimit(unsigned int resource, struct rlimit __user *r | |||
644 | #endif | 645 | #endif |
645 | asmlinkage long sys_setrlimit(unsigned int resource, | 646 | asmlinkage long sys_setrlimit(unsigned int resource, |
646 | struct rlimit __user *rlim); | 647 | struct rlimit __user *rlim); |
648 | asmlinkage long sys_prlimit64(pid_t pid, unsigned int resource, | ||
649 | const struct rlimit64 __user *new_rlim, | ||
650 | struct rlimit64 __user *old_rlim); | ||
647 | asmlinkage long sys_getrusage(int who, struct rusage __user *ru); | 651 | asmlinkage long sys_getrusage(int who, struct rusage __user *ru); |
648 | asmlinkage long sys_umask(int mask); | 652 | asmlinkage long sys_umask(int mask); |
649 | 653 | ||