lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1b2221cb-803b-4709-bb61-4a347397df28@pengutronix.de>
Date: Wed, 26 Nov 2025 10:24:30 +0100
From: Ahmad Fatoum <a.fatoum@...gutronix.de>
To: Simon Glass <sjg@...omium.org>, linux-arm-kernel@...ts.infradead.org
Cc: Thomas Weißschuh <thomas.weissschuh@...utronix.de>,
 Masahiro Yamada <masahiroy@...nel.org>, Tom Rini <trini@...sulko.com>,
 J . Neuschäfer <j.ne@...teo.net>,
 Nicolas Schier <nicolas@...sle.eu>, Chen-Yu Tsai <wenst@...omium.org>,
 Nicolas Schier <nsc@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 1/8] scripts/make_fit: Speed up operation



On 11/19/25 7:13 PM, Simon Glass wrote:
> The kernel is likely at least 16MB so we may as well use that as a step
> size when reallocating space for the FIT in memory. Pack the FIT at the
> end, so there is no wasted space.
> 
> This reduces the time to pack by an order of magnitude, or so.
> 
> Signed-off-by: Simon Glass <sjg@...omium.org>
> Reviewed-by: Nicolas Schier <nsc@...nel.org>

Reviewed-by: Ahmad Fatoum <a.fatoum@...gutronix.de>

> ---
> 
> (no changes since v3)
> 
> Changes in v3:
> - Move the ramdisk chunk into the correct patch
> 
>  scripts/make_fit.py | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/make_fit.py b/scripts/make_fit.py
> index 1683e5ec6e67..0f5e7c4b8aed 100755
> --- a/scripts/make_fit.py
> +++ b/scripts/make_fit.py
> @@ -98,7 +98,7 @@ def setup_fit(fsw, name):
>          fsw (libfdt.FdtSw): Object to use for writing
>          name (str): Name of kernel image
>      """
> -    fsw.INC_SIZE = 65536
> +    fsw.INC_SIZE = 16 << 20
>      fsw.finish_reservemap()
>      fsw.begin_node('')
>      fsw.property_string('description', f'{name} with devicetree set')
> @@ -299,7 +299,9 @@ def build_fit(args):
>      finish_fit(fsw, entries)
>  
>      # Include the kernel itself in the returned file count
> -    return fsw.as_fdt().as_bytearray(), seq + 1, size
> +    fdt = fsw.as_fdt()
> +    fdt.pack()
> +    return fdt.as_bytearray(), seq + 1, size
>  
>  
>  def run_make_fit():

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ