Re: [PATCH v2 2/2] x86/sgx: Implement EUPDATESVN and opportunistically call it during first EPC page alloc
From: Jarkko Sakkinen
Date: Mon Mar 31 2025 - 13:46:50 EST
On Mon, Mar 31, 2025 at 07:26:45AM +0000, Reshetova, Elena wrote:
> > > > + default:
> > > > + pr_err("EUPDATESVN: unknown error %d\n", ret);
> > > > + break;
> > > > + }
> > >
> > > Overall, I think you're right in that "inversion" does make sense,
> > > now that other stuff is better aligned.
> > >
> > > At least when there is spurious error, I think ioctl's should stop
> > > responding and driver should not do anything useful anymore. I.e.,
> > > it should go out-of-service.
> > >
> > > I don't think the driver should tear-down, just stop servicing
> > > VM's and responding ioctl's.
> > >
> > > Possibly thish should be also right action for other errors than
> > > "insufficient entropy" but I'm open for comments for this.
> >
> > Or actually actually I take one step back with my suggestions
> > because this really should be a question for which I don't have
> > the definitive answer.
> >
> > The current code works like this: if anything that we don't
> > like happens, we re-iterate.
> >
> > Should some of the "exceptional conditions" have a different
> > recovery or not?
>
> None of these exceptional conditions are fatal or present an
> immediate danger to the system security. So, allowing the re-tries
> seems logical in this case. In case re-tries also fail, the system
> admin will have an option of gracefully shutting down all enclaves
> and doing either a full reboot (if SVN is the only concern) or other
> necessary actions like taking the physical node out of use, etc.
>
> Does this sound reasonable?
Uknown error I don't think would hold that premise.
>
> Best Regards,
> Elena.
>
BR, Jarkko
>