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 smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 61355C53219 for ; Wed, 29 Jul 2026 04:55:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 2E833810A4; Wed, 29 Jul 2026 04:55:35 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id q55HobNg5kCF; Wed, 29 Jul 2026 04:55:34 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 7EDB181068 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.u-boot-project.org ; s=default; t=1785300934; bh=1XEBQ3uzR69M2nBOFTBjrzenv3EgWoQiRYWZo+q7syw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=eL7oCHT6jf5aJqarl363Pu0Ay6adOFc0gH10qtyEFjR0qVLb9skbZ/4Pee5PRd50G NUxsGp6DXsR/3KmtnWhRyfek8PJjK3rmm9UfBROgBrQwVrU+wj7/LMIYyf4RocUjo2 62US7Rx9Y4O9Cqfyi8lSyHQz+dZmZpNIQb6jgbXmc0lxJ/FJmKZ9RoOK7r98q9kJWm MPq8uOlDosVQOUIYAmSlPvmoINTCBtgsIqS7L6762ShJhm8BcSYCvsT6B18XycM3gv SsZgMu5KwsBZ8ibxg/7Q1Y4sVNg9uosRCOwYiuJ0v8VzosxIPThsbDwAzrTmn9DFYM q1UKQVQrDOo6w== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id 7EDB181068; Wed, 29 Jul 2026 04:55:34 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists1.osuosl.org (Postfix) with ESMTP id 4226B490 for ; Tue, 28 Jul 2026 17:43:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 2855E409BB for ; Tue, 28 Jul 2026 17:43:59 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id OAwjLTeFcfXO for ; Tue, 28 Jul 2026 17:43:58 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::32a; helo=mail-ot1-x32a.google.com; envelope-from=james.hilliard1@gmail.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 6C9A14096A DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 6C9A14096A Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) by smtp4.osuosl.org (Postfix) with ESMTPS id 6C9A14096A for ; Tue, 28 Jul 2026 17:43:58 +0000 (UTC) Received: by mail-ot1-x32a.google.com with SMTP id 46e09a7af769-7eb64085c45so123661a34.2 for ; Tue, 28 Jul 2026 10:43:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785260637; x=1785865437; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-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THF/d26 wT0G8AkRfrdltGdE8S/Hj2gR8XBdZryGvObK1k3hUgxZjbkS1da6EpBHab0iuvJjYWAQOyRgLEt qHO4NG4CmqNzCBYEVWdJbtgWGsyuvwR762MjYpG5LbbbZATZyyti26x X-Received: by 2002:a05:6830:6585:b0:7d8:b269:e99b with SMTP id 46e09a7af769-7efff243e9emr1793668a34.17.1785260637245; Tue, 28 Jul 2026 10:43:57 -0700 (PDT) Received: from [127.0.1.1] (71-218-31-69.hlrn.qwest.net. [71.218.31.69]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7f00d94389dsm271103a34.21.2026.07.28.10.43.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 10:43:56 -0700 (PDT) From: James Hilliard Date: Tue, 28 Jul 2026 11:41:44 -0600 Subject: [PATCH v6 01/13] cmd: aes: fix DM operation handling MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260728-submit-ce-series-v2-v6-1-80c1f7daffa5@gmail.com> References: <20260728-submit-ce-series-v2-v6-0-80c1f7daffa5@gmail.com> In-Reply-To: <20260728-submit-ce-series-v2-v6-0-80c1f7daffa5@gmail.com> To: Svyatoslav Ryhel , Ion Agorria , Aspeed BMC SW team , Joel Stanley , u-boot@lists.u-boot-project.org Cc: Chen-Yu Tsai , Samuel Holland , Tom Rini , Simon Glass , James Hilliard , Thierry Reding , Quentin Schulz , Quentin Schulz , Marek Vasut , Marek Vasut , Rasmus Villemoes , Rasmus Villemoes , Aristo Chen , Anton Ivanov , Daniel Golle , Francois Berder , Peng Fan , Neil Armstrong , Randolph Sapp , Jonas Karlman , Wolfgang Wallner , Alexey Charkov , Ilias Apalodimas , Heiko Schocher , "Kory Maincent (TI.com)" , Anshul Dalal , Johan Jonker , Francesco Valla , Heinrich Schuchardt , Michael Walle , Andre Przywara , Lukasz Majewski , Richard Genoud , Michael Trimarchi , E Shattow , Enric Balletbo i Serra , Mattijs Korpershoek , Lucas Dietrich , David Lechner , Julien Stephan , Kuan-Wei Chiu , Bastien Curutchet , Raymond Mao , Ryan Chen , Chia-Wei Wang , "Lucien.Jheng" , Mateusz Furdyna , Dinesh Maniyam , Heiko Stuebner , Vincent Jardin X-Mailer: b4 0.15.2 X-Mailman-Approved-At: Wed, 29 Jul 2026 04:55:22 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785260637; x=1785865437; darn=lists.u-boot-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=1XEBQ3uzR69M2nBOFTBjrzenv3EgWoQiRYWZo+q7syw=; b=XtmJPz9VR0onytawKq3WNtk3qVzRrWWaFb9DLXCBTB8eZVJX+d2cs80td/IkiPFQma hHxRmeqSRw9sb1ftKs35xJSeTpvwwxUfs3SxY72W8gBOhLysdcMlxbHjglsz51JiCeac /gpjjTwQELad4LxME9Xx3wVQRMdGZJ29j9rNoPd3bla7nYbVpa57FTENV3uX8bmpHMAo L4gbjMenjzsi0vY/E460Y++oRj/zw/ekHHSFqP9clazM8vTiWATRA4bOc7Zt8Cac5Cw0 d3ZCRV8N2fetVlzyiS6BJpKfYVLpsY1rObRGjBwD+cPOB4ZEIc9LBJVfXPVsI37nQkTh Guhg== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=gmail.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=XtmJPz9V X-BeenThere: u-boot@lists.u-boot-project.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.u-boot-project.org Sender: "U-Boot" The DM AES command path takes operation-specific arguments after the common arguments. argv[1] holds the mode, "ecb" or "cbc", while argv[2] holds the requested operation, "enc" or "dec". The DM path checked argv[1] for the operation, so the ecb and cbc commands always returned CMD_RET_USAGE before running. Parse argv[2] instead. Fixes: b01444aa14cf ("cmd: aes: Add support for DM AES drivers") Reviewed-by: Svyatoslav Ryhel Reviewed-by: Simon Glass Signed-off-by: James Hilliard --- Changes v1 -> v2: - Limit the patch to the argv parsing fix (suggested by Simon Glass) - State that the commands always returned usage (suggested by Simon Glass) - Add a Fixes tag (suggested by Simon Glass) --- cmd/aes.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/aes.c b/cmd/aes.c index 3fd83013ffe..edcd87cf11b 100644 --- a/cmd/aes.c +++ b/cmd/aes.c @@ -175,9 +175,9 @@ int cmd_aes_ecb(int argc, char *const argv[], u32 key_len) if (ret) return ret; - if (!strncmp(argv[1], "enc", 3)) + if (!strncmp(argv[2], "enc", 3)) enc = 1; - else if (!strncmp(argv[1], "dec", 3)) + else if (!strncmp(argv[2], "dec", 3)) enc = 0; else return CMD_RET_USAGE; @@ -223,9 +223,9 @@ int cmd_aes_cbc(int argc, char *const argv[], u32 key_len) if (ret) return ret; - if (!strncmp(argv[1], "enc", 3)) + if (!strncmp(argv[2], "enc", 3)) enc = 1; - else if (!strncmp(argv[1], "dec", 3)) + else if (!strncmp(argv[2], "dec", 3)) enc = 0; else return CMD_RET_USAGE; -- 2.53.0