Coder Social home page Coder Social logo

Comments (9)

 avatar commented on August 29, 2024

Not related to bug itself but sgx_page_alloc() should return -EINTR (note to self mainly) and call site should decide how to deal with it.

In the case of sgx_ioc_enclave_create() the return value should be checked and if it is -EINTR it should return -ERESTARTSYS.

It's a driver bug. Returning -EINVAL makes zero sense.

from linux-sgx-driver.

haitaohuang avatar haitaohuang commented on August 29, 2024

I think there are more cases where sgx_init_page/sgx_alloc_page used and possibly return -ERESTARTSYS, which should have returned -EINTR. And callers of those functions should handle properly. That may be the reason why you see 1% failures in create_enclave

from linux-sgx-driver.

 avatar commented on August 29, 2024

Now you are mixing two things. The regression here is that the call site returns -EINVAL. The comment about -EINTR was completely unrelated to the regression.

from linux-sgx-driver.

haitaohuang avatar haitaohuang commented on August 29, 2024

here is an attempt to track down those pending signal situations, where -EINTR returned from either mmu_notifier_register or sgx_alloc_page(0):
haitaohuang@f2ba8fb
Please review or give it a try.

from linux-sgx-driver.

haitaohuang avatar haitaohuang commented on August 29, 2024

should einit IOC also return -ERESTARTSYS at https://github.com/01org/linux-sgx-driver/blob/master/sgx_ioctl.c#L849?
It is idempotent, isn't it?

from linux-sgx-driver.

 avatar commented on August 29, 2024

I don't know how this relates to the bug in question. Here the problem is converting the return value to -EINVAL and that's the only problem here really.

from linux-sgx-driver.

haitaohuang avatar haitaohuang commented on August 29, 2024

Yes, we won't be sure to find fix of the original failures until we can reproduce. The patch only attempt to fix those EINTR cases in driver, which may help application side to isolate the issue.

from linux-sgx-driver.

deeglaze avatar deeglaze commented on August 29, 2024

Your patch worked for me, @haitaohuang, except now I hit yet another problem that appears unrelated since it's in the uae service. I've opened an issue in linux-sgx.

from linux-sgx-driver.

haitaohuang avatar haitaohuang commented on August 29, 2024

fixed

from linux-sgx-driver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.