lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 31 Oct 2015 01:54:47 -0700
From:	tip-bot for Andy Lutomirski <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, luto@...nel.org,
	tglx@...utronix.de, stsp@...t.ru, torvalds@...ux-foundation.org,
	mingo@...nel.org, bp@...en8.de, brgerst@...il.com
Subject: [tip:x86/urgent] selftests/x86: Add a fork()
  to entry_from_vm86 to catch fork bugs

Commit-ID:  226f1f729ce277720fab60c91dd1b12574cfe66c
Gitweb:     http://git.kernel.org/tip/226f1f729ce277720fab60c91dd1b12574cfe66c
Author:     Andy Lutomirski <luto@...nel.org>
AuthorDate: Fri, 30 Oct 2015 22:42:45 -0700
Committer:  Thomas Gleixner <tglx@...utronix.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@...nel.org>
Cc: Brian Gerst <brgerst@...il.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Stas Sergeev <stsp@...t.ru>
Link: http://lkml.kernel.org/r/08f83295460a80e41dc5e3e81ec40d6844d316f5.1446270067.git.luto@kernel.org
Signed-off-by: Thomas Gleixner <tglx@...utronix.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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ