Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1207)

Unified Diff: src/trusted/validator_x86/testdata/32/tls.tf

Issue 10908137: (abandoned) Validator tests: convert hexes to TFs and run on bots (for prod. validator only) (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: restore 'read overflow' and 'SegmentationError' Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/trusted/validator_x86/testdata/32/tls.tf
diff --git a/src/trusted/validator_x86/testdata/32/tls.tf b/src/trusted/validator_x86/testdata/32/tls.tf
new file mode 100644
index 0000000000000000000000000000000000000000..c77e768736b2f0f0221d6b6ebefd66e2ecf7c365
--- /dev/null
+++ b/src/trusted/validator_x86/testdata/32/tls.tf
@@ -0,0 +1,60 @@
+BITS: 32
+OUTCOME: invalid
+
+# Test TLS access commands.
+# mov %gs:0, %eax
+asm: mov %gs:0x0,%eax
+hex: 65 a1 00 00 00 00
+
+# AFAIK it's open question whether # writes to gs:... should be allowed.
+# Currently RDFA rejects.
+# mov %eax, %gs:0
+asm: mov %eax,%gs:0x0
+hex: 65 a3 00 00 00 00
+
+# Forbidden
+# mov %gs:0, %ax
+asm: mov %gs:0x0,%ax
+hex: 65 66 a1 00 00 00 00
+nc_out: Bad prefix usage
+
+# mov %ax, %gs:0
+asm: mov %ax,%gs:0x0
+hex: 65 66 a3 00 00 00 00
+nc_out: Bad prefix usage
+
+
+# Invalid access to TLS
+# mov %fs:0, %eax
+asm: mov %fs:0x0,%eax
+hex: 64 a1 00 00 00 00
+nc_out: Bad prefix usage
+
+# mov %eax, %fs:0
+asm: mov %eax,%fs:0x0
+hex: 64 a3 00 00 00 00
+nc_out: Bad prefix usage
+
+# mov %fs:0, %ax
+asm: mov %fs:0x0,%ax
+hex: 64 66 a1 00 00 00 00
+nc_out: Bad prefix usage
+
+# mov %ax, %fs:0
+asm: mov %ax,%fs:0x0
+hex: 64 66 a3 00 00 00 00
+nc_out: Bad prefix usage
+
+
+# AFAIK it's open question whether writes to gs:... should be allowed.
+# Currently RDFA rejects.
+asm: mov %gs:(%eax),%eax
+hex: 65 8B 00
+
+
+# Forbidden
+# lock add %gs:0x0,%eax
+asm: lock add %gs:0x0,%eax;
+hex: 65 F0 03 05 00 00 00 00
+nc_out: Bad prefix usage
+

Powered by Google App Engine
This is Rietveld 408576698