[PATCH v7 3/5] virt: Add efi_secret module to expose confidential computing secrets

Gerd Hoffmann kraxel at redhat.com
Wed Feb 2 08:45:13 UTC 2022


  Hi,

> +	s->coco_dir = NULL;
> +	s->fs_dir = NULL;
> +	memset(s->fs_files, 0, sizeof(s->fs_files));
> +
> +	dent = securityfs_create_dir("coco", NULL);
> +	if (IS_ERR(dent)) {
> +		pr_err("Error creating coco securityfs directory entry err=%ld\n", PTR_ERR(dent));
> +		return PTR_ERR(dent);
> +	}
> +	s->coco_dir = dent;
> +
> +	dent = securityfs_create_dir("efi_secret", s->coco_dir);
> +	if (IS_ERR(dent)) {
> +		pr_err("Error creating efi_secret securityfs directory entry err=%ld\n",
> +		       PTR_ERR(dent));
> +		return PTR_ERR(dent);
> +	}
> +	d_inode(dent)->i_op = &efi_secret_dir_inode_operations;
> +	s->fs_dir = dent;

Why have two levels of subdirectories here?  Do we expect more users for
the coco/ directory?

See also the naming discussion in the cover letter sub-thread.

take care,
  Gerd



More information about the Linux-security-module-archive mailing list