Skip to contentSkip to conversation

arm64: add support for TIF_NOTIFY_SIGNAL

PATCH In review Jens Axboe 3 participants 10 messages Oct 29, 2020 – Nov 6, 2020 arm64

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

PATCH 1/1 arm64: add support for TIF_NOTIFY_SIGNAL

---

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/arm64/include/asm/thread_info.h | 5 ++++-
 arch/arm64/kernel/signal.c           | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)
arch/arm64/include/asm/thread_info.h +4 -1
index 1fbab854a51b..cdcf307764aa 100644
@@ -68,6 +68,7 @@ void arch_release_task_struct(struct task_struct *tsk);
 #define TIF_UPROBE		4	/* uprobe breakpoint or singlestep */
 #define TIF_FSCHECK		5	/* Check FS is USER_DS on return */
 #define TIF_MTE_ASYNC_FAULT	6	/* MTE Asynchronous Tag Check Fault */
+#define TIF_NOTIFY_SIGNAL	7	/* signal notifications exist */
 #define TIF_SYSCALL_TRACE	8	/* syscall trace active */
 #define TIF_SYSCALL_AUDIT	9	/* syscall auditing */
 #define TIF_SYSCALL_TRACEPOINT	10	/* syscall tracepoint for ftrace */
@@ -98,10 +99,12 @@ void arch_release_task_struct(struct task_struct *tsk);
 #define _TIF_32BIT		(1 << TIF_32BIT)
 #define _TIF_SVE		(1 << TIF_SVE)
 #define _TIF_MTE_ASYNC_FAULT	(1 << TIF_MTE_ASYNC_FAULT)
+#define _TIF_NOTIFY_SIGNAL	(1 << TIF_NOTIFY_SIGNAL)
 
 #define _TIF_WORK_MASK		(_TIF_NEED_RESCHED | _TIF_SIGPENDING | \
 				 _TIF_NOTIFY_RESUME | _TIF_FOREIGN_FPSTATE | \
-				 _TIF_UPROBE | _TIF_FSCHECK | _TIF_MTE_ASYNC_FAULT)
+				 _TIF_UPROBE | _TIF_FSCHECK | _TIF_MTE_ASYNC_FAULT | \
+				 _TIF_NOTIFY_SIGNAL)
 
 #define _TIF_SYSCALL_WORK	(_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \
 				 _TIF_SYSCALL_TRACEPOINT | _TIF_SECCOMP | \
arch/arm64/kernel/signal.c +1 -1
index a8184cad8890..bec6ef69704f 100644
@@ -942,7 +942,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs,
 					       (void __user *)NULL, current);
 			}
 
-			if (thread_flags & _TIF_SIGPENDING)
+			if (thread_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
 				do_signal(regs);
 
 			if (thread_flags & _TIF_NOTIFY_RESUME) {
Signature · 10 lines
2.29.0

-- 
Jens Axboe


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Acked-by on v1 1/1
#1 lore raw

Hi Jens,

[+ Catalin]

Quoted 9 lines · Jens Axboe

---

5.11 has support queued up for TIF_NOTIFY_SIGNAL, see this posting for details:

https://lore.kernel.org/io-uring/[email protected]/

Quoted 8 lines

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/arm64/include/asm/thread_info.h | 5 ++++-
 arch/arm64/kernel/signal.c           | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

I think it makes sense for this to go via the arm64 tree, as it's self-contained and we can handle any conflicts directly. Catalin -- would you be able to pick this up when you start queueing stuff around -rc3, please?

But either way:

Cheers,

Will

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author
#2 lore raw
Quoted 19 lines · Will Deacon

Hi Jens,

[+ Catalin]

Quoted 14 lines · Jens Axboe

---

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.

Quoted 8 lines
Quoted 3 lines
 arch/arm64/include/asm/thread_info.h | 5 ++++-
 arch/arm64/kernel/signal.c           | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

I think it makes sense for this to go via the arm64 tree, as it's self-contained and we can handle any conflicts directly. Catalin -- would you be able to pick this up when you start queueing stuff around -rc3, please?

Works for me, it's done as such that it can be carried outside of the main series.

Quoted 3 lines

But either way:

Thanks!

Signature · 7 lines
Jens Axboe


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author
#3 lore raw
In reply to Jens Axboe

Gentle nudge on this one.

Quoted 58 lines · Jens Axboe

---

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/arm64/include/asm/thread_info.h | 5 ++++-
 arch/arm64/kernel/signal.c           | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)
arch/arm64/include/asm/thread_info.h +4 -1
index 1fbab854a51b..cdcf307764aa 100644
@@ -68,6 +68,7 @@ void arch_release_task_struct(struct task_struct *tsk);
 #define TIF_UPROBE		4	/* uprobe breakpoint or singlestep */
 #define TIF_FSCHECK		5	/* Check FS is USER_DS on return */
 #define TIF_MTE_ASYNC_FAULT	6	/* MTE Asynchronous Tag Check Fault */
+#define TIF_NOTIFY_SIGNAL	7	/* signal notifications exist */
 #define TIF_SYSCALL_TRACE	8	/* syscall trace active */
 #define TIF_SYSCALL_AUDIT	9	/* syscall auditing */
 #define TIF_SYSCALL_TRACEPOINT	10	/* syscall tracepoint for ftrace */
@@ -98,10 +99,12 @@ void arch_release_task_struct(struct task_struct *tsk);
 #define _TIF_32BIT		(1 << TIF_32BIT)
 #define _TIF_SVE		(1 << TIF_SVE)
 #define _TIF_MTE_ASYNC_FAULT	(1 << TIF_MTE_ASYNC_FAULT)
+#define _TIF_NOTIFY_SIGNAL	(1 << TIF_NOTIFY_SIGNAL)
 
 #define _TIF_WORK_MASK		(_TIF_NEED_RESCHED | _TIF_SIGPENDING | \
 				 _TIF_NOTIFY_RESUME | _TIF_FOREIGN_FPSTATE | \
-				 _TIF_UPROBE | _TIF_FSCHECK | _TIF_MTE_ASYNC_FAULT)
+				 _TIF_UPROBE | _TIF_FSCHECK | _TIF_MTE_ASYNC_FAULT | \
+				 _TIF_NOTIFY_SIGNAL)
 
 #define _TIF_SYSCALL_WORK	(_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \
 				 _TIF_SYSCALL_TRACEPOINT | _TIF_SECCOMP | \
arch/arm64/kernel/signal.c +1 -1
index a8184cad8890..bec6ef69704f 100644
@@ -942,7 +942,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs,
 					       (void __user *)NULL, current);
 			}
 
-			if (thread_flags & _TIF_SIGPENDING)
+			if (thread_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
 				do_signal(regs);
 
 			if (thread_flags & _TIF_NOTIFY_RESUME) {
Signature · 7 lines
Jens Axboe


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer
#4 lore raw
Quoted 1 line · Jens Axboe

Gentle nudge on this one.

I'll pick it up for 5.11, though I only start queuing patches usually at -rc3 (so next week).

Thanks.

Signature · 6 lines
Catalin

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author
#5 lore raw
Quoted 5 lines · Catalin Marinas
Quoted 1 line · Jens Axboe

Gentle nudge on this one.

I'll pick it up for 5.11, though I only start queuing patches usually at -rc3 (so next week).

Thanks! I can carry it too with your ack, I got some patches that depend on all archs being switched over. But not a huge deal if you want to take it through your tree, I'll likely need to split into a prep and post series anyway.

Signature · 7 lines
Jens Axboe


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Acked-by
#6 lore raw
Quoted 11 lines · Jens Axboe
Quoted 5 lines · Catalin Marinas
Quoted 1 line · Jens Axboe

Gentle nudge on this one.

I'll pick it up for 5.11, though I only start queuing patches usually at -rc3 (so next week).

Thanks! I can carry it too with your ack, I got some patches that depend on all archs being switched over. But not a huge deal if you want to take it through your tree, I'll likely need to split into a prep and post series anyway.

If you have a dependency, feel free to take it through your tree but please provide a stable branch in case we get a non-trivial conflict.

Will's ack would suffice but if you need another:

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author
#7 lore raw
Quoted 8 lines · Catalin Marinas
Quoted 7 lines · Jens Axboe
Quoted 5 lines · Catalin Marinas
Quoted 1 line · Jens Axboe

Gentle nudge on this one.

I'll pick it up for 5.11, though I only start queuing patches usually at -rc3 (so next week).

Quoted 7 lines
Quoted 4 lines

Thanks! I can carry it too with your ack, I got some patches that depend on all archs being switched over. But not a huge deal if you want to take it through your tree, I'll likely need to split into a prep and post series anyway.

If you have a dependency, feel free to take it through your tree but please provide a stable branch in case we get a non-trivial conflict.

I'll likely keep rebasing this series for a bit - not doing code changes, but just adding acks etc from folks. I'll keep an eye on potential conflicts, but given the nature of the patch and the size of it, even if we had any they are likely going to be very trivial.

That said, if you want a stable branch, then I can provide one now and just have everything that's acked up until this point. Either way is fine with me.

Quoted 3 lines

Will's ack would suffice but if you need another:

Thanks - I had missed Will already acked it, but 2 is better than 1 :-)

Signature · 7 lines
Jens Axboe


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer
#8 lore raw
Quoted 17 lines · Jens Axboe
Quoted 8 lines · Catalin Marinas
Quoted 7 lines · Jens Axboe
Quoted 5 lines · Catalin Marinas
Quoted 1 line · Jens Axboe

Gentle nudge on this one.

I'll pick it up for 5.11, though I only start queuing patches usually at -rc3 (so next week).

Quoted 7 lines
Quoted 4 lines

Thanks! I can carry it too with your ack, I got some patches that depend on all archs being switched over. But not a huge deal if you want to take it through your tree, I'll likely need to split into a prep and post series anyway.

If you have a dependency, feel free to take it through your tree but please provide a stable branch in case we get a non-trivial conflict.

Quoted 8 lines

I'll likely keep rebasing this series for a bit - not doing code changes, but just adding acks etc from folks. I'll keep an eye on potential conflicts, but given the nature of the patch and the size of it, even if we had any they are likely going to be very trivial.

That said, if you want a stable branch, then I can provide one now and just have everything that's acked up until this point. Either way is fine with me.

That's not needed for now. I (or sfr) will let you know in the next 2 weeks or so once I start queuing patches. As you said, the conflicts may be trivial, if any.

Signature · 6 lines
Catalin

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author
#9 lore raw
Quoted 23 lines · Catalin Marinas
Quoted 22 lines · Jens Axboe
Quoted 8 lines · Catalin Marinas
Quoted 7 lines · Jens Axboe
Quoted 5 lines · Catalin Marinas
Quoted 1 line · Jens Axboe

Gentle nudge on this one.

I'll pick it up for 5.11, though I only start queuing patches usually at -rc3 (so next week).

Quoted 7 lines
Quoted 4 lines

Thanks! I can carry it too with your ack, I got some patches that depend on all archs being switched over. But not a huge deal if you want to take it through your tree, I'll likely need to split into a prep and post series anyway.

If you have a dependency, feel free to take it through your tree but please provide a stable branch in case we get a non-trivial conflict.

I'll likely keep rebasing this series for a bit - not doing code changes, but just adding acks etc from folks. I'll keep an eye on potential conflicts, but given the nature of the patch and the size of it, even if we had any they are likely going to be very trivial.

Quoted 7 lines
Quoted 3 lines

That said, if you want a stable branch, then I can provide one now and just have everything that's acked up until this point. Either way is fine with me.

That's not needed for now. I (or sfr) will let you know in the next 2 weeks or so once I start queuing patches. As you said, the conflicts may be trivial, if any.

Sounds good, thanks. Stephen's email are usually a good indication of the magnitude of conflicts indeed.

Signature · 7 lines
Jens Axboe


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel