parisc: Fix SIGSYS signals in compat case
authorHelge Deller <deller@gmx.de>
Wed, 30 Mar 2016 12:11:50 +0000 (14:11 +0200)
committerHelge Deller <deller@gmx.de>
Thu, 31 Mar 2016 10:28:37 +0000 (12:28 +0200)
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org # v4.5
arch/parisc/include/asm/compat.h
arch/parisc/kernel/signal32.c

index 0448a2c8eafbc34e8252240171f77173ebdb1dd3..3387307cc33e11f5e6a718a26d8781d3c9d140d2 100644 (file)
@@ -183,6 +183,13 @@ typedef struct compat_siginfo {
                        int _band;      /* POLL_IN, POLL_OUT, POLL_MSG */
                        int _fd;
                } _sigpoll;
+
+               /* SIGSYS */
+               struct {
+                       compat_uptr_t _call_addr; /* calling user insn */
+                       int _syscall;   /* triggering system call number */
+                       compat_uint_t _arch;    /* AUDIT_ARCH_* of syscall */
+               } _sigsys;
        } _sifields;
 } compat_siginfo_t;
 
index 984abbee71ca2b7be36cbd94a7b7a1c206191a86..c342b2e17492ebf1884c69334dd01716c1cde086 100644 (file)
@@ -371,6 +371,11 @@ copy_siginfo_to_user32 (compat_siginfo_t __user *to, const siginfo_t *from)
                        val = (compat_int_t)from->si_int;
                        err |= __put_user(val, &to->si_int);
                        break;
+               case __SI_SYS >> 16:
+                       err |= __put_user(ptr_to_compat(from->si_call_addr), &to->si_call_addr);
+                       err |= __put_user(from->si_syscall, &to->si_syscall);
+                       err |= __put_user(from->si_arch, &to->si_arch);
+                       break;
                }
        }
        return err;