diff options
Diffstat (limited to 'include/linux/syscalls.h')
| -rw-r--r-- | include/linux/syscalls.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index ebb2f24027e8..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 |
| @@ -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 |
