Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1259941
| From | Andy Lutomirski <luto@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH urgent 1/2] selftests/x86: Add a fork() to entry_from_vm86 to catch fork bugs |
| Date | 2015-10-31 06:50 +0100 |
| Message-ID | <qpxd7-7ms-15@gated-at.bofh.it> (permalink) |
| References | <qpxd7-7ms-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[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
csiph-web