linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Nicolas Schier <nsc@kernel.org>
Cc: Kees Cook <kees@kernel.org>, WangYuli <wangyuli@aosc.io>,
	WangYuli <wangyl5933@chinaunicom.cn>,
	linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kbuild@vger.kernel.org,
	Nicolas Schier <nicolas.schier@linux.dev>
Subject: Re: [PATCH 2/2] fortify: Cleanup temp file also on non-successful exit
Date: Mon, 1 Dec 2025 16:43:05 -0700	[thread overview]
Message-ID: <20251201234305.GC2018462@ax162> (raw)
In-Reply-To: <20251128-fortify-improve-handling-of-tempfile-v1-2-a79d0d3abcac@kernel.org>

On Fri, Nov 28, 2025 at 08:27:58PM +0100, Nicolas Schier wrote:
> From: Nicolas Schier <nicolas.schier@linux.dev>
> 
> Ensure cleanup of test_fortify.sh's temporary file also on script
> interruption, or some common signals.
> 
> Reported-by: WangYuli <wangyuli@aosc.io>
> Closes: https://lore.kernel.org/linux-kbuild/20251112114725.287349-1-wangyuli@aosc.io/
> Signed-off-by: Nicolas Schier <n.schier@avm.de>

I guess with patch 1, this does not become as big of a deal. Kees, is
there any reason to leave these temporary files around if there was an
interruption or other signal? I do not see any obvious ones so:

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
>  lib/test_fortify/test_fortify.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/test_fortify/test_fortify.sh b/lib/test_fortify/test_fortify.sh
> index 368d07d9acbf..ad6dd44fa31c 100644
> --- a/lib/test_fortify/test_fortify.sh
> +++ b/lib/test_fortify/test_fortify.sh
> @@ -29,7 +29,7 @@ shift
>  __cleanup() {
>  	rm -f "$TMP"
>  }
> -trap __cleanup EXIT
> +trap __cleanup EXIT HUP INT QUIT TERM
>  
>  # Function names in warnings are wrapped in backticks under UTF-8 locales.
>  # Run the commands with LANG=C so that grep output will not change.
> 
> -- 
> 2.51.0
> 

      parent reply	other threads:[~2025-12-01 23:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-28 19:27 [PATCH 0/2] fortify: test_fortify.sh: Improve handling of tempfile Nicolas Schier
2025-11-28 19:27 ` [PATCH 1/2] fortify: Rename temporary file to match ignore pattern Nicolas Schier
2025-12-01  1:55   ` WangYuli
2025-12-01 23:41   ` Nathan Chancellor
2025-11-28 19:27 ` [PATCH 2/2] fortify: Cleanup temp file also on non-successful exit Nicolas Schier
2025-12-01  1:56   ` WangYuli
2025-12-01 23:43   ` Nathan Chancellor [this message]

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=20251201234305.GC2018462@ax162 \
    --to=nathan@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.schier@linux.dev \
    --cc=nsc@kernel.org \
    --cc=wangyl5933@chinaunicom.cn \
    --cc=wangyuli@aosc.io \
    /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;
as well as URLs for NNTP newsgroup(s).