From: Willem de Bruijn <willemb@xxxxxxxxxx> Use in_compat_syscall() to differentiate compat handling exactly where needed, including in nested function calls. Then remove duplicated code in callers. Changes RFC[1]->v1 - remove kselftest dependency on variant support in teardown (patch is out for review, not available in linux-next/akpm yet) - add patch 5: deduplicate set_user_sigmask compat handling - add patch 6: deduplicate io_pgetevents sigmask compat handling [1] RFC: https://github.com/wdebruij/linux-next-mirror/tree/select-compat-1 Willem de Bruijn (6): selftests/filesystems: add initial select and poll selftest select: deduplicate compat logic ppoll: deduplicate compat logic epoll: deduplicate compat logic compat: add set_maybe_compat_user_sigmask helper io_pgetevents: deduplicate compat logic fs/aio.c | 94 ++--- fs/eventpoll.c | 35 +- fs/io_uring.c | 9 +- fs/select.c | 339 +++++------------- include/linux/compat.h | 10 + .../testing/selftests/filesystems/.gitignore | 1 + tools/testing/selftests/filesystems/Makefile | 2 +- .../selftests/filesystems/selectpoll.c | 207 +++++++++++ 8 files changed, 344 insertions(+), 353 deletions(-) create mode 100644 tools/testing/selftests/filesystems/selectpoll.c -- 2.30.0.284.gd98b1dd5eaa7-goog