selinux: don't use make's grouped targets feature yet
Paul Moore
maintainerPATCH 1/1 selinux: don't use make's grouped targets feature yet
The Linux Kernel currently only requires make v3.82 while the grouped target functionality requires make v4.3. Removed the grouped target introduced in 4ce1f694eb5d ("selinux: ensure av_permissions.h is built when needed") as well as the multiple header file targets in the make rule. This effectively reverts the problem commit.
We will revisit this change when make >= 4.3 is required by the rest of the kernel.
--- security/selinux/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
security/selinux/Makefile +5 -1
@@ -26,5 +26,9 @@ quiet_cmd_flask = GEN $(obj)/flask.h $(obj)/av_permissions.h cmd_flask = $< $(obj)/flask.h $(obj)/av_permissions.h targets += flask.h av_permissions.h -$(obj)/flask.h $(obj)/av_permissions.h &: scripts/selinux/genheaders/genheaders FORCE +# once make >= 4.3 is required, we can use grouped targets in the rule below, +# which basically involves adding both headers and a '&' before the colon, see +# the example below: +# $(obj)/flask.h $(obj)/av_permissions.h &: scripts/selinux/... +$(obj)/flask.h: scripts/selinux/genheaders/genheaders FORCE $(call if_changed,flask)
Signature · 1 line
2.40.1
Paul Moore
maintainerQuoted 10 lines · Paul Moore
The Linux Kernel currently only requires make v3.82 while the grouped target functionality requires make v4.3. Removed the grouped target introduced in
4ce1f694eb5d("selinux: ensureav_permissions.his built when needed") as well as the multiple header file targets in the make rule. This effectively reverts the problem commit.We will revisit this change when make >= 4.3 is required by the rest of the kernel.
Quoted 8 lines
Fixes 4ce1f694eb5d ("selinux: ensure av_permissions.h is built when needed")Reported-by Erwan Velu <[email protected]>Reported-by Luiz Capitulino <[email protected]>Signed-off-by Paul Moore <[email protected]>--- security/selinux/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
As indicated by the -stable tag above, this is intended for the selinux/stable-6.4 branch, with backports to the affected -stable trees expected once this hits Linus' tree.
The SELinux folks will likely note that a different patch will be needed for selinux/next, you can expect that shortly, I just wanted to make sure we fixed Linus' tree first.
Signature · 1 line
paul-moore.com
Quoted 11 lines · Paul Moore
The Linux Kernel currently only requires make v3.82 while the grouped target functionality requires make v4.3. Removed the grouped target introduced in
4ce1f694eb5d("selinux: ensureav_permissions.his built when needed") as well as the multiple header file targets in the make rule. This effectively reverts the problem commit.We will revisit this change when make >= 4.3 is required by the rest of the kernel.
Note for -stable: this is needed in all kernels that backported commit 4ce1f694eb5d
Thanks, Paul!
Quoted 28 lines
Fixes 4ce1f694eb5d ("selinux: ensure av_permissions.h is built when needed")Reported-by Erwan Velu <[email protected]>Reported-by Luiz Capitulino <[email protected]>Signed-off-by Paul Moore <[email protected]>--- security/selinux/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)security/selinux/Makefile +5
-2@@ -26,5 +26,9 @@ quiet_cmd_flask = GEN $(obj)/flask.h $(obj)/av_permissions.h cmd_flask = $< $(obj)/flask.h $(obj)/av_permissions.h targets += flask.h av_permissions.h -$(obj)/flask.h $(obj)/av_permissions.h &: scripts/selinux/genheaders/genheaders FORCE +# once make >= 4.3 is required, we can use grouped targets in the rule below, +# which basically involves adding both headers and a '&' before the colon, see +# the example below: +# $(obj)/flask.h $(obj)/av_permissions.h &: scripts/selinux/... +$(obj)/flask.h: scripts/selinux/genheaders/genheaders FORCE $(call if_changed,flask) --2.40.1
Paul Moore
maintainerQuoted 8 lines · Luiz Capitulino
Quoted 7 lines · Paul Moore
The Linux Kernel currently only requires make v3.82 while the grouped target functionality requires make v4.3. Removed the grouped target introduced in
4ce1f694eb5d("selinux: ensureav_permissions.his built when needed") as well as the multiple header file targets in the make rule. This effectively reverts the problem commit.
Quoted 4 lines
Quoted 2 lines
We will revisit this change when make >= 4.3 is required by the rest of the kernel.
Tested-by Luiz Capitulino <[email protected]>
Great, thanks for the help. I'm going to merge this into selinux/stable-6.4 and send it up to Linus as soon as the testing with that is done (should be later tonight).
Quoted 4 lines
Note for -stable: this is needed in all kernels that backported commit
4ce1f694eb5dThanks, Paul!
Signature · 1 line
paul-moore.com
Le 01/06/2023 à 20:06, Paul Moore a écrit :
Quoted 6 lines
The Linux Kernel currently only requires make v3.82 while the grouped target functionality requires make v4.3. Removed the grouped target introduced in
4ce1f694eb5d("selinux: ensureav_permissions.his built when needed") as well as the multiple header file targets in the make rule. This effectively reverts the problem commit.
Quoted 8 lines
We will revisit this change when make >= 4.3 is required by the rest of the kernel.
Fixes 4ce1f694eb5d ("selinux: ensure av_permissions.h is built when needed")Reported-by Erwan Velu <[email protected]>Reported-by Luiz Capitulino <[email protected]>Signed-off-by Paul Moore <[email protected]>
Thanks for the patch & the quick exchange we had around this issue.
Erwan,
Paul Moore
maintainerQuoted 10 lines · Erwan Velu
Quoted 9 lines · Paul Moore
The Linux Kernel currently only requires make v3.82 while the grouped target functionality requires make v4.3. Removed the grouped target introduced in
4ce1f694eb5d("selinux: ensureav_permissions.his built when needed") as well as the multiple header file targets in the make rule. This effectively reverts the problem commit.We will revisit this change when make >= 4.3 is required by the rest of the kernel.
Quoted 7 lines
Quoted 5 lines
Fixes 4ce1f694eb5d ("selinux: ensure av_permissions.h is built when needed")Reported-by Erwan Velu <[email protected]>Reported-by Luiz Capitulino <[email protected]>Signed-off-by Paul Moore <[email protected]>Thanks for the patch & the quick exchange we had around this issue.
Thanks for your help with identification and testing! I just saw that Linus merged this into his tree, so I would expect this to start making its way to the -stable trees soon.
Signature · 1 line
paul-moore.com