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 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 490E3C433EF for ; Mon, 31 Jan 2022 02:52:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 916E480D1C; Mon, 31 Jan 2022 03:52:21 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="aBaGyfWq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DBA4580A4F; Mon, 31 Jan 2022 03:52:19 +0100 (CET) Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) (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 09EAB82A59 for ; Mon, 31 Jan 2022 03:52:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=masami.hiramatsu@linaro.org Received: by mail-pg1-x52c.google.com with SMTP id g2so10976888pgo.9 for ; Sun, 30 Jan 2022 18:52:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:user-agent:mime-version :content-transfer-encoding; bh=YZkXz+Pgf7ptn6PyhHVglqpycrPmoAC47D+DcGh4D5Q=; b=aBaGyfWqt0t3w36t32J4R8AF1umjgvwTQVBbE9nEtIyzuUQgaq94VtkASo5fcfYCiV tEtaqF4/Ohuem8SMvR1/hKUbmKZeGmEgWydRl3DpLkGBw+ocXJV7/MphToVLt3GCkcqX pbkEw0QRe3KJGz4mEGSbDKfBU7ZVxlwVTAdoL+t17umiHNEB5em4W06EjkZjn6Jskerm 3CpwanZS5+3bTnQdoU6MGOQmaz6O7hTrT0wm+xd3151XIzICCWI+pVnYz+RvOxi8j0w+ sjISUuAb0EXIfqwN9RJaX8RZ5eBJ8qf6oaeQbMQqoRYjV4XqECL32Zyya/X/8OeyQNzr P5TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=YZkXz+Pgf7ptn6PyhHVglqpycrPmoAC47D+DcGh4D5Q=; b=m5yVgzih8NcVWgcYH7S/kRwPhDp3KfIUZTcJpcRfqH/W0uj5tnyY1VfUU9i2S40soU thZFSOQMlKl8j9Ae3+agxpSRMTWthU15oG1gdi3vs112ncehmlED2rU+sj432gXs9+VQ Q81kRYAZozpIvKf6/314yMSaVsnKPAobLx2unYnGgzHcoiHEgvWowRHImVk1+2i9GJPW GVp9qsW5xNPE+SfNOmW72y91/eAKx8mVvOkBbINEkenVLxdJ/Ty6YB5UPj380e2RBXOv 7O6v6UxSfLkbe8MDbmsHFgYp/KCQeWKAiU6/wFEjrdCjKLqxKl3iIv5hV+cKc0sZi2T/ La0A== X-Gm-Message-State: AOAM531dqMNRSY+fUEIwC4DwTL+CJTDNiO3fC6EP3DakJzi/bugINH7e kSQCDHm8IXEKnbTJZiM99jMiK1dSBxpHPA== X-Google-Smtp-Source: ABdhPJzZD4DsuDTQrIFxwiGr8H7eBGDeoofIFmJ9JYcf4v0ae5jOl7cPXkOiSsfaSMxCgoVWEJii0Q== X-Received: by 2002:a63:88c6:: with SMTP id l189mr15196127pgd.229.1643597535314; Sun, 30 Jan 2022 18:52:15 -0800 (PST) Received: from localhost.localdomain (113x37x226x201.ap113.ftth.ucom.ne.jp. [113.37.226.201]) by smtp.gmail.com with ESMTPSA id y42sm17022381pfa.5.2022.01.30.18.52.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Jan 2022 18:52:14 -0800 (PST) From: Masami Hiramatsu To: Tom Rini , Lukasz Majewski Cc: u-boot@lists.denx.de, ilias.apalodimas@linaro.org, sughosh.ganu@linaro.org, jaswinder.singh@linaro.org Subject: [PATCH v2 0/5] DFU: Update dfu_alt_info parser etc. Date: Mon, 31 Jan 2022 11:52:11 +0900 Message-Id: <164359753172.280839.8310577813724924540.stgit@localhost> X-Mailer: git-send-email 2.25.1 User-Agent: StGit/0.19 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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.5 at phobos.denx.de X-Virus-Status: Clean Hi, Here is the 2nd version of improving DFU subsystem series. This improves dfu_alt_info parser and fixing documents etc. In this version I fixed a build error of cmd/dfu.c so that it can be build without DFU_OVER_USB and DFU_OVER_TFTP (in this case, the platform will use the DFU only for EFI capsule update.) When I was debuging my patch for updating dfu_alt_info on the DeveloperBox platform, I found that dfu_alt_info parser didn't accept redundant spaces and tabs. Also the dfu.rst description seems wrong. Moreover, there is no way to check whether the parser parses the dfu_alt_info correctly. These patches fixes such issues. [1/5] is just for avoiding buffer overrun, [2/5] and [3/5] improves dfu_alt_info parser to accept redundant spaces and tabs, and check the number of arguments strictly so that the parser (and user) can notice any unexpected parameters. [4/5] fixes the documents (there seems some wrong description maybe coming from copy&paste). [5/5] allows user to run 'dfu list' even if the platform doesn't support DFU_OVER_USB nor DFU_OVER_TFTP. Thank you, --- Masami Hiramatsu (5): DFU: Do not copy the entity name over the buffer size DFU: Accept redundant spaces and tabs in dfu_alt_info DFU: Check the number of arguments and argument string strictly doc: usage: DFU: Fix dfu_alt_info document cmd/dfu: Enable 'dfu list' command without DFU_OVER_USB cmd/dfu.c | 8 +++---- doc/usage/dfu.rst | 57 ++++++++++++++++++++++++++++++++++-------------- drivers/dfu/dfu.c | 37 ++++++++++++++++++++++++------- drivers/dfu/dfu_mmc.c | 55 +++++++++++++++++++++++++++------------------- drivers/dfu/dfu_mtd.c | 34 +++++++++++++++++++---------- drivers/dfu/dfu_nand.c | 34 ++++++++++++++++++----------- drivers/dfu/dfu_ram.c | 24 ++++++++++---------- drivers/dfu/dfu_sf.c | 34 ++++++++++++++++++----------- drivers/dfu/dfu_virt.c | 5 +++- include/dfu.h | 33 ++++++++++++++++++---------- 10 files changed, 205 insertions(+), 116 deletions(-) -- Masami Hiramatsu