From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795896854; b=fE+nhrZhz2Bne5R6bLyJ0jCXV8Z/AeUP7u1omlBlFWRXorqEFphztGWw8YJK/gOSVRgV e5/ZioEJvIHiQmBwlIBoMrOmoDN/zzTbS6uPpKnsaA8GAcjW1jdefMfvY0tCRncGEcCR7 l4s51x5+ocqfIn5nyfUdibKCLsvvhecX7uH15GmFvT/4wO7Y4bsV1GIAu2p+bHjDi3KoB lsHczfdEFZIjfd1VEJneZFnaWu+xxjM7Myd9HnRSYiFo5TOtCGER5pB9pOwxZQX3aFWup 8rdnUTB9DH2MoCcd7s3Cb+0n+ILr8VpPezHiEbjYNCjFC1BJwr68H/6S+Z6QznbeYRw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795896854; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=kT4GoZRBN05sOZdDNPq9mz2vUNXyIT5F+V6ulRZhwPQ=; b=zELAcQ42DwUC3G0JF9wd5oVDtrFzahG4XpNYgyCQDjOxCERZfxpQBVa3NkfKXwIXIe0v uGbmTTGAsjzH21UYGd5GIuaHIrd3fGOzO+nLcMJixUWidArWVRMcesrktOpd6DnzL5odn PnWgmK8MZ0KdNCfXctyqaU0oizv0y3ogzZmbjiDkwZ5xHXOJyKj3pIZmG57kKI3v4IIsx Smf6ptaCSWdZ8GmAlKC2BqzaQEdt5NFRZpzZ1fSorzU7GdXwoqfFOwTR/9QoHVIxifzeU SD0T8X6xffEe2xSA/LE/3lOdUQGqqeoWTcdrxAYroZcc19BFn4MxN/bRIYf9IdwvdjQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Cz17YR+q; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (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 45566606A31C; Sat, 28 Nov 2026 20:14:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Cz17YR+q Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01BC01F00897; Sat, 28 Nov 2026 20:14:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795896854; bh=kT4GoZRBN05sOZdDNPq9mz2vUNXyIT5F+V6ulRZhwPQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Cz17YR+q8HGUa+9/TNmNQyrUK+voPswnFmYHPbrkX0wOHW6RTavdcjgIB0hNIDJId 6Luro06G1XVso8x5fITU1jRcIkkzN952kovhWTdmxTZ6XWxx9XwMjr6pyi2/jaH2Ba 2LcOCMQEU5QtIPIqrF/FMOrkSALFiFnUtd96md0I7/VlwWxPeBqlkhL0u6bFpufr1k OBdrgMFGFWZAax77LYvkFVbivM9N9G8EaOaLPuRsENFimqJWroMNQknXJqMG5uNO+n nETpYKmkHgAY02RmyA5SGqQ79lC1yoptsFf9vbFtOgX8rXlnBXoLSjlHh8MdOEUnGs MN2Gqb+VQDQqg== Date: Sat, 28 Nov 2026 13:14:10 -0700 From: Nathan Chancellor To: Ard Biesheuvel Cc: linux-efi@vger.kernel.org, Nicolas Schier , linux-kbuild@vger.kernel.org Subject: Re: [PATCH 1/2] scripts/Makefile.lib: Capture decompressed size in ZSTD22 metadata Message-ID: <20261128201410.GA2897137@ax162> References: <20261126224400.10147-4-ardb@kernel.org> <20261126224400.10147-5-ardb@kernel.org> X-Mailing-List: linux-efi@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261126224400.10147-5-ardb@kernel.org> On Thu, Nov 26, 2026 at 11:44:02PM +0100, Ard Biesheuvel wrote: > Tweak the [unused] ZSTD22 compression rule so that the combined size of > the uncompressed input is recorded in the ZSTD metadata. This allows > ZSTD standard tooling to query it. > > Signed-off-by: Ard Biesheuvel Unless Nicolas has any objections, I think you can take this via the EFI tree. I doubt there will be conflicts in this area. Acked-by: Nathan Chancellor > --- > scripts/Makefile.lib | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib > index 19e96b30a122f..5b58577b158af 100644 > --- a/scripts/Makefile.lib > +++ b/scripts/Makefile.lib > @@ -344,13 +344,17 @@ quiet_cmd_gzip = GZIP $@ > > # Bzip2 and LZMA do not include size in file... so we have to fake that; > # append the size as a 32-bit littleendian number as gzip does. > -size_append = printf $(shell \ > +total_file_size = $(shell \ > dec_size=0; \ > for F in $(real-prereqs); do \ > fsize=$$($(CONFIG_SHELL) $(srctree)/scripts/file-size.sh $$F); \ > dec_size=$$(expr $$dec_size + $$fsize); \ > done; \ > -printf "%08x\n" $$dec_size | \ > +printf "%d\n" $$dec_size \ > +) > + > +size_append = printf $(shell \ > +printf "%08x\n" $(total_file_size) | \ > sed 's/\(..\)/\1 /g' | { \ > read ch0 ch1 ch2 ch3; \ > for ch in $$ch3 $$ch2 $$ch1 $$ch0; do \ > @@ -479,7 +483,7 @@ quiet_cmd_zstd = ZSTD $@ > cmd_zstd = cat $(real-prereqs) | $(ZSTD) -19 > $@ > > quiet_cmd_zstd22 = ZSTD22 $@ > - cmd_zstd22 = cat $(real-prereqs) | $(ZSTD) -22 --ultra > $@ > + cmd_zstd22 = cat $(real-prereqs) | $(ZSTD) -22 --ultra --stream-size=$(total_file_size) > $@ > > quiet_cmd_zstd22_with_size = ZSTD22 $@ > cmd_zstd22_with_size = { cat $(real-prereqs) | $(ZSTD) -22 --ultra; $(size_append); } > $@ > -- > 2.47.3 > -- Cheers, Nathan