Commit Graph

248460 Commits

Author SHA1 Message Date
kamil
77d313fc36 Detach libpthread_dbg(3) from gdb(1) and gdbtui (gdb.old)
libpthread_dbg(3) is a remnant library from the M:N thread model
(pre-NetBSD-5.0) API to introspect threads within a process and for use
of debuggers.

Currently in the 1:1 model it's not used in GDB neither in LLDB and it's
not either planned to be used. It's current function to read pthread_t
structures is realizable within a regular debugger capable to
instrospect objects within a tracee (GDB, LLDB...).

pthread_dbg(3) is going to be removed from the base distribution and moved
to pkgsrc.

Patch reviewed by <christos>

Sponsored by <The NetBSD Foundation>
2017-02-08 01:32:37 +00:00
kamil
e361313d33 Detach libpthread_dbg(3) from gdb(1) and gdbtui
libpthread_dbg(3) is a remnant library from the M:N thread model
(pre-NetBSD-5.0) API to introspect threads within a process and for use
of debuggers.

Currently in the 1:1 model it's not used in GDB neither in LLDB and it's
not either planned to be used. It's current function to read pthread_t
structures is realizable within a regular debugger capable to
instrospect objects within a tracee (GDB, LLDB...).

pthread_dbg(3) is going to be removed from the base distribution and moved
to pkgsrc.

Patch reviewed by <christos>

Sponsored by <The NetBSD Foundation>
2017-02-07 22:53:19 +00:00
christos
ecb1597c64 add config files as examples 2017-02-07 22:37:18 +00:00
christos
8c4b80eae5 don't overwrite etc files. 2017-02-07 22:34:37 +00:00
christos
9e972dfc78 add nsd and unbound example dirs 2017-02-07 22:31:29 +00:00
christos
4251f87df7 PR/51958: Ngie Cooper: ESRCH error description in hcreate(3) contains typo
for action
2017-02-07 22:25:25 +00:00
christos
3048692a87 Kernel build objdirs have a kernel name after the objdir. Use a regex for
that. Note that debug-prefix-map and debug-regex-map insert entries in a
linked list in reverse order.
2017-02-07 21:19:13 +00:00
christos
2f4a483dfc Use make -C instead of cd && make; this is done to preserve the logical path
for debugging info DW_AT_comp_dir
2017-02-07 21:18:05 +00:00
christos
fa1ea25f42 use the logical path for -C if correct. 2017-02-07 21:16:31 +00:00
kamil
5acf460d25 Mark exect(3) obsolete and bind it to plain execve(2) on all platforms
The original exect(2) from BSD4.2 was enabling bit for tracing
(single-step mode) and calling execve(2). The purpose of it was to generate
a signal for a tracer once the application will change its image to a new
program.

This approach no longer works as:
 - exect(2) traces (single-steps) libc and it requires hundreds or
   thousands steps before entering a new image
 - it's vax and x86 specific code
 - this functionality has been moved to the kernel - once a process is
   traced it will generate SIGTRAP with si_code TRAP_EXEC and route it to
   its debugger
 - the side effects and unportability make this interface unusable
 - there are no known users of this interface
 - it apparently never worked better since day0 of NetBSD ("day0 bug")

Users are requested to move to other execve(2) variants. Calling current
execve(2) as it is the most similar behavior to this one from BSD4.2.

Discussed several times on mailing lists and in PR/51700.

Add warning to exect(3) telling about marking this function obsolete.

This function is prepared to be removed in next libc major bump.

Sponsored by <The NetBSD Foundation>
2017-02-07 19:29:39 +00:00
rin
44fe74158a Define NOMAN before including bsd.own.mk to set MKMAN=no appropriately. 2017-02-07 16:49:40 +00:00
kamil
edc4b9f5d5 Update TODO.ptrace
Note PT_WATCHPOINT change to PT_*ETDBREGS.
Remove GDB and LLDB related entries from generic ptrace(2) TODO.
Note need for TRAP_SCE and TRAP_SCX si_codes in PT_SYSCALL*.
Note removal request of pthread_dbg(3).

Sponsord by <The NetBSD Foundation>
2017-02-07 16:15:05 +00:00
rin
872902e1dd Do not compile in progress.c when SMALLPROG is defined. 2017-02-07 16:14:47 +00:00
kamil
c58abbea19 Document in libc's shlib_version request for exect(3) removal
This functionality has been moved long time to the kernel. Kernel exec()
emits SIGTRAP under a debugger (unless PT_SYSCALL traced).
2017-02-07 15:33:25 +00:00
isaki
52c6bd173d Implement m68k assembly version of AES.
It's approx 1.4 times faster than the original one.
2017-02-07 11:18:43 +00:00
skrll
3a6718d674 KNF and trailing whitespace. No functional change. 2017-02-07 11:17:50 +00:00
skrll
bdab6c1478 Fix non-DIAGNOSTIC build 2017-02-07 09:14:52 +00:00
msaitoh
fa6c521647 Set IFM_10G_T on 10G... 2017-02-07 04:27:43 +00:00
msaitoh
764d2113eb Fix link status stuff:
- Set get_link_status in ixv_init_locked() to get link status correctly.
 - Don't discard checked speed in ixv_config_link()...
2017-02-07 04:26:07 +00:00
msaitoh
675c237596 Fix device attach:
- Even if ixgbevf_negotiate_api_version() failed, continue attaching.
   Same as Linux. Tested on ESXi 6.0.
 - Fix argument of pci_msix_alloc_exact().
 - Use different intr_xname for each interrupt.
 - Add missing pci_intr_release() on error.
 - Add missign kcpuset_destroy().
 - Calculate MSI-X vectors correctly.
2017-02-07 04:20:59 +00:00
ozaki-r
57c38b2894 Add missing NULL checks for m_get_rcvif 2017-02-07 02:38:08 +00:00
ozaki-r
588bba2396 Tweak m_get_rcvif
Call pserialize_read_exit if if_byindex returns NULL in m_get_rcvif.
By changing so, callers need to call m_put_rcvif only if m_get_rcvif
returns non-NULL.

Old m_get_rcvif/m_put_rcvif could forget to call pserialize_read_exit,
which is pointed out by maxv@. The change fixes it.
2017-02-07 02:36:48 +00:00
ozaki-r
ecf8174acc Use m_get_rcvif_psref instead of m_get_rcvif
Because the critical sections are now sleepable.

Reviewed by knakahara@
2017-02-07 02:33:54 +00:00
nat
82da0e66b7 Ensure the vc block size is set before call to set defaults.
It should address PR kern/51746 Panics from audio.
2017-02-07 02:05:26 +00:00
uwe
a2ad93dec3 Use ELFOSABI_LINUX instead of a magic number. 2017-02-06 23:45:49 +00:00
christos
1a962b420e Remove __DATE__! Intel really likes non-reprodible builds! 2017-02-06 23:12:25 +00:00
rin
1eca2a869b white space 2017-02-06 21:06:04 +00:00
kre
cb46eb8bd0 + /usr/bin/nc (someone please check these are correct) 2017-02-06 19:45:17 +00:00
maxv
44542be787 In cpu_mcontext32_validate, allow the registers to have different locations
if the LDT is user-set.

I am intentionally not allowing this in check_sigcontext32, because I don't
think Wine uses it.
2017-02-06 16:34:37 +00:00
wiz
e28e311f97 Use full month name in Dd. 2017-02-06 16:08:56 +00:00
christos
ac1e6b580d mention netcat (nc) 2017-02-06 16:08:40 +00:00
christos
5d91f28a16 add nc 2017-02-06 16:06:38 +00:00
christos
eead193d4a Add nc. 2017-02-06 16:04:07 +00:00
christos
d71fee0faa - Disable crypto for now, and functionality that we don't provide.
- Fix warnings
2017-02-06 16:03:40 +00:00
maxv
54f03c77cf Add the USER_LDT sysarch options in netbsd32. We don't translate 'desc',
since if we ever implement USER_LDT we will only allow 8-byte-sized
entries, which have the same layout on amd64 and i386.
2017-02-06 16:02:17 +00:00
christos
ac264ff54b Import OpenBSD's netcat. 2017-02-06 16:00:50 +00:00
nonaka
3595ccfb7d Remove unnecessary flag. 2017-02-06 10:32:35 +00:00
dholland
3e58855b26 Fix misuse of arc4random by using arc4random_uniform.
Noticed by riastradh.
2017-02-06 02:26:44 +00:00
palle
9634b3fd38 sun4v: update TODO list to reflect the current state - TRAP_SETUP() was adapted to handle both sun4u and sun4v systems in version 1.404 of locore.s 2017-02-05 20:08:35 +00:00
skrll
e585f321ff Don't call _sema_init twice on various objects... remote_event_create
will initialise them

Found by LOCKDEBUG
2017-02-05 16:05:20 +00:00
mlelstv
61e95c24aa Destroy callouts when cleaning up. 2017-02-05 12:05:46 +00:00
maxv
6c9d31ed8a Rename ldt->ldtstore and gdt->gdtstore on i386. It reduces the diff with
amd64, and makes it easier to track down these variables on nxr - 'ldt'
and 'gdt' being common keywords.
2017-02-05 10:42:21 +00:00
joerg
3a551b58b2 Be a bit nicer to outdated compilers and use __unreachable(). 2017-02-05 10:13:43 +00:00
joerg
1ca42661a2 Unbreak clang again. 2017-02-05 10:13:18 +00:00
maxv
173e2026e3 Remove misleading comment; these macros should not be used if a user LDT
is active.
2017-02-05 08:58:39 +00:00
maxv
549eebb1a2 Remove #if 0 on USER_LDT. 2017-02-05 08:52:11 +00:00
maxv
d0c8365f2c Missing pmap_ldt_cleanup. 2017-02-05 08:42:49 +00:00
maxv
c4d9b79654 Now that valid_user_selector only checks for LDT selectors, remove it. A
user may legitimately want to have one register in the GDT, and another in
the LDT.

Pass 2/2.
2017-02-05 08:36:08 +00:00
maxv
33f2d3769e In cpu_mcontext_validate, treat %cs differently depending on whether a user
LDT is set; just check the permission without checking the location (which
may change).

In valid_user_selector, don't check the length of the LDT. This is racy
because pm_ldt_len could be updated by another thread, and useless since
the length is already referenced in ldtr (ldt_alloc), which means that any
overflow will fault in userland.

Also, don't check the permission of the segment pointed to; this too is
racy, and we don't care either since the permissions are checked earlier
in x86_set_ldt1.

Pass 1/2.
2017-02-05 08:19:05 +00:00
maya
3445e73ad7 Fix off by one.
ok cherry
2017-02-05 07:25:49 +00:00