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]
Message-Id: <1364001923-10796-2-git-send-email-andi@firstfloor.org>
Date:	Fri, 22 Mar 2013 18:24:55 -0700
From:	Andi Kleen <andi@...stfloor.org>
To:	linux-kernel@...r.kernel.org
Cc:	torvalds@...ux-foundation.org, akpm@...ux-foundation.org,
	x86@...nel.org, Andi Kleen <ak@...ux.intel.com>
Subject: [PATCH 01/29] tsx: Add generic noop macros for RTM intrinsics

From: Andi Kleen <ak@...ux.intel.com>

Add generic noop macros (act like transaction aborted) for RTM.
The main use case is an occasional _xtest() added to generic
code, without needing ifdefs. On x86+RTM this will use
real TSX instructions.

Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
 include/linux/rtm.h |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
 create mode 100644 include/linux/rtm.h

diff --git a/include/linux/rtm.h b/include/linux/rtm.h
new file mode 100644
index 0000000..887b221
--- /dev/null
+++ b/include/linux/rtm.h
@@ -0,0 +1,15 @@
+#ifndef _LINUX_RTM
+#define _LINUX_RTM 1
+
+#ifdef CONFIG_RTM_LOCKS
+#include <asm/rtm.h>
+#else
+/* Make transactions appear as always abort */
+#define _XBEGIN_STARTED 0
+#define _xbegin() 1
+#define _xtest()  0
+#define _xend()   do {} while (0)
+#define _xabort(x) do {} while (0)
+#endif
+
+#endif
-- 
1.7.7.6

--
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