All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/process: Delete useless check for dead process with LDT
@ 2019-07-12 22:41 Jann Horn
  2019-07-16 21:23 ` [tip:x86/urgent] " tip-bot for Jann Horn
  2019-07-16 22:46 ` tip-bot for Jann Horn
  0 siblings, 2 replies; 3+ messages in thread
From: Jann Horn @ 2019-07-12 22:41 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, jannh
  Cc: H. Peter Anvin, x86, linux-kernel

At release_thread(), ->mm is NULL; and it is fine for the former mm to
still have an LDT. Delete this check in process_64.c, similar to
commit 2684927c6b93 ("[PATCH] x86: Deprecate useless bug"), which did the
same in process_32.c.

Signed-off-by: Jann Horn <jannh@google.com>
---
 arch/x86/kernel/process_64.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index 250e4c4ac6d9..af64519b2695 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -143,17 +143,7 @@ void __show_regs(struct pt_regs *regs, enum show_regs_mode mode)
 
 void release_thread(struct task_struct *dead_task)
 {
-	if (dead_task->mm) {
-#ifdef CONFIG_MODIFY_LDT_SYSCALL
-		if (dead_task->mm->context.ldt) {
-			pr_warn("WARNING: dead process %s still has LDT? <%p/%d>\n",
-				dead_task->comm,
-				dead_task->mm->context.ldt->entries,
-				dead_task->mm->context.ldt->nr_entries);
-			BUG();
-		}
-#endif
-	}
+	WARN_ON(dead_task->mm);
 }
 
 enum which_selector {
-- 
2.22.0.510.g264f2c817a-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [tip:x86/urgent] x86/process: Delete useless check for dead process with LDT
  2019-07-12 22:41 [PATCH] x86/process: Delete useless check for dead process with LDT Jann Horn
@ 2019-07-16 21:23 ` tip-bot for Jann Horn
  2019-07-16 22:46 ` tip-bot for Jann Horn
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Jann Horn @ 2019-07-16 21:23 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: jannh, tglx, hpa, linux-kernel, mingo

Commit-ID:  68c2976d7d93392d33ccd8871e9e61b33b5e640f
Gitweb:     https://git.kernel.org/tip/68c2976d7d93392d33ccd8871e9e61b33b5e640f
Author:     Jann Horn <jannh@google.com>
AuthorDate: Sat, 13 Jul 2019 00:41:52 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 16 Jul 2019 23:13:50 +0200

x86/process: Delete useless check for dead process with LDT

At release_thread(), ->mm is NULL; and it is fine for the former mm to
still have an LDT. Delete this check in process_64.c, similar to
commit 2684927c6b93 ("[PATCH] x86: Deprecate useless bug"), which did the
same in process_32.c.

Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190712224152.13129-1-jannh@google.com

---
 arch/x86/kernel/process_64.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index 250e4c4ac6d9..af64519b2695 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -143,17 +143,7 @@ void __show_regs(struct pt_regs *regs, enum show_regs_mode mode)
 
 void release_thread(struct task_struct *dead_task)
 {
-	if (dead_task->mm) {
-#ifdef CONFIG_MODIFY_LDT_SYSCALL
-		if (dead_task->mm->context.ldt) {
-			pr_warn("WARNING: dead process %s still has LDT? <%p/%d>\n",
-				dead_task->comm,
-				dead_task->mm->context.ldt->entries,
-				dead_task->mm->context.ldt->nr_entries);
-			BUG();
-		}
-#endif
-	}
+	WARN_ON(dead_task->mm);
 }
 
 enum which_selector {

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [tip:x86/urgent] x86/process: Delete useless check for dead process with LDT
  2019-07-12 22:41 [PATCH] x86/process: Delete useless check for dead process with LDT Jann Horn
  2019-07-16 21:23 ` [tip:x86/urgent] " tip-bot for Jann Horn
@ 2019-07-16 22:46 ` tip-bot for Jann Horn
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Jann Horn @ 2019-07-16 22:46 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: jannh, tglx, mingo, hpa, linux-kernel

Commit-ID:  50e04acf2990d0d93983720b0a85b11ef805df60
Gitweb:     https://git.kernel.org/tip/50e04acf2990d0d93983720b0a85b11ef805df60
Author:     Jann Horn <jannh@google.com>
AuthorDate: Sat, 13 Jul 2019 00:41:52 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 17 Jul 2019 00:42:27 +0200

x86/process: Delete useless check for dead process with LDT

At release_thread(), ->mm is NULL; and it is fine for the former mm to
still have an LDT. Delete this check in process_64.c, similar to
commit 2684927c6b93 ("[PATCH] x86: Deprecate useless bug"), which did the
same in process_32.c.

Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190712224152.13129-1-jannh@google.com


---
 arch/x86/kernel/process_64.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index 250e4c4ac6d9..af64519b2695 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -143,17 +143,7 @@ void __show_regs(struct pt_regs *regs, enum show_regs_mode mode)
 
 void release_thread(struct task_struct *dead_task)
 {
-	if (dead_task->mm) {
-#ifdef CONFIG_MODIFY_LDT_SYSCALL
-		if (dead_task->mm->context.ldt) {
-			pr_warn("WARNING: dead process %s still has LDT? <%p/%d>\n",
-				dead_task->comm,
-				dead_task->mm->context.ldt->entries,
-				dead_task->mm->context.ldt->nr_entries);
-			BUG();
-		}
-#endif
-	}
+	WARN_ON(dead_task->mm);
 }
 
 enum which_selector {

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-16 22:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-12 22:41 [PATCH] x86/process: Delete useless check for dead process with LDT Jann Horn
2019-07-16 21:23 ` [tip:x86/urgent] " tip-bot for Jann Horn
2019-07-16 22:46 ` tip-bot for Jann Horn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.