[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230109091919.3160916-1-masahiroy@kernel.org>
Date: Mon, 9 Jan 2023 18:19:18 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Kentaro Takeda <takedakn@...data.co.jp>,
Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
Cc: linux-kernel@...r.kernel.org,
Masahiro Yamada <masahiroy@...nel.org>,
James Morris <jmorris@...ei.org>,
Paul Moore <paul@...l-moore.com>,
"Serge E. Hallyn" <serge@...lyn.com>,
linux-security-module@...r.kernel.org
Subject: [PATCH] tomoyo: remove a temporary output file
Commit 8ab5bc40aad4 ("tomoyo: Omit use of bin2c") was locally modified
on top of the patch I submitted.
I recommend writing to the target directly.
If the recipe command fails, Kbuild will automatically delete the target
because scripts/Kbuild.include defines .DELETE_ON_ERROR.
If the recipe command is interrupted, GNU Make will automatically
delete the target if it has been partially updated. There was a corner
case where the target was not cleaned up, but it was fixed by Commit
a7f3257da8a8 ("kbuild: remove the target in signal traps when
interrupted").
Since this is a general problem, you can leave it to Kbuild instead
of introducing unneeded complexity.
Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
---
If it is not too late, please squash this.
security/tomoyo/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/tomoyo/Makefile b/security/tomoyo/Makefile
index 458cf5e2fa25..884ff155edc3 100644
--- a/security/tomoyo/Makefile
+++ b/security/tomoyo/Makefile
@@ -9,7 +9,7 @@ quiet_cmd_policy = POLICY $@
printf 'static char tomoyo_builtin_$x[] __initdata =\n'; \
sed -e 's/\\/\\\\/g' -e 's/\"/\\"/g' -e 's/\(.*\)/\t"\1\\n"/' -- $(firstword $(filter %/$x.conf %/$x.conf.default, $^) /dev/null); \
printf '\t"";\n';) \
- } > $@...p && mv $@...p $@
+ } > $@
$(obj)/builtin-policy.h: $(wildcard $(obj)/policy/*.conf $(srctree)/$(src)/policy/*.conf.default) FORCE
$(call if_changed,policy)
--
2.34.1
Powered by blists - more mailing lists