diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-03-04 00:35:43 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-03-04 00:35:43 -0500 |
commit | d2c032e3dc58137a7261a7824d3acce435db1d66 (patch) | |
tree | 7eea1c7c6103eefe879f07472eec99b3c41eb792 /kernel/sys.c | |
parent | 7e8e385aaf6ed5b64b5d9108081cfcdcdd021b78 (diff) | |
parent | 13a7a6ac0a11197edcd0f756a035f472b42cdf8b (diff) |
Merge tag 'v4.0-rc2' into x86/asm, to refresh the tree
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index ea9c88109894..a03d9cd23ed7 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -97,6 +97,12 @@ | |||
97 | #ifndef MPX_DISABLE_MANAGEMENT | 97 | #ifndef MPX_DISABLE_MANAGEMENT |
98 | # define MPX_DISABLE_MANAGEMENT(a) (-EINVAL) | 98 | # define MPX_DISABLE_MANAGEMENT(a) (-EINVAL) |
99 | #endif | 99 | #endif |
100 | #ifndef GET_FP_MODE | ||
101 | # define GET_FP_MODE(a) (-EINVAL) | ||
102 | #endif | ||
103 | #ifndef SET_FP_MODE | ||
104 | # define SET_FP_MODE(a,b) (-EINVAL) | ||
105 | #endif | ||
100 | 106 | ||
101 | /* | 107 | /* |
102 | * this is where the system-wide overflow UID and GID are defined, for | 108 | * this is where the system-wide overflow UID and GID are defined, for |
@@ -1102,6 +1108,7 @@ DECLARE_RWSEM(uts_sem); | |||
1102 | /* | 1108 | /* |
1103 | * Work around broken programs that cannot handle "Linux 3.0". | 1109 | * Work around broken programs that cannot handle "Linux 3.0". |
1104 | * Instead we map 3.x to 2.6.40+x, so e.g. 3.0 would be 2.6.40 | 1110 | * Instead we map 3.x to 2.6.40+x, so e.g. 3.0 would be 2.6.40 |
1111 | * And we map 4.x to 2.6.60+x, so 4.0 would be 2.6.60. | ||
1105 | */ | 1112 | */ |
1106 | static int override_release(char __user *release, size_t len) | 1113 | static int override_release(char __user *release, size_t len) |
1107 | { | 1114 | { |
@@ -1121,7 +1128,7 @@ static int override_release(char __user *release, size_t len) | |||
1121 | break; | 1128 | break; |
1122 | rest++; | 1129 | rest++; |
1123 | } | 1130 | } |
1124 | v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 40; | 1131 | v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 60; |
1125 | copy = clamp_t(size_t, len, 1, sizeof(buf)); | 1132 | copy = clamp_t(size_t, len, 1, sizeof(buf)); |
1126 | copy = scnprintf(buf, copy, "2.6.%u%s", v, rest); | 1133 | copy = scnprintf(buf, copy, "2.6.%u%s", v, rest); |
1127 | ret = copy_to_user(release, buf, copy + 1); | 1134 | ret = copy_to_user(release, buf, copy + 1); |
@@ -2219,6 +2226,12 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, | |||
2219 | return -EINVAL; | 2226 | return -EINVAL; |
2220 | error = MPX_DISABLE_MANAGEMENT(me); | 2227 | error = MPX_DISABLE_MANAGEMENT(me); |
2221 | break; | 2228 | break; |
2229 | case PR_SET_FP_MODE: | ||
2230 | error = SET_FP_MODE(me, arg2); | ||
2231 | break; | ||
2232 | case PR_GET_FP_MODE: | ||
2233 | error = GET_FP_MODE(me); | ||
2234 | break; | ||
2222 | default: | 2235 | default: |
2223 | error = -EINVAL; | 2236 | error = -EINVAL; |
2224 | break; | 2237 | break; |