diff options
author | Emese Revfy <re.emese@gmail.com> | 2016-07-26 22:43:27 +0200 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-02-06 13:26:51 -0800 |
commit | 134d8d0b94785246d9b458ecbb7b2e0c87da05f4 (patch) | |
tree | d2bd0e4bef6ecbdf5b7b5296ea70f68cecebebfb /lib/vsprintf.c | |
parent | e89c98504d8962186caa82a7f613a6d0b24cb917 (diff) |
initify: Mark functions with the __unverified_nocapture attribute
The initify plugin attempts to analyze function arguments that have been
marked correctly with the __nocapture attribute. However, due to code
complexity, this is not always possible to verify. As a result, some
__nocapture attributes need to be marked as excluded from the automatic
verification. To do this, the __unverified_nocapture attribute is added.
It is intedned to only be used on function parameters that are difficult
for the plugin to analyze.
Signed-off-by: Emese Revfy <re.emese@gmail.com>
[kees: updated markings, thanks to Arnd]
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'lib/vsprintf.c')
-rw-r--r-- | lib/vsprintf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index a192761d338a..cb964b51f9f8 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -118,7 +118,7 @@ long long simple_strtoll(const char *cp, char **endp, unsigned int base) } EXPORT_SYMBOL(simple_strtoll); -static noinline_for_stack __nocapture(1) +static noinline_for_stack __nocapture(1) __unverified_nocapture(1) int skip_atoi(const char **s) { int i = 0; @@ -1570,7 +1570,7 @@ int kptr_restrict __read_mostly; * function pointers are really function descriptors, which contain a * pointer to the real address. */ -static noinline_for_stack __nocapture(1) +static noinline_for_stack __nocapture(1) __unverified_nocapture(1) char *pointer(const char *fmt, char *buf, char *end, void *ptr, struct printf_spec spec) { |