Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LibOS] Emulate in/out instructions as if they generate SIGSEGV #1192

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Commits on Mar 10, 2023

  1. [libos] Correctly generates SIGSEGV instead of SIGILL during GPF that…

    … occurs when in/out instructions are executed.
    
    This fixes issue gramineproject#1191. This fixes the bug where in/out instructions are incorrectly generating SIGSEGV instead of SIGILL. To test this run cd libos/test/fs/ && gramine-test --sgx pytest  -v -k test_211_copy_lscpu_test
    
    Signed-off-by: Nirjhar Roy <nirjhar.roy@fortanix.com>
    NirjharRoyiitk committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    cede66d View commit details
    Browse the repository at this point in the history
  2. fixup! [libos] Correctly generates SIGSEGV instead of SIGILL during G…

    …PF that occurs when in/out instructions are executed.
    
    Signed-off-by: Nirjhar Roy <nirjhar.roy@fortanix.com>
    NirjharRoyiitk committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    75ae75e View commit details
    Browse the repository at this point in the history
  3. fixup! [libos] Correctly generates SIGSEGV instead of SIGILL during G…

    …PF that occurs when in/out instructions are executed.
    
    Signed-off-by: Nirjhar Roy <nirjhar.roy@fortanix.com>
    NirjharRoyiitk committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    5fc4b44 View commit details
    Browse the repository at this point in the history
  4. fixup! [libos] Correctly generates SIGSEGV instead of SIGILL during G…

    …PF that occurs when in/out instructions are executed.
    
    Signed-off-by: Nirjhar Roy <nirjhar.roy@fortanix.com>
    NirjharRoyiitk committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    e9ff6b8 View commit details
    Browse the repository at this point in the history
  5. fixup! [libos] Correctly generates SIGSEGV instead of SIGILL during G…

    …PF that occurs when in/out instructions are executed.
    
    Signed-off-by: Nirjhar Roy <nirjhar.roy@fortanix.com>
    NirjharRoyiitk committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    47d1bac View commit details
    Browse the repository at this point in the history
  6. [LibOS] Emulate in/out instructions as if they generate SIGSEGV

    Executing I/O instructions (e.g., in/out) inside an SGX enclave generates
    a #UD fault. Gramine's PAL tries to handle this exception and propogates
    it to LibOS/app as a SIGILL signal.
    
    However, I/O instructions result in a #GP fault (which raises a SIGSEGV
    signal) if I/O is not permitted. Let Gramine emulate these instructions as
    if they end up in SIGSEGV. This helps some apps, e.g. `lscpu`.
    
    Signed-off-by: Nirjhar Roy <nirjhar.roy@fortanix.com>
    NirjharRoyiitk committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    7d255a3 View commit details
    Browse the repository at this point in the history
  7. fixup! [LibOS] Emulate in/out instructions as if they generate SIGSEGV

    Signed-off-by: Nirjhar Roy <nirjhar.roy@fortanix.com>
    NirjharRoyiitk committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    3b8547f View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2023

  1. fixup

    Signed-off-by: Nirjhar Roy <nirjhar.roy@fortanix.com>
    NirjharRoyiitk committed Mar 13, 2023
    Configuration menu
    Copy the full SHA
    fffa97f View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2023

  1. fixup

    Signed-off-by: Nirjhar Roy <nirjhar.roy@fortanix.com>
    NirjharRoyiitk committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    5add302 View commit details
    Browse the repository at this point in the history
  2. fixup

    Signed-off-by: Nirjhar Roy <nirjhar.roy@fortanix.com>
    NirjharRoyiitk committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    19c0b36 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2023

  1. fixups

    Signed-off-by: Nirjhar Roy <nirjhar.roy@fortanix.com>
    NirjharRoyiitk committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    b5254a1 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2023

  1. fixes

    NirjharRoyiitk committed Mar 16, 2023
    Configuration menu
    Copy the full SHA
    5d4676c View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2023

  1. fixes

    Signed-off-by: Nirjhar Roy <nirjhar.roy@fortanix.com>
    NirjharRoyiitk committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    ad4aa0e View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2023

  1. fixes

    Signed-off-by: Nirjhar Roy <nirjhar.roy@fortanix.com>
    NirjharRoyiitk committed Apr 20, 2023
    Configuration menu
    Copy the full SHA
    6c1d0bd View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2024

  1. Moved the in/out detection logic in PAL linux-sgx

    Signed-off-by: Nirjhar Roy <nirjhar.roy@fortanix.com>
    NirjharRoyiitk committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    c628bb4 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2024

  1. fixup! Moved the in/out detection logic in PAL linux-sgx

    Signed-off-by: Dmitrii Kuvaiskii <dmitrii.kuvaiskii@intel.com>
    dimakuv committed May 14, 2024
    Configuration menu
    Copy the full SHA
    183635f View commit details
    Browse the repository at this point in the history