From patchwork Thu Sep 19 13:39:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe REYNES X-Patchwork-Id: 1164634 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=softathome.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46Yydd6Yr0z9sN1 for ; Thu, 19 Sep 2019 23:40:05 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 3BE07C21DDC; Thu, 19 Sep 2019 13:40:00 +0000 (UTC) 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=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B7F1AC21C38; Thu, 19 Sep 2019 13:39:58 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A0938C21C50; Thu, 19 Sep 2019 13:39:57 +0000 (UTC) Received: from vrout30.yaziba.net (vrout30.yaziba.net [185.56.204.33]) by lists.denx.de (Postfix) with ESMTPS id 3EF27C21C38 for ; Thu, 19 Sep 2019 13:39:57 +0000 (UTC) Received: from mtaout20.int.yaziba.net (mtaout20.int.yaziba.net [10.4.20.37]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by vrout30.yaziba.net (mx10.yaziba.net) with ESMTPS id C2B3952080; Thu, 19 Sep 2019 15:39:56 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mtaout20.int.yaziba.net (Postfix) with ESMTP id D87FB160236; Thu, 19 Sep 2019 15:39:56 +0200 (CEST) Received: from mtaout20.int.yaziba.net ([127.0.0.1]) by localhost (mtaout20.int.yaziba.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id J79cGwhY15a6; Thu, 19 Sep 2019 15:39:56 +0200 (CEST) Received: from sahnlpt0333.softathome.com (unknown [149.6.166.170]) by mtaout20.int.yaziba.net (Postfix) with ESMTPSA id BB8C0160231; Thu, 19 Sep 2019 15:39:56 +0200 (CEST) From: Philippe Reynes To: sjg@chromium.org, mario.six@gdsys.cc, joe.hershberger@ni.com Date: Thu, 19 Sep 2019 15:39:42 +0200 Message-Id: <1568900385-21957-2-git-send-email-philippe.reynes@softathome.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1568900385-21957-1-git-send-email-philippe.reynes@softathome.com> References: <1568900385-21957-1-git-send-email-philippe.reynes@softathome.com> X-CLAMAV-SCAN: ok X-VRSPAM-SCORE: 0 X-VRSPAM-STATE: legit X-VRSPAM-CAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrvddtgdeikecutefuodetggdotefrucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhestddtredtredttdenucfhrhhomheprfhhihhlihhpphgvucftvgihnhgvshcuoehphhhilhhiphhpvgdrrhgvhihnvghssehsohhfthgrthhhohhmvgdrtghomheqnecukfhppedugeelrdeirdduieeirddujedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhht X-VRSPAM-EXTCAUSE: mhhouggvpehsmhhtphhouhht Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 1/4] sandbox: enable command aes X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This commit enable the command aes on sandbox. Then, it may be used on pytest. Signed-off-by: Philippe Reynes Reviewed-by: Simon Glass --- configs/sandbox_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig index 968ffda..d5872dd 100644 --- a/configs/sandbox_defconfig +++ b/configs/sandbox_defconfig @@ -67,6 +67,7 @@ CONFIG_CMD_QFW=y CONFIG_CMD_BOOTSTAGE=y CONFIG_CMD_PMIC=y CONFIG_CMD_REGULATOR=y +CONFIG_CMD_AES=y CONFIG_CMD_TPM=y CONFIG_CMD_TPM_TEST=y CONFIG_CMD_BTRFS=y From patchwork Thu Sep 19 13:39:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe REYNES X-Patchwork-Id: 1164637 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=softathome.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46YygH3RQ3z9s4Y for ; Thu, 19 Sep 2019 23:41:30 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 5F59CC21DB3; Thu, 19 Sep 2019 13:40:17 +0000 (UTC) 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=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id D33DCC21DCA; Thu, 19 Sep 2019 13:39:59 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id CC449C21C6A; Thu, 19 Sep 2019 13:39:57 +0000 (UTC) Received: from vrout30.yaziba.net (vrout30.yaziba.net [185.56.204.33]) by lists.denx.de (Postfix) with ESMTPS id A25BDC21C38 for ; Thu, 19 Sep 2019 13:39:57 +0000 (UTC) Received: from mtaout20.int.yaziba.net (mtaout20.int.yaziba.net [10.4.20.37]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by vrout30.yaziba.net (mx10.yaziba.net) with ESMTPS id E4A7B52082; Thu, 19 Sep 2019 15:39:56 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mtaout20.int.yaziba.net (Postfix) with ESMTP id 05BE4160238; Thu, 19 Sep 2019 15:39:57 +0200 (CEST) Received: from mtaout20.int.yaziba.net ([127.0.0.1]) by localhost (mtaout20.int.yaziba.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id HqmD_WBBXNF0; Thu, 19 Sep 2019 15:39:56 +0200 (CEST) Received: from sahnlpt0333.softathome.com (unknown [149.6.166.170]) by mtaout20.int.yaziba.net (Postfix) with ESMTPSA id CCAF0160234; Thu, 19 Sep 2019 15:39:56 +0200 (CEST) From: Philippe Reynes To: sjg@chromium.org, mario.six@gdsys.cc, joe.hershberger@ni.com Date: Thu, 19 Sep 2019 15:39:43 +0200 Message-Id: <1568900385-21957-3-git-send-email-philippe.reynes@softathome.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1568900385-21957-1-git-send-email-philippe.reynes@softathome.com> References: <1568900385-21957-1-git-send-email-philippe.reynes@softathome.com> X-CLAMAV-SCAN: ok X-VRSPAM-SCORE: 0 X-VRSPAM-STATE: legit X-VRSPAM-CAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrvddtgdeikecutefuodetggdotefrucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhestddtredtredttdenucfhrhhomheprfhhihhlihhpphgvucftvgihnhgvshcuoehphhhilhhiphhpvgdrrhgvhihnvghssehsohhfthgrthhhohhmvgdrtghomheqnecukfhppedugeelrdeirdduieeirddujedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhht X-VRSPAM-EXTCAUSE: mhhouggvpehsmhhtphhouhht Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 2/4] sandbox64: enable command aes X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This commit add the support of command aes. Then, it may be used on pytest. Signed-off-by: Philippe Reynes --- configs/sandbox64_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig index c177ff8..9332e34 100644 --- a/configs/sandbox64_defconfig +++ b/configs/sandbox64_defconfig @@ -59,6 +59,7 @@ CONFIG_CMD_QFW=y CONFIG_CMD_BOOTSTAGE=y CONFIG_CMD_PMIC=y CONFIG_CMD_REGULATOR=y +CONFIG_CMD_AES=y CONFIG_CMD_TPM=y CONFIG_CMD_TPM_TEST=y CONFIG_CMD_BTRFS=y From patchwork Thu Sep 19 13:39:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe REYNES X-Patchwork-Id: 1164639 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=softathome.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46YyhB66fQz9s4Y for ; Thu, 19 Sep 2019 23:42:18 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 3782CC21DF3; Thu, 19 Sep 2019 13:40:25 +0000 (UTC) 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=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 8C112C21DF8; Thu, 19 Sep 2019 13:40:00 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DE6A2C21BE5; Thu, 19 Sep 2019 13:39:57 +0000 (UTC) Received: from vrout30.yaziba.net (vrout30.yaziba.net [185.56.204.33]) by lists.denx.de (Postfix) with ESMTPS id A1D62C21BE5 for ; Thu, 19 Sep 2019 13:39:57 +0000 (UTC) Received: from mtaout20.int.yaziba.net (mtaout20.int.yaziba.net [10.4.20.37]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by vrout30.yaziba.net (mx10.yaziba.net) with ESMTPS id F0FB852088; Thu, 19 Sep 2019 15:39:56 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mtaout20.int.yaziba.net (Postfix) with ESMTP id 1633D160239; Thu, 19 Sep 2019 15:39:57 +0200 (CEST) Received: from mtaout20.int.yaziba.net ([127.0.0.1]) by localhost (mtaout20.int.yaziba.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id QIC1bbzThmow; Thu, 19 Sep 2019 15:39:57 +0200 (CEST) Received: from sahnlpt0333.softathome.com (unknown [149.6.166.170]) by mtaout20.int.yaziba.net (Postfix) with ESMTPSA id E97F316022B; Thu, 19 Sep 2019 15:39:56 +0200 (CEST) From: Philippe Reynes To: sjg@chromium.org, mario.six@gdsys.cc, joe.hershberger@ni.com Date: Thu, 19 Sep 2019 15:39:44 +0200 Message-Id: <1568900385-21957-4-git-send-email-philippe.reynes@softathome.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1568900385-21957-1-git-send-email-philippe.reynes@softathome.com> References: <1568900385-21957-1-git-send-email-philippe.reynes@softathome.com> X-CLAMAV-SCAN: ok X-VRSPAM-SCORE: 0 X-VRSPAM-STATE: legit X-VRSPAM-CAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrvddtgdeikecutefuodetggdotefrucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhestddtredtredttdenucfhrhhomheprfhhihhlihhpphgvucftvgihnhgvshcuoehphhhilhhiphhpvgdrrhgvhihnvghssehsohhfthgrthhhohhmvgdrtghomheqnecukfhppedugeelrdeirdduieeirddujedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhht X-VRSPAM-EXTCAUSE: mhhouggvpehsmhhtphhouhht Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 3/4] cmd: aes: use map_sysmem when accessing memory X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The aes command used to segfault when accessing memory in sandbox. The pointer accesses should be mapped. Signed-off-by: Philippe Reynes --- cmd/aes.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/aes.c b/cmd/aes.c index 7ff4a71..3db110c 100644 --- a/cmd/aes.c +++ b/cmd/aes.c @@ -11,6 +11,7 @@ #include #include #include +#include /** * do_aes() - Handle the "aes" command-line command @@ -46,10 +47,10 @@ static int do_aes(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) dst_addr = simple_strtoul(argv[5], NULL, 16); len = simple_strtoul(argv[6], NULL, 16); - key_ptr = (uint8_t *)key_addr; - iv_ptr = (uint8_t *)iv_addr; - src_ptr = (uint8_t *)src_addr; - dst_ptr = (uint8_t *)dst_addr; + key_ptr = (uint8_t *)map_sysmem(key_addr, 128 / 8); + iv_ptr = (uint8_t *)map_sysmem(iv_addr, 128 / 8); + src_ptr = (uint8_t *)map_sysmem(src_addr, len); + dst_ptr = (uint8_t *)map_sysmem(dst_addr, len); /* First we expand the key. */ aes_expand_key(key_ptr, key_exp); From patchwork Thu Sep 19 13:39:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe REYNES X-Patchwork-Id: 1164638 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=softathome.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46Yygp3rzvz9s4Y for ; Thu, 19 Sep 2019 23:41:58 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 1F3A2C21E16; Thu, 19 Sep 2019 13:40:34 +0000 (UTC) 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=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 349DBC21E07; Thu, 19 Sep 2019 13:40:01 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 36107C21BE5; Thu, 19 Sep 2019 13:39:58 +0000 (UTC) Received: from vrout30.yaziba.net (vrout30.yaziba.net [185.56.204.33]) by lists.denx.de (Postfix) with ESMTPS id 04A17C21C38 for ; Thu, 19 Sep 2019 13:39:58 +0000 (UTC) Received: from mtaout20.int.yaziba.net (mtaout20.int.yaziba.net [10.4.20.37]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by vrout30.yaziba.net (mx10.yaziba.net) with ESMTPS id 192E85208D; Thu, 19 Sep 2019 15:39:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mtaout20.int.yaziba.net (Postfix) with ESMTP id 34AE516022B; Thu, 19 Sep 2019 15:39:57 +0200 (CEST) Received: from mtaout20.int.yaziba.net ([127.0.0.1]) by localhost (mtaout20.int.yaziba.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id t9tqSrOZ5gAq; Thu, 19 Sep 2019 15:39:57 +0200 (CEST) Received: from sahnlpt0333.softathome.com (unknown [149.6.166.170]) by mtaout20.int.yaziba.net (Postfix) with ESMTPSA id 033F5160231; Thu, 19 Sep 2019 15:39:57 +0200 (CEST) From: Philippe Reynes To: sjg@chromium.org, mario.six@gdsys.cc, joe.hershberger@ni.com Date: Thu, 19 Sep 2019 15:39:45 +0200 Message-Id: <1568900385-21957-5-git-send-email-philippe.reynes@softathome.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1568900385-21957-1-git-send-email-philippe.reynes@softathome.com> References: <1568900385-21957-1-git-send-email-philippe.reynes@softathome.com> X-CLAMAV-SCAN: ok X-VRSPAM-SCORE: 0 X-VRSPAM-STATE: legit X-VRSPAM-CAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrvddtgdeikecutefuodetggdotefrucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhestddtredtredttdenucfhrhhomheprfhhihhlihhpphgvucftvgihnhgvshcuoehphhhilhhiphhpvgdrrhgvhihnvghssehsohhfthgrthhhohhmvgdrtghomheqnecukfhppedugeelrdeirdduieeirddujedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhht X-VRSPAM-EXTCAUSE: mhhouggvpehsmhhtphhouhht Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 4/4] pytest: add a new test for aes X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This commit add a simple test to check that a text may be ciphered and unciphered. Each step are checked with the known result. Signed-off-by: Philippe Reynes --- test/py/tests/test_aes.py | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 test/py/tests/test_aes.py diff --git a/test/py/tests/test_aes.py b/test/py/tests/test_aes.py new file mode 100644 index 0000000..408bd77 --- /dev/null +++ b/test/py/tests/test_aes.py @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2019, Softathome + +# Test U-Boot's "aes" command. + +import pytest + +def test_aes(u_boot_console): + """ + Test the aes command, and validate that it can + cipher and uncipher a simple text + """ + + cons = u_boot_console + tmpdir = cons.config.result_dir + '/' + datadir = cons.config.source_dir + '/test/py/tests/aes/' + + # Check that the option cmd_aes is enabled in the config + if cons.config.buildconfig.get('config_cmd_aes', 'n') != 'y': + pytest.skip('aes command not supported') + + # Send a command with no argument ... + output = cons.run_command('aes') + assert('AES 128 CBC encryption' in ''.join(output)) + + # Load file from host + output = cons.run_command('host load hostfs - 1000 %skey128.bin' % datadir) + assert('16 bytes read' in ''.join(output)) + output = cons.run_command('host load hostfs - 2000 %siv128.bin' % datadir) + assert('16 bytes read' in ''.join(output)) + output = cons.run_command('host load hostfs - 3000 %splaintext.bin' % datadir) + assert('32 bytes read' in ''.join(output)) + + output = cons.run_command('md.b 3000 0x20') + + output = cons.run_command('aes enc 1000 2000 3000 4000 0x20') + + output = cons.run_command('cmp.b 3000 4000 0x20') + assert('Total of 0 byte(s) were the same' in ''.join(output)) + + output = cons.run_command('md.b 4000 0x20') + + output = cons.run_command('aes dec 1000 2000 4000 5000 0x20') + + output = cons.run_command('md.b 5000 0x20') + + output = cons.run_command('cmp.b 3000 5000 0x20') + assert('Total of 32 byte(s) were the same' in ''.join(output))