1. 01 May, 2015 1 commit
  2. 29 Apr, 2015 1 commit
  3. 15 Apr, 2015 1 commit
    • kib's avatar
      Implement support for binary to requesting specific stack size for the · b4924fbf
      kib authored
      initial thread.  It is read by the ELF image activator as the virtual
      size of the PT_GNU_STACK program header entry, and can be specified by
      the linker option -z stack-size in newer binutils.
      The soft RLIMIT_STACK is auto-increased if possible, to satisfy the
      binary' request.
      Sponsored by:	The FreeBSD Foundation
      MFC after:	1 week
  4. 18 Mar, 2015 1 commit
  5. 09 Mar, 2015 2 commits
    • Oliver Pinter's avatar
      HBSD: fix merge conflicts after recent update · 244bbd77
      Oliver Pinter authored
      	modified:   sys/conf/NOTES
      	modified:   sys/kern/imgact_elf.c
      	modified:   sys/kern/kern_sig.c
      Signed-off-by: default avatarOliver Pinter <oliver.pinter@hardenedbsd.org>
    • markj's avatar
      Reimplement support for userland core dump compression using a new interface · 25e41e01
      markj authored
      in kern_gzio.c. The old gzio interface was somewhat inflexible and has not
      worked properly since r272535: currently, the gzio functions are called with
      a range lock held on the output vnode, but kern_gzio.c does not pass the
      IO_RANGELOCKED flag to vn_rdwr() calls, resulting in deadlock when vn_rdwr()
      attempts to reacquire the range lock. Moreover, the new gzio interface can
      be used to implement kernel core compression.
      This change also modifies the kernel configuration options needed to enable
      userland core dump compression support: gzio is now an option rather than a
      device, and the COMPRESS_USER_CORES option is removed. Core dump compression
      is enabled using the kern.compress_user_cores sysctl/tunable.
      Differential Revision:	https://reviews.freebsd.org/D1832
      Reviewed by:	rpaulo
      Discussed with:	kib
  6. 27 Feb, 2015 1 commit
    • ian's avatar
      Allow the kern.osrelease and kern.osreldate sysctl values to be set in a · 1df855e5
      ian authored
      jail's creation parameters.  This allows the kernel version to be reliably
      spoofed within the jail whether examined directly with sysctl or
      indirectly with the uname -r and -K options.
      The values can only be set at jail creation time, to eliminate the need
      for any locking when accessing the values via sysctl.
      The overridden values are inherited by nested jails (unless the config for
      the nested jails also overrides the values).
      There is no sanity or range checking, other than disallowing an empty
      release string or a zero release date, by design.  The system
      administrator is trusted to set sane values.  Setting values that are
      newer than the actual running kernel will likely cause compatibility
      Differential Revision:	https://reviews.freebsd.org/D1948
      Relnotes:	yes
  7. 14 Feb, 2015 1 commit
  8. 31 Jan, 2015 1 commit
  9. 22 Nov, 2014 1 commit
  10. 21 Nov, 2014 1 commit
    • jhb's avatar
      Improve support for XSAVE with debuggers. · 1671ac91
      jhb authored
      - Dump an NT_X86_XSTATE note if XSAVE is in use. This note is designed
        to match what Linux does in that 1) it dumps the entire XSAVE area
        including the fxsave state, and 2) it stashes a copy of the current
        xsave mask in the unused padding between the fxsave state and the
        xstate header at the same location used by Linux.
      - Teach readelf() to recognize NT_X86_XSTATE notes.
      - Change PT_GET/SETXSTATE to take the entire XSAVE state instead of
        only the extra portion. This avoids having to always make two
        ptrace() calls to get or set the full XSAVE state.
      - Add a PT_GET_XSTATE_INFO which returns the length of the current
        XSTATE save area (so the size of the buffer needed for PT_GETXSTATE)
        and the current XSAVE mask (%xcr0).
      Differential Revision:	https://reviews.freebsd.org/D1193
      Reviewed by:	kib
      MFC after:	2 weeks
  11. 18 Nov, 2014 1 commit
  12. 04 Nov, 2014 1 commit
  13. 04 Oct, 2014 1 commit
    • kib's avatar
      Fixes for i/o during coredumping: · 18bdc94c
      kib authored
      - Do not dump into system files.
      - Do not acquire write reference to the mount point where img.core is
        written, in the coredump().  The vn_rdwr() calls from ELF imgact
        request the write ref from vn_rdwr().  Recursive acqusition of the
        write ref deadlocks with the unmount.
      - Instead, take the range lock for the whole core file.  This prevents
        parallel dumping from two processes executing the same image,
        converting the useless interleaved dump into sequential dumping,
        with second core overwriting the first.
      Tested by:	pho
      Sponsored by:	The FreeBSD Foundation
      MFC after:	2 weeks
  14. 30 Aug, 2014 1 commit
  15. 18 Aug, 2014 1 commit
  16. 09 Aug, 2014 1 commit
  17. 23 Jul, 2014 2 commits
  18. 08 Jul, 2014 1 commit
  19. 07 Jul, 2014 1 commit
    • marcel's avatar
      Remove ia64. · 9f28abd9
      marcel authored
      This includes:
      o   All directories named *ia64*
      o   All files named *ia64*
      o   All ia64-specific code guarded by __ia64__
      o   All ia64-specific makefile logic
      o   Mention of ia64 in comments and documentation
      This excludes:
      o   Everything under contrib/
      o   Everything under crypto/
      o   sys/xen/interface
      o   sys/sys/elf_common.h
      Discussed at: BSDcan
  20. 28 Jun, 2014 1 commit
  21. 27 Jun, 2014 2 commits
    • gjb's avatar
      Revert r267961, r267973: · fc21f405
      gjb authored
      These changes prevent sysctl(8) from returning proper output,
      such as:
       1) no output from sysctl(8)
       2) erroneously returning ENOMEM with tools like truss(1)
          or uname(1)
       truss: can not get etype: Cannot allocate memory
    • hselasky's avatar
      Extend the meaning of the CTLFLAG_TUN flag to automatically check if · bd1ed65f
      hselasky authored
      there is an environment variable which shall initialize the SYSCTL
      during early boot. This works for all SYSCTL types both statically and
      dynamically created ones, except for the SYSCTL NODE type and SYSCTLs
      which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to
      be used in the case a tunable sysctl has a custom initialisation
      function allowing the sysctl to still be marked as a tunable. The
      kernel SYSCTL API is mostly the same, with a few exceptions for some
      special operations like iterating childrens of a static/extern SYSCTL
      node. This operation should probably be made into a factored out
      common macro, hence some device drivers use this. The reason for
      changing the SYSCTL API was the need for a SYSCTL parent OID pointer
      and not only the SYSCTL parent OID list pointer in order to quickly
      generate the sysctl path. The motivation behind this patch is to avoid
      parameter loading cludges inside the OFED driver subsystem. Instead of
      adding special code to the OFED driver subsystem to post-load tunables
      into dynamically created sysctls, we generalize this in the kernel.
      Other changes:
      - Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask"
      to "hw.pcic.intr_mask".
      - Removed redundant TUNABLE statements throughout the kernel.
      - Some minor code rewrites in connection to removing not needed
      TUNABLE statements.
      - Added a missing SYSCTL_DECL().
      - Wrapped two very long lines.
      - Avoid malloc()/free() inside sysctl string handling, in case it is
      called to initialize a sysctl from a tunable, hence malloc()/free() is
      not ready when sysctls from the sysctl dataset are registered.
      - Bumped FreeBSD version to indicate SYSCTL API change.
      MFC after:	2 weeks
      Sponsored by:	Mellanox Technologies
  22. 22 Jun, 2014 1 commit
  23. 17 Jun, 2014 1 commit
  24. 11 Jun, 2014 1 commit
  25. 31 May, 2014 1 commit
  26. 09 May, 2014 1 commit
  27. 29 Apr, 2014 1 commit
  28. 25 Apr, 2014 1 commit
  29. 19 Apr, 2014 1 commit
  30. 16 Apr, 2014 2 commits
    • Oliver Pinter's avatar
      PAX ASLR: temporary disable pax_elf in imgact_elf.c due calling linuxulator... · ed30720a
      Oliver Pinter authored
      PAX ASLR: temporary disable pax_elf in imgact_elf.c due calling linuxulator caused panic() after importing codes from Danielo
      Fatal trap 9: general protection fault while in kernel mode
      cpuid = 2; apic id = 04
      instruction pointer     = 0x20:0xffffffff804b0d90
      stack pointer           = 0x28:0xfffffe02378d64e0
      frame pointer           = 0x28:0xfffffe02378d6520
      code segment            = base 0x0, limit 0xfffff, type 0x1b
                              = DPL 0, pres 1, long 1, def32 0, gran 1
      processor eflags        = interrupt enabled, resume, IOPL = 0
      current process         = 64016 (csh)
      [ thread pid 64016 tid 100113 ]
      Stopped at      pax_elf+0x70:   cmpl    $0x7,0xffffffffffffffe4(%rbx)
      db> bt
      Tracing pid 64016 tid 100113 td 0xfffff8006a326490
      pax_elf() at pax_elf+0x70/frame 0xfffffe02378d6520
      exec_elf32_imgact() at exec_elf32_imgact+0x630/frame 0xfffffe02378d65f0
      kern_execve() at kern_execve+0x5c4/frame 0xfffffe02378d6940
      sys_execve() at sys_execve+0x37/frame 0xfffffe02378d69a0
      amd64_syscall() at amd64_syscall+0x22e/frame 0xfffffe02378d6ab0
      Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe02378d6ab0
      --- syscall (59, Linux ELF32, linux_olduname), rip = 0x9da65686a, rsp = 0x7fffffff6bb8, rbp = 0x7fffffff6bc0 ---
      Signed-off-by: default avatarOliver Pinter <oliver.pntr@gmail.com>
    • Oliver Pinter's avatar
  31. 14 Apr, 2014 1 commit
  32. 13 Apr, 2014 3 commits
  33. 12 Apr, 2014 1 commit
  34. 11 Apr, 2014 1 commit