From owner-svn-src-user@freebsd.org Tue May 21 03:55:22 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 537CB15A1801 for ; Tue, 21 May 2019 03:55:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E839D7318B; Tue, 21 May 2019 03:55:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AFE0D30E; Tue, 21 May 2019 03:55:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L3tLIX091199; Tue, 21 May 2019 03:55:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L3tL54091198; Tue, 21 May 2019 03:55:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905210355.x4L3tL54091198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 21 May 2019 03:55:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r348043 - in user/ngie/bug-237403: stand/powerpc tests/sys/opencrypto X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in user/ngie/bug-237403: stand/powerpc tests/sys/opencrypto X-SVN-Commit-Revision: 348043 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E839D7318B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 03:55:22 -0000 Author: ngie Date: Tue May 21 03:55:20 2019 New Revision: 348043 URL: https://svnweb.freebsd.org/changeset/base/348043 Log: MFhead@r348042 Modified: user/ngie/bug-237403/stand/powerpc/Makefile user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Directory Properties: user/ngie/bug-237403/ (props changed) Modified: user/ngie/bug-237403/stand/powerpc/Makefile ============================================================================== --- user/ngie/bug-237403/stand/powerpc/Makefile Tue May 21 03:52:48 2019 (r348042) +++ user/ngie/bug-237403/stand/powerpc/Makefile Tue May 21 03:55:20 2019 (r348043) @@ -6,7 +6,7 @@ NO_OBJ=t SUBDIR.yes= boot1.chrp ofw uboot -.if "${TARGET_ARCH}" == "powerpc64" +.if "${MACHINE_ARCH}" == "powerpc64" SUBDIR.${MK_FDT}+= kboot .endif Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py ============================================================================== --- user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Tue May 21 03:52:48 2019 (r348042) +++ user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Tue May 21 03:55:20 2019 (r348043) @@ -228,9 +228,8 @@ class Crypto: ivbuf = array.array('B', str_to_ascii(iv)) cop.iv = ivbuf.buffer_info()[0] - cop_b = bytes(cop) - #print('cop:', cop_b) - ioctl(_cryptodev, CIOCCRYPT, cop_b) + #print('cop:', cop) + ioctl(_cryptodev, CIOCCRYPT, bytes(cop)) s = array_tobytes(s) if self._maclen is not None: @@ -244,6 +243,7 @@ class Crypto: caead.op = op caead.flags = CRD_F_IV_EXPLICIT caead.flags = 0 + src = str_to_ascii(src) caead.len = len(src) src = str_to_ascii(src) s = array.array("B", src) @@ -256,6 +256,7 @@ class Crypto: if self._maclen is None: raise ValueError('must have a tag length') + tag = str_to_ascii(tag) if tag is None: tag = array.array('B', [0] * self._maclen) else: @@ -270,8 +271,7 @@ class Crypto: caead.ivlen = len(iv) caead.iv = ivbuf.buffer_info()[0] - caead_b = bytes(caead) - ioctl(_cryptodev, CIOCCRYPTAEAD, caead_b) + ioctl(_cryptodev, CIOCCRYPTAEAD, bytes(caead)) s = array_tobytes(s) @@ -279,7 +279,8 @@ class Crypto: def perftest(self, op, size, timeo=3): inp = array.array('B', (random.randint(0, 255) for x in range(size))) - out = array.array('B', str_to_ascii(inp)) + inp = str_to_ascii(inp) + out = array.array('B', inp) # prep ioctl cop = CryptOp() @@ -305,9 +306,9 @@ class Crypto: start = time.time() reps = 0 - cop_b = bytes(cop) + cop = bytes(cop) while not exit[0]: - ioctl(_cryptodev, CIOCCRYPT, cop_b) + ioctl(_cryptodev, CIOCCRYPT, cop) reps += 1 end = time.time()