This project is mirrored from https://github.com/hermitcore/libhermit-rs.git. Pull mirroring updated .
  1. 21 Aug, 2021 1 commit
  2. 17 Aug, 2021 2 commits
  3. 13 Aug, 2021 2 commits
  4. 10 Aug, 2021 1 commit
  5. 09 Aug, 2021 2 commits
  6. 08 Aug, 2021 12 commits
  7. 07 Aug, 2021 4 commits
  8. 23 Jul, 2021 1 commit
  9. 11 Jul, 2021 1 commit
    • bors[bot]'s avatar
      Merge #254 · bce6d72f
      bors[bot] authored
      
      
      254: update dependencies / lockfile r=stlankes a=striezel
      
      * updating proc-macro2 v1.0.26 -> v1.0.27
      * updating raw-cpuid v9.0.0 -> v9.1.1
      * updating syn v1.0.72 -> v1.0.73
      
      
      `proc-macro2` and `syn` should be painless, because these are only patch version updates.
      
      `raw-cpuid` should be no hassle, too, if it follows semver - and its readme says it does. :)
      
      Co-authored-by: default avatarDirk Stolle <striezel-dev@web.de>
      bce6d72f
  10. 10 Jul, 2021 1 commit
  11. 09 Jul, 2021 1 commit
  12. 02 Jul, 2021 1 commit
  13. 29 Jun, 2021 4 commits
  14. 28 Jun, 2021 2 commits
    • bors[bot]'s avatar
      Merge #246 #248 · 3e9f6cdb
      bors[bot] authored
      
      
      246: Fix copyright header placement r=stlankes a=mkroening
      
      
      
      248: Remove more instances of hardcoded stack offsets r=stlankes a=mkroening
      
      
      
      Co-authored-by: Martin Kröning's avatarMartin Kröning <mkroening@posteo.net>
      3e9f6cdb
    • bors[bot]'s avatar
      Merge #247 · 3f93b2f9
      bors[bot] authored
      247: Fix switching to kernel stack r=stlankes a=mkroening
      
      This fixes https://github.com/hermitcore/libhermit-rs/issues/234 introduced in https://github.com/hermitcore/libhermit-rs/commit/41cf625c33801690f5be566db67e3eec5b372feb.
      
      As described in https://github.com/hermitcore/libhermit-rs/issues/234
      
      , the issue with the old implementation was inlining resulting in wrongly managing stack space after the switch, potentially resulting in a page fault, when writing before the new stack:
      
      ```rust
      fn sys_foo() {
          // reserves stack space for `a` (`rsp -= 16`)
      
          switch_rsp();
      
          // use reserved stack space (`[rsp + 16]`), even though rsp is not the same anymore
          let a = [0_u8; 16];
      }
      ```
      
      To my knowledge, inlining can only be really prevented, by explicitly `call`ing the function in assembly.
      
      I fixed this issue in five steps:
      
      1. Remove `switch_to_kernel!`, `switch_to_user!`, migrate uses to `kernel_function!`
      2. Fix a potential stack overflow caused by a typo (unrelated)
      3. Improve consistency of kernel functions by adding the prefix `__sys_` to all functions.
      4. Make all `__sys_`-functions `extern "C"` to allow calling in assembly.
      5. Reimplement `kernel_function!` and call kernel function in assembly.
      
      Co-authored-by: Martin Kröning's avatarMartin Kröning <mkroening@posteo.net>
      3f93b2f9
  15. 26 Jun, 2021 1 commit
    • Martin Kröning's avatar
      Reimplement kernel_function! · d25ab7a6
      Martin Kröning authored
      To force Rust manage the new stack in the kernel function, we call the
      kernel function manually in assembly. That's why we need the kernel
      functions to be extern "C".
      d25ab7a6
  16. 25 Jun, 2021 4 commits