Code Monkey home page Code Monkey logo

linux's People

Stargazers

 avatar  avatar

Watchers

 avatar

linux's Issues

Some questions on `sgx_enclave_modify_type()`

Hi, @rchatre , thanks for your great contribution for EDMM Linux kernel patch. I'm the person who is interested in the newer EDMM, and I'm trying to follow and understand the implementation from the newest EDMM kernel patch.

I have some questions on the current implementation sgx_enclave_modify_type(): Why remove the PTE in enclave's page table when we modify the page type from SGX_PAGE_TYPE_REG to SGX_PAGE_TYPE_TCS (Line 968 in arch/x86/kernel/cpu/sgx/ioctl.c) ? As mentioned in the Intel SDK SDM, the EMODT performed by kernel needs validation by EACCEPT inside enclave. If we remove the PTE mapping of TCS page here, subsequent EACCEPT will generate #PF exception, and the sgx_vma_fault() in arch/x86/kernel/cpu/sgx/encl.c will re-add the mapping (I have verified such flow on my machine by using the SGX SDK with newest EDMM support: https://github.com/intel/linux-sgx/tree/edmm_v5).

My question is: can we eliminate the operations in Line 953- Line 972 ? Such operations seem to remove the mappings which will be re-added by vma fault handler (sgx_vma_fault()). I'm new to Linux kernel development, please correct me if my understanding is incorrect.

Looking forward to your reply!

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.