[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aKBRBLnPYhI02QnJ@gondor.apana.org.au>
Date: Sat, 16 Aug 2025 17:36:04 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: David Sterba <dsterba@...e.com>
Cc: linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
ebiggers@...nel.org
Subject: Re: [PATCH] lib/lzo: add unlikely hints to overrun checks
On Thu, Aug 07, 2025 at 01:44:44PM +0200, David Sterba wrote:
> The NEED_* macros do an implicit goto in case the safety bounds checks
> fail. Add the unlikely hints as this is the error case and not a hot
> path. The final assembly is slightly shorter and some jumps got
> reordered according to the hints.
>
> text data bss dec hex filename
> 2294 16 0 2310 906 pre/lzo1x_decompress_safe.o
> 2277 16 0 2293 8f5 post/lzo1x_decompress_safe.o
>
> text data bss dec hex filename
> 3444 48 0 3492 da4 pre/lzo1x_compress_safe.o
> 3372 48 0 3420 d5c post/lzo1x_compress_safe.o
>
> Signed-off-by: David Sterba <dsterba@...e.com>
> ---
> lib/lzo/lzo1x_compress.c | 2 +-
> lib/lzo/lzo1x_decompress_safe.c | 6 +++---
> 2 files changed, 4 insertions(+), 4 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists