Add support for SIGSYS in signalfd

Linux 4.18 added support for SIGSYS info in signalfd. Add the new
fields to signalfd_siginfo.

While the kernel has support for these new fields now, no libc has
shipped a release with the new signalfd fields.
This commit is contained in:
Stephen Barber 2018-11-05 16:02:26 -08:00
parent 9c5e70ae30
commit 60ab3041a1
6 changed files with 40 additions and 10 deletions

View File

@ -841,7 +841,13 @@ fn main() {
// musl seems to define this as an *anonymous* bitfield
(musl && struct_ == "statvfs" && field == "__f_unused") ||
// sigev_notify_thread_id is actually part of a sigev_un union
(struct_ == "sigevent" && field == "sigev_notify_thread_id")
(struct_ == "sigevent" && field == "sigev_notify_thread_id") ||
// signalfd had SIGSYS fields added in Linux 4.18, but no libc release has them yet.
(struct_ == "signalfd_siginfo" && (field == "ssi_addr_lsb" ||
field == "_pad2" ||
field == "ssi_syscall" ||
field == "ssi_call_addr" ||
field == "ssi_arch"))
});
cfg.fn_cname(move |name, cname| {

View File

@ -685,7 +685,12 @@ s! {
pub ssi_utime: ::uint64_t,
pub ssi_stime: ::uint64_t,
pub ssi_addr: ::uint64_t,
_pad: [::uint8_t; 48],
pub ssi_addr_lsb: ::uint16_t,
_pad2: ::uint16_t,
pub ssi_syscall: ::int32_t,
pub ssi_call_addr: ::uint64_t,
pub ssi_arch: ::uint32_t,
_pad: [::uint8_t; 28],
}
pub struct itimerspec {

View File

@ -172,12 +172,16 @@ s! {
pub ssi_trapno: ::uint32_t,
pub ssi_status: ::int32_t,
pub ssi_int: ::int32_t,
pub ssi_ptr: ::c_ulonglong,
pub ssi_utime: ::c_ulonglong,
pub ssi_stime: ::c_ulonglong,
pub ssi_addr: ::c_ulonglong,
pub ssi_ptr: ::uint64_t,
pub ssi_utime: ::uint64_t,
pub ssi_stime: ::uint64_t,
pub ssi_addr: ::uint64_t,
pub ssi_addr_lsb: ::uint16_t,
_pad: [::uint8_t; 46],
_pad2: ::uint16_t,
pub ssi_syscall: ::int32_t,
pub ssi_call_addr: ::uint64_t,
pub ssi_arch: ::uint32_t,
_pad: [::uint8_t; 28],
}
pub struct ucred {

View File

@ -184,7 +184,12 @@ s! {
pub ssi_utime: ::uint64_t,
pub ssi_stime: ::uint64_t,
pub ssi_addr: ::uint64_t,
_pad: [::uint8_t; 48],
pub ssi_addr_lsb: ::uint16_t,
_pad2: ::uint16_t,
pub ssi_syscall: ::int32_t,
pub ssi_call_addr: ::uint64_t,
pub ssi_arch: ::uint32_t,
_pad: [::uint8_t; 28],
}
pub struct fsid_t {

View File

@ -270,7 +270,12 @@ s! {
pub ssi_utime: ::uint64_t,
pub ssi_stime: ::uint64_t,
pub ssi_addr: ::uint64_t,
_pad: [::uint8_t; 48],
pub ssi_addr_lsb: ::uint16_t,
_pad2: ::uint16_t,
pub ssi_syscall: ::int32_t,
pub ssi_call_addr: ::uint64_t,
pub ssi_arch: ::uint32_t,
_pad: [::uint8_t; 28],
}
pub struct itimerspec {

View File

@ -391,7 +391,12 @@ s! {
pub ssi_utime: ::uint64_t,
pub ssi_stime: ::uint64_t,
pub ssi_addr: ::uint64_t,
_pad: [::uint8_t; 48],
pub ssi_addr_lsb: ::uint16_t,
_pad2: ::uint16_t,
pub ssi_syscall: ::int32_t,
pub ssi_call_addr: ::uint64_t,
pub ssi_arch: ::uint32_t,
_pad: [::uint8_t; 28],
}
pub struct fsid_t {