|
@@ -275,7 +275,7 @@ struct kiocb {
|
|
void (*ki_complete)(struct kiocb *iocb, long ret, long ret2);
|
|
void (*ki_complete)(struct kiocb *iocb, long ret, long ret2);
|
|
void *private;
|
|
void *private;
|
|
int ki_flags;
|
|
int ki_flags;
|
|
-};
|
|
|
|
|
|
+} __randomize_layout;
|
|
|
|
|
|
static inline bool is_sync_kiocb(struct kiocb *kiocb)
|
|
static inline bool is_sync_kiocb(struct kiocb *kiocb)
|
|
{
|
|
{
|
|
@@ -392,7 +392,7 @@ struct address_space {
|
|
gfp_t gfp_mask; /* implicit gfp mask for allocations */
|
|
gfp_t gfp_mask; /* implicit gfp mask for allocations */
|
|
struct list_head private_list; /* ditto */
|
|
struct list_head private_list; /* ditto */
|
|
void *private_data; /* ditto */
|
|
void *private_data; /* ditto */
|
|
-} __attribute__((aligned(sizeof(long))));
|
|
|
|
|
|
+} __attribute__((aligned(sizeof(long)))) __randomize_layout;
|
|
/*
|
|
/*
|
|
* On most architectures that alignment is already the case; but
|
|
* On most architectures that alignment is already the case; but
|
|
* must be enforced here for CRIS, to let the least significant bit
|
|
* must be enforced here for CRIS, to let the least significant bit
|
|
@@ -435,7 +435,7 @@ struct block_device {
|
|
int bd_fsfreeze_count;
|
|
int bd_fsfreeze_count;
|
|
/* Mutex for freeze */
|
|
/* Mutex for freeze */
|
|
struct mutex bd_fsfreeze_mutex;
|
|
struct mutex bd_fsfreeze_mutex;
|
|
-};
|
|
|
|
|
|
+} __randomize_layout;
|
|
|
|
|
|
/*
|
|
/*
|
|
* Radix-tree tags, for tagging dirty and writeback pages within the pagecache
|
|
* Radix-tree tags, for tagging dirty and writeback pages within the pagecache
|
|
@@ -653,7 +653,7 @@ struct inode {
|
|
#endif
|
|
#endif
|
|
|
|
|
|
void *i_private; /* fs or device private pointer */
|
|
void *i_private; /* fs or device private pointer */
|
|
-};
|
|
|
|
|
|
+} __randomize_layout;
|
|
|
|
|
|
static inline unsigned int i_blocksize(const struct inode *node)
|
|
static inline unsigned int i_blocksize(const struct inode *node)
|
|
{
|
|
{
|
|
@@ -868,7 +868,8 @@ struct file {
|
|
struct list_head f_tfile_llink;
|
|
struct list_head f_tfile_llink;
|
|
#endif /* #ifdef CONFIG_EPOLL */
|
|
#endif /* #ifdef CONFIG_EPOLL */
|
|
struct address_space *f_mapping;
|
|
struct address_space *f_mapping;
|
|
-} __attribute__((aligned(4))); /* lest something weird decides that 2 is OK */
|
|
|
|
|
|
+} __randomize_layout
|
|
|
|
+ __attribute__((aligned(4))); /* lest something weird decides that 2 is OK */
|
|
|
|
|
|
struct file_handle {
|
|
struct file_handle {
|
|
__u32 handle_bytes;
|
|
__u32 handle_bytes;
|
|
@@ -1005,7 +1006,7 @@ struct file_lock {
|
|
int state; /* state of grant or error if -ve */
|
|
int state; /* state of grant or error if -ve */
|
|
} afs;
|
|
} afs;
|
|
} fl_u;
|
|
} fl_u;
|
|
-};
|
|
|
|
|
|
+} __randomize_layout;
|
|
|
|
|
|
struct file_lock_context {
|
|
struct file_lock_context {
|
|
spinlock_t flc_lock;
|
|
spinlock_t flc_lock;
|
|
@@ -1404,7 +1405,7 @@ struct super_block {
|
|
|
|
|
|
spinlock_t s_inode_wblist_lock;
|
|
spinlock_t s_inode_wblist_lock;
|
|
struct list_head s_inodes_wb; /* writeback inodes */
|
|
struct list_head s_inodes_wb; /* writeback inodes */
|
|
-};
|
|
|
|
|
|
+} __randomize_layout;
|
|
|
|
|
|
/* Helper functions so that in most cases filesystems will
|
|
/* Helper functions so that in most cases filesystems will
|
|
* not need to deal directly with kuid_t and kgid_t and can
|
|
* not need to deal directly with kuid_t and kgid_t and can
|
|
@@ -1690,7 +1691,7 @@ struct file_operations {
|
|
u64);
|
|
u64);
|
|
ssize_t (*dedupe_file_range)(struct file *, u64, u64, struct file *,
|
|
ssize_t (*dedupe_file_range)(struct file *, u64, u64, struct file *,
|
|
u64);
|
|
u64);
|
|
-};
|
|
|
|
|
|
+} __randomize_layout;
|
|
|
|
|
|
struct inode_operations {
|
|
struct inode_operations {
|
|
struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int);
|
|
struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int);
|