> > > > +const struct file_operations sgx_provision_fops = { > > + .owner = THIS_MODULE, > > +}; > > + > > +static struct miscdevice sgx_dev_provision = { > > + .minor = MISC_DYNAMIC_MINOR, > > + .name = "sgx_provision", > > + .nodename = "sgx_provision", > > + .fops = &sgx_provision_fops, > > +}; > > + > > +int sgx_set_attribute(unsigned long *allowed_attributes, > > + unsigned int attribute_fd) > > kdoc Will do. > > > +{ > > + struct file *file; > > + > > + file = fget(attribute_fd); > > + if (!file) > > + return -EINVAL; > > + > > + if (file->f_op != &sgx_provision_fops) { > > + fput(file); > > + return -EINVAL; > > + } > > + > > + *allowed_attributes |= SGX_ATTR_PROVISIONKEY; > > + > > + fput(file); > > + return 0; > > +} > > +EXPORT_SYMBOL_GPL(sgx_set_attribute); > > +