1. 08 Jan, 2024 3 commits
    • Jinoh Kang's avatar
      ntdll/tests: Don't hard code the maximum XState length in test_extended_context(). · 835f99bd
      Jinoh Kang authored
      This is required to support systems with a larger XSAVE area.
      835f99bd
    • Jinoh Kang's avatar
      ntdll/tests: Fix incorrect calculation of context length in test_copy_context(). · 7ba9dea9
      Jinoh Kang authored
      `(BYTE *)dst_ex - (BYTE *)dst` is the size of the legacy context, but
      `dst_ex->All` already contains the legacy context.  Therefore,
      `context_length` has the legacy context size added *twice*.
      
      This becomes a problem when `context_length` exceeds
      `sizeof(src_context_buffer)`.  This confuses `check_changes_in_range()`,
      causing out-of-bounds read and unpredictable test results.
      7ba9dea9
    • Jinoh Kang's avatar
      ntdll/tests: Fix x86-32 extended context end offset in test_copy_context(). · 3995ff24
      Jinoh Kang authored
      The penultimate element of `ranges_x86` array has an incorrect value: it
      should be *at least* 0x2f0, which is the minimum size of an extended
      context.
      
      Fix this by setting it to 0x440, which is the minimum size of an
      extended context *with* CONTEXT_I386_XSTATE.  This is consistent with
      `ranges_amd64`, the penultimate element of which has the minimum size of
      an extended context *with* CONTEXT_AMD64_XSTATE.
      
      Note that the incorrect value does not always lead to a test failure,
      since check_changes_in_range_() effectively ignores range `start`s that
      are not in order.  Reproducing the failure requires a system with a
      sufficiently large XSAVE area; specifically, the following condition is
      necessary for check_changes_in_range_() to pick up the wrong value:
      
          0x2cc < 0x294 + src_ex->XState.Length - sizeof(XSTATE).
      3995ff24
  2. 05 Jan, 2024 7 commits
  3. 04 Jan, 2024 6 commits
  4. 03 Jan, 2024 4 commits
  5. 02 Jan, 2024 5 commits
  6. 01 Jan, 2024 1 commit
  7. 27 Dec, 2023 6 commits
  8. 22 Dec, 2023 8 commits