Commit b8aeec34 authored by Hidetoshi Seto's avatar Hidetoshi Seto Committed by Andi Kleen

HWPOISON/signalfd: add support for addr_lsb

Similar change as to signal delivery: copy out the si_addr_lsb field
to user space in signalfd
Signed-off-by: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
parent 6b0cd00b
...@@ -98,6 +98,16 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo, ...@@ -98,6 +98,16 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo,
err |= __put_user((long) kinfo->si_addr, &uinfo->ssi_addr); err |= __put_user((long) kinfo->si_addr, &uinfo->ssi_addr);
#ifdef __ARCH_SI_TRAPNO #ifdef __ARCH_SI_TRAPNO
err |= __put_user(kinfo->si_trapno, &uinfo->ssi_trapno); err |= __put_user(kinfo->si_trapno, &uinfo->ssi_trapno);
#endif
#ifdef BUS_MCEERR_AO
/*
* Other callers might not initialize the si_lsb field,
* so check explicitly for the right codes here.
*/
if (kinfo->si_code == BUS_MCEERR_AR ||
kinfo->si_code == BUS_MCEERR_AO)
err |= __put_user((short) kinfo->si_addr_lsb,
&uinfo->ssi_addr_lsb);
#endif #endif
break; break;
case __SI_CHLD: case __SI_CHLD:
......
...@@ -33,6 +33,7 @@ struct signalfd_siginfo { ...@@ -33,6 +33,7 @@ struct signalfd_siginfo {
__u64 ssi_utime; __u64 ssi_utime;
__u64 ssi_stime; __u64 ssi_stime;
__u64 ssi_addr; __u64 ssi_addr;
__u16 ssi_addr_lsb;
/* /*
* Pad strcture to 128 bytes. Remember to update the * Pad strcture to 128 bytes. Remember to update the
...@@ -43,7 +44,7 @@ struct signalfd_siginfo { ...@@ -43,7 +44,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[48]; __u8 __pad[46];
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment