Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1562846
| From | Josh Poimboeuf <jpoimboe@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v4 02/15] x86/entry: define _TIF_ALLWORK_MASK flags explicitly |
| Date | 2017-01-19 16:50 +0100 |
| Message-ID | <t1n8n-3mv-45@gated-at.bofh.it> (permalink) |
| References | <t1n8l-3mv-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The _TIF_ALLWORK_MASK macro automatically includes the least-significant
16 bits of the thread_info flags, which is less than obvious and tends
to create confusion and surprises when reading or modifying the code.
Define the flags explicitly.
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
---
arch/x86/include/asm/thread_info.h | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h
index ad6f5eb0..207d0d9 100644
--- a/arch/x86/include/asm/thread_info.h
+++ b/arch/x86/include/asm/thread_info.h
@@ -73,9 +73,6 @@ struct thread_info {
* thread information flags
* - these are process state flags that various assembly files
* may need to access
- * - pending work-to-be-done flags are in LSW
- * - other flags in MSW
- * Warning: layout of LSW is hardcoded in entry.S
*/
#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
#define TIF_NOTIFY_RESUME 1 /* callback before returning to user */
@@ -103,8 +100,8 @@ struct thread_info {
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
-#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
+#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
#define _TIF_SYSCALL_EMU (1 << TIF_SYSCALL_EMU)
#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
#define _TIF_SECCOMP (1 << TIF_SECCOMP)
@@ -133,8 +130,10 @@ struct thread_info {
/* work to do on any return to user space */
#define _TIF_ALLWORK_MASK \
- ((0x0000FFFF & ~_TIF_SECCOMP) | _TIF_SYSCALL_TRACEPOINT | \
- _TIF_NOHZ)
+ (_TIF_SYSCALL_TRACE | _TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \
+ _TIF_NEED_RESCHED | _TIF_SINGLESTEP | _TIF_SYSCALL_EMU | \
+ _TIF_SYSCALL_AUDIT | _TIF_USER_RETURN_NOTIFY | _TIF_UPROBE | \
+ _TIF_NOHZ | _TIF_SYSCALL_TRACEPOINT)
/* flags to check in __switch_to() */
#define _TIF_WORK_CTXSW \
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 00/15] livepatch: hybrid consistency model Josh Poimboeuf <jpoimboe@redhat.com> - 2017-01-19 16:50 +0100
[PATCH v4 02/15] x86/entry: define _TIF_ALLWORK_MASK flags explicitly Josh Poimboeuf <jpoimboe@redhat.com> - 2017-01-19 16:50 +0100
[PATCH v4 15/15] livepatch: allow removal of a disabled patch Josh Poimboeuf <jpoimboe@redhat.com> - 2017-01-19 16:50 +0100
[PATCH v4 04/15] livepatch/x86: add TIF_PATCH_PENDING thread flag Josh Poimboeuf <jpoimboe@redhat.com> - 2017-01-19 17:00 +0100
[PATCH v4 12/15] livepatch: store function sizes Josh Poimboeuf <jpoimboe@redhat.com> - 2017-01-19 17:00 +0100
[PATCH v4 06/15] livepatch/s390: reorganize TIF thread flag bits Josh Poimboeuf <jpoimboe@redhat.com> - 2017-01-19 17:00 +0100
[PATCH v4 11/15] livepatch: use kstrtobool() in enabled_store() Josh Poimboeuf <jpoimboe@redhat.com> - 2017-01-19 17:00 +0100
[PATCH v4 03/15] livepatch: create temporary klp_update_patch_state() stub Josh Poimboeuf <jpoimboe@redhat.com> - 2017-01-19 17:00 +0100
Re: [PATCH v4 03/15] livepatch: create temporary klp_update_patch_state() stub Miroslav Benes <mbenes@suse.cz> - 2017-01-27 10:00 +0100
[PATCH v4 10/15] livepatch: move patching functions into patch.c Josh Poimboeuf <jpoimboe@redhat.com> - 2017-01-19 17:00 +0100
csiph-web