summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2019-08-27 11:29:03 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2019-08-27 11:29:03 +0000
commitba347c6543e6ff6ffba5d804e1705af24514e945 (patch)
tree6404ba78068dd4b3ddd97fc7212a010cca5e79b6 /usr/src
parent679f546c5aa97e75a655a2b0f0cd0cddf2ccdafb (diff)
parent4a3c0cdaf405cda95f1af235054ff0d94cd926c9 (diff)
downloadillumos-joyent-ba347c6543e6ff6ffba5d804e1705af24514e945.tar.gz
[illumos-gate merge]
commit 4a3c0cdaf405cda95f1af235054ff0d94cd926c9 11613 libzfs_crypto doesn't need to use kmfapi.h 11614 libzfs_crypto.c doesn't need to use pkcs11_getrandom commit 06756f4eb3dca79934574cacc46bd5a99cee195d 11590 unused variables in pcie
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/lib/libzfs/common/libzfs_crypto.c15
-rw-r--r--usr/src/uts/common/io/pciex/pcie.c5
-rw-r--r--usr/src/uts/i86pc/pcie/Makefile1
3 files changed, 5 insertions, 16 deletions
diff --git a/usr/src/lib/libzfs/common/libzfs_crypto.c b/usr/src/lib/libzfs/common/libzfs_crypto.c
index c7233e5348..72c2992f4b 100644
--- a/usr/src/lib/libzfs/common/libzfs_crypto.c
+++ b/usr/src/lib/libzfs/common/libzfs_crypto.c
@@ -15,6 +15,7 @@
/*
* Copyright (c) 2017, Datto, Inc. All rights reserved.
+ * Copyright 2019 Joyent, Inc.
*/
#include <string.h>
@@ -25,9 +26,9 @@
#include <sys/fs/zfs.h>
#include <sys/dsl_crypt.h>
#ifdef sun
-#include <kmfapi.h>
-#include <security/pkcs11.h>
-#include <cryptoutil.h>
+#include <stdlib.h>
+#include <security/cryptoki.h>
+#include <cryptoutil.h> /* for pkcs11_strerror */
#else
#include <sys/crypto/icp.h>
#endif
@@ -573,13 +574,7 @@ populate_create_encryption_params_nvlists(libzfs_handle_t *hdl,
/* passphrase formats require a salt and pbkdf2 iters property */
if (keyformat == ZFS_KEYFORMAT_PASSPHRASE) {
#ifdef sun
- /* always generate a new salt */
- ret = pkcs11_get_random(&salt, sizeof (uint64_t));
- if (ret != 0) {
- zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
- "Failed to generate salt."));
- goto error;
- }
+ arc4random_buf(&salt, sizeof (salt));
#else
random_init();
diff --git a/usr/src/uts/common/io/pciex/pcie.c b/usr/src/uts/common/io/pciex/pcie.c
index 1922f821f3..4eff14d563 100644
--- a/usr/src/uts/common/io/pciex/pcie.c
+++ b/usr/src/uts/common/io/pciex/pcie.c
@@ -3029,11 +3029,6 @@ pcie_link_bw_intr(dev_info_t *dip)
pcie_bus_t *bus_p = PCIE_DIP2BUS(dip);
uint16_t linksts;
uint16_t flags = PCIE_LINKSTS_LINK_BW_MGMT | PCIE_LINKSTS_AUTO_BW;
- dev_info_t *cdip;
- sysevent_t *se = NULL;
- sysevent_value_t se_val;
- sysevent_id_t eid;
- sysevent_attr_list_t *ev_attr_list = NULL;
if ((bus_p->bus_lbw_state & PCIE_LBW_S_ENABLED) == 0) {
return (DDI_INTR_UNCLAIMED);
diff --git a/usr/src/uts/i86pc/pcie/Makefile b/usr/src/uts/i86pc/pcie/Makefile
index 1a849006f5..6e79f397fb 100644
--- a/usr/src/uts/i86pc/pcie/Makefile
+++ b/usr/src/uts/i86pc/pcie/Makefile
@@ -57,7 +57,6 @@ ALL_TARGET = $(BINARY)
INSTALL_TARGET = $(BINARY) $(ROOTMODULE)
CERRWARN += -_gcc=-Wno-unused-value
-CERRWARN += -_gcc=-Wno-unused-variable
CERRWARN += -_gcc=-Wno-unused-function # safe
# needs work