Skip to content
Snippets Groups Projects
  1. Jan 28, 2021
    • André Almeida's avatar
      futex2: Adapt glibc to use futex2 · 1e1fad4a
      André Almeida authored
      Add a new low level lock interface to use futex2 syscall. Adapt the
      current timed waiters to use absolute timeout, instead of relative ones.
      Add FUTEX_32 flag to all futex2 calls.
      1e1fad4a
  2. Aug 05, 2020
  3. Aug 04, 2020
  4. Aug 03, 2020
  5. Jul 31, 2020
  6. Jul 27, 2020
    • H.J. Lu's avatar
      nptl: Zero-extend arguments to SETXID syscalls [BZ #26248] · 0ad926f3
      H.J. Lu authored
      nptl has
      
      /* Opcodes and data types for communication with the signal handler to
         change user/group IDs.  */
      struct xid_command
      {
        int syscall_no;
        long int id[3];
        volatile int cntr;
        volatile int error;
      };
      
       /* This must be last, otherwise the current thread might not have
           permissions to send SIGSETXID syscall to the other threads.  */
        result = INTERNAL_SYSCALL_NCS (cmdp->syscall_no, 3,
                                       cmdp->id[0], cmdp->id[1], cmdp->id[2]);
      
      But the second argument of setgroups syscal is a pointer:
      
             int setgroups (size_t size, const gid_t *list);
      
      But on x32, pointers passed to syscall must have pointer type so that
      they will be zero-extended.  The kernel XID arguments are unsigned and
      do not require sign extension.  Change xid_command to
      
      struct xid_command
      {
        int syscall_no;
        unsigned long int id[3];
        volatile int cntr;
        volatile int error;
      };
      
      so that all arguments are zero-extended.  A testcase is added for x32 and
      setgroups returned with EFAULT when running as root without the fix.
      0ad926f3
    • Joseph Myers's avatar
      Use binutils 2.35 branch in build-many-glibcs.py. · b51c1500
      Joseph Myers authored
      This patch makes build-many-glibcs.py use binutils 2.35 branch.
      
      Tested with build-many-glibcs.py (compilers and glibcs builds).
      b51c1500
    • Szabolcs Nagy's avatar
      aarch64: Use future HWCAP2_MTE in ifunc resolver · 2dc33b92
      Szabolcs Nagy authored
      Make glibc MTE-safe on systems where MTE is available. This allows
      using heap tagging with an LD_PRELOADed malloc implementation that
      enables MTE. We don't document this as guaranteed contract yet, so
      glibc may not be MTE safe when HWCAP2_MTE is set (older glibcs
      certainly aren't). This is mainly for testing and debugging.
      
      The HWCAP flag is not exposed in public headers until Linux adds it
      to its uapi. The HWCAP value reservation will be in Linux 5.9.
      2dc33b92
  7. Jul 25, 2020
  8. Jul 24, 2020
    • Szabolcs Nagy's avatar
      aarch64: Respect p_flags when protecting code with PROT_BTI · 7ebd1142
      Szabolcs Nagy authored
      Use PROT_READ and PROT_WRITE according to the load segment p_flags
      when adding PROT_BTI.
      
      This is before processing relocations which may drop PROT_BTI in
      case of textrels.  Executable stacks are not protected via PROT_BTI
      either.  PROT_BTI is hardening in case memory corruption happened,
      it's value is reduced if there is writable and executable memory
      available so missing it on such memory is fine, but we should
      respect the p_flags and should not drop PROT_WRITE.
      7ebd1142
  9. Jul 23, 2020
  10. Jul 21, 2020
  11. Jul 20, 2020
  12. Jul 18, 2020
Loading