Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33006cdf authored by Kees Cook's avatar Kees Cook Committed by Miklos Szeredi
Browse files

ovl: Use designated initializers



Prepare to mark sensitive kernel structures for randomization by making
sure they're using designated initializers. These were identified during
allyesconfig builds of x86, arm, and arm64, with most initializer fixes
extracted from grsecurity.

For these cases, use { }, which will be zero-filled, instead of
undesignated NULLs.

Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent b1eaa950
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -709,8 +709,8 @@ static const struct xattr_handler *ovl_xattr_handlers[] = {

static int ovl_fill_super(struct super_block *sb, void *data, int silent)
{
	struct path upperpath = { NULL, NULL };
	struct path workpath = { NULL, NULL };
	struct path upperpath = { };
	struct path workpath = { };
	struct dentry *root_dentry;
	struct inode *realinode;
	struct ovl_entry *oe;
+1 −1
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ void ovl_path_lower(struct dentry *dentry, struct path *path)
{
	struct ovl_entry *oe = dentry->d_fsdata;

	*path = oe->numlower ? oe->lowerstack[0] : (struct path) { NULL, NULL };
	*path = oe->numlower ? oe->lowerstack[0] : (struct path) { };
}

enum ovl_path_type ovl_path_real(struct dentry *dentry, struct path *path)