um: add support for TIF_NOTIFY_SIGNAL
PATCH 1/1 um: add support for TIF_NOTIFY_SIGNAL
Wire up TIF_NOTIFY_SIGNAL handling for um.
---
5.11 has support queued up for TIF_NOTIFY_SIGNAL, see this posting for details:
https://lore.kernel.org/io-uring/[email protected]/
As part of that work, I'm adding TIF_NOTIFY_SIGNAL support to all archs, as that will enable a set of cleanups once all of them support it. I'm happy carrying this patch if need be, or it can be funelled through the arch tree. Let me know.
arch/um/include/asm/thread_info.h | 2 ++ arch/um/kernel/process.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-)
arch/um/include/asm/thread_info.h +2 -0
@@ -57,6 +57,7 @@ static inline struct thread_info *current_thread_info(void)#define TIF_SYSCALL_TRACE 0/* syscall trace active */ #define TIF_SIGPENDING 1/* signal pending */ #define TIF_NEED_RESCHED 2/* rescheduling necessary */ +#define TIF_NOTIFY_SIGNAL 3/* signal notifications exist */ #define TIF_RESTART_BLOCK 4#define TIF_MEMDIE 5/* is terminating due to OOM killer */ #define TIF_SYSCALL_AUDIT 6
@@ -67,6 +68,7 @@ static inline struct thread_info *current_thread_info(void)#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) +#define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL)#define _TIF_MEMDIE (1 << TIF_MEMDIE)#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)#define _TIF_SECCOMP (1 << TIF_SECCOMP)
arch/um/kernel/process.c +2 -1
@@ -99,7 +99,8 @@ void interrupt_end(void)if (need_resched ())schedule (); -if (test_thread_flag (TIF_SIGPENDING )) +if (test_thread_flag (TIF_SIGPENDING ) || +test_thread_flag (TIF_NOTIFY_SIGNAL ))do_signal (regs);if (test_thread_flag (TIF_NOTIFY_RESUME ))tracehook_notify_resume (regs);
Signature · 10 lines
2.29.0 -- Jens Axboe _______________________________________________ linux-um mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-um
Gentle nudge on this one.
Quoted 55 lines · Jens Axboe
Wire up
TIF_NOTIFY_SIGNALhandling for um.Signed-off-by Jens Axboe <[email protected]>---
5.11 has support queued up for
TIF_NOTIFY_SIGNAL, see this posting for details:https://lore.kernel.org/io-uring/[email protected]/
As part of that work, I'm adding
TIF_NOTIFY_SIGNALsupport to all archs, as that will enable a set of cleanups once all of them support it. I'm happy carrying this patch if need be, or it can be funelled through the arch tree. Let me know.arch/um/include/asm/thread_info.h | 2 ++ arch/um/kernel/process.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-)arch/um/include/asm/thread_info.h +2
-0@@ -57,6 +57,7 @@ static inline struct thread_info *current_thread_info(void)#define TIF_SYSCALL_TRACE 0/* syscall trace active */ #define TIF_SIGPENDING 1/* signal pending */ #define TIF_NEED_RESCHED 2/* rescheduling necessary */ +#define TIF_NOTIFY_SIGNAL 3/* signal notifications exist */ #define TIF_RESTART_BLOCK 4#define TIF_MEMDIE 5/* is terminating due to OOM killer */ #define TIF_SYSCALL_AUDIT 6@@ -67,6 +68,7 @@ static inline struct thread_info *current_thread_info(void)#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) +#define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL)#define _TIF_MEMDIE (1 << TIF_MEMDIE)#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)#define _TIF_SECCOMP (1 << TIF_SECCOMP)arch/um/kernel/process.c +2
-1@@ -99,7 +99,8 @@ void interrupt_end(void)if (need_resched ())schedule (); -if (test_thread_flag (TIF_SIGPENDING )) +if (test_thread_flag (TIF_SIGPENDING ) || +test_thread_flag (TIF_NOTIFY_SIGNAL ))do_signal (regs);if (test_thread_flag (TIF_NOTIFY_RESUME ))tracehook_notify_resume (regs);
Signature · 7 lines
Jens Axboe _______________________________________________ linux-um mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-um
Quoted 46 lines · Jens Axboe
Wire up
TIF_NOTIFY_SIGNALhandling for um.Signed-off-by Jens Axboe <[email protected]>---
5.11 has support queued up for
TIF_NOTIFY_SIGNAL, see this posting for details:https://lore.kernel.org/io-uring/[email protected]/
As part of that work, I'm adding
TIF_NOTIFY_SIGNALsupport to all archs, as that will enable a set of cleanups once all of them support it. I'm happy carrying this patch if need be, or it can be funelled through the arch tree. Let me know.arch/um/include/asm/thread_info.h | 2 ++ arch/um/kernel/process.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-)arch/um/include/asm/thread_info.h +2
-0@@ -57,6 +57,7 @@ static inline struct thread_info *current_thread_info(void)#define TIF_SYSCALL_TRACE 0/* syscall trace active */ #define TIF_SIGPENDING 1/* signal pending */ #define TIF_NEED_RESCHED 2/* rescheduling necessary */ +#define TIF_NOTIFY_SIGNAL 3/* signal notifications exist */ #define TIF_RESTART_BLOCK 4#define TIF_MEMDIE 5/* is terminating due to OOM killer */ #define TIF_SYSCALL_AUDIT 6@@ -67,6 +68,7 @@ static inline struct thread_info *current_thread_info(void)#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) +#define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL)#define _TIF_MEMDIE (1 << TIF_MEMDIE)#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)#define _TIF_SECCOMP (1 << TIF_SECCOMP)arch/um/kernel/process.c +0
-0
arch/um/kernel/process.c void interrupt_end(void) · line 106
Quoted 9 lines
arch/um/kernel/process.c +2
-1@@ -99,7 +99,8 @@ void interrupt_end(void)if (need_resched ())schedule (); -if (test_thread_flag (TIF_SIGPENDING )) +if (test_thread_flag (TIF_SIGPENDING ) || +test_thread_flag (TIF_NOTIFY_SIGNAL ))do_signal (regs);if (test_thread_flag (TIF_NOTIFY_RESUME ))tracehook_notify_resume (regs);
Signature · 8 lines
Anton R. Ivanov Cambridgegreys Limited. Registered in England. Company Number 10273661 https://www.cambridgegreys.com/ _______________________________________________ linux-um mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-um
Quoted 49 lines · Anton Ivanov
Quoted 46 lines · Jens Axboe
Wire up
TIF_NOTIFY_SIGNALhandling for um.Signed-off-by Jens Axboe <[email protected]>---
5.11 has support queued up for
TIF_NOTIFY_SIGNAL, see this posting for details:https://lore.kernel.org/io-uring/[email protected]/
As part of that work, I'm adding
TIF_NOTIFY_SIGNALsupport to all archs, as that will enable a set of cleanups once all of them support it. I'm happy carrying this patch if need be, or it can be funelled through the arch tree. Let me know.arch/um/include/asm/thread_info.h | 2 ++ arch/um/kernel/process.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-)arch/um/include/asm/thread_info.h +2
-0@@ -57,6 +57,7 @@ static inline struct thread_info *current_thread_info(void)#define TIF_SYSCALL_TRACE 0/* syscall trace active */ #define TIF_SIGPENDING 1/* signal pending */ #define TIF_NEED_RESCHED 2/* rescheduling necessary */ +#define TIF_NOTIFY_SIGNAL 3/* signal notifications exist */ #define TIF_RESTART_BLOCK 4#define TIF_MEMDIE 5/* is terminating due to OOM killer */ #define TIF_SYSCALL_AUDIT 6@@ -67,6 +68,7 @@ static inline struct thread_info *current_thread_info(void)#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) +#define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL)#define _TIF_MEMDIE (1 << TIF_MEMDIE)#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)#define _TIF_SECCOMP (1 << TIF_SECCOMP)arch/um/kernel/process.c +0
-0@@ -99,7 +99,8 @@ void interrupt_end(void)
Quoted 11 lines
arch/um/kernel/process.c void interrupt_end(void) · line 106
Quoted 9 lines
arch/um/kernel/process.c +2
-1if (need_resched ())schedule (); -if (test_thread_flag (TIF_SIGPENDING )) +if (test_thread_flag (TIF_SIGPENDING ) || +test_thread_flag (TIF_NOTIFY_SIGNAL ))do_signal (regs);if (test_thread_flag (TIF_NOTIFY_RESUME ))tracehook_notify_resume (regs);Acked-by Anton Ivanov <[email protected]>
Thanks, added.
Signature · 7 lines
Jens Axboe _______________________________________________ linux-um mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-um