I agree to the case, but not fully to the fix.
The old syscall definitions came in in 2007 via [1] "Update Linux kernel syscall list" (v0.10.0)
The feature adding the timerfd was added in 2014 with [2] "linux-user: support timerfd_{create, gettime, settime} syscalls" (v2.2.0) using the wrong definitions.
Later this was fixed 2015 for arm [3] "linux-user/arm: Correct TARGET_NR_timerfd to TARGET_NR_timerfd_create" (v2.4.0) and for the rest 2016 in [4] "linux-user: correct timerfd_create syscall numbers" (2.6.0).
No follow on fixes after that seen in upstream/master
That said things are fixed in Yakkety and later.
And the feature didn't exist in Trusty.
So only Xenial is affected.
The changes seem doable, and even if one used the old header on a backport it became the number which still is the same number. Also those headers are not meant for external use (no one links on that, and even if one would - again - it is the same number now).
Old value only used in the defines:
$ grep -Hrn 'TARGET_NR_timerfd\s'
linux-user/sparc/syscall_nr.h:281:#define TARGET_NR_timerfd 312
linux-user/unicore32/syscall_nr.h:361:#define TARGET_NR_timerfd 350
linux-user/ppc/syscall_nr.h:322:#define TARGET_NR_timerfd 306
linux-user/sparc64/syscall_nr.h:313:#define TARGET_NR_timerfd 312
linux-user/mips/syscall_nr.h:323:#define TARGET_NR_timerfd (TARGET_NR_Linux + 318)
linux-user/sh4/syscall_nr.h:326:#define TARGET_NR_timerfd 322
linux-user/m68k/syscall_nr.h:320:#define TARGET_NR_timerfd 318
linux-user/x86_64/syscall_nr.h:284:#define TARGET_NR_timerfd 283
linux-user/s390x/syscall_nr.h:246:#define TARGET_NR_timerfd 317
linux-user/i386/syscall_nr.h:327:#define TARGET_NR_timerfd 322
linux-user/mips64/syscall_nr.h:287:#define TARGET_NR_timerfd (TARGET_NR_Linux + 281)
linux-user/mips64/syscall_nr.h:601:#define TARGET_NR_timerfd (TARGET_NR_Linux + 277)
linux-user/alpha/syscall_nr.h:416:#define TARGET_NR_timerfd 477
That said, that LGTM - except I'd backport the official upstream fixes [3] and [4].
@Wes - would you mind outlining steps to reproduce as that is an integral part of any SRU [5]
I agree to the case, but not fully to the fix.
The old syscall definitions came in in 2007 via [1] "Update Linux kernel syscall list" (v0.10.0)
The feature adding the timerfd was added in 2014 with [2] "linux-user: support timerfd_{create, gettime, settime} syscalls" (v2.2.0) using the wrong definitions.
Later this was fixed 2015 for arm [3] "linux-user/arm: Correct TARGET_NR_timerfd to TARGET_ NR_timerfd_ create" (v2.4.0) and for the rest 2016 in [4] "linux-user: correct timerfd_create syscall numbers" (2.6.0).
No follow on fixes after that seen in upstream/master
That said things are fixed in Yakkety and later.
And the feature didn't exist in Trusty.
So only Xenial is affected.
The changes seem doable, and even if one used the old header on a backport it became the number which still is the same number. Also those headers are not meant for external use (no one links on that, and even if one would - again - it is the same number now).
Old value only used in the defines: NR_timerfd\ s' sparc/syscall_ nr.h:281: #define TARGET_NR_timerfd 312 unicore32/ syscall_ nr.h:361: #define TARGET_NR_timerfd 350 ppc/syscall_ nr.h:322: #define TARGET_NR_timerfd 306 sparc64/ syscall_ nr.h:313: #define TARGET_NR_timerfd 312 mips/syscall_ nr.h:323: #define TARGET_NR_timerfd (TARGET_NR_Linux + 318) sh4/syscall_ nr.h:326: #define TARGET_NR_timerfd 322 m68k/syscall_ nr.h:320: #define TARGET_NR_timerfd 318 x86_64/ syscall_ nr.h:284: #define TARGET_NR_timerfd 283 s390x/syscall_ nr.h:246: #define TARGET_NR_timerfd 317 i386/syscall_ nr.h:327: #define TARGET_NR_timerfd 322 mips64/ syscall_ nr.h:287: #define TARGET_NR_timerfd (TARGET_NR_Linux + 281) mips64/ syscall_ nr.h:601: #define TARGET_NR_timerfd (TARGET_NR_Linux + 277) alpha/syscall_ nr.h:416: #define TARGET_NR_timerfd 477
$ grep -Hrn 'TARGET_
linux-user/
linux-user/
linux-user/
linux-user/
linux-user/
linux-user/
linux-user/
linux-user/
linux-user/
linux-user/
linux-user/
linux-user/
linux-user/
That said, that LGTM - except I'd backport the official upstream fixes [3] and [4].
@Wes - would you mind outlining steps to reproduce as that is an integral part of any SRU [5]
[1]: https:/ /git.qemu. org/?p= qemu.git; a=commit; h=8dd77cca03ac6 325bda61dbdb8b8 a2021fe524c3 /git.qemu. org/?p= qemu.git; a=commit; h=518343413fd31 1a3d95798b2c1d5 1853fd8d3c85 /git.qemu. org/?p= qemu.git; a=commit; h=d82322e175d58 c0c8951cbc905da 1ca9ee2e008c /git.qemu. org/?p= qemu.git; a=commit; h=93a92d3bd649c d315db47b9fb5dc b6af657cc22c /wiki.ubuntu. com/StableRelea seUpdates# SRU_Bug_ Template
[2]: https:/
[3]: https:/
[4]: https:/
[5]: https:/