Skip to content

Commit cfac6df

Browse files
joergroedelIngo Molnar
authored andcommitted
x86/signals: Fix lower/upper bound reporting in compat siginfo
Put the right values from the original siginfo into the userspace compat-siginfo. This fixes the 32-bit MPX "tabletest" testcase on 64-bit kernels. Signed-off-by: Joerg Roedel <[email protected]> Acked-by: Dave Hansen <[email protected]> Cc: <[email protected]> # v4.8+ Cc: Andy Lutomirski <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Brian Gerst <[email protected]> Cc: Denys Vlasenko <[email protected]> Cc: Dmitry Safonov <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Josh Poimboeuf <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Fixes: a445508 ('x86/signals: Add missing signal_compat code for x86 features') Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 308ac75 commit cfac6df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/kernel/signal_compat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ int __copy_siginfo_to_user32(compat_siginfo_t __user *to, const siginfo_t *from,
151151

152152
if (from->si_signo == SIGSEGV) {
153153
if (from->si_code == SEGV_BNDERR) {
154-
compat_uptr_t lower = (unsigned long)&to->si_lower;
155-
compat_uptr_t upper = (unsigned long)&to->si_upper;
154+
compat_uptr_t lower = (unsigned long)from->si_lower;
155+
compat_uptr_t upper = (unsigned long)from->si_upper;
156156
put_user_ex(lower, &to->si_lower);
157157
put_user_ex(upper, &to->si_upper);
158158
}

0 commit comments

Comments
 (0)