summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
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