# Re: \[PATCH v39 15/24\] x86/sgx: Add SGX\_IOC\_ENCLAVE\_PROVISION

- From: Jarkko Sakkinen \<hidden\>
- Date: 2020-10-23 10:14:27 
- List: linux-security-module
- Page: https://ratatoskr.run/linux-security-module/2020/10/6147525
- Thread: https://ratatoskr.run/linux-security-module/2020/10/6129481/t.md

```text
On Tue, Oct 20, 2020 at 08:48:54AM -0700, Dave Hansen wrote:
> >  int __init sgx_drv_init(void)
> >  {
> >  	unsigned int eax, ebx, ecx, edx;
> > @@ -181,5 +192,12 @@ int __init sgx_drv_init(void)
> >  		return ret;
> >  	}
> >  
> > +	ret = misc_register(&sgx_dev_provision);
> > +	if (ret) {
> > +		pr_err("Creating /dev/sgx/provision failed with %d.\n", ret);
> > +		misc_deregister(&sgx_dev_enclave);
> > +		return ret;
> > +	}
> > +
> 
> Isn't it a *bit* too specific to say that a device file failed to be
> created?  Do other misc devices use this kind of message?

Before seeing this I had already removed it. It is incosistent at
least and quite useless error really. We have tracing tools for
this.

/Jarkko
```
