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 BD33DC433F5 for ; Mon, 6 Dec 2021 05:44:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0F45483027; Mon, 6 Dec 2021 06:44:40 +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="avxGsC00"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0517483027; Mon, 6 Dec 2021 06:44:38 +0100 (CET) Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) (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 4D4558083E for ; Mon, 6 Dec 2021 06:44:34 +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-x533.google.com with SMTP id r5so9398059pgi.6 for ; Sun, 05 Dec 2021 21:44:34 -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=JyOEyWPFUnnxVOL9xIsSh7srJ9jlIKdkUYbsyvYuIis=; b=avxGsC00puA62qsmk7ntbvRXr0VagUZssHcxvd+z3dLV1Fbo+O7zR+eVzJqqwcrUBR WuHFxrGYS77FkZONtXH8LZwD+jo49xp5q8nXTdBLFAGruOTdl4qX7Z1hSaO4UfKRTWxE hWh0ugHYTqxzs0hkKl18YBqG/mu2wn+kMPA5lz6grijyACm0pWiaJ7xGw9J38PdqJDI9 1T3uqbiszbj45DwGGE5OYrSPdWFfiMoeKn7fC4ehvAYVrRTVgVHsjhfYT4nZPo6VKF0J TOEH4yKwGYFdSo9uVVNWt9pmrHEx1IX2QEGZk1vgitqJT4376y7jk50uH/aU9padGF3c cfhQ== 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=JyOEyWPFUnnxVOL9xIsSh7srJ9jlIKdkUYbsyvYuIis=; b=hxj1Fq3figYVO+6eWTIBYvVdu2tozBvM/vog7UTWhHYnq6+uJBy/mFqH2BtR3g2864 doT1vlhp+U//dVy3QvRGKyNJRdMbbWWEAlroRcOY7Hriwa128pjOSvMPOTCdzm51ioEh gc5tB2i62WTP6pabalTW+rMsCXLX/et2ytGbpOEQ4pKRkzK6gAz1iq5x7bg0HW6WPPO9 +i5v8n1BgoZrmHbqflUgIR9EG6czQ52VZzSegsbFcl1vZbqVtOz0Wsu6NG5LQEEZyV2T VZ/DoqOO89OFU/i8Qcg4HFyhxqDlX1q+1Zc4ZjUMIdZOTfs1G56+t5XKvae99SyGrAsp yFkg== X-Gm-Message-State: AOAM533Mx4vl+ijkXrK7k+KdZnaozizTwMq6LsQzzaZNw263ZZsK8YBD f3VLsOqD8N9i+ssW2tFOq1eZKw== X-Google-Smtp-Source: ABdhPJzTXiC3Ga2bfhszikLSJin5EUQV8I/dyhASMrdDLA5Df8EpZ1ffRW4UJFND8yYBILhMEtaT6g== X-Received: by 2002:a63:4e22:: with SMTP id c34mr17086274pgb.180.1638769472670; Sun, 05 Dec 2021 21:44:32 -0800 (PST) Received: from localhost.localdomain (122x208x150x49.ap122.ftth.ucom.ne.jp. [122.208.150.49]) by smtp.gmail.com with ESMTPSA id g18sm3882960pfj.142.2021.12.05.21.44.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Dec 2021 21:44:32 -0800 (PST) From: Masami Hiramatsu To: Lukasz Majewski Cc: u-boot@lists.denx.de, ilias.apalodimas@linaro.org, sughosh.ganu@linaro.org, jaswinder.singh@linaro.org Subject: [PATCH 0/5] DFU: Update dfu_alt_info parser etc. Date: Mon, 6 Dec 2021 14:44:30 +0900 Message-Id: <163876946986.38238.10896882043017582609.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.38 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.2 at phobos.denx.de X-Virus-Status: Clean Hi, This series is improving DFU subsystem. This improves dfu_alt_info parser and fixing documents etc. When I was debuging my patch for updating dfu_alt_info on the DeveloperBox platform, I found that dfu_alt_info parser doesn'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. 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 | 6 +++-- 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(+), 114 deletions(-) -- Masami Hiramatsu