From: Masahiro Yamada <masahiroy@kernel.org>
To: Kentaro Takeda <takedakn@nttdata.co.jp>,
Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: linux-kernel@vger.kernel.org,
Masahiro Yamada <masahiroy@kernel.org>,
James Morris <jmorris@namei.org>,
Paul Moore <paul@paul-moore.com>,
"Serge E. Hallyn" <serge@hallyn.com>,
linux-security-module@vger.kernel.org
Subject: [PATCH] tomoyo: remove a temporary output file
Date: Mon, 9 Jan 2023 18:19:18 +0900 [thread overview]
Message-ID: <20230109091919.3160916-1-masahiroy@kernel.org> (raw)
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@kernel.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';) \
- } > $@.tmp && mv $@.tmp $@
+ } > $@
$(obj)/builtin-policy.h: $(wildcard $(obj)/policy/*.conf $(srctree)/$(src)/policy/*.conf.default) FORCE
$(call if_changed,policy)
--
2.34.1
next reply other threads:[~2023-01-09 9:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 9:19 Masahiro Yamada [this message]
2023-01-09 10:01 ` Tetsuo Handa
2023-01-09 11:35 ` Masahiro Yamada
2023-01-09 12:59 ` Tetsuo Handa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230109091919.3160916-1-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=serge@hallyn.com \
--cc=takedakn@nttdata.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®