diff options
author | Christopher Li <sparse@chrisli.org> | 2017-06-23 17:13:17 -0700 |
---|---|---|
committer | Christopher Li <sparse@chrisli.org> | 2017-06-23 17:13:17 -0700 |
commit | d8925f125ee8b1cc6eb29f43312b81f3f859374d (patch) | |
tree | c8712c0f074cd5c3eee89b3ef22e4f965f2a062d | |
parent | a6fbbbf01a1ca358e0a991dd0fb1a1cca60b6f0b (diff) | |
download | sparse-0.5.1-rc3.tar.gz |
Adding ignored attribute optimizev0.5.1-rc3
It was used in kvm/vmx.c
Signed-of-By: Christopher Li <sparse@chrisli.org>
-rw-r--r-- | parse.c | 6 | ||||
-rw-r--r-- | validation/attr-optimize.c | 16 |
2 files changed, 20 insertions, 2 deletions
@@ -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 + */ |