summaryrefslogtreecommitdiff
path: root/fs/ntfs
diff options
context:
space:
mode:
authorEmese Revfy <re.emese@gmail.com>2016-07-26 22:41:43 +0200
committerKees Cook <keescook@chromium.org>2017-02-06 13:26:31 -0800
commite89c98504d8962186caa82a7f613a6d0b24cb917 (patch)
tree6174c271746c30108b5e63c113cb1221bb1d168c /fs/ntfs
parentdc259d15102b74f87f23166491aeb7b99ecf4da1 (diff)
initify: Mark functions with the __nocapture attribute
The nocapture gcc attribute can be on functions only. The attribute takes zero or more signed integer constants as parameters that specify the function parameters to initify when the passed arguments are of const char* type. A negative attribute parameter value means that the corresponding function parameter is returned by the function and the passed argument will only be initified if the data flow of the returned value is not captured in the caller. If no values are passed to the attribute then all function parameters are treated as nocapture. If the marked parameter is a vararg then the plugin initifies all vararg arguments. 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 'fs/ntfs')
-rw-r--r--fs/ntfs/debug.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ntfs/debug.h b/fs/ntfs/debug.h
index 61bf091e32a8..6ac561943118 100644
--- a/fs/ntfs/debug.h
+++ b/fs/ntfs/debug.h
@@ -30,7 +30,7 @@
extern int debug_msgs;
-extern __printf(4, 5)
+extern __printf(4, 5) __nocapture(3)
void __ntfs_debug(const char *file, int line, const char *function,
const char *format, ...);
/**
@@ -58,12 +58,12 @@ do { \
#endif /* !DEBUG */
-extern __printf(3, 4)
+extern __printf(3, 4) __nocapture(1)
void __ntfs_warning(const char *function, const struct super_block *sb,
const char *fmt, ...);
#define ntfs_warning(sb, f, a...) __ntfs_warning(__func__, sb, f, ##a)
-extern __printf(3, 4)
+extern __printf(3, 4) __nocapture(1)
void __ntfs_error(const char *function, const struct super_block *sb,
const char *fmt, ...);
#define ntfs_error(sb, f, a...) __ntfs_error(__func__, sb, f, ##a)