From nobody Sat Feb 7 05:52:54 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C5EE726D4E5; Wed, 14 Jan 2026 13:57:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768399047; cv=none; b=bf4u2Ro6/myoh6Olipdp7gujTh4D+wP6qUqYS5dE78ALBjDCAsj1/Gd/AYnu61CKsPjOwVxBokoHl8Id5QOTE9nG/pumxe3ND/IDFQ22l2cYD3z/tgugOa25dP3HAW7xCM038CMXVgk2JLBih49PXgbAm6611KMgPLvluZ3shaw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768399047; c=relaxed/simple; bh=A7ygFWHnIONEhJhocd8AvjOJ78ZJEEV+LBZvV8xV114=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ml7OC/rwq9tlK43+70EXI+quB5LulfrIud395J4XGqPqsfEe+ZVxHWof4fcHMiHTgx1gEilzRlA3q22hdVkMP7ykpW/ldxtNQanUVY2MrQPcfUcs3SidWlVg3HmF3hrYl/FQMeuGwOImPd1k74RBXdvVhKRMI3WYhCdkjpMQ/lE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WkOPVN7d; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WkOPVN7d" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2972AC4CEF7; Wed, 14 Jan 2026 13:57:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1768399047; bh=A7ygFWHnIONEhJhocd8AvjOJ78ZJEEV+LBZvV8xV114=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=WkOPVN7dE/j2JMVMAHAhX4r9aXtO6y25t/CL1P/WKLeFkyoOXdUHf6AlC26rRU1Ki 85M9Wm9heNuw3+UgSjuSzitf8rxAU+PbsHz+AofUhGGmewUcguXRF2s+n4PUJvYuZI pw2qjYTzUYw9ffTa/x25PnsYL8EkyWUPpgjUtzD+Ol5mylP3MOvQr64gGFDmUOCDgn Z6bFsx3YG1gzFDr7J9X6QqRXskZ/PkyyjCOcK8qKAcrcQc4OG8lUAYUW6aMNxIZcSR OA7aKkMTOVClC00FFRXoJT1Pbc1Qi7BNIWdsTFkM7Gdycqyh83A+sA33VVz2+4mlOR th6GjJmHBMb7Q== From: Nicolas Schier Date: Wed, 14 Jan 2026 14:57:14 +0100 Subject: [PATCH v2 1/2] fortify: Rename temporary file to match ignore pattern Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260114-fortify-improve-handling-of-tempfile-v2-1-63b86c4dbd0e@kernel.org> References: <20260114-fortify-improve-handling-of-tempfile-v2-0-63b86c4dbd0e@kernel.org> In-Reply-To: <20260114-fortify-improve-handling-of-tempfile-v2-0-63b86c4dbd0e@kernel.org> To: Kees Cook Cc: linux-hardening@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Nicolas Schier , WangYuli , Nathan Chancellor X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1768399036; l=1011; i=nsc@kernel.org; s=20250924; h=from:subject:message-id; bh=A7ygFWHnIONEhJhocd8AvjOJ78ZJEEV+LBZvV8xV114=; b=H1yMYBKniPqfpoD6hD4nj51OF7lH/u889QvUnzjAKf4PXy3AEkOEJuDffsV2szcos9859lLop eUeVydBJU7XAV7JbLiAYPvv6EwuIRe0ZBJ1iJVwUEO4HHYUJysJBM5A X-Developer-Key: i=nsc@kernel.org; a=ed25519; pk=+0ar7sBdSzOoVoXxW8B+48yZbV4azT4joSEm8UyP7z4= test_fortify.sh uses a temporary file that might appear as untracked file in some rare sitations. Rename it to match one of top-level's gitignore patterns. Reported-by: WangYuli Closes: https://lore.kernel.org/linux-kbuild/20251112114725.287349-1-wangyu= li@aosc.io/ Reviewed-by: Nathan Chancellor Reviewed-by: WangYuli Signed-off-by: Nicolas Schier --- 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_forti= fy.sh index c2688ab8281d025ad80168b783d293950c4e726c..368d07d9acbf737be376756b39d= ef87f12f4e9bf 100644 --- a/lib/test_fortify/test_fortify.sh +++ b/lib/test_fortify/test_fortify.sh @@ -17,7 +17,7 @@ WANT=3D"__${FILE%%-*}" # Argument 2: Where to write the build log. OUT=3D"$1" shift -TMP=3D"${OUT}.tmp" +TMP=3D"${OUT%/*}/.${OUT##*/}.tmp" =20 # Argument 3: Path to "nm" tool. NM=3D"$1" --=20 2.47.3 From nobody Sat Feb 7 05:52:54 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 74D041E25F9; Wed, 14 Jan 2026 13:57:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768399050; cv=none; b=uJl8iKqMNAMvHT5SQ1/6Ax1wGDSX+bXmgGOSYFyGXlZdNCXGQ/HNESbEn0UDgG9wSLwFduYMb8/DI4iLL5m59sdmrOeIhnGBlQS9y6nbRrPo114yiWv9ahWgIikeDwSoZPHLzzORXBkUe9JI9deNgfVhR/rZ6JiiJydEtktCyiI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768399050; c=relaxed/simple; bh=sv6so1kAWDstRTHH9n09D8fRDroRVEa1x32rvkw/VJA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gHIthNO2eRBtqXRwNhbjwJXFd0fpCB8CQ1R6xQVu8maNJu3LujDof+lNhDvO4Ad//LuS+Y5LXt8wpIm1cYPoCo+GdV7amex3SNuypFuuvoJGNrOn/O1Eeo+r0Z6/935LHqth3xVlXdf/KGxrtmNRgy3+C9P++KuaainugWjYpeE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fu7NPq6/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fu7NPq6/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6D82C16AAE; Wed, 14 Jan 2026 13:57:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1768399050; bh=sv6so1kAWDstRTHH9n09D8fRDroRVEa1x32rvkw/VJA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=fu7NPq6/5Yz27+CRF235QGwz8QhQzdXAyCsYF3xmHYlXix6wwXg3JMFFQ2zU3azST n7XQuB5LnysRQURFB3HIPnt+2inoAy5uYkIZ6ynobBuDqmJzPJ0V1649SgQqKe2loA sBobkyBECVksGERwvQPaZ3n7su7jOYar84fzHAEquF55veYToZ8A1QId6BeonN97eM esysauvxCYv5d58U9xZNeBSMnIL9UJQKWwL7QH92TZpvvqSd5NF4nFGyA0Ub07OaaH 8zSS5LcPBiw+meCaIeCZsZ8AasAr7iumYYNYGK+4crDjmH461g3hELxSNfZDQq9zkX N9xtU4IJKIkKw== From: Nicolas Schier Date: Wed, 14 Jan 2026 14:57:15 +0100 Subject: [PATCH v2 2/2] fortify: Cleanup temp file also on non-successful exit Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260114-fortify-improve-handling-of-tempfile-v2-2-63b86c4dbd0e@kernel.org> References: <20260114-fortify-improve-handling-of-tempfile-v2-0-63b86c4dbd0e@kernel.org> In-Reply-To: <20260114-fortify-improve-handling-of-tempfile-v2-0-63b86c4dbd0e@kernel.org> To: Kees Cook Cc: linux-hardening@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Nicolas Schier , WangYuli , Nathan Chancellor X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1768399036; l=1024; i=nsc@kernel.org; s=20250924; h=from:subject:message-id; bh=sv6so1kAWDstRTHH9n09D8fRDroRVEa1x32rvkw/VJA=; b=1TtsteheMDjFq0FlufKyn5Ge631Q8bpNrEyQg4F61tMMYLvq961Z2cyy+NNtS6R6aMCHlBPh/ wOYyBwBypzlBoOzwM+gdG+2Go6Ynsx0jiBMnpra3ZIa2/lFrEtx6B+y X-Developer-Key: i=nsc@kernel.org; a=ed25519; pk=+0ar7sBdSzOoVoXxW8B+48yZbV4azT4joSEm8UyP7z4= Ensure cleanup of test_fortify.sh's temporary file also on script interruption, or some common signals. Reported-by: WangYuli Closes: https://lore.kernel.org/linux-kbuild/20251112114725.287349-1-wangyu= li@aosc.io/ Reviewed-by: Nathan Chancellor Reviewed-by: WangYuli Signed-off-by: Nicolas Schier --- 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_forti= fy.sh index 368d07d9acbf737be376756b39def87f12f4e9bf..ad6dd44fa31c0ad3a063cd0caab= 3a4664f9f3f31 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 =20 # Function names in warnings are wrapped in backticks under UTF-8 locales. # Run the commands with LANG=3DC so that grep output will not change. --=20 2.47.3