skey
unsigned long skey;
skey = ((hpte_r & HPTE_R_KEY_HI) >> 57) |
return (amr >> (62 - 2 * skey)) & 3;
unsigned char skey, int mapped)
: [skey] "d" (skey), [addr] "a" (addr)
: [skey] "d" (skey), [addr] "a" (addr)
unsigned char skey;
asm volatile("iske %0,%1" : "=d" (skey) : "a" (addr));
return skey;
static inline unsigned long sske_frame(unsigned long addr, unsigned char skey)
: [addr] "+a" (addr) : [skey] "d" (skey));
u8 skey : 1;
union skey nkey = { .acc = pgste.acc, .fp = pgste.fp };
page_set_storage_key(pte_origin(pte), nkey.skey, 0);
union skey skey;
skey.skey = page_get_storage_key(pte_origin(pte));
pgste.acc = skey.acc;
pgste.fp = skey.fp;
pgste.gr |= skey.r;
pgste.gc |= skey.c;
int dat_get_storage_key(union asce asce, gfn_t gfn, union skey *skey)
skey->skey = 0;
skey->skey = page_get_storage_key(large_crste_to_phys(crste, gfn));
skey->acc = pgste.acc;
skey->fp = pgste.fp;
skey->skey = page_get_storage_key(pte_origin(*ptep));
skey->r |= pgste.gr;
skey->c |= pgste.gc;
union skey skey, bool nq)
page_set_storage_key(large_crste_to_phys(*crstep, gfn), skey.skey, !nq);
pgste.acc = skey.acc;
pgste.fp = skey.fp;
pgste.gc = skey.c;
pgste.gr = skey.r;
union skey old_skey;
old_skey.skey = page_get_storage_key(pte_origin(*ptep));
skey.r = 0;
skey.c = 0;
page_set_storage_key(pte_origin(*ptep), skey.skey, !nq);
static bool page_cond_set_storage_key(phys_addr_t paddr, union skey skey, union skey *oldkey,
oldkey->skey = page_get_storage_key(paddr);
if (oldkey->acc == skey.acc && oldkey->fp == skey.fp &&
(oldkey->r == skey.r || mr) && (oldkey->c == skey.c || mc))
page_set_storage_key(paddr, skey.skey, !nq);
union skey skey, union skey *oldkey, bool nq, bool mr, bool mc)
union skey prev;
return page_cond_set_storage_key(large_crste_to_phys(*crstep, gfn), skey, oldkey,
pgste.acc = skey.acc;
pgste.fp = skey.fp;
pgste.gc = skey.c;
pgste.gr = skey.r;
rc = page_cond_set_storage_key(pte_origin(*ptep), skey, &prev, nq, mr, mc);
unsigned char skey;
static_assert(sizeof(union skey) == sizeof(char));
int dat_get_storage_key(union asce asce, gfn_t gfn, union skey *skey);
union skey skey, bool nq);
union skey skey, union skey *oldkey, bool nq, bool mr, bool mc);
union skey storage_key;
union skey storage_key;
union skey *keys;
union skey *keys;
union skey skey;
skey.skey = kop.key;
r = kvm_s390_keyop(mc, kvm, kop.operation, kop.guest_addr, skey);
unsigned long addr, union skey skey)
r = dat_cond_set_storage_key(mc, asce, gfn, skey, &skey, 0, 0, 0);
return skey.skey;
r = dat_get_storage_key(asce, gfn, &skey);
return skey.skey;
union skey key;
key.skey = vcpu->run->s.regs.gprs[reg1] & PFMF_KEY;
union skey key;
vcpu->run->s.regs.gprs[reg1] |= key.skey;
union skey key, oldkey;
key.skey = vcpu->run->s.regs.gprs[reg1] & 0xfe;
vcpu->run->s.regs.gprs[reg1] |= (u64)oldkey.skey << 8;
u8 skey, asc, ascq;
skey = sc->sense_buffer[2] & 0x0F;
"[0x%02x,0x%02x,0x%02x]\n", ioc->name, skey, asc, ascq);
e->key = skey;
esw_vport_tbl_lookup(struct mlx5_eswitch *esw, struct mlx5_vport_key *skey, u32 key)
if (!memcmp(&e->key, skey, sizeof(*skey)))
struct mlx5_vport_key skey;
hkey = flow_attr_to_vport_key(esw, attr, &skey);
e = esw_vport_tbl_lookup(esw, &skey, hkey);
static int nvme_auth_hash_skey(int hmac_id, u8 *skey, size_t skey_len, u8 *hkey)
ret = crypto_shash_tfm_digest(tfm, skey, skey_len, hkey);
int nvme_auth_augmented_challenge(u8 hmac_id, u8 *skey, size_t skey_len,
ret = nvme_auth_hash_skey(hmac_id, skey,
int nvme_auth_generate_psk(u8 hmac_id, u8 *skey, size_t skey_len,
ret = crypto_shash_setkey(tfm, skey, skey_len);
sclp.has_skey = cpue->skey;
u8 skey;
data->skey = sense_buffer[1] & 0x0F;
data->skey = sense_buffer[2] & 0x0F;
data.skey, data.asc, data.ascq,
mpt3sas_trigger_scsi(ioc, data.skey, data.asc, data.ascq);
if (sense_info.skey == UNIT_ATTENTION)
else if (sense_info.skey == NOT_READY) {
} else if (sense_info.skey == ILLEGAL_REQUEST &&
} else if (sense_info.skey == MEDIUM_ERROR) {
} else if (sense_info.skey == HARDWARE_ERROR) {
sense_info.skey, sense_info.asc, sense_info.ascq);
memcpy(&psetstakey_para->key, &psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey, 16);
memcpy(&(psecuritypriv->dot11DefKey[keyid].skey[0]), &(wep->key_material), wep->key_length);
memcpy(&psetkeyparm->key[0], &psecuritypriv->dot11DefKey[keyid].skey[0], keylen);
memcpy(&psetkeyparm->key[0], &psecuritypriv->dot11DefKey[keyid].skey[0], keylen);
mickey = &psecuritypriv->dot118021XGrprxmickey[prxattrib->key_index].skey[0];
mickey = &stainfo->dot11tkiprxmickey.skey[0];
memcpy(&wepkey[3], &psecuritypriv->dot11DefKey[keyindex].skey[0], keylength);
prwskey = psecuritypriv->dot118021XGrpKey[prxattrib->key_index].skey;
prwskey = &stainfo->dot118021x_UncstKey.skey[0];
if (omac1_aes_128(padapter->securitypriv.dot11wBIPKey[padapter->securitypriv.dot11wBIPKeyid].skey
prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
prwskey = pattrib->dot118021x_UncstKey.skey;
prwskey = psecuritypriv->dot118021XGrpKey[prxattrib->key_index].skey;
prwskey = &stainfo->dot118021x_UncstKey.skey[0];
memcpy(&wepkey[3], &psecuritypriv->dot11DefKey[psecuritypriv->dot11PrivacyKeyIndex].skey[0], keylength);
prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
prwskey = pattrib->dot118021x_UncstKey.skey;
if (omac1_aes_128(padapter->securitypriv.dot11wBIPKey[padapter->securitypriv.dot11wBIPKeyid].skey
memcpy(pattrib->dot118021x_UncstKey.skey, psta->dot118021x_UncstKey.skey, 16);
memset(pattrib->dot118021x_UncstKey.skey, 0, 16);
memset(pattrib->dot11tkiptxmickey.skey, 0, 16);
memcpy(pattrib->dot11tkiptxmickey.skey, psta->dot11tkiptxmickey.skey, 16);
memcpy(pattrib->dot118021x_UncstKey.skey, psta->dot118021x_UncstKey.skey, 16);
if (!memcmp(psecuritypriv->dot118021XGrptxmickey[psecuritypriv->dot118021XGrpKeyid].skey, null_key, 16))
rtw_secmicsetkey(&micdata, psecuritypriv->dot118021XGrptxmickey[psecuritypriv->dot118021XGrpKeyid].skey);
if (!memcmp(&pattrib->dot11tkiptxmickey.skey[0], null_key, 16))
rtw_secmicsetkey(&micdata, &pattrib->dot11tkiptxmickey.skey[0]);
u8 skey[16];
char *grpkey = padapter->securitypriv.dot118021XGrpKey[param->u.crypt.idx].skey;
char *txkey = padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.idx].skey;
char *rxkey = padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.idx].skey;
memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), param->u.crypt.key, wep_key_len);
memcpy(psta->dot118021x_UncstKey.skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len));
memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8);
memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8);
memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), param->u.crypt.key, wep_key_len);
memcpy(psta->dot118021x_UncstKey.skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len));
memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8);
memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8);
memcpy(padapter->securitypriv.dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len));
memcpy(padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8);
memcpy(padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8);
memcpy(padapter->securitypriv.dot11wBIPKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len));
key = attr->key ?: (struct lock_class_key *)&attr->skey;
key = attr->key ?: (struct lock_class_key *)&attr->skey;
int nvme_auth_augmented_challenge(u8 hmac_id, u8 *skey, size_t skey_len,
int nvme_auth_generate_psk(u8 hmac_id, u8 *skey, size_t skey_len,
struct lock_class_key skey;
#define sock_lock_init_class_and_name(sk, sname, skey, name, key) \
(skey), (sname)); \
unsigned long skey; /* lookup key of current session */
pd->tunnel->tunnel_id, &pd->skey);
pd->skey++;
pd->skey = 0;
unsigned long skey;
unsigned long skey = cbd->skey;
tunnel->tunnel_id, &skey);
skey = 0;
skey++;
cbd->skey = skey;
unsigned long skey; /* lookup key of current session */
pd->tunnel->tunnel_id, &pd->skey);
pd->skey++;
pd->skey = 0;
u32 skey = llsec_dev_hash_short(dev->short_addr, dev->pan_id);
hash_add_rcu(sec->devices_short, &entry->bucket_s, skey);
kfree_sensitive(rx->skey);
rx->skey = NULL;
rx->nokey = !(rx->skey ||
struct tipc_aead_key *skey;
static int tipc_crypto_key_xmit(struct net *net, struct tipc_aead_key *skey,
size = tipc_aead_key_size(skey);
*((__be32 *)(data + TIPC_AEAD_ALG_NAME)) = htonl(skey->keylen);
memcpy(data, skey->alg_name, TIPC_AEAD_ALG_NAME);
memcpy(data + TIPC_AEAD_ALG_NAME + sizeof(__be32), skey->key,
skey->keylen);
struct tipc_aead_key *skey = NULL;
if (unlikely(rx->skey || (key_gen == rx->key_gen && rx->key.keys))) {
rx->skey, key_gen, rx->key_gen);
skey = kmalloc(size, GFP_ATOMIC);
if (unlikely(!skey)) {
skey->keylen = keylen;
memcpy(skey->alg_name, data, TIPC_AEAD_ALG_NAME);
memcpy(skey->key, data + TIPC_AEAD_ALG_NAME + sizeof(__be32),
skey->keylen);
rx->skey = skey;
if (likely(skey && queue_delayed_work(tx->wq, &rx->work, 0)))
if (rx->skey) {
rc = tipc_crypto_key_init(rx, rx->skey, rx->skey_mode, false);
kfree_sensitive(rx->skey);
rx->skey = NULL;
struct tipc_aead_key *skey = NULL;
skey = kmemdup(aead->key, tipc_aead_key_size(aead->key), GFP_ATOMIC);
if (likely(skey)) {
rc = tipc_aead_key_generate(skey) ?:
tipc_crypto_key_init(tx, skey, PER_NODE_KEY, false);
kfree_sensitive(skey);
static int tipc_crypto_key_xmit(struct net *net, struct tipc_aead_key *skey,
static int tipc_aead_key_generate(struct tipc_aead_key *skey);
static int tipc_aead_key_generate(struct tipc_aead_key *skey)
rc = crypto_rng_get_bytes(crypto_default_rng, skey->key,
skey->keylen);
static int do_keyop(struct kvm_vcpu *vcpu, int op, unsigned long page_idx, unsigned char skey)
.key = skey,
page_idx, skey, keyop.key);
static void set_storage_key(void *addr, uint8_t skey)
asm volatile("sske %0,%1" : : "d" (skey), "a" (addr));