Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B9092C43217 for ; Mon, 21 Nov 2022 15:40:32 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3C64B85111; Mon, 21 Nov 2022 16:40:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="sZh3eclC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 39A32852F0; Mon, 21 Nov 2022 16:40:28 +0100 (CET) Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6FB5985111 for ; Mon, 21 Nov 2022 16:40:25 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x82a.google.com with SMTP id l15so7473286qtv.4 for ; Mon, 21 Nov 2022 07:40:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=fCSeQa8FjtsCndI823H3JnKHwTZAJV3qOytg+xmk3os=; b=sZh3eclCixHqalCgtOWptkVMFtt9rbInx8JGjyxlY8l3keANFZO+vZ7mc5+zpIuM3U iGS+GMAJhqvB/D8uz5GR0Qm+T4KkZ0Fju3ZVjo2a/OhgJAnplhi8DY27wV0Vb/rYcsvP ag6VIcDKvQNUBfYSsEYGutKsMvvjLHs8F02FI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fCSeQa8FjtsCndI823H3JnKHwTZAJV3qOytg+xmk3os=; b=jzYVdo71Rl6cLQGW+KH4F0U00XSbVHf6IOBTYFNEX9aKsPHk19FEnMreTpOvXhQ0Ff zypvdJuvabeLOnaM4ruwHbgbNE+74UbwV8XnE+Xq4M076hjYN3LuVPRKMRHfFOo5plKH sXXHgshAyyNKtGJiJo18SOKKD1BESAmzCS2V34VYvh0x4X3SZlrcjzKOtBtuN91n/3Ff ve/Ckc55GCb2vuW/JA1RgmsK+QWIFenXzqZPzFoQ2YEQvOBdx9V5v4cjCMwMdjbqjznT OcneMyJ28aZAuTz5Ad7YQ8BNXHT3vH6YHuarS0Hzvw6+x7dgQCJSY5NeRoCDxcMIlAWh nOIg== X-Gm-Message-State: ANoB5pnOz4SRzPSzYhOZM7jM5s3RBBTCwi0aFu0m39NAqi9FmvD/BWqr 6QuJC1x73qN86wYG6GbSwF9PkA== X-Google-Smtp-Source: AA0mqf7Cz+8eZ4QKue87bHrMTtKgpIGKjfpVLl3bfHITTDNZjx4obJd3EUSQfJGjRtcW2BiVCkG3uQ== X-Received: by 2002:ac8:5189:0:b0:39c:b790:6c9c with SMTP id c9-20020ac85189000000b0039cb7906c9cmr17457202qtn.55.1669045224165; Mon, 21 Nov 2022 07:40:24 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-91a3-6c7b-3405-8039.res6.spectrum.com. [2603:6081:7b00:6400:91a3:6c7b:3405:8039]) by smtp.gmail.com with ESMTPSA id ay34-20020a05620a17a200b006b929a56a2bsm8399426qkb.3.2022.11.21.07.40.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Nov 2022 07:40:23 -0800 (PST) Date: Mon, 21 Nov 2022 10:40:20 -0500 From: Tom Rini To: Jit Loon Lim Cc: u-boot@lists.denx.de, Jagan Teki , Vignesh R , Marek , Simon , Kris , Tien Fong , Kok Kiang , Siew Chin , Sin Hui , Raaj , Dinesh , Boon Khai , Alif , Teik Heng , Hazim , Sieu Mun Tang , Chin Liang See , Mark Adler Subject: Re: [PATCH] lib: zlib: Use post-increment only in inffast.c. Message-ID: <20221121154020.GA3653320@bill-the-cat> References: <20220911084637.21513-1-jit.loon.lim@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zYM0uCDKw75PZbzx" Content-Disposition: inline In-Reply-To: <20220911084637.21513-1-jit.loon.lim@intel.com> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 11, 2022 at 04:46:37PM +0800, Jit Loon Lim wrote: > From: Chin Liang See >=20 > An old inffast.c optimization turns out to not be optimal anymore > with modern compilers, and furthermore was not compliant with the > C standard, for which decrementing a pointer before its allocated > memory is undefined. Per the recommendation of a security audit of > the zlib code by Trail of Bits and TrustInSoft, in support of the > Mozilla Foundation, this "optimization" was removed, in order to > avoid the possibility of undefined behavior. >=20 > This is a backport of commit 9aaec95e82117 from the upstream zlib > project. >=20 > Signed-off-by: Mark Adler > Signed-off-by: Chin Liang See > Signed-off-by: Jit Loon Lim I was about to apply this with a slightly updated commit message and then I discovered that this causes at least the following tests to fail in CI on sandbox: FAILED test/py/tests/test_fit.py::test_fit - AssertionError: Kernel not loa= ded FAILED test/py/tests/test_ut.py::test_ut[ut_dm_dm_test_video_bmp16] - Value= Error: U-Boot exi... FAILED test/py/tests/test_ut.py::test_ut[ut_dm_dm_test_video_bmp24] - Value= Error: U-Boot exi... FAILED test/py/tests/test_ut.py::test_ut[ut_dm_dm_test_video_bmp24_32] - Va= lueError: U-Boot ... FAILED test/py/tests/test_fs/test_squashfs/test_sqfs_load.py::test_sqfs_loa= d - AssertionError FAILED test/py/tests/test_fs/test_squashfs/test_sqfs_ls.py::test_sqfs_ls - = AssertionError Given that the sqfs ones are saying the data is corrupt, I'm unsure if the problem is the code or the patch here. --=20 Tom --zYM0uCDKw75PZbzx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmN7m+EACgkQFHw5/5Y0 tyxoIQv/cKoji+CXeR1RK03aocykjlWI6AQ6QYbQrHRwOGjDtp+TaGTto78EDLQM xHzAknFSmCtMAs1FUPtwjHThy/nL2afGp2BVyG1UQmzWjB+gRFMQ3lTQpaYDEeX1 hxCZLOyR9txcIWTnQZTRqmDivEdB8QiMD8IhbCGX0mQfiji7wuw2SgPfhtJrFjdg KLnxuYBsXsf0pWlqq9FqqgBSlvpRwmICdi7OqlTSDMBU714EorM08AwDlArN5h2J 9dCqAugd7Z8c4jXct6TEiyBpZJyOv6M+Y4jFvXwZjoWK40JkHkwUo8iZbZeb67UM T2+AbgxHnvXhlrZXfYnUuLqQ4qwxIq04dxBFK78PiRHKansGicxW2PGkvaX35W9W G8uXhtHcrAR+J7/8aBiXOnraYCaxjKsu5O1GZJkNqXacWWlv9WBtIf3qerlV1g59 JzP96mvc11IxeKeZ2HycJHvrKjcy3Y0fiGhoPfo50pPI3lsv1niBR0qEzADTiz5q LO0sf4Xf =fpYK -----END PGP SIGNATURE----- --zYM0uCDKw75PZbzx--