logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>

set_thread_area.patch (1084B)


  1. SPDX-FileCopyrightText: 2020 Rich Felker <dalias@aerifal.cx>
  2. SPDX-License-Identifier: MIT
  3. From 0b0640219338b80cf47026d1970b5503414ed7f3 Mon Sep 17 00:00:00 2001
  4. From: Rich Felker <dalias@aerifal.cx>
  5. Date: Sun, 30 Aug 2020 21:37:12 -0400
  6. Subject: fix i386 __set_thread_area fallback
  7. this code is only needed for pre-2.6 kernels, which are not actually
  8. supported anyway, and was never tested. the fallback path using
  9. SYS_modify_ldt failed to clear the upper bits of %eax (all ones due to
  10. SYS_set_thread_area's return value being an error) before modifying
  11. %al to attempt a new syscall.
  12. ---
  13. src/thread/i386/__set_thread_area.s | 1 +
  14. 1 file changed, 1 insertion(+)
  15. (limited to 'src/thread/i386/__set_thread_area.s')
  16. diff --git src/thread/i386/__set_thread_area.s src/thread/i386/__set_thread_area.s
  17. index c2c21dd5..aa6852be 100644
  18. --- musl-1.1.24/src/thread/i386/__set_thread_area.s
  19. +++ musl-1.1.24/src/thread/i386/__set_thread_area.s
  20. @@ -28,6 +28,7 @@ __set_thread_area:
  21. ret
  22. 2:
  23. mov %ebx,%ecx
  24. + xor %eax,%eax
  25. xor %ebx,%ebx
  26. xor %edx,%edx
  27. mov %ebx,(%esp)
  28. --
  29. cgit v1.2.1