[{"id":1800115,"web_url":"http://patchwork.ozlabs.org/comment/1800115/","msgid":"<20171106232815.GD32663@bill-the-cat>","list_archive_url":null,"date":"2017-11-06T23:28:15","subject":"Re: [U-Boot] disk: part_dos: fix part_get_info_extended() function","submitter":{"id":65875,"url":"http://patchwork.ozlabs.org/api/people/65875/","name":"Tom Rini","email":"trini@konsulko.com"},"content":"On Thu, Nov 02, 2017 at 04:46:34PM +0800, Shawn Guo wrote:\n\n> From: Shawn Guo <shawn.guo@linaro.org>\n> \n> The check in part_get_info_extended() for a successful partition\n> searching misses a condition for extended partition. In case of\n> (ext_part_sector == 0), we should anyway mark the partition as found,\n> even if it's an extended partition, i.e. (is_extended(pt->sys_ind) == 0).\n> Otherwise, the extended partition (type 0x0f) will never be identified,\n> and the following recursive call to part_get_info_extended() will get a\n> wrong 'part_num' and 'which_part' parameter.  In the end, all those\n> partitions in extended table will not be identified.\n> \n> Let's add the missing OR condition of (ext_part_sector == 0) for\n> is_extended() check to fix the problem.\n> \n> The issue is discovered by running fastboot flash to an extended\n> partition on eMMC.\n> \n>   $ fastboot flash mmcsda5 cache.img\n>   target reported max download size of 536870912 bytes\n>   sending 'mmcsda5' (18796 KB)...\n>   OKAY [  2.144s]\n>   writing 'mmcsda5'...\n>   FAILED (remote: cannot find partition)\n>   finished. total time: 2.261s\n> \n> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>\n\nApplied to u-boot/master, thanks!","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=konsulko.com header.i=@konsulko.com\n\theader.b=\"ZjFwkWI9\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3yW8595HVFz9sDB\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  7 Nov 2017 10:33:33 +1100 (AEDT)","by lists.denx.de (Postfix, from userid 105)\n\tid 74505C21F74; Mon,  6 Nov 2017 23:31:39 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 7C7EEC21EB4;\n\tMon,  6 Nov 2017 23:30:34 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 36179C21F97; Mon,  6 Nov 2017 23:28:23 +0000 (UTC)","from mail-yw0-f171.google.com (mail-yw0-f171.google.com\n\t[209.85.161.171])\n\tby lists.denx.de (Postfix) with ESMTPS id B7438C21EFD\n\tfor <u-boot@lists.denx.de>; Mon,  6 Nov 2017 23:28:19 +0000 (UTC)","by mail-yw0-f171.google.com with SMTP id q1so9380521ywh.5\n\tfor <u-boot@lists.denx.de>; Mon, 06 Nov 2017 15:28:19 -0800 (PST)","from bill-the-cat (cpe-65-184-142-68.ec.res.rr.com.\n\t[65.184.142.68]) by smtp.gmail.com with ESMTPSA id\n\t1sm6797570ywm.13.2017.11.06.15.28.17\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 06 Nov 2017 15:28:17 -0800 (PST)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3,\n\tRCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID autolearn=unavailable autolearn_force=no\n\tversion=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com;\n\ts=google; \n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=TWR8oe18quy8S9ca4Lt/3xqWNyCokv+zHY2Sdc3ubFM=;\n\tb=ZjFwkWI9ME1aqttPofPpBOmoq4DNeJJJY6+7MmOxAKAqWFj0s8I7nuxeEl5O5aB238\n\tYy+nxttL5uGJmTvZcO+7ve1rQOmgCiQKzOsGsr9MAgY+avHqemQjWmUOHR1oOyhlVASY\n\tcDfwv7VI5P6U8GAl3xYeIM9w9ZWQTuE2gx9fk=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=TWR8oe18quy8S9ca4Lt/3xqWNyCokv+zHY2Sdc3ubFM=;\n\tb=eO7wvSKD+d0pFq0I8OjLY/sSEJUz0hMt9bIPRPKl+9FtiIQ4nxO/E+hh8mlJuxB4kV\n\tbfGPLVTAuV/4+yIr9qnSdkzpWt7eFgHyQZBDcmqGb0BGrVQEg/Shb59P7RV6zGL6slwO\n\toipSWPrbZLQlrS6aZUJj6t9E9tA8FBpiWRgcumek0qB0vVRWfLJwH3I8BbOdhwZiqT1n\n\tgR66BZS3yzUS7Ta6wvrK7u4IFAkqJQXSQL5d0v0Vk7RxVrmVqdmbgjIse3fs5vFuRsEe\n\tbhGUQDCgj8h/KgcJkzPA5mz1udlK6/PYsR7w3ubmNNpuB8c1sx6nzNykbaMXCBt/dRbf\n\tyOLg==","X-Gm-Message-State":"AMCzsaXN4iKMjDAGRmebl+HByUTT6SsoFsC7clCzgiWaRG5Iw5VURwag\n\tBoRwCtqH+a6wAKzQyMTTiPXx7OUNkRA=","X-Google-Smtp-Source":"ABhQp+SJSjRdO1EeCY/f4EwuO3PbFUnpDP/ALkzPvbraaWUX3M0z5ZdHjYzKtv+j1+yOjHmJ//Duww==","X-Received":"by 10.37.15.5 with SMTP id 5mr10364741ybp.76.1510010898553;\n\tMon, 06 Nov 2017 15:28:18 -0800 (PST)","Date":"Mon, 6 Nov 2017 18:28:15 -0500","From":"Tom Rini <trini@konsulko.com>","To":"Shawn Guo <shawnguo@kernel.org>","Message-ID":"<20171106232815.GD32663@bill-the-cat>","References":"<1509612394-24359-1-git-send-email-shawnguo@kernel.org>","MIME-Version":"1.0","In-Reply-To":"<1509612394-24359-1-git-send-email-shawnguo@kernel.org>","User-Agent":"Mutt/1.5.24 (2015-08-30)","Cc":"Andre Przywara <andre.przywara@arm.com>, Peter Jones <pjones@redhat.com>,\n\tAlexander Graf <agraf@suse.de>, project-aspen-dev@linaro.org,\n\tu-boot@lists.denx.de","Subject":"Re: [U-Boot] disk: part_dos: fix part_get_info_extended() function","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"multipart/mixed;\n\tboundary=\"===============4681581348876719091==\"","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}}]