From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=84.16.66.171 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796163020; b=hhwKgJWVNFzMmdPz6af4vgjhkpHtX8eIySZ78THVBz5aIMrmkSnTKrk6p6egdH+ef2PC elmFj1A8AHEUTVsUv8x4UeLDWVxo0jZGqTgstlO8bmGbDZyZ5ACW8irNien/9qJwNGVIz bwYOqkoEgctjBvD6D2I5fG5D8VNk3rPQ06zAhQBNZtyD33ekUnQJG75nA9hhAgoObITUu Q9Ss8XYGmnveBUyRO55b7rBxS2FVMYAKo+vxJ5oC2oOKIcL0qYEU4qjiF3g9iMWkrTaIX lqaic1mTW/W7bGCyV0s4UGXGcmyKU/QTiQZzsOkFiCnp6B0fP9pBg319JI0iHatfRrw== 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=GKWYSrsNJdOFzdb54SpgRXofcJoP24WGEv+670aaNzISrhBzXTvW9YrB6ep/Ig06a0+b wvJffcTuwOJTi9u3/jnjMbViphJRIIAeSvYZ+WMGeLI4Aj5sb/cIE3KlIp8LJl7GGaGOV sSBhk66W3sw9powI5qeFtrOo6bohgWhuUUnXv6ckVy2WcLCMVYnA0dRm697/oMtRnMUsU bHlPvyMeKUCE/Jclh8Hqnt0WYO/yP39cLL7aVcbgZ7gG1l74ZFLXghYhLt0/EunzdXGjL ClcNr1W8KCFRw4tjWBBy+ZOkFU1odFatf7v7cx02nKrpcTKBlazvy78ZcIQWufs55hw== 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=84.16.66.171 Received: from smtp-42ab.mail.infomaniak.ch (smtp-42ab.mail.infomaniak.ch [84.16.66.171]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7347606A32D for ; Tue, 1 Dec 2026 22:10:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D7347606A32D 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, unprotected) header.d=daylightlinux.ch header.i=@daylightlinux.ch header.a=rsa-sha256 header.s=20261016 header.b=AsdpuW3M Received: from smtp-4-0001 (smtp-4-0001.mail.infomaniak.ch [10.7.10.108]) by smtp-4-3000 (Postfix) with ESMTPS id 4jfFSV08HJz1B7p; 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-kernel@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