提交 76b7f670 编写于 作者: E Eric W. Biederman

signal/signalfd: Add support for SIGSYS

I don't know why signalfd has never grown support for SIGSYS but grow it now.

This corrects an oversight and removes a need for a default in the
switch statement.  Allowing gcc to warn when future members are added
to the enum siginfo_layout, and signalfd does not handle them.
Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
上级 5611f55e
...@@ -134,7 +134,6 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo, ...@@ -134,7 +134,6 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo,
new.ssi_stime = kinfo->si_stime; new.ssi_stime = kinfo->si_stime;
break; break;
case SIL_RT: case SIL_RT:
default:
/* /*
* This case catches also the signals queued by sigqueue(). * This case catches also the signals queued by sigqueue().
*/ */
...@@ -143,6 +142,11 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo, ...@@ -143,6 +142,11 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo,
new.ssi_ptr = (long) kinfo->si_ptr; new.ssi_ptr = (long) kinfo->si_ptr;
new.ssi_int = kinfo->si_int; new.ssi_int = kinfo->si_int;
break; break;
case SIL_SYS:
new.ssi_call_addr = (long) kinfo->si_call_addr;
new.ssi_syscall = kinfo->si_syscall;
new.ssi_arch = kinfo->si_arch;
break;
} }
if (copy_to_user(uinfo, &new, sizeof(struct signalfd_siginfo))) if (copy_to_user(uinfo, &new, sizeof(struct signalfd_siginfo)))
......
...@@ -35,6 +35,10 @@ struct signalfd_siginfo { ...@@ -35,6 +35,10 @@ struct signalfd_siginfo {
__u64 ssi_stime; __u64 ssi_stime;
__u64 ssi_addr; __u64 ssi_addr;
__u16 ssi_addr_lsb; __u16 ssi_addr_lsb;
__u16 __pad2;
__s32 ssi_syscall;
__u64 ssi_call_addr;
__u32 ssi_arch;
/* /*
* Pad strcture to 128 bytes. Remember to update the * Pad strcture to 128 bytes. Remember to update the
...@@ -45,7 +49,7 @@ struct signalfd_siginfo { ...@@ -45,7 +49,7 @@ struct signalfd_siginfo {
* comes out of a read(2) and we really don't want to have * comes out of a read(2) and we really don't want to have
* a compat on read(2). * a compat on read(2).
*/ */
__u8 __pad[46]; __u8 __pad[28];
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册