Lines Matching refs:vcssb

62 struct vcssb {  struct
214 static void pr_dbf_vcssb(const struct vcssb *s) in pr_dbf_vcssb()
428 static char *get_key_description(struct vcssb *vcssb, const struct vce *vce) in get_key_description() argument
434 cs_token = vcssb->cs_token; in get_key_description()
453 static int create_key_from_vce(struct vcssb *vcssb, struct vce *vce, in create_key_from_vce() argument
460 desc = get_key_description(vcssb, vce); in create_key_from_vce()
485 static int get_vcssb(struct vcssb *vcssb) in get_vcssb() argument
489 memset(vcssb, 0, sizeof(*vcssb)); in get_vcssb()
490 vcssb->vcssb_length = VCSSB_LEN_BYTES; in get_vcssb()
491 diag320_rc = diag320(DIAG320_STORAGE, vcssb); in get_vcssb()
492 pr_dbf_vcssb(vcssb); in get_vcssb()
498 if (vcssb->vcssb_length == VCSSB_LEN_NO_CERTS) { in get_vcssb()
506 static u32 get_4k_mult_vcb_size(struct vcssb *vcssb) in get_4k_mult_vcb_size() argument
508 return round_up(vcssb->max_single_vcb_length, PAGE_SIZE); in get_4k_mult_vcb_size()
512 static void fill_vcb_input(struct vcssb *vcssb, struct vcb *vcb, u16 index) in fill_vcb_input() argument
515 vcb->vcb_hdr.vcb_input_length = get_4k_mult_vcb_size(vcssb); in fill_vcb_input()
516 vcb->vcb_hdr.cs_token = vcssb->cs_token; in fill_vcb_input()
532 static int get_sevcb(struct vcssb *vcssb, u16 index, struct vcb *vcb) in get_sevcb() argument
536 fill_vcb_input(vcssb, vcb, index); in get_sevcb()
571 static int create_key_from_sevcb(struct vcssb *vcssb, u16 index, in create_key_from_sevcb() argument
579 vcb = vmalloc(get_4k_mult_vcb_size(vcssb)); in create_key_from_sevcb()
580 vce = vmalloc(vcssb->max_single_vcb_length - sizeof(vcb->vcb_hdr)); in create_key_from_sevcb()
584 rc = get_sevcb(vcssb, index, vcb); in create_key_from_sevcb()
593 rc = create_key_from_vce(vcssb, vce, keyring); in create_key_from_sevcb()
609 static int add_certificates_to_keyring(struct vcssb *vcssb, struct key *keyring) in add_certificates_to_keyring() argument
616 for (index = 1; index < vcssb->total_vc_index_count + 1; index++) { in add_certificates_to_keyring()
618 rc = create_key_from_sevcb(vcssb, index, keyring); in add_certificates_to_keyring()
684 struct vcssb *vcssb; in fill_cs_keyring() local
688 vcssb = kmalloc(VCSSB_LEN_BYTES, GFP_KERNEL); in fill_cs_keyring()
689 if (!vcssb) in fill_cs_keyring()
702 rc = get_vcssb(vcssb); in fill_cs_keyring()
711 rc = add_certificates_to_keyring(vcssb, cs_keyring); in fill_cs_keyring()
722 kfree(vcssb); in fill_cs_keyring()