summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--parse.c6
-rw-r--r--validation/attr-optimize.c16
2 files changed, 20 insertions, 2 deletions
diff --git a/parse.c b/parse.c
index 21454790..f665f05c 100644
--- a/parse.c
+++ b/parse.c
@@ -607,6 +607,8 @@ static const char *ignored_attributes[] = {
"__naked__",
"no_instrument_function",
"__no_instrument_function__",
+ "no_sanitize_address",
+ "__no_sanitize_address__",
"noclone",
"__noclone",
"__noclone__",
@@ -618,6 +620,8 @@ static const char *ignored_attributes[] = {
"nothrow",
"__nothrow",
"__nothrow__",
+ "optimize",
+ "__optimize__",
"regparm",
"__regparm__",
"section",
@@ -646,8 +650,6 @@ static const char *ignored_attributes[] = {
"__warning__",
"weak",
"__weak__",
- "no_sanitize_address",
- "__no_sanitize_address__",
};
diff --git a/validation/attr-optimize.c b/validation/attr-optimize.c
new file mode 100644
index 00000000..c45cbe89
--- /dev/null
+++ b/validation/attr-optimize.c
@@ -0,0 +1,16 @@
+
+#define __noclone __attribute__((__noclone__, __optimize__("no-tracer")))
+
+struct kvm_vcpu;
+
+static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
+{
+ __asm__("");
+}
+
+extern void *run;
+void *run = vmx_vcpu_run;
+
+/*
+ * check-name: optimize attributes
+ */