Lines Matching +full:pk +full:- +full:pk
1 // SPDX-License-Identifier: GPL-2.0-only
63 "PK",
70 "PK",
90 var.name = kcalloc(key_len - 1, sizeof(wchar_t), GFP_KERNEL); in plpks_get_variable()
92 return -ENOMEM; in plpks_get_variable()
93 rc = utf8s_to_utf16s(key, key_len - 1, UTF16_LITTLE_ENDIAN, (wchar_t *)var.name, in plpks_get_variable()
94 key_len - 1); in plpks_get_variable()
113 if (rc && rc != -ENOENT) { in plpks_get_variable()
115 // Return -EIO since userspace probably doesn't care about the in plpks_get_variable()
117 rc = -EIO; in plpks_get_variable()
132 return -EINVAL; in plpks_set_variable()
136 var.name = kcalloc(key_len - 1, sizeof(wchar_t), GFP_KERNEL); in plpks_set_variable()
138 return -ENOMEM; in plpks_set_variable()
139 rc = utf8s_to_utf16s(key, key_len - 1, UTF16_LITTLE_ENDIAN, (wchar_t *)var.name, in plpks_set_variable()
140 key_len - 1); in plpks_set_variable()
145 // Flags are contained in the first 8 bytes of the buffer, and are always big-endian in plpks_set_variable()
148 var.datalen = data_size - sizeof(flags); in plpks_set_variable()
154 // userspace on write, so we return it rather than just -EIO in plpks_set_variable()
169 * codes -ENOENT or -EPERM are expected in static key management mode. An
191 if (rc != -ENOENT && rc != -EPERM) in plpks_get_sb_keymgmt_mode()
202 * "ibm,plpks-sb-v<n>" or "ibm,plpks-sb-v0", based on the key management mode,
210 return snprintf(buf, bufsize, "ibm,plpks-sb-v%hhu", mode); in plpks_secvar_format()
246 return -ENODEV; in plpks_secvar_init()