linux-next: build failure after merge of the kspp tree
Subsystems (3)
Hi all,
After merging the kspp tree, today's linux-next build (x86_64 allmodconfig) failed like this:
security/apparmor/file.c: In function 'aa_path_link':security/apparmor/file.c:475:23: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
struct path link = { new_dir->mnt, new_dentry };
^
security/apparmor/file.c:475:23: note: (near initialization for 'link')
security/apparmor/file.c:475:37: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
struct path link = { new_dir->mnt, new_dentry };
^
security/apparmor/file.c:475:37: note: (near initialization for 'link')
security/apparmor/file.c:476:25: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
struct path target = { new_dir->mnt, old_dentry };
^
security/apparmor/file.c:476:25: note: (near initialization for 'target')
security/apparmor/file.c:476:39: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
struct path target = { new_dir->mnt, old_dentry };
^security/apparmor/file.c:476:39: note: (near initialization for 'target')
Caused by commit
1a12979f61e4 ("randstruct: Mark various structs for randomization")
interacting with commit
8014370f1257 ("apparmor: move path_link mediation to using labels")
from the security tree.
I added the following merge fix patch for today:
From: Stephen Rothwell <[email protected]>
Date: Tue, 20 Jun 2017 14:50:36 +1000
Subject: [PATCH] apparmor: put back designators in struct initialisers
--- security/apparmor/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
security/apparmor/file.c +2 -2
@@ -472,8 +472,8 @@ static int profile_path_link(struct aa_profile *profile,int aa_path_link (struct aa_label *label,struct dentry *old_dentry,const struct path *new_dir,struct dentry *new_dentry) { -struct path link = { new_dir->mnt, new_dentry }; -struct path target = { new_dir->mnt, old_dentry }; +struct path link = { .mnt = new_dir->mnt, .dentry = new_dentry }; +struct path target = { .mnt = new_dir->mnt, .dentry = old_dentry };struct path_cond cond = {d_backing_inode (old_dentry)->i_uid,d_backing_inode (old_dentry)->i_mode
Signature · 5 lines
2.11.0 -- Cheers, Stephen Rothwell
Quoted 61 lines · Stephen Rothwell
Hi all,
After merging the kspp tree, today's linux-next build (
x86_64allmodconfig) failed like this:
security/apparmor/file.c: In function 'aa_path_link':security/apparmor/file.c:475:23: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]struct path link = { new_dir->mnt, new_dentry }; ^ security/apparmor/file.c:475:23: note: (near initialization for 'link') security/apparmor/file.c:475:37: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] struct path link = { new_dir->mnt, new_dentry }; ^ security/apparmor/file.c:475:37: note: (near initialization for 'link') security/apparmor/file.c:476:25: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] struct path target = { new_dir->mnt, old_dentry }; ^ security/apparmor/file.c:476:25: note: (near initialization for 'target') security/apparmor/file.c:476:39: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] struct path target = { new_dir->mnt, old_dentry }; ^
security/apparmor/file.c:476:39: note: (near initialization for 'target')Caused by commit
1a12979f61e4("randstruct: Mark various structs for randomization")interacting with commit
8014370f1257("apparmor: movepath_linkmediation to using labels")from the security tree.
I added the following merge fix patch for today:
From: Stephen Rothwell <[email protected]>
Date: Tue, 20 Jun 2017 14:50:36 +1000
Subject: [PATCH] apparmor: put back designators in struct initialisersFixes 8014370f1257 ("apparmor: move path_link mediation to using labels")Signed-off-by Stephen Rothwell <[email protected]>--- security/apparmor/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)security/apparmor/file.c +2
-3@@ -472,8 +472,8 @@ static int profile_path_link(struct aa_profile *profile,int aa_path_link (struct aa_label *label,struct dentry *old_dentry,const struct path *new_dir,struct dentry *new_dentry) { - struct path link = { new_dir->mnt, new_dentry }; - struct path target = { new_dir->mnt, old_dentry }; +struct path link = { .mnt = new_dir->mnt, .dentry = new_dentry }; +struct path target = { .mnt = new_dir->mnt, .dentry = old_dentry };struct path_cond cond = {d_backing_inode (old_dentry)->i_uid,d_backing_inode (old_dentry)->i_mode --
Quoted 1 line
2.11.0
Thanks for the fix! That looks correct to me. It seems the refactoring in 8014370f1257 ("apparmor: move path_link mediation to using labels") didn't take 8486adf0d755 ("apparmor: use designated initializers") into account. John, if this looks okay, can you Ack it for James to carry in security-next?
-Kees
Signature · 2 lines
Kees Cook Pixel Security
Quoted 33 lines · Stephen Rothwell
Hi all,
After merging the kspp tree, today's linux-next build (
x86_64allmodconfig) failed like this:
security/apparmor/file.c: In function 'aa_path_link':security/apparmor/file.c:475:23: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]struct path link = { new_dir->mnt, new_dentry }; ^ security/apparmor/file.c:475:23: note: (near initialization for 'link') security/apparmor/file.c:475:37: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] struct path link = { new_dir->mnt, new_dentry }; ^ security/apparmor/file.c:475:37: note: (near initialization for 'link') security/apparmor/file.c:476:25: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] struct path target = { new_dir->mnt, old_dentry }; ^ security/apparmor/file.c:476:25: note: (near initialization for 'target') security/apparmor/file.c:476:39: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] struct path target = { new_dir->mnt, old_dentry }; ^
security/apparmor/file.c:476:39: note: (near initialization for 'target')Caused by commit
1a12979f61e4("randstruct: Mark various structs for randomization")interacting with commit
8014370f1257("apparmor: movepath_linkmediation to using labels")from the security tree.
Quoted 8 lines
I added the following merge fix patch for today:
From: Stephen Rothwell <[email protected]>
Date: Tue, 20 Jun 2017 14:50:36 +1000
Subject: [PATCH] apparmor: put back designators in struct initialisersFixes 8014370f1257 ("apparmor: move path_link mediation to using labels")Signed-off-by Stephen Rothwell <[email protected]>
Quoted 20 lines
--- security/apparmor/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)security/apparmor/file.c +2
-2@@ -472,8 +472,8 @@ static int profile_path_link(struct aa_profile *profile,int aa_path_link (struct aa_label *label,struct dentry *old_dentry,const struct path *new_dir,struct dentry *new_dentry) { -struct path link = { new_dir->mnt, new_dentry }; -struct path target = { new_dir->mnt, old_dentry }; +struct path link = { .mnt = new_dir->mnt, .dentry = new_dentry }; +struct path target = { .mnt = new_dir->mnt, .dentry = old_dentry };struct path_cond cond = {d_backing_inode (old_dentry)->i_uid,d_backing_inode (old_dentry)->i_mode
John Johansen
maintainerQuoted 61 lines · Kees Cook
Quoted 60 lines · Stephen Rothwell
Hi all,
After merging the kspp tree, today's linux-next build (
x86_64allmodconfig) failed like this:
security/apparmor/file.c: In function 'aa_path_link':security/apparmor/file.c:475:23: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]struct path link = { new_dir->mnt, new_dentry }; ^ security/apparmor/file.c:475:23: note: (near initialization for 'link') security/apparmor/file.c:475:37: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] struct path link = { new_dir->mnt, new_dentry }; ^ security/apparmor/file.c:475:37: note: (near initialization for 'link') security/apparmor/file.c:476:25: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] struct path target = { new_dir->mnt, old_dentry }; ^ security/apparmor/file.c:476:25: note: (near initialization for 'target') security/apparmor/file.c:476:39: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] struct path target = { new_dir->mnt, old_dentry }; ^
security/apparmor/file.c:476:39: note: (near initialization for 'target')Caused by commit
1a12979f61e4("randstruct: Mark various structs for randomization")interacting with commit
8014370f1257("apparmor: movepath_linkmediation to using labels")from the security tree.
I added the following merge fix patch for today:
From: Stephen Rothwell <[email protected]>
Date: Tue, 20 Jun 2017 14:50:36 +1000
Subject: [PATCH] apparmor: put back designators in struct initialisersFixes 8014370f1257 ("apparmor: move path_link mediation to using labels")Signed-off-by Stephen Rothwell <[email protected]>--- security/apparmor/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)security/apparmor/file.c +2
-2@@ -472,8 +472,8 @@ static int profile_path_link(struct aa_profile *profile,int aa_path_link (struct aa_label *label,struct dentry *old_dentry,const struct path *new_dir,struct dentry *new_dentry) { -struct path link = { new_dir->mnt, new_dentry }; -struct path target = { new_dir->mnt, old_dentry }; +struct path link = { .mnt = new_dir->mnt, .dentry = new_dentry }; +struct path target = { .mnt = new_dir->mnt, .dentry = old_dentry };struct path_cond cond = {d_backing_inode (old_dentry)->i_uid,d_backing_inode (old_dentry)->i_mode
Quoted 9 lines
Quoted 2 lines
--
2.11.0Thanks for the fix! That looks correct to me. It seems the refactoring in
8014370f1257("apparmor: movepath_linkmediation to using labels") didn't take8486adf0d755("apparmor: use designated initializers") into account. John, if this looks okay, can you Ack it for James to carry in security-next?
yep, already done. Sorry I missed that one :(
Kees Cook
Acked-byQuoted 36 lines · John Johansen
Quoted 35 lines · Stephen Rothwell
Hi all,
After merging the kspp tree, today's linux-next build (
x86_64allmodconfig) failed like this:
security/apparmor/file.c: In function 'aa_path_link':security/apparmor/file.c:475:23: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]struct path link = { new_dir->mnt, new_dentry }; ^ security/apparmor/file.c:475:23: note: (near initialization for 'link') security/apparmor/file.c:475:37: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] struct path link = { new_dir->mnt, new_dentry }; ^ security/apparmor/file.c:475:37: note: (near initialization for 'link') security/apparmor/file.c:476:25: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] struct path target = { new_dir->mnt, old_dentry }; ^ security/apparmor/file.c:476:25: note: (near initialization for 'target') security/apparmor/file.c:476:39: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] struct path target = { new_dir->mnt, old_dentry }; ^
security/apparmor/file.c:476:39: note: (near initialization for 'target')Caused by commit
1a12979f61e4("randstruct: Mark various structs for randomization")interacting with commit
8014370f1257("apparmor: movepath_linkmediation to using labels")from the security tree.
I added the following merge fix patch for today:
Quoted 7 lines
Quoted 6 lines
From: Stephen Rothwell <[email protected]>
Date: Tue, 20 Jun 2017 14:50:36 +1000
Subject: [PATCH] apparmor: put back designators in struct initialisersFixes 8014370f1257 ("apparmor: move path_link mediation to using labels")Signed-off-by Stephen Rothwell <[email protected]>Acked-by John Johansen <[email protected]>
Hi James,
Just a ping; this needs to get into -next to avoid build errors. Please consider it also:
Thanks!
-Kees
Signature · 2 lines
Kees Cook Pixel Security
James Morris
maintainerQuoted 7 lines · Kees Cook
Quoted 3 lines
Quoted 2 lines
Fixes 8014370f1257 ("apparmor: move path_link mediation to using labels")Signed-off-by Stephen Rothwell <[email protected]>Acked-by John Johansen <[email protected]>Hi James,
Just a ping; this needs to get into -next to avoid build errors.
Surely Linus will resolve this when he pulls the trees in?
Signature · 2 lines
James Morris <[email protected]>
Quoted 11 lines · James Morris
Quoted 7 lines · Kees Cook
Quoted 3 lines
Quoted 2 lines
Fixes 8014370f1257 ("apparmor: move path_link mediation to using labels")Signed-off-by Stephen Rothwell <[email protected]>Acked-by John Johansen <[email protected]>Hi James,
Just a ping; this needs to get into -next to avoid build errors.
Surely Linus will resolve this when he pulls the trees in?
It's not a merge glitch, it's a refactoring glitch. John's commit in security-next ("apparmor: move path_link mediation to using labels") undid an earlier commit 8486adf0d755 ("apparmor: use designated initializers") from v4.11. This patch is needed for security-next.
-Kees
Signature · 2 lines
Kees Cook Pixel Security
James Morris
maintainerQuoted 9 lines · Kees Cook
Quoted 8 lines · James Morris
Quoted 6 lines · Kees Cook
Quoted 3 lines
Quoted 2 lines
Fixes 8014370f1257 ("apparmor: move path_link mediation to using labels")Signed-off-by Stephen Rothwell <[email protected]>Acked-by John Johansen <[email protected]>Hi James,
Quoted 9 lines
Quoted 3 lines
Quoted 1 line
Just a ping; this needs to get into -next to avoid build errors.
Surely Linus will resolve this when he pulls the trees in?
It's not a merge glitch, it's a refactoring glitch. John's commit in security-next ("apparmor: move
path_linkmediation to using labels") undid an earlier commit8486adf0d755("apparmor: use designated initializers") from v4.11. This patch is needed for security-next.
Thanks.
Applied togit://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next
Signature · 2 lines
James Morris <[email protected]>