1. 15 May, 2022 1 commit
  2. 14 May, 2022 1 commit
  3. 15 May, 2022 11 commits
    • Rick Macklem's avatar
      krpc: Fix NFS-over-TLS for KTLS1.3 · 0b4f2ab0
      Rick Macklem authored
      When NFS-over-TLS uses KTLS1.3, the client can receive
      post-handshake handshake records.  These records can be
      safely thown away, but are not handled correctly via the
      rpctls_ct_handlerecord() upcall to the daemon.
      
      Commit 37351133 changed soreceive_generic() so that it
      will only return ENXIO for Alert records when MSG_TLSAPPDATA
      is specified.  As such, the post-handshake handshake
      records will be returned to the krpc.
      
      This patch modifies the krpc so that it will throw
      these records away, which seems sufficient to make
      NFS-over-TLS work with KTLS1.3.  This change has
      no effect on the use of KTLS1.2, since it does not
      generate post-handshake handshake records.
      
      MFC after:	2 weeks
      0b4f2ab0
    • Dmitry Chagin's avatar
      linux(4): Add AT_MINSIGSTKSZ to arm64 port · 390c9ea0
      Dmitry Chagin authored
      MFC after:	2 weeks
      390c9ea0
    • Dmitry Chagin's avatar
      linux(4): Implement signal trampoline for arm64 in a FreeBSD-way · c56480a8
      Dmitry Chagin authored
      The implemenation differs from others Linuxulators.
      For unwinders Linux ucontext_t is stored, however native machine context
      is used to store/restore process state to avoid code duplication.
      
      As DWARF Aarch64 does not define a register number for PC and provides no
      direct way to encode the PC of the previous frame, CFI cannot describe a
      signal trampoline frame. So, modified the vdso linker script to discard
      unused sections.
      
      Extensions are not implemented.
      
      MFC after:		2 weeks
      c56480a8
    • Dmitry Chagin's avatar
      linux(4): Retire unused include · 08e201a3
      Dmitry Chagin authored
      MFC after:		2 weeks
      08e201a3
    • Dmitry Chagin's avatar
      linux(4): Retire handmade DWARF annotations from signal trampolines · 8f9635dc
      Dmitry Chagin authored
      The Linux exports __kernel_sigreturn and __kernel_rt_sigreturn from the
      vdso. Modern glibc's sigaction sets the sa_restorer field of sigaction
      to the corresponding vdso __sigreturn, and sets the SA_RESTORER.
      Our signal trampolines uses the FreeBSD-way to call a signal handler,
      so does not use the sigaction's sa_restorer.
      
      However, as glibc's runtime linker depends on the existment of the vdso
      __sigreturn symbols, for all Linuxulators was added separate trampolines
      named __sigcode with DWARF anotations and left separate __sigreturn
      methods, which are exported.
      
      MFC after:		2 weeks
      8f9635dc
    • Dmitry Chagin's avatar
      linux(4): Better naming for ucontext field of struct rt_sigframe · 6e826d27
      Dmitry Chagin authored
      To reduce sendsig code difference and to avoid confusing me,
      rename sf_sc to sf_uc to match the content.
      
      MFC after:		2 weeks
      6e826d27
    • Dmitry Chagin's avatar
      linux(4): Rework the definition of struct siginfo to match Linux actual one · af557e64
      Dmitry Chagin authored
      Rework the defintion of struct siginfo so that the array padding
      struct siginfo to SI_MAX_SIZE can be placed in a union along side of the
      rest of the struct siginfo members.  The result is that we no longer need
      the __ARCH_SI_PREAMBLE_SIZE or SI_PAD_SIZE definitions.
      
      Move struct siginfo definition under /compat/linux to reduce MD part.
      To avoid headers polution include linux_siginfo.h in the MD linux.h
      
      MFC after:		2 weeks
      af557e64
    • Dmitry Chagin's avatar
      linux(4): Move sigframe definitions to separate headers · 21f24617
      Dmitry Chagin authored
      The signal trampoine-related definitions are used only in the MD part
      of code, wherefore moved from everywhere used linux.h to separate MD
      headers.
      
      MFC after:		2 weeks
      21f24617
    • Dmitry Chagin's avatar
      linux(4): Cleanup signal trampolines · ba279bcd
      Dmitry Chagin authored
      This is the first stage of a signal trampolines refactoring.
      
      From trampolines retired emulation of the 'call' instruction, which is
      replaced by direct call of a signal handler. The signal handler address
      is in the register.
      
      The previous trampoline implemenatation used semi-Linux-way to call
      a signal handler via the 'jmp' instruction. Wherefore the trampoline
      emulated a 'call' instruction to into the stack the return address for
      signal handler's 'ret' instruction.  Wherefore handmade DWARD annotations
      was used.
      
      While here rephrased and removed excessive comments.
      
      MFC after:		2 weeks
      ba279bcd
    • Dmitry Chagin's avatar
      linux(4): Retire unneeded initialization · 0b5d5dc3
      Dmitry Chagin authored
      Both uc_flags and uc_link are zeroed above. On amd64 and i386 the
      uc_link field is not used at all. The UC_FP_XSTATE bit should be set
      in the uc_flags if OS xsave knob is turned on (and xsave is implemented).
      
      MFC after:		2 weeks
      0b5d5dc3
    • Dmitry Chagin's avatar
      linux(4): Implement futex_op for arm64. · 3bae1cd6
      Dmitry Chagin authored
      It's mostly modeled like the Linux does.
      
      Differential revision:	https://reviews.freebsd.org/D35154
      MFC after:		2 weeks
      3bae1cd6
  4. 14 May, 2022 27 commits