From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=45.157.188.14 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796163020; b=HsnQmOvznlxfU1x2tbwC2rlBkblXOPzw1fEsIL/MHfEJkvMDLdVt/dCrZvrZ3tkxeqmF VwvP9ddjFvpFEZ//ZGFjh2qoMHgDfAv4+ppB0/YUe9tVqtfuGd8AdxJFW8Qy3zbrHXOsO +8FmEnw+Jg2cGXK7M/XP6x1ZqVvSDGvSas/3SVg6maDY0ZKM4TawxkJmb3fV8kJgleIpt 3hOcwMTc42U850XBZ9gLMcNgA92Iv7mn/22HWcToJyr/Gbik7opjkXb+sVJ/ryOF7JCKn 8H92EtEWE+unNBIZ+en5n46qDQhn7WnSrRiEifNEtuwqzihy0Qxejv1QG5WjP/wb1Sw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796163020; h=DMARC-Filter:Received:DKIM-Signature:Received:Received:From:To:Cc: Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding:X-Infomaniak-Routing; bh=9oKwYZFGdi4I6ZSmS3t/mbrvSwDbYTHYz45q2FhKizc=; b=mI+NJaWOI/VFcJ3z9Uhbc5NcqhH11FR/8fKdd7Gil5+4cp6kqoVpoh2c54RePW5lYPyy KJnARmAi/3gZBI+I3Whi2kcyw5X1y7QYyebRso2/rloabX8vsEGrKmOgfayZs94eUsRyA WbQl5FEYYgx4OQ07qFilTDgNrZcRaj+vSRorSu7muJEk/KMuMgdNOiIn2SREhERSbR6dh ddnqoevpo9mdEzxImRo5qe6GcvWT3fxqu53vtP0GQstRI+qfKq1KJLROc1kDlgLmMN7xW LiFDn26yRT8Lgoy+ViocEx5SopmMLrSL4zIw7lCUQLe0Z6fxTjvya2DsVKKS39xh3yg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=daylightlinux.ch; spf=pass smtp.mailfrom=daylightlinux.ch; dkim=pass header.d=daylightlinux.ch header.i=@daylightlinux.ch header.a=rsa-sha256 header.s=20261016 header.b=AsdpuW3M; arc=none smtp.remote-ip=45.157.188.14 Received: from smtp-bc0e.mail.infomaniak.ch (smtp-bc0e.mail.infomaniak.ch [45.157.188.14]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA56A606A32F for ; Tue, 1 Dec 2026 22:10:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DA56A606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=daylightlinux.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=daylightlinux.ch Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=daylightlinux.ch header.i=@daylightlinux.ch header.a=rsa-sha256 header.s=20261016 header.b=AsdpuW3M Received: from smtp-4-0001 (unknown [IPv6:2001:1600:7:10::a6c]) by smtp-3-3000 (Postfix) with ESMTPS id 4jfFSV0Fhfz43s; Tue, 1 Dec 2026 23:10:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daylightlinux.ch; s=20261016; t=1796163017; bh=9oKwYZFGdi4I6ZSmS3t/mbrvSwDbYTHYz45q2FhKizc=; h=From:To:Cc:Subject:Date:From; b=AsdpuW3M5JkwtDMbc9d3fjLRRqH2oUbCai5QOieBQ4TaTCN3MyML+MHeMK5wJXcYL JEnCbttn9As5FJexaff9bkCkPzg2oWAW4qZVwzj6nW54t3zpZlhzgZkLtJuJxypwwb 1AxatnMRnsQrZuxoAsm14+qnFipwA/T6CvRmDcZPrhcXVCtI6521xFRhzxNiH3F3Px sXaI+qKklU4BjQwBaPY9iAAHHXLF/nsxTsvxMUEy0loOJ7JEDNYrDhhBazXiS5zj17 I4znq2ISwde6BO1PLJbatFpLP6rfPZGyRiVLkd/twqX5tnTKwefbjF8DB9+ngqa8rl TzN4KWfbpgm6A== Received: from unknown by smtp-4-0001 (Postfix) with ESMTPA id 4jfFST0w7yzNVj; Tue, 1 Dec 2026 23:10:17 +0100 (CET) Received: from unknown by raspberrypi.home with local (Exim 4.96) (envelope-from ) id 1xYW3E-004kgA-2K; Tue, 01 Dec 2026 23:10:16 +0100 From: Hamdy Abou El Anein To: nathan@kernel.org, nsc@kernel.org Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, corentincj@iksaif.net, mmarek@suse.cz Subject: [PATCH] scripts: extract-vmlinux: return failure when extraction fails Date: Tue, 1 Dec 2026 23:10:13 +0100 Message-ID: <20261201221013.16216-1-info@daylightlinux.ch> X-Mailer: git-send-email 2.56.1 X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Infomaniak-Routing: alpha When none of the supported decompression methods yields a kernel image, extract-vmlinux prints an error but returns the exit status of echo, which is normally zero. Callers checking the exit status can therefore mistake an unsuccessful extraction for success. Explicitly exit with status 1 after the error message, matching extract-ikconfig's failure convention. Preserve status 2 for invalid invocations and status 0 for successful extraction. Tested invalid raw and gzip-compressed input, missing and empty input, and byte-for-byte extraction of raw, gzip and xz ELF fixtures. AI assistance: ChatGPT identified the issue, prepared the fix and commit message, and ran local regression tests. Fixes: 09d481270d44 ("scripts: add extract-vmlinux") Signed-off-by: Hamdy Abou El Anein --- scripts/extract-vmlinux | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/extract-vmlinux b/scripts/extract-vmlinux index 266df9bc7a48..947182fff26d 100755 --- a/scripts/extract-vmlinux +++ b/scripts/extract-vmlinux @@ -63,3 +63,4 @@ check_vmlinux "$img" cat 0 # Bail out: echo "$me: Cannot find vmlinux." >&2 +exit 1 -- 2.56.1