From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0401C48BCF for ; Wed, 9 Jun 2021 17:40:47 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8AF1F61246 for ; Wed, 9 Jun 2021 17:40:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8AF1F61246 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E64EA82EF5; Wed, 9 Jun 2021 19:40:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (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="GkRoxbqF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A264E82EAF; Wed, 9 Jun 2021 19:40:42 +0200 (CEST) Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) (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 B015A82EAF for ; Wed, 9 Jun 2021 19:40:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qv1-xf30.google.com with SMTP id im10so12385995qvb.3 for ; Wed, 09 Jun 2021 10:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=6JQ+PfQU6evC0li1woeDU4svMmNh5orh+GkylOM0bh8=; b=GkRoxbqFBTVSY5hFikv4Hsg1uS1wy5SDg+XZg7a5UduRLe8ZFO804uwtEYkL9UG6w7 cUfa6T6IlUwbye4a481dk7k9rN7wLc3Fj+y3RcoQWNBWeFcp/tgJkpmIL59KpvXa/WuD o9KvD4H2YONahDHHyFApr8FIfAyKGlmykvldY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=6JQ+PfQU6evC0li1woeDU4svMmNh5orh+GkylOM0bh8=; b=LJZ+4F2EeIHhs3kyiboBWmkUUzrmBuj1ZixeI16opLwggZZHDrO2ILrv7L2a2Fof0u v3sVEhgGjzUJpa7Fcn5qOQZ3cTRZrq9iLV40teuYUAsHaMm/1pOXJLJIwsphx+0MhDNS 6B3ei62ARL86R8C4p2HcWiVnOPV3movcaFuHYyf9K7//mO2opa0gd7E0B1QOWZQJucTW /IfSG2MysK/1y39FHBP5ZG+3hdXzB/uN5hNXGEAJfHZk46PsiEVO0+tSlaY6J8/pgaL9 tiScqpPjq+x0kZbEh2gccfFTj5y6/HruPDTzkvmCL1BPJBgfKp4bLLgHkyHkOsr75ST4 +Zxg== X-Gm-Message-State: AOAM533KqvEdQuXxntL/87gWlHdxLwUPNDGI2MAGi2ilBL4UYJRrnIME SSvrzzzDXB/r6v05FVpmhmLXoQ== X-Google-Smtp-Source: ABdhPJxUMqwjHW74pJxq9acytsF+88+cwQT+Rd4esfLQp9cHMsWCJ7QtbLn3sEKeiZDYILXzfgqfdA== X-Received: by 2002:a05:6214:180a:: with SMTP id o10mr1164364qvw.31.1623260438474; Wed, 09 Jun 2021 10:40:38 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-4157-2a7b-ef5c-df25.res6.spectrum.com. [2603:6081:7b01:cbda:4157:2a7b:ef5c:df25]) by smtp.gmail.com with ESMTPSA id g19sm481563qto.49.2021.06.09.10.40.37 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Jun 2021 10:40:37 -0700 (PDT) Date: Wed, 9 Jun 2021 13:40:35 -0400 From: Tom Rini To: =?iso-8859-1?Q?Jo=E3o?= Marcos Costa Cc: U-Boot Mailing List , Miquel Raynal , Simon Glass , Thomas Petazzoni , Richard Genoud Subject: Re: [PATCH] fs/squashfs: fix reading of fragmented files Message-ID: <20210609174035.GH9516@bill-the-cat> References: <20210517212038.117284-1-jmcosta944@gmail.com> <20210526095224.17f2e3f8@xps13> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="4hmTAJAngH+SZkLl" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.4 at phobos.denx.de X-Virus-Status: Clean --4hmTAJAngH+SZkLl Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 09, 2021 at 10:16:53AM -0300, Jo=E3o Marcos Costa wrote: > Hello, everyone >=20 > Em qua., 26 de mai. de 2021 =E0s 09:35, Jo=E3o Marcos Costa < > jmcosta944@gmail.com> escreveu: >=20 > > Hello, Miqu=E8l > > > > Em qua., 26 de mai. de 2021 =E0s 04:52, Miquel Raynal < > > miquel.raynal@bootlin.com> escreveu: > > > >> Hi Joao, > >> > >> Joao Marcos Costa wrote on Mon, 17 May 2021 > >> 18:20:38 -0300: > >> > >> > The fragmented files were not correctly read because of two issues: > >> > > >> > - The squashfs_file_info struct has a field named 'comp', which tell= s if > >> > the file's fragment is compressed or not. This field was always set = to > >> > 'true' in sqfs_get_regfile_info and sqfs_get_lregfile_info. It should > >> > actually take sqfs_frag_lookup's return value. This patch addresses > >> > these two assignments. > >> > > >> > - In sqfs_read, the fragments (compressed or not) were copied to the > >> > output buffer through a for loop which was reading data at the wrong > >> > offset. Replace these loops by equivalent calls to memcpy, with the > >> > right parameters. > >> > >> Good idea to get rid of these memcpy of 1 byte :) > >> > >> > I tested this patch by comparing the MD5 checksum of a few fragmented > >> > files with the respective md5sum output in sandbox, considering both > >> > compressed and uncompressed fragments. > >> > > >> > Signed-off-by: Joao Marcos Costa > >> > >> Reviewed-by: Miquel Raynal > >> > >> But next time, when you fix two issues (even if they fix the same > >> feature) please provide two patches ;) > >> > >> Thanks, > >> Miqu=E8l > >> > > > > > Any updates on this patch review? Seems fine, but I'm also leaning on grabbing all of the squashfs patches for -next at this point, unless people have strong feelings about it being safe at this point for master, thanks. --=20 Tom --4hmTAJAngH+SZkLl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmDA/RMACgkQFHw5/5Y0 tyyi0gv/XuVGkvGJjrbf0F8UYQ+txHMv/Lh/BWeYM5tOVOhZDsieVai8cdKV4GlC mOte1voZ0Kag/hYfrjNXATwj2PfcH9L3aP38GKmO2RYMF7s9ToGX0b3kO+1I7hi5 B/2k1GoeYu0uL2CWIOgnXCuR1vKooW1vkWsJTSKShlEfkezoIpPYdgsDz3Co/xiP kLBqAFGIJa5a/tAaLjMEcjEzeVPqTD6ws9l1D00vfREhCTSeSQhUb5h4Q3JwQv8/ w+LU+7UU8+gT5qwCuwoac9fWGb++m+IzfNwKA4XlzhB++ECsFl5W0buWlazauQja pilR6e3NPbl7+uMFPUIZw6IrvAQ8MQLwkhiuQ475dTVU39A37M0NoxnezCrqaVZV GVvWMoUgnmsxcwq9lh9qCVD2OBbFleYS2vTL8CqW+aBKUR4rlgA259kgghHvMCO+ nAxSOuNT1H8OgNZ5myejSkqBkdK3S3hkGGaUAu0eo2KX1WTDtdki37VI144h4pV/ RvR7FFp9 =IROq -----END PGP SIGNATURE----- --4hmTAJAngH+SZkLl--