Hi,
These patches update syscalls rt_sigqueueinfo, rt_tgsigqueueinfo, pidfd_send_signal and rt_sigtimedwait for PCuABI. kselftests are added for each of the modified syscall.
This patch series is based on tree [1] and the complete series can be found here [2].
Thanks, Amit Daniel
[1]: https://git.morello-project.org/morello/kernel/linux.git morello/next [2]: https://git.morello-project.org/amitdaniel/linux.git review/sigqueueinfo-v1
Amit Daniel Kachhap (6): kernel: signal: Update rt_{*}sigqueueinfo() syscalls for PCuABI kernel: signal: Update pidfd_send_signal() syscall for PCuABI kernel: signal: Update rt_sigtimedwait() syscall for PCuABI kselftests/arm64/morello: Add tests for [*]sigqueueinfo syscalls kselftests/arm64/morello: Add tests for pidfd_send_signal syscall kselftests/arm64/morello: Add test for rt_sigtimedwait syscall
kernel/signal.c | 29 ++- tools/testing/selftests/arm64/morello/clone.c | 2 +- .../selftests/arm64/morello/freestanding.h | 19 ++ .../selftests/arm64/morello/read_write.c | 2 +- .../testing/selftests/arm64/morello/signal.c | 170 ++++++++++++++++++ .../selftests/arm64/morello/signal_common.c | 26 +++ .../selftests/arm64/morello/signal_common.h | 6 + 7 files changed, 244 insertions(+), 10 deletions(-)
rt_sigqueueinfo and rt_tgsigqueueinfo syscalls are used to signal and pass siginfo_t type data to a process. PCuABI specification requires that the data should be transmitted along with the capability pointer tags in case of signal delivered to the same process. In case of different process no tag details should be copied and any tag present in siginfo_t should be treated as an -EINVAL type error.
Modify function __copy_siginfo_from_user() to have a bool current_pid argument which is obtained by comparing received pid with the virtual pid of the current process. However the siginfo_t tag validation checks for non current process is marked as a TODO for now.
Signed-off-by: Amit Daniel Kachhap amit.kachhap@arm.com --- kernel/signal.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/kernel/signal.c b/kernel/signal.c index e9d6a399a47e..355195b665b6 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -3377,9 +3377,16 @@ static int post_copy_siginfo_from_user(kernel_siginfo_t *info, }
static int __copy_siginfo_from_user(int signo, kernel_siginfo_t *to, - const siginfo_t __user *from) + const siginfo_t __user *from, + bool current_pid) { - if (copy_from_user(to, from, sizeof(struct kernel_siginfo))) + /* + * TODO [PCuABI]: In case target pid differs from the current pid, this + * code silently ignores the tag copy. Revisit this later to treat this + * as an error(-EINVAL) for PCuABI. + */ + if (current_pid ? copy_from_user_with_ptr(to, from, sizeof(struct kernel_siginfo)) + : copy_from_user(to, from, sizeof(struct kernel_siginfo))) return -EFAULT; to->si_signo = signo; return post_copy_siginfo_from_user(to, from); @@ -4025,7 +4032,7 @@ SYSCALL_DEFINE3(rt_sigqueueinfo, pid_t, pid, int, sig, siginfo_t __user *, uinfo) { kernel_siginfo_t info; - int ret = __copy_siginfo_from_user(sig, &info, uinfo); + int ret = __copy_siginfo_from_user(sig, &info, uinfo, (pid == task_pid_vnr(current))); if (unlikely(ret)) return ret; return do_rt_sigqueueinfo(pid, sig, &info); @@ -4065,7 +4072,7 @@ SYSCALL_DEFINE4(rt_tgsigqueueinfo, pid_t, tgid, pid_t, pid, int, sig, siginfo_t __user *, uinfo) { kernel_siginfo_t info; - int ret = __copy_siginfo_from_user(sig, &info, uinfo); + int ret = __copy_siginfo_from_user(sig, &info, uinfo, (pid == task_pid_vnr(current))); if (unlikely(ret)) return ret; return do_rt_tgsigqueueinfo(tgid, pid, sig, &info);
pidfd_send_signal syscall is used to signal and pass siginfo_t type data to a process identified by a pidfd. PCuABI specification requires that the data should be transmitted along with the capability pointer tags in case of signal delivered to the same process. In case of different process no tag details should be copied and any tag present in siginfo_t should be treated as an -EINVAL type error.
Modify function copy_siginfo_from_user_any() to have a bool argument and is obtained by comparing received pidfd with the current process. However the siginfo_t tag validation checks for non current process is marked as a TODO for now.
Signed-off-by: Amit Daniel Kachhap amit.kachhap@arm.com --- kernel/signal.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/kernel/signal.c b/kernel/signal.c index 355195b665b6..3efb33031d36 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -3834,7 +3834,7 @@ static bool access_pidfd_pidns(struct pid *pid) }
static int copy_siginfo_from_user_any(kernel_siginfo_t *kinfo, - siginfo_t __user *info) + siginfo_t __user *info, bool current_pid) { #ifdef CONFIG_COMPAT /* @@ -3846,7 +3846,13 @@ static int copy_siginfo_from_user_any(kernel_siginfo_t *kinfo, return copy_siginfo_from_user32( kinfo, (struct compat_siginfo __user *)info); #endif - return copy_siginfo_from_user(kinfo, info); + /* + * TODO [PCuABI]: In case target pid differs from the current pid, this + * code silently ignores the tag copy. Revisit this later to treat this + * as an error(-EINVAL) for PCuABI. + */ + return (current_pid ? copy_siginfo_from_user_with_ptr(kinfo, info) + : copy_siginfo_from_user(kinfo, info)); }
static struct pid *pidfd_to_pid(const struct file *file) @@ -3906,7 +3912,7 @@ SYSCALL_DEFINE4(pidfd_send_signal, int, pidfd, int, sig, goto err;
if (info) { - ret = copy_siginfo_from_user_any(&kinfo, info); + ret = copy_siginfo_from_user_any(&kinfo, info, (task_pid(current) == pid)); if (unlikely(ret)) goto err;
The siginfo structure contains user pointers with tags and the complete details need to be delivered to the user of rt_sigtimedwait() syscall.
Make use of copy_siginfo_to_user_with_ptr() interface while copying siginfo_t to user memory.
Signed-off-by: Amit Daniel Kachhap amit.kachhap@arm.com --- kernel/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/signal.c b/kernel/signal.c index 3efb33031d36..7139f9cf0151 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -3684,7 +3684,7 @@ SYSCALL_DEFINE4(rt_sigtimedwait, const sigset_t __user *, uthese, ret = do_sigtimedwait(&these, &info, uts ? &ts : NULL);
if (ret > 0 && uinfo) { - if (copy_siginfo_to_user(uinfo, &info)) + if (copy_siginfo_to_user_with_ptr(uinfo, &info)) ret = -EFAULT; }
PCuABI requires that the siginfo_t data delivered to the signal by syscalls rt_sigqueueinfo and rt_tgsigqueueinfo should pass the capability pointer tags in case of signal delivered to the same process. In case of different process, no tag details are propagated.
Appropriate tests are added to verify the above behavior.
Signed-off-by: Amit Daniel Kachhap amit.kachhap@arm.com --- tools/testing/selftests/arm64/morello/clone.c | 2 +- .../selftests/arm64/morello/freestanding.h | 19 ++++ .../selftests/arm64/morello/read_write.c | 2 +- .../testing/selftests/arm64/morello/signal.c | 107 ++++++++++++++++++ .../selftests/arm64/morello/signal_common.c | 10 ++ .../selftests/arm64/morello/signal_common.h | 2 + 6 files changed, 140 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/arm64/morello/clone.c b/tools/testing/selftests/arm64/morello/clone.c index 03ce8f34ff0e..8217840ba504 100644 --- a/tools/testing/selftests/arm64/morello/clone.c +++ b/tools/testing/selftests/arm64/morello/clone.c @@ -178,7 +178,7 @@ void wait_single(struct test_fixture *data) __TH_LOG_ERROR("wait_test: Failed to clone"); }
- result = syscall(__NR_waitid, P_PID, cpid, wait_si, WEXITED, wait_ru); + result = waitid(P_PID, cpid, wait_si, WEXITED, wait_ru);
ASSERT_EQ(result, 0) { __TH_LOG_ERROR("wait_test: Failed on wait"); diff --git a/tools/testing/selftests/arm64/morello/freestanding.h b/tools/testing/selftests/arm64/morello/freestanding.h index 2d1b701bd1d4..f8a0fdcbdec3 100644 --- a/tools/testing/selftests/arm64/morello/freestanding.h +++ b/tools/testing/selftests/arm64/morello/freestanding.h @@ -9,6 +9,8 @@ #include <stddef.h> #include <asm/unistd.h> #include <linux/posix_types.h> +#include <linux/resource.h> +#include <linux/signal.h> #include <cheriintrin.h>
/* this is provided by libc, so roll our own */ @@ -17,6 +19,8 @@ typedef __kernel_pid_t pid_t; typedef __kernel_mqd_t mqd_t; typedef __kernel_timer_t timer_t; typedef __kernel_clockid_t clockid_t; +typedef __kernel_uid_t uid_t; +typedef __kernel_mode_t mode_t;
struct __test_meta { int message; @@ -185,4 +189,19 @@ static inline int close(int fd) return syscall(__NR_close, fd); }
+static inline pid_t getpid(void) +{ + return syscall(__NR_getpid); +} + +static inline uid_t getuid(void) +{ + return syscall(__NR_getuid); +} + +static inline int waitid(int id_type, pid_t id, siginfo_t *info, int options, struct rusage *ru) +{ + return syscall(__NR_waitid, id_type, id, info, options, ru); +} + #endif diff --git a/tools/testing/selftests/arm64/morello/read_write.c b/tools/testing/selftests/arm64/morello/read_write.c index 3cb53e683a2e..a68b5efeb5ab 100644 --- a/tools/testing/selftests/arm64/morello/read_write.c +++ b/tools/testing/selftests/arm64/morello/read_write.c @@ -42,7 +42,7 @@ static int fd;
TEST(test_getpid) { - syscall(__NR_getpid, 0); + getpid(); }
TEST(test_write) diff --git a/tools/testing/selftests/arm64/morello/signal.c b/tools/testing/selftests/arm64/morello/signal.c index 7629b0877cb2..67e277cecc52 100644 --- a/tools/testing/selftests/arm64/morello/signal.c +++ b/tools/testing/selftests/arm64/morello/signal.c @@ -5,8 +5,10 @@
#include <stdbool.h>
+#include <linux/mman.h> #include <linux/signal.h> #include <linux/time.h> +#include <linux/wait.h> #include <asm/fcntl.h> #include <asm/sigcontext.h> #include <asm/siginfo.h> @@ -172,6 +174,49 @@ static void test_timer_create_signal(void) ASSERT_EQ(timer_delete(timerid), 0); }
+static void setup_siginfo_same_process(siginfo_t *siginfo) +{ + signal_status = false; + siginfo_params.ptr = &siginfo_params; + ASSERT_EQ(1, cheri_tag_get(siginfo_params.ptr)) { + __TH_LOG_ERROR("Check if application compiled in purecap"); + } + siginfo_params.cap = true; + siginfo_params.si_code = SI_QUEUE; + siginfo->si_signo = SIGUSR1; + siginfo->si_code = SI_QUEUE; + siginfo->si_pid = getpid(); + siginfo->si_uid = getuid(); + siginfo->si_ptr = siginfo_params.ptr; +} + +static int sigqueueinfo_child(__attribute__((__unused__)) void *data) +{ + struct sigaction sa; + + setup_sigusr1_handler(&sa, SIG_UNBLOCK); + /* wait for some time till the sigusr1 handler is called */ + wait(DELAY * 1000); + ASSERT_TRUE(signal_status); + return 0; +} + +static pid_t setup_siginfo_diff_process(siginfo_t *siginfo) +{ + pid_t cpid; + + setup_siginfo_same_process(siginfo); + siginfo_params.cap = false; + siginfo_params.ptr = cheri_tag_clear(siginfo_params.ptr); + siginfo->si_ptr = siginfo_params.ptr; + + cpid = __clone(sigqueueinfo_child, 0, SIGCHLD, NULL, NULL, NULL, NULL); + ASSERT_GT(cpid, 0) { + __TH_LOG_ERROR("Failed to clone"); + } + return cpid; +} + TEST(test_signal_basic) { struct sigaction sa; @@ -225,10 +270,72 @@ TEST(test_timer_create) ASSERT_TRUE(signal_status); }
+TEST(test_rt_sigqueueinfo) +{ + siginfo_t si, wait_si; + pid_t cpid; + struct sigaction sa; + int ret; + + setup_sigusr1_handler(&sa, SIG_UNBLOCK); + + TH_LOG("test_rt_sigqueueinfo: Signal to the same process"); + setup_siginfo_same_process(&si); + ret = rt_sigqueueinfo(si.si_pid, SIGUSR1, &si); + ASSERT_EQ(ret, 0) { + __TH_LOG_ERROR("rt_sigqueueinfo syscall failed"); + } + wait(DELAY * 1000); + ASSERT_TRUE(signal_status); + + TH_LOG("test_rt_sigqueueinfo: Signal to a different process"); + cpid = setup_siginfo_diff_process(&si); + ret = rt_sigqueueinfo(cpid, SIGUSR1, &si); + ASSERT_EQ(ret, 0) { + __TH_LOG_ERROR("rt_sigqueueinfo syscall failed"); + } + ret = waitid(P_PID, cpid, &wait_si, WEXITED, NULL); + ASSERT_EQ(ret, 0) { + __TH_LOG_ERROR("test_rt_sigqueueinfo: Failed on wait"); + } +} + +TEST(test_rt_tgsigqueueinfo) +{ + siginfo_t si, wait_si; + pid_t cpid; + struct sigaction sa; + int ret; + + setup_sigusr1_handler(&sa, SIG_UNBLOCK); + + TH_LOG("test_rt_tgsigqueueinfo: Signal to the same process"); + setup_siginfo_same_process(&si); + ret = rt_tgsigqueueinfo(si.si_pid, si.si_pid, SIGUSR1, &si); + ASSERT_EQ(ret, 0) { + __TH_LOG_ERROR("rt_tgsigqueueinfo syscall failed"); + } + wait(DELAY * 1000); + ASSERT_TRUE(signal_status); + + TH_LOG("test_rt_tgsigqueueinfo: Signal to a different process"); + cpid = setup_siginfo_diff_process(&si); + ret = rt_tgsigqueueinfo(cpid, cpid, SIGUSR1, &si); + ASSERT_EQ(ret, 0) { + __TH_LOG_ERROR("rt_tgsigqueueinfo syscall failed"); + } + ret = waitid(P_PID, cpid, &wait_si, WEXITED, NULL); + ASSERT_EQ(ret, 0) { + __TH_LOG_ERROR("test_rt_tgsigqueueinfo: Failed on wait"); + } +} + int main(void) { test_signal_basic(); test_mq_notify(); test_timer_create(); + test_rt_sigqueueinfo(); + test_rt_tgsigqueueinfo(); return 0; } diff --git a/tools/testing/selftests/arm64/morello/signal_common.c b/tools/testing/selftests/arm64/morello/signal_common.c index 1bfbee442f29..59bb7cca1b40 100644 --- a/tools/testing/selftests/arm64/morello/signal_common.c +++ b/tools/testing/selftests/arm64/morello/signal_common.c @@ -87,3 +87,13 @@ int timer_settime(timer_t timerid, int flags, const struct itimerspec *new_value { return syscall(__NR_timer_settime, timerid, flags, new_value, old_value); } + +int rt_sigqueueinfo(pid_t tgid, int sig, siginfo_t *uinfo) +{ + return syscall(__NR_rt_sigqueueinfo, tgid, sig, uinfo); +} + +int rt_tgsigqueueinfo(pid_t tgid, pid_t tid, int sig, siginfo_t *uinfo) +{ + return syscall(__NR_rt_tgsigqueueinfo, tgid, tid, sig, uinfo); +} diff --git a/tools/testing/selftests/arm64/morello/signal_common.h b/tools/testing/selftests/arm64/morello/signal_common.h index 1fdd95a95d69..cf08a3995792 100644 --- a/tools/testing/selftests/arm64/morello/signal_common.h +++ b/tools/testing/selftests/arm64/morello/signal_common.h @@ -31,5 +31,7 @@ int timer_create(clockid_t clockid, struct sigevent *sevp, timer_t *timerid); int timer_delete(timer_t timerid); int timer_settime(timer_t timerid, int flags, const struct itimerspec *new_value, struct itimerspec *old_value); +int rt_sigqueueinfo(pid_t tgid, int sig, siginfo_t *uinfo); +int rt_tgsigqueueinfo(pid_t tgid, pid_t tid, int sig, siginfo_t *uinfo);
#endif /* ! SIGNAL_COMMON_H */
PCuABI requires that the siginfo_t data delivered to the signal by syscall pidfd_send_signal should pass the capability pointer tags in case of signal delivered to the same process. In case of different process, no tag details are copied.
Appropriate tests are added to verify the above behavior.
Signed-off-by: Amit Daniel Kachhap amit.kachhap@arm.com --- .../testing/selftests/arm64/morello/signal.c | 42 +++++++++++++++++++ .../selftests/arm64/morello/signal_common.c | 10 +++++ .../selftests/arm64/morello/signal_common.h | 2 + 3 files changed, 54 insertions(+)
diff --git a/tools/testing/selftests/arm64/morello/signal.c b/tools/testing/selftests/arm64/morello/signal.c index 67e277cecc52..5c5bddf251ad 100644 --- a/tools/testing/selftests/arm64/morello/signal.c +++ b/tools/testing/selftests/arm64/morello/signal.c @@ -330,6 +330,47 @@ TEST(test_rt_tgsigqueueinfo) } }
+TEST(test_pidfd_send_signal) +{ + siginfo_t si, wait_si; + pid_t cpid; + int pidfd, ret; + struct sigaction sa; + + setup_sigusr1_handler(&sa, SIG_UNBLOCK); + + TH_LOG("test_pidfd_send_signal: Signal to the same process"); + setup_siginfo_same_process(&si); + pidfd = pidfd_open(si.si_pid, 0); + ASSERT_GE(pidfd, 0) { + __TH_LOG_ERROR("Failed to open process file descriptor"); + } + ret = pidfd_send_signal(pidfd, SIGUSR1, &si, 0); + ASSERT_EQ(ret, 0) { + __TH_LOG_ERROR("pidfd_send_signal syscall failed"); + } + wait(DELAY * 1000); + ASSERT_TRUE(signal_status); + close(pidfd); + + TH_LOG("test_pidfd_send_signal: Signal to a different process"); + cpid = setup_siginfo_diff_process(&si); + + pidfd = pidfd_open(cpid, 0); + ASSERT_GE(pidfd, 0) { + __TH_LOG_ERROR("Failed to open process file descriptor"); + } + ret = pidfd_send_signal(pidfd, SIGUSR1, &si, 0); + ASSERT_EQ(ret, 0) { + __TH_LOG_ERROR("pidfd_send_signal syscall failed"); + } + ret = waitid(P_PID, cpid, &wait_si, WEXITED, NULL); + ASSERT_EQ(ret, 0) { + __TH_LOG_ERROR("test_pidfd_send_signal: Failed on wait"); + } + close(pidfd); +} + int main(void) { test_signal_basic(); @@ -337,5 +378,6 @@ int main(void) test_timer_create(); test_rt_sigqueueinfo(); test_rt_tgsigqueueinfo(); + test_pidfd_send_signal(); return 0; } diff --git a/tools/testing/selftests/arm64/morello/signal_common.c b/tools/testing/selftests/arm64/morello/signal_common.c index 59bb7cca1b40..260f3ebe2b5e 100644 --- a/tools/testing/selftests/arm64/morello/signal_common.c +++ b/tools/testing/selftests/arm64/morello/signal_common.c @@ -97,3 +97,13 @@ int rt_tgsigqueueinfo(pid_t tgid, pid_t tid, int sig, siginfo_t *uinfo) { return syscall(__NR_rt_tgsigqueueinfo, tgid, tid, sig, uinfo); } + +int pidfd_open(pid_t pid, int flags) +{ + return syscall(__NR_pidfd_open, pid, flags); +} + +int pidfd_send_signal(int pidfd, int sig, siginfo_t *uinfo, unsigned int flags) +{ + return syscall(__NR_pidfd_send_signal, pidfd, sig, uinfo, flags); +} diff --git a/tools/testing/selftests/arm64/morello/signal_common.h b/tools/testing/selftests/arm64/morello/signal_common.h index cf08a3995792..2275ae1cab18 100644 --- a/tools/testing/selftests/arm64/morello/signal_common.h +++ b/tools/testing/selftests/arm64/morello/signal_common.h @@ -33,5 +33,7 @@ int timer_settime(timer_t timerid, int flags, const struct itimerspec *new_value struct itimerspec *old_value); int rt_sigqueueinfo(pid_t tgid, int sig, siginfo_t *uinfo); int rt_tgsigqueueinfo(pid_t tgid, pid_t tid, int sig, siginfo_t *uinfo); +int pidfd_open(pid_t pid, int flags); +int pidfd_send_signal(int pidfd, int sig, siginfo_t *uinfo, unsigned int flags);
#endif /* ! SIGNAL_COMMON_H */
PCuABI requires that the siginfo_t data delivered to the signal by syscalls such as rt_sigqueueinfo/pidfd_send_signal should pass the capability pointer tags in case of signal delivered to the same process. Hence rt_sigtimedwait() syscall should be able to get siginfo_t with all tag details.
Appropriate test is added to verify the above behavior.
Signed-off-by: Amit Daniel Kachhap amit.kachhap@arm.com --- .../testing/selftests/arm64/morello/signal.c | 21 +++++++++++++++++++ .../selftests/arm64/morello/signal_common.c | 6 ++++++ .../selftests/arm64/morello/signal_common.h | 2 ++ 3 files changed, 29 insertions(+)
diff --git a/tools/testing/selftests/arm64/morello/signal.c b/tools/testing/selftests/arm64/morello/signal.c index 5c5bddf251ad..50b1d623bacb 100644 --- a/tools/testing/selftests/arm64/morello/signal.c +++ b/tools/testing/selftests/arm64/morello/signal.c @@ -371,6 +371,26 @@ TEST(test_pidfd_send_signal) close(pidfd); }
+TEST(test_rt_sigtimedwait) +{ + siginfo_t si, wait_si = (siginfo_t){0}; + struct sigaction sa; + int ret; + + setup_sigusr1_handler(&sa, SIG_SETMASK); + + TH_LOG("test_rt_sigtimedwait: Signal to the same process"); + setup_siginfo_same_process(&si); + ret = rt_sigqueueinfo(si.si_pid, SIGUSR1, &si); + ASSERT_EQ(ret, 0) { + __TH_LOG_ERROR("rt_sigqueueinfo syscall failed"); + } + ret = rt_sigtimedwait(&sa.sa_mask, &wait_si, NULL, sizeof(sa.sa_mask)); + ASSERT_EQ(ret, SIGUSR1); + ASSERT_TRUE(cheri_is_equal_exact(wait_si.si_value.sival_ptr, + siginfo_params.ptr)); +} + int main(void) { test_signal_basic(); @@ -379,5 +399,6 @@ int main(void) test_rt_sigqueueinfo(); test_rt_tgsigqueueinfo(); test_pidfd_send_signal(); + test_rt_sigtimedwait(); return 0; } diff --git a/tools/testing/selftests/arm64/morello/signal_common.c b/tools/testing/selftests/arm64/morello/signal_common.c index 260f3ebe2b5e..8178e1eb6a8a 100644 --- a/tools/testing/selftests/arm64/morello/signal_common.c +++ b/tools/testing/selftests/arm64/morello/signal_common.c @@ -107,3 +107,9 @@ int pidfd_send_signal(int pidfd, int sig, siginfo_t *uinfo, unsigned int flags) { return syscall(__NR_pidfd_send_signal, pidfd, sig, uinfo, flags); } + +int rt_sigtimedwait(const sigset_t *set, siginfo_t *info, + const struct timespec *timeout, size_t sigsetsize) +{ + return syscall(__NR_rt_sigtimedwait, set, info, timeout, sigsetsize); +} diff --git a/tools/testing/selftests/arm64/morello/signal_common.h b/tools/testing/selftests/arm64/morello/signal_common.h index 2275ae1cab18..6ddc9acf95eb 100644 --- a/tools/testing/selftests/arm64/morello/signal_common.h +++ b/tools/testing/selftests/arm64/morello/signal_common.h @@ -35,5 +35,7 @@ int rt_sigqueueinfo(pid_t tgid, int sig, siginfo_t *uinfo); int rt_tgsigqueueinfo(pid_t tgid, pid_t tid, int sig, siginfo_t *uinfo); int pidfd_open(pid_t pid, int flags); int pidfd_send_signal(int pidfd, int sig, siginfo_t *uinfo, unsigned int flags); +int rt_sigtimedwait(const sigset_t *set, siginfo_t *info, + const struct timespec *timeout, size_t sigsetsize);
#endif /* ! SIGNAL_COMMON_H */
On 05/08/2022 15:31, Amit Daniel Kachhap wrote:
Hi,
These patches update syscalls rt_sigqueueinfo, rt_tgsigqueueinfo, pidfd_send_signal and rt_sigtimedwait for PCuABI. kselftests are added for each of the modified syscall.
This patch series is based on tree [1] and the complete series can be found here [2].
Thanks, Amit Daniel
[1]: https://git.morello-project.org/morello/kernel/linux.git morello/next [2]: https://git.morello-project.org/amitdaniel/linux.git review/sigqueueinfo-v1
Amit Daniel Kachhap (6): kernel: signal: Update rt_{*}sigqueueinfo() syscalls for PCuABI kernel: signal: Update pidfd_send_signal() syscall for PCuABI kernel: signal: Update rt_sigtimedwait() syscall for PCuABI kselftests/arm64/morello: Add tests for [*]sigqueueinfo syscalls kselftests/arm64/morello: Add tests for pidfd_send_signal syscall kselftests/arm64/morello: Add test for rt_sigtimedwait syscall
Happy with this series, will merge soon if there is no further comment.
Kevin
kernel/signal.c | 29 ++- tools/testing/selftests/arm64/morello/clone.c | 2 +- .../selftests/arm64/morello/freestanding.h | 19 ++ .../selftests/arm64/morello/read_write.c | 2 +- .../testing/selftests/arm64/morello/signal.c | 170 ++++++++++++++++++ .../selftests/arm64/morello/signal_common.c | 26 +++ .../selftests/arm64/morello/signal_common.h | 6 + 7 files changed, 244 insertions(+), 10 deletions(-)
On 10/08/2022 10:50, Kevin Brodsky wrote:
On 05/08/2022 15:31, Amit Daniel Kachhap wrote:
Hi,
These patches update syscalls rt_sigqueueinfo, rt_tgsigqueueinfo, pidfd_send_signal and rt_sigtimedwait for PCuABI. kselftests are added for each of the modified syscall.
This patch series is based on tree [1] and the complete series can be found here [2].
Thanks, Amit Daniel
morello/next [2]: https://git.morello-project.org/amitdaniel/linux.git review/sigqueueinfo-v1
Amit Daniel Kachhap (6): kernel: signal: Update rt_{*}sigqueueinfo() syscalls for PCuABI kernel: signal: Update pidfd_send_signal() syscall for PCuABI kernel: signal: Update rt_sigtimedwait() syscall for PCuABI kselftests/arm64/morello: Add tests for [*]sigqueueinfo syscalls kselftests/arm64/morello: Add tests for pidfd_send_signal syscall kselftests/arm64/morello: Add test for rt_sigtimedwait syscall
Happy with this series, will merge soon if there is no further comment.
Now in next, thanks!
Kevin
Kevin
kernel/signal.c | 29 ++- tools/testing/selftests/arm64/morello/clone.c | 2 +- .../selftests/arm64/morello/freestanding.h | 19 ++ .../selftests/arm64/morello/read_write.c | 2 +- .../testing/selftests/arm64/morello/signal.c | 170 ++++++++++++++++++ .../selftests/arm64/morello/signal_common.c | 26 +++ .../selftests/arm64/morello/signal_common.h | 6 + 7 files changed, 244 insertions(+), 10 deletions(-)
linux-morello mailing list -- linux-morello@op-lists.linaro.org To unsubscribe send an email to linux-morello-leave@op-lists.linaro.org
linux-morello@op-lists.linaro.org