diff options
Diffstat (limited to 'include/linux/syscalls.h')
| -rw-r--r-- | include/linux/syscalls.h | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 5c1a0933768e..2ff814c92f7f 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -81,6 +81,7 @@ union bpf_attr; | |||
| 81 | #include <linux/unistd.h> | 81 | #include <linux/unistd.h> |
| 82 | #include <linux/quota.h> | 82 | #include <linux/quota.h> |
| 83 | #include <linux/key.h> | 83 | #include <linux/key.h> |
| 84 | #include <linux/personality.h> | ||
| 84 | #include <trace/syscall.h> | 85 | #include <trace/syscall.h> |
| 85 | 86 | ||
| 86 | #ifdef CONFIG_ARCH_HAS_SYSCALL_WRAPPER | 87 | #ifdef CONFIG_ARCH_HAS_SYSCALL_WRAPPER |
| @@ -506,9 +507,9 @@ asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, | |||
| 506 | /* fs/timerfd.c */ | 507 | /* fs/timerfd.c */ |
| 507 | asmlinkage long sys_timerfd_create(int clockid, int flags); | 508 | asmlinkage long sys_timerfd_create(int clockid, int flags); |
| 508 | asmlinkage long sys_timerfd_settime(int ufd, int flags, | 509 | asmlinkage long sys_timerfd_settime(int ufd, int flags, |
| 509 | const struct itimerspec __user *utmr, | 510 | const struct __kernel_itimerspec __user *utmr, |
| 510 | struct itimerspec __user *otmr); | 511 | struct __kernel_itimerspec __user *otmr); |
| 511 | asmlinkage long sys_timerfd_gettime(int ufd, struct itimerspec __user *otmr); | 512 | asmlinkage long sys_timerfd_gettime(int ufd, struct __kernel_itimerspec __user *otmr); |
| 512 | 513 | ||
| 513 | /* fs/utimes.c */ | 514 | /* fs/utimes.c */ |
| 514 | asmlinkage long sys_utimensat(int dfd, const char __user *filename, | 515 | asmlinkage long sys_utimensat(int dfd, const char __user *filename, |
| @@ -573,10 +574,10 @@ asmlinkage long sys_timer_create(clockid_t which_clock, | |||
| 573 | struct sigevent __user *timer_event_spec, | 574 | struct sigevent __user *timer_event_spec, |
| 574 | timer_t __user * created_timer_id); | 575 | timer_t __user * created_timer_id); |
| 575 | asmlinkage long sys_timer_gettime(timer_t timer_id, | 576 | asmlinkage long sys_timer_gettime(timer_t timer_id, |
| 576 | struct itimerspec __user *setting); | 577 | struct __kernel_itimerspec __user *setting); |
| 577 | asmlinkage long sys_timer_getoverrun(timer_t timer_id); | 578 | asmlinkage long sys_timer_getoverrun(timer_t timer_id); |
| 578 | asmlinkage long sys_timer_settime(timer_t timer_id, int flags, | 579 | asmlinkage long sys_timer_settime(timer_t timer_id, int flags, |
| 579 | const struct itimerspec __user *new_setting, | 580 | const struct __kernel_itimerspec __user *new_setting, |
| 580 | struct itimerspec __user *old_setting); | 581 | struct itimerspec __user *old_setting); |
| 581 | asmlinkage long sys_timer_delete(timer_t timer_id); | 582 | asmlinkage long sys_timer_delete(timer_t timer_id); |
| 582 | asmlinkage long sys_clock_settime(clockid_t which_clock, | 583 | asmlinkage long sys_clock_settime(clockid_t which_clock, |
| @@ -1282,4 +1283,14 @@ static inline long ksys_truncate(const char __user *pathname, loff_t length) | |||
| 1282 | return do_sys_truncate(pathname, length); | 1283 | return do_sys_truncate(pathname, length); |
| 1283 | } | 1284 | } |
| 1284 | 1285 | ||
| 1286 | static inline unsigned int ksys_personality(unsigned int personality) | ||
| 1287 | { | ||
| 1288 | unsigned int old = current->personality; | ||
| 1289 | |||
| 1290 | if (personality != 0xffffffff) | ||
| 1291 | set_personality(personality); | ||
| 1292 | |||
| 1293 | return old; | ||
| 1294 | } | ||
| 1295 | |||
| 1285 | #endif | 1296 | #endif |
