Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1259940 > unrolled thread

[PATCH urgent 0/2] x86: vm86 fix and test

Started byAndy Lutomirski <luto@kernel.org>
First post2015-10-31 06:50 +0100
Last post2015-10-31 10:00 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH urgent 0/2] x86: vm86 fix and test Andy Lutomirski <luto@kernel.org> - 2015-10-31 06:50 +0100
    [PATCH urgent 1/2] selftests/x86: Add a fork() to entry_from_vm86 to catch fork bugs Andy Lutomirski <luto@kernel.org> - 2015-10-31 06:50 +0100
      [tip:x86/urgent] selftests/x86: Add a fork()   to entry_from_vm86 to catch fork bugs tip-bot for Andy Lutomirski <tipbot@zytor.com> - 2015-10-31 10:00 +0100

#1259940 — [PATCH urgent 0/2] x86: vm86 fix and test

FromAndy Lutomirski <luto@kernel.org>
Date2015-10-31 06:50 +0100
Subject[PATCH urgent 0/2] x86: vm86 fix and test
Message-ID<qpxd7-7ms-5@gated-at.bofh.it>
Calling vm86 and then forking will corrupt things.  Fix it.

This is for x86/urgent.  It fixes a 4.3 regression.

Andy Lutomirski (2):
  selftests/x86: Add a fork() to entry_from_vm86 to catch fork bugs
  x86/vm86: Set thread.vm86 to NULL on fork/clone

 arch/x86/kernel/process.c                     | 3 +++
 tools/testing/selftests/x86/entry_from_vm86.c | 4 ++++
 2 files changed, 7 insertions(+)

-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1259941 — [PATCH urgent 1/2] selftests/x86: Add a fork() to entry_from_vm86 to catch fork bugs

FromAndy Lutomirski <luto@kernel.org>
Date2015-10-31 06:50 +0100
Subject[PATCH urgent 1/2] selftests/x86: Add a fork() to entry_from_vm86 to catch fork bugs
Message-ID<qpxd7-7ms-15@gated-at.bofh.it>
In reply to#1259940
Mere possession of vm86 state is strange.  Make sure that nothing
gets corrupted if we fork after calling vm86().

Signed-off-by: Andy Lutomirski <luto@kernel.org>
---
 tools/testing/selftests/x86/entry_from_vm86.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/testing/selftests/x86/entry_from_vm86.c b/tools/testing/selftests/x86/entry_from_vm86.c
index 9a43a59a9bb4..13b2965472e3 100644
--- a/tools/testing/selftests/x86/entry_from_vm86.c
+++ b/tools/testing/selftests/x86/entry_from_vm86.c
@@ -229,5 +229,9 @@ int main(void)
 	}
 	clearhandler(SIGSEGV);
 
+	/* Make sure nothing explodes if we fork. */
+	if (fork() > 0)
+		return 0;
+
 	return (nerrs == 0 ? 0 : 1);
 }
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1259957 — [tip:x86/urgent] selftests/x86: Add a fork() to entry_from_vm86 to catch fork bugs

Fromtip-bot for Andy Lutomirski <tipbot@zytor.com>
Date2015-10-31 10:00 +0100
Subject[tip:x86/urgent] selftests/x86: Add a fork() to entry_from_vm86 to catch fork bugs
Message-ID<qpAaZ-EJ-1@gated-at.bofh.it>
In reply to#1259941
Commit-ID:  226f1f729ce277720fab60c91dd1b12574cfe66c
Gitweb:     http://git.kernel.org/tip/226f1f729ce277720fab60c91dd1b12574cfe66c
Author:     Andy Lutomirski <luto@kernel.org>
AuthorDate: Fri, 30 Oct 2015 22:42:45 -0700
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 31 Oct 2015 09:50:25 +0100

selftests/x86: Add a fork() to entry_from_vm86 to catch fork bugs

Mere possession of vm86 state is strange.  Make sure that nothing
gets corrupted if we fork after calling vm86().

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Stas Sergeev <stsp@list.ru>
Link: http://lkml.kernel.org/r/08f83295460a80e41dc5e3e81ec40d6844d316f5.1446270067.git.luto@kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 tools/testing/selftests/x86/entry_from_vm86.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/testing/selftests/x86/entry_from_vm86.c b/tools/testing/selftests/x86/entry_from_vm86.c
index 421c607..d075ea0 100644
--- a/tools/testing/selftests/x86/entry_from_vm86.c
+++ b/tools/testing/selftests/x86/entry_from_vm86.c
@@ -230,5 +230,9 @@ int main(void)
 	}
 	clearhandler(SIGSEGV);
 
+	/* Make sure nothing explodes if we fork. */
+	if (fork() > 0)
+		return 0;
+
 	return (nerrs == 0 ? 0 : 1);
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web