From nobody Sun Jun 16 20:38:08 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2Pwc42pPz5PRKH; Sun, 16 Jun 2024 20:38:08 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2Pwc1Ywbz3xQt; Sun, 16 Jun 2024 20:38:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/DrlB5HN7hk3ipG2998FIlOjjY2OElBIzAcAijDbAnY=; b=mAh+jPeKQp5VpFazZRuEsagrzdLOGxLHBvWKQa1B6MHuf2E12f7CW3p0Tt4zTQ0mk+P1Rf fJzcl+VwhFanxOsL03MNz7hH0wp3ixfLG8NdSEMlocJTG9tvXJWthVGD3DoV+/XIOeZZha ovTRFThkh78X5H9l1/s2uDtHAk3Gho2fxfL9rMQ3djW//U4wnq4yxScpE4KLbWTaE54e9Z eG7qSU3WWsvWrtP1ujt23Lhqfry2qtFM9axvICJk0KuyZlcWl0KMbS+DczTjOlCnFLmXNn sqhU7VgqC1IadTU+ZYSd0pOifVEnebB136uNf9WGYN2nNSvVxProke7NshQdoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570288; a=rsa-sha256; cv=none; b=Yv9OLh4/Wq2KejP3xRT4dWh7sFz1B4LG7T/K70mbSR0VPVzYNzxauZijqxOYvFvJ5IzDBC 6iGfGQZpPwTCH2cYKrSdMFBVohEKOxulBJtlsr3/ZQnoQaoU/zl2GQS0ts/ZuqoxR4g7Mp XJUEmWQfUUcFxwu6IefOn7kzq8xsLg9wfTF6A6glWVg6XZBCTk/4YNH/t3qSuz87iHYMqH 744AhJ4BvAwKSXJxodxn9omLoI6iYARgBFm+81Bsp6RntYGHAentIePQPQgRPjRI5pnRNU fo+mEJd9NZdrYwT+ygwgHxyLTpUQinkJVo28gJkz2YE4H9Dq7mNW+AW/Oyne8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/DrlB5HN7hk3ipG2998FIlOjjY2OElBIzAcAijDbAnY=; b=DMhTL2+2LBeJogwDbN1cZ5gEJ/C62ueWcUPFGon/Ifv/vW/k1wWKVWKOLWLSreFJH9MNBz BXo4zcGqieTX7WLiLKlaaKqVY/RRQedLDWEf5dQh4G/s/6hcgk6luXU4vcBqQHD/XqgXgL GJ6pZfMit2CkskfqKBgkPBYvyvHX7z0GRvBKZ2HaWkd8DktC23ZFxDg6P3xTfv4QmtnXEo rmzQNFId/ft9UPGzgL248+QwrfmZy8RUz/2SciFxWM6dbzHivuQbEDkdFb/IzJFgsqUnUL 1eyq4wGopF5c9hnK4QkM/3u6F991CcJ6ulKy8OmMJEPvzi/f2/uBh/nzxtYGZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2Pwc18jjz12KW; Sun, 16 Jun 2024 20:38:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKc8ar079878; Sun, 16 Jun 2024 20:38:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKc85G079875; Sun, 16 Jun 2024 20:38:08 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:38:08 GMT Message-Id: <202406162038.45GKc85G079875@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 131c8ee7331a - main - padlock: Use device_set_descf() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 131c8ee7331af701c78e694c9c7051f53600c4fe Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=131c8ee7331af701c78e694c9c7051f53600c4fe commit 131c8ee7331af701c78e694c9c7051f53600c4fe Author: Mark Johnston AuthorDate: 2024-06-05 19:33:59 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 padlock: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/crypto/via/padlock.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/sys/crypto/via/padlock.c b/sys/crypto/via/padlock.c index 8ff222ef413b..359618409f09 100644 --- a/sys/crypto/via/padlock.c +++ b/sys/crypto/via/padlock.c @@ -79,31 +79,14 @@ padlock_identify(driver_t *drv, device_t parent) static int padlock_probe(device_t dev) { - char capp[256]; - #if defined(__amd64__) || defined(__i386__) /* If there is no AES support, we has nothing to do here. */ if (!(via_feature_xcrypt & VIA_HAS_AES)) { device_printf(dev, "No ACE support.\n"); return (EINVAL); } - strlcpy(capp, "AES-CBC", sizeof(capp)); -#if 0 - strlcat(capp, ",AES-EBC", sizeof(capp)); - strlcat(capp, ",AES-CFB", sizeof(capp)); - strlcat(capp, ",AES-OFB", sizeof(capp)); -#endif - if (via_feature_xcrypt & VIA_HAS_SHA) { - strlcat(capp, ",SHA1", sizeof(capp)); - strlcat(capp, ",SHA256", sizeof(capp)); - } -#if 0 - if (via_feature_xcrypt & VIA_HAS_AESCTR) - strlcat(capp, ",AES-CTR", sizeof(capp)); - if (via_feature_xcrypt & VIA_HAS_MM) - strlcat(capp, ",RSA", sizeof(capp)); -#endif - device_set_desc_copy(dev, capp); + device_set_descf(dev, "AES-CBC%s", + (via_feature_xcrypt & VIA_HAS_SHA) ? ",SHA1,SHA256" : ""); return (0); #else return (EINVAL);