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,URIBL_BLOCKED,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 AE9A2C48BCD for ; Thu, 10 Jun 2021 00:59:00 +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 6BE84613F5 for ; Thu, 10 Jun 2021 00:58:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6BE84613F5 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 1AA1782052; Thu, 10 Jun 2021 02:58:57 +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="bpZk0HB4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 395AA82CDA; Thu, 10 Jun 2021 02:58:55 +0200 (CEST) Received: from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com [IPv6:2607:f8b0:4864:20::f32]) (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 0239D80C67 for ; Thu, 10 Jun 2021 02:58:45 +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-xf32.google.com with SMTP id im10so13005292qvb.3 for ; Wed, 09 Jun 2021 17:58:45 -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=uPAUQ1H4/kPDJtc0yZmQAXhJGGEkptTIZdJObfiqseo=; b=bpZk0HB4yayq3O0hlFGEO8YkgBxx0u5dQwVvxXWsvnpfM6BXMJjiSpBkbWzQYV3N72 9WTEmh591GePLgbig+LS4vqQcs/FmlUrtpV3XNRb4cfy1auhf71mAiJnJWkhMh1l7qaI EzBJ75gzpRYBWiT4ewAelT+x0oqj3tsORqUk4= 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=uPAUQ1H4/kPDJtc0yZmQAXhJGGEkptTIZdJObfiqseo=; b=XYL5gWrqBkXFAS37aXjNHDLEp/VLoyI5x/WSXe/BLsKXmiyb/btxJm5FAavvsPnuGv 0SX19h0DiZLBuwFt1gg1r0DWDy7p9aVzEAT4BeMT7zUv0Kqkf3uEZ5rui/jaPHXCJr95 GvcjpBik25bmRtmLUE377yLnD3H43+8vCJ/cJV/pOAxTkLHihqXPN4lRzite3xepyRtU NOq0KVKCn4a94Hx4cVBbprv4b+20iTP++NfX33Dm4sulmKunVaZODp4HWk5WhA/oxaKs 85kbcSAxwI7s4TzRpRCxNlN6084O+aBC/jMAMKbQtquOXFv49XeJyWLoWygvR0kqEzZK 6Atw== X-Gm-Message-State: AOAM531i+SbXOEIihdlSLvnWZllk94EkFRkbo0xJqwT629uvkS8bsOmn uK4FKMR9ffpYNicVXu5sL0pxXA== X-Google-Smtp-Source: ABdhPJzNjgrN44c8rChC84ecnYsjhCJssSFPWUEYMDH7JwAN89UW31WpoeRvVF0tK1GQVwRihiz7Rw== X-Received: by 2002:a0c:e54c:: with SMTP id n12mr2931495qvm.20.1623286724811; Wed, 09 Jun 2021 17:58:44 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-b9ef-ba99-589b-078c.res6.spectrum.com. [2603:6081:7b01:cbda:b9ef:ba99:589b:78c]) by smtp.gmail.com with ESMTPSA id h4sm1273942qti.0.2021.06.09.17.58.43 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Jun 2021 17:58:43 -0700 (PDT) Date: Wed, 9 Jun 2021 20:58:41 -0400 From: Tom Rini To: Joao Marcos Costa Cc: u-boot@lists.denx.de, thomas.petazzoni@bootlin.com, miquel.raynal@bootlin.com, richard.genoud@posteo.net Subject: Re: [PATCH] fs/squashfs: fix reading of fragmented files Message-ID: <20210610005841.GN9516@bill-the-cat> References: <20210517212038.117284-1-jmcosta944@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="dWJ7k1c3mh7Yseyi" Content-Disposition: inline In-Reply-To: <20210517212038.117284-1-jmcosta944@gmail.com> 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 --dWJ7k1c3mh7Yseyi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 17, 2021 at 06:20:38PM -0300, Joao Marcos Costa wrote: > The fragmented files were not correctly read because of two issues: >=20 > - The squashfs_file_info struct has a field named 'comp', which tells 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. >=20 > - 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. >=20 > 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. >=20 > Signed-off-by: Joao Marcos Costa > Tested-by: Richard Genoud > Reviewed-by: Miquel Raynal Applied to u-boot/master, thanks! --=20 Tom --dWJ7k1c3mh7Yseyi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmDBY74ACgkQFHw5/5Y0 tyx0fwv/ZPoo7upgmX4j/SmH+M68RjlVNrikR1fWCn6fWVJnJWy2UH+j90sDDvEn IZSknppIvxfWYS8m3f7Dzi2UxWMrvgAjw3mQjq5OgSZG73xbdytrgEE27R2B4KGQ qLSqLsobCGcXgOsD7Jf/ysbnmIDrVnniniw1zGArZPKwomMB2qT0YJDOgC82xST/ d1iQ8RESNrM3JYNfDsZ5bywEvDfWk/3FPP2Mhf/XhxHG2Zfeit/opqZq859E+Sgs Sfev5rPoo6EdVEobVRboWZLJdrzF2YWyPGEusdctXR6ZW+MNsTTy0VIq55Q8g22k gr+QcdBsYzLf6yN7riVPw9OGyYLMbQzkeKt3L8mN4fnXq6f8rtZS9IF/RRWX20CT 58w8YeibfPBzYEkd7x2qgutFw/06MfPr2DCN/KOCavwsUHefnCAJrj7SwPIda+2h QjCrbG2Yj1+H/kzKBjc1aHVGQrlEWkSEWINoTOLGcfWZb2GgUEf5cjBVNSIdRkcT pTV922IM =xz+u -----END PGP SIGNATURE----- --dWJ7k1c3mh7Yseyi--