diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 7b5d6816542b..6e1fd5d21248 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -296,7 +296,7 @@ struct kiocb { | |||
296 | void *private; | 296 | void *private; |
297 | int ki_flags; | 297 | int ki_flags; |
298 | enum rw_hint ki_hint; | 298 | enum rw_hint ki_hint; |
299 | }; | 299 | } __randomize_layout; |
300 | 300 | ||
301 | static inline bool is_sync_kiocb(struct kiocb *kiocb) | 301 | static inline bool is_sync_kiocb(struct kiocb *kiocb) |
302 | { | 302 | { |
@@ -404,7 +404,7 @@ struct address_space { | |||
404 | struct list_head private_list; /* ditto */ | 404 | struct list_head private_list; /* ditto */ |
405 | void *private_data; /* ditto */ | 405 | void *private_data; /* ditto */ |
406 | errseq_t wb_err; | 406 | errseq_t wb_err; |
407 | } __attribute__((aligned(sizeof(long)))); | 407 | } __attribute__((aligned(sizeof(long)))) __randomize_layout; |
408 | /* | 408 | /* |
409 | * On most architectures that alignment is already the case; but | 409 | * On most architectures that alignment is already the case; but |
410 | * must be enforced here for CRIS, to let the least significant bit | 410 | * must be enforced here for CRIS, to let the least significant bit |
@@ -447,7 +447,7 @@ struct block_device { | |||
447 | int bd_fsfreeze_count; | 447 | int bd_fsfreeze_count; |
448 | /* Mutex for freeze */ | 448 | /* Mutex for freeze */ |
449 | struct mutex bd_fsfreeze_mutex; | 449 | struct mutex bd_fsfreeze_mutex; |
450 | }; | 450 | } __randomize_layout; |
451 | 451 | ||
452 | /* | 452 | /* |
453 | * Radix-tree tags, for tagging dirty and writeback pages within the pagecache | 453 | * Radix-tree tags, for tagging dirty and writeback pages within the pagecache |
@@ -666,7 +666,7 @@ struct inode { | |||
666 | #endif | 666 | #endif |
667 | 667 | ||
668 | void *i_private; /* fs or device private pointer */ | 668 | void *i_private; /* fs or device private pointer */ |
669 | }; | 669 | } __randomize_layout; |
670 | 670 | ||
671 | static inline unsigned int i_blocksize(const struct inode *node) | 671 | static inline unsigned int i_blocksize(const struct inode *node) |
672 | { | 672 | { |
@@ -883,7 +883,8 @@ struct file { | |||
883 | #endif /* #ifdef CONFIG_EPOLL */ | 883 | #endif /* #ifdef CONFIG_EPOLL */ |
884 | struct address_space *f_mapping; | 884 | struct address_space *f_mapping; |
885 | errseq_t f_wb_err; | 885 | errseq_t f_wb_err; |
886 | } __attribute__((aligned(4))); /* lest something weird decides that 2 is OK */ | 886 | } __randomize_layout |
887 | __attribute__((aligned(4))); /* lest something weird decides that 2 is OK */ | ||
887 | 888 | ||
888 | struct file_handle { | 889 | struct file_handle { |
889 | __u32 handle_bytes; | 890 | __u32 handle_bytes; |
@@ -1020,7 +1021,7 @@ struct file_lock { | |||
1020 | int state; /* state of grant or error if -ve */ | 1021 | int state; /* state of grant or error if -ve */ |
1021 | } afs; | 1022 | } afs; |
1022 | } fl_u; | 1023 | } fl_u; |
1023 | }; | 1024 | } __randomize_layout; |
1024 | 1025 | ||
1025 | struct file_lock_context { | 1026 | struct file_lock_context { |
1026 | spinlock_t flc_lock; | 1027 | spinlock_t flc_lock; |
@@ -1412,7 +1413,7 @@ struct super_block { | |||
1412 | 1413 | ||
1413 | spinlock_t s_inode_wblist_lock; | 1414 | spinlock_t s_inode_wblist_lock; |
1414 | struct list_head s_inodes_wb; /* writeback inodes */ | 1415 | struct list_head s_inodes_wb; /* writeback inodes */ |
1415 | }; | 1416 | } __randomize_layout; |
1416 | 1417 | ||
1417 | /* Helper functions so that in most cases filesystems will | 1418 | /* Helper functions so that in most cases filesystems will |
1418 | * not need to deal directly with kuid_t and kgid_t and can | 1419 | * not need to deal directly with kuid_t and kgid_t and can |
@@ -1698,7 +1699,7 @@ struct file_operations { | |||
1698 | u64); | 1699 | u64); |
1699 | ssize_t (*dedupe_file_range)(struct file *, u64, u64, struct file *, | 1700 | ssize_t (*dedupe_file_range)(struct file *, u64, u64, struct file *, |
1700 | u64); | 1701 | u64); |
1701 | }; | 1702 | } __randomize_layout; |
1702 | 1703 | ||
1703 | struct inode_operations { | 1704 | struct inode_operations { |
1704 | struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int); | 1705 | struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int); |