[PATCH v2 0/2] fortify: test_fortify.sh: Improve handling of tempfile

Nicolas Schier posted 2 patches 3 weeks, 2 days ago
lib/test_fortify/test_fortify.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH v2 0/2] fortify: test_fortify.sh: Improve handling of tempfile
Posted by Nicolas Schier 3 weeks, 2 days ago
WangYuli reported [1] that the temporary file created by test_fortify.sh
is recognised by git as untracked file, especially if it remains after
non-common exits of test_fortify.sh (e.g. killed by signal).

The following two patches handle that by renaming the temporary file and
by cleaning up the file in more situations.

Link: https://lore.kernel.org/linux-kbuild/20251112114725.287349-1-wangyuli@aosc.io/ # [1]
Signed-off-by: Nicolas Schier <nsc@kernel.org>
---
Changes in v2:
  * Fixed author/trailer inconsistency (Nathan)
  * Added review trailers
  * Link to v1: https://patch.msgid.link/20251128-fortify-improve-handling-of-tempfile-v1-0-a79d0d3abcac@kernel.org

---
Nicolas Schier (2):
      fortify: Rename temporary file to match ignore pattern
      fortify: Cleanup temp file also on non-successful exit

 lib/test_fortify/test_fortify.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
change-id: 20251128-fortify-improve-handling-of-tempfile-2d2ac64ba4aa

Best regards,
-- 
Nicolas
Re: [PATCH v2 0/2] fortify: test_fortify.sh: Improve handling of tempfile
Posted by Kees Cook 3 weeks, 1 day ago
On Wed, 14 Jan 2026 14:57:13 +0100, Nicolas Schier wrote:
> WangYuli reported [1] that the temporary file created by test_fortify.sh
> is recognised by git as untracked file, especially if it remains after
> non-common exits of test_fortify.sh (e.g. killed by signal).
> 
> The following two patches handle that by renaming the temporary file and
> by cleaning up the file in more situations.
> 
> [...]

Applied to for-next/hardening, thanks!

[1/2] fortify: Rename temporary file to match ignore pattern
      https://git.kernel.org/kees/c/ccfe7d6251f4
[2/2] fortify: Cleanup temp file also on non-successful exit
      https://git.kernel.org/kees/c/9f54ab83cb2a

Take care,

-- 
Kees Cook