5 years agofile: libmagic knows about libz now so drop the dependency
Franco Fichtner [Thu, 19 Jun 2014 12:28:14 +0000 (14:28 +0200)]
file: libmagic knows about libz now so drop the dependency

5 years agolibmagic: fix file identification
Franco Fichtner [Thu, 19 Jun 2014 12:10:26 +0000 (14:10 +0200)]
libmagic: fix file identification

Removes local modifications from contrib code and
fixes at least the following identification issue.


    # file /usr/src/bin/test/test.c
    /usr/src/bin/test/test.c: ASCII text


    # file /usr/src/bin/test/test.c
    /usr/src/bin/test/test.c: C source, ASCII text

5 years agojscan(8): Remove dupdata() (no longer used since 36d6bdee113b682f2).
Sascha Wildner [Thu, 19 Jun 2014 09:28:23 +0000 (11:28 +0200)]
jscan(8): Remove dupdata() (no longer used since 36d6bdee113b682f2).

5 years agokernel - Fix rare ucred race
Matthew Dillon [Wed, 18 Jun 2014 18:47:45 +0000 (11:47 -0700)]
kernel - Fix rare ucred race

* In a threaded program if one thread is modifying the ucred, e.g.
  changing the uid or gid or something like that, and another thread
  enters a system call at the same time, the second thread can wind
  up trying to hold a stale ucred kfree()'d by the first thread.

* Very rare race on top of a ~2-instruction window.

* Fix the problem by obtaining proc->p_spin when updating the per-thread
  ucred cache (td->td_ucred) from p->p_ucred, as well as when replacing

  These fixes do NOT impose any critical-path overhead.  For the case where
  a thread already has the current p_ucred cached on entry to a system call,
  absolutely nothing needs to be done.

Reported-by: joris (Joris Giovannangeli)
5 years agosocket: so_pru_abort_oncpu -> so_pru_abort_direct
Sepherosa Ziehau [Wed, 18 Jun 2014 14:19:53 +0000 (22:19 +0800)]
socket: so_pru_abort_oncpu -> so_pru_abort_direct

No functional change.  It is consistent w/ other so_pru functions name.

5 years agosocket: {soabort,so_pru_abort}a -> {soabort,so_pru_abort}_async
Sepherosa Ziehau [Wed, 18 Jun 2014 14:12:50 +0000 (22:12 +0800)]
socket: {soabort,so_pru_abort}a -> {soabort,so_pru_abort}_async

No functional change.  They are consistent w/ other so and so_pru
function names.

5 years agouipc: Fix comment
Sepherosa Ziehau [Wed, 18 Jun 2014 13:46:51 +0000 (21:46 +0800)]
uipc: Fix comment

5 years agouipc: Nuke unnecessary void cast
Sepherosa Ziehau [Wed, 18 Jun 2014 13:32:00 +0000 (21:32 +0800)]
uipc: Nuke unnecessary void cast

5 years agotcp: White space cleanup; no functional changes.
Sepherosa Ziehau [Wed, 18 Jun 2014 13:20:25 +0000 (21:20 +0800)]
tcp: White space cleanup; no functional changes.

5 years agoip/demux: Remove no longer applied comment
Sepherosa Ziehau [Wed, 18 Jun 2014 13:19:41 +0000 (21:19 +0800)]
ip/demux: Remove no longer applied comment

5 years agoudp: Fix "unconnect" and cleanup connect
Sepherosa Ziehau [Wed, 18 Jun 2014 13:18:45 +0000 (21:18 +0800)]
udp: Fix "unconnect" and cleanup connect

Put udp inpcb into wildcard hash in pru_disconnect method.  This restores
the old behaviour of traditional BSD "unconnect".

Clean up pru_connect after fixing the "unconnect" support; in preparation
for distributing udp inpcb across netisrs.

5 years agosystat/ip,tcp: Initialize curstate to avoid overflow/underflow
Sepherosa Ziehau [Wed, 18 Jun 2014 13:18:02 +0000 (21:18 +0800)]
systat/ip,tcp: Initialize curstate to avoid overflow/underflow

5 years agonet: Add initport protosw method to init socket's default protocol port
Sepherosa Ziehau [Wed, 18 Jun 2014 13:16:58 +0000 (21:16 +0800)]
net: Add initport protosw method to init socket's default protocol port

Currently only tcp implements this method to distribute pru_attach and
pru_connect workload.

Nuke no longer necessary protosw flag PR_RAND_INITPORT and sysctl

5 years agotcp: Avoid unnecessary calling of in_pcbladdr() in tcp_connect()
Sepherosa Ziehau [Wed, 18 Jun 2014 13:15:52 +0000 (21:15 +0800)]
tcp: Avoid unnecessary calling of in_pcbladdr() in tcp_connect()

If in_pcbladdr() was called and inp_laddr was saved, there would be
no need to call in_pcbladdr() again, after the inp was forwarded to
its owner netisr.

5 years agolibmagic: link against libz
Franco Fichtner [Mon, 16 Jun 2014 13:16:08 +0000 (15:16 +0200)]
libmagic: link against libz

Linking a program against the library without explicitly
stating `-lz' produced this output:

    /usr/lib/libmagic.so: undefined reference to `inflate'
    /usr/lib/libmagic.so: undefined reference to `inflateInit2_'
    /usr/lib/libmagic.so: undefined reference to `inflateEnd'

5 years agoinpcb: Remove inp_cpcbinfo, which serves no purpose now
Sepherosa Ziehau [Mon, 16 Jun 2014 13:08:46 +0000 (21:08 +0800)]
inpcb: Remove inp_cpcbinfo, which serves no purpose now

It is always same as inp_pcbinfo.

5 years agoinpcb: Cache align inpcbinfo
Sepherosa Ziehau [Mon, 16 Jun 2014 13:08:02 +0000 (21:08 +0800)]
inpcb: Cache align inpcbinfo

5 years agoinet: in_pcbsetlport_remote -> in_pcbbind_remote
Sepherosa Ziehau [Mon, 16 Jun 2014 13:07:01 +0000 (21:07 +0800)]
inet: in_pcbsetlport_remote -> in_pcbbind_remote

This function may change inp_laddr, so 'bind' is is better than

5 years agonet: Remove unnecessary sosetport() in various pru_attachs
Sepherosa Ziehau [Mon, 16 Jun 2014 13:06:16 +0000 (21:06 +0800)]
net: Remove unnecessary sosetport() in various pru_attachs

The so_port is set before the pru_attach is called; there is no need
to do it again.

5 years agoudp: No data will be carried along w/ connect
Sepherosa Ziehau [Mon, 16 Jun 2014 13:05:38 +0000 (21:05 +0800)]
udp: No data will be carried along w/ connect

Pull the assertion into earlier place.

5 years agoctags(1): Fix use after free().
Sascha Wildner [Sun, 15 Jun 2014 18:13:17 +0000 (20:13 +0200)]
ctags(1): Fix use after free().

5 years agonetstat(8): Remove upHex(), which is unused since we dropped NS.
Sascha Wildner [Sun, 15 Jun 2014 18:02:00 +0000 (20:02 +0200)]
netstat(8): Remove upHex(), which is unused since we dropped NS.

5 years agoUpdate the pciconf(8) database.
Sascha Wildner [Sun, 15 Jun 2014 11:46:20 +0000 (13:46 +0200)]
Update the pciconf(8) database.

June 14, 2014 snapshot from http://pciids.sourceforge.net/

5 years agoRemove some unneeded continue statements.
Sascha Wildner [Sun, 15 Jun 2014 01:10:42 +0000 (03:10 +0200)]
Remove some unneeded continue statements.

5 years agoSync zoneinfo database with tzdata2014e from ftp://ftp.iana.org/tz/releases
Sascha Wildner [Sat, 14 Jun 2014 21:35:53 +0000 (23:35 +0200)]
Sync zoneinfo database with tzdata2014e from ftp://ftp.iana.org/tz/releases

* africa: Egypt's 2014 Ramadan-based transitions are June 26 and July 31
    at 24:00. (Thanks to Imed Chihi.) Similarly, Morocco's are June 28
    at 03:00 and August 2 at 02:00.  (Thanks to Milamber Space Network.)

* europe: The abbreviation "MSM" (Moscow Midsummer Time) is now used
    instead of "MSD" for Moscow's double daylight time in summer 1921.
    Also, a typo "VLASST" has been repaired to be "VLAST" for
    Vladivostok summer time in 1991.  (Thanks to Hank W. for reporting
    the problems.)

* Some minor adjustments/rearrangement.

5 years agokernel: Add the mrsas(4) RAID driver for LSI Thunderbolt and newer series.
Sascha Wildner [Sat, 14 Jun 2014 11:35:11 +0000 (13:35 +0200)]
kernel: Add the mrsas(4) RAID driver for LSI Thunderbolt and newer series.

Specifically, it adds support for Thunderbolt (6 Gb/s), Invader (12 Gb/s)
and Fury (12 Gb/s) series.

Note that Thunderbolt controllers are supported by mfi(4) too. When both
drivers are loaded, the default is to attach via mfi(4). This can be
changed by either not loading or compiling in the mfi(4) driver at all
or by setting hw.mfi.mrsas_enable=1 in /boot/loader.conf. It might be
that we change this default to giving precedence to mrsas(4) before the
next release, but for now, until it gets some more testing, we take
FreeBSD's default (giving mfi(4) precedence).

That said, the driver works without any issues here with an
Intel RS25DB080 card (which is really an LSI MegaRAID SAS 9265).

mrsas(4) should (at least) support the following adapters:





Taken-from: FreeBSD

5 years agodrm/i915: Sync drm_irq.c with Linux 3.8.13
François Tigeot [Sat, 14 Jun 2014 10:19:13 +0000 (12:19 +0200)]
drm/i915: Sync drm_irq.c with Linux 3.8.13

Most significant change: an interrupt handler called when parity errors
are detected in the GPU L3 cache of Ivy Bridge+ CPUs.

5 years agodrm: Add linux/io.h
François Tigeot [Sat, 14 Jun 2014 10:06:33 +0000 (12:06 +0200)]
drm: Add linux/io.h

5 years agodrm/i915: Update ivybridge_init_clock_gating()
François Tigeot [Sat, 14 Jun 2014 07:40:02 +0000 (09:40 +0200)]
drm/i915: Update ivybridge_init_clock_gating()

* Synchronize it with Linux 3.8.13

* This commit fixes a flickering issue with some laptop screens

Reported-by: luxh
5 years agokernel/sound: Take the correct variable for a tunable.
Sascha Wildner [Fri, 13 Jun 2014 19:26:26 +0000 (21:26 +0200)]
kernel/sound: Take the correct variable for a tunable.

5 years agoinet: Migrate to CPU0 to perform in_pcblist_global() for rawip and divert
Sepherosa Ziehau [Fri, 13 Jun 2014 14:19:38 +0000 (22:19 +0800)]
inet: Migrate to CPU0 to perform in_pcblist_global() for rawip and divert

It is safe to access their pcb list on CPU0, but not on other CPUs.

5 years agofetch(1): Fix library order (helps static building).
Sascha Wildner [Fri, 13 Jun 2014 09:37:57 +0000 (11:37 +0200)]
fetch(1): Fix library order (helps static building).

5 years agodrill(1): Fix library order (helps static building).
Sascha Wildner [Fri, 13 Jun 2014 09:37:08 +0000 (11:37 +0200)]
drill(1): Fix library order (helps static building).

5 years agosftp(1): Link libtermcap instead of libcurses.
Sascha Wildner [Fri, 13 Jun 2014 09:34:28 +0000 (11:34 +0200)]
sftp(1): Link libtermcap instead of libcurses.

5 years agokernel: Add a few more missing crit_exit()s.
Sascha Wildner [Fri, 13 Jun 2014 09:15:00 +0000 (11:15 +0200)]
kernel: Add a few more missing crit_exit()s.

5 years agokernel - Update existing csprng
Matthew Dillon [Fri, 13 Jun 2014 04:47:45 +0000 (21:47 -0700)]
kernel - Update existing csprng

* Bring the current csprng up-to-date as per the author.  However, note
  that we will likely be making additional commits to add other csprng
  algorithms to the system.

  - Change stateIndex to a static instead of starting at 0 each time
    to improve security.

  - Move the L_SCHEDULE(keyLen) to the end.

  - Warm-up the IBAA in the entropy interrupt.  Author suggested warming
    it up before each read_random() but that creates a non-deterministic
    performance problem.

* Change read_random_unlimited() from L15_Byte() to IBAA_Byte().
  read_random() already uses IBAA_Byte().  That is, go with the
  heavier-weight csprng for everything (sysctl, /dev/urandom, /dev/random).
  Before only /dev/random was using the heavier-weight csprng.

5 years agousb - Fix mouse stall issue in X
Matthew Dillon [Fri, 13 Jun 2014 02:35:16 +0000 (19:35 -0700)]
usb - Fix mouse stall issue in X

* Some code I had added to fix abort/reissue issues in ums could lose
  track of whether the read was operational or not if the FIFO became

* Correct the lost state.

* Should hopefully fix mouse-stall issues related to temporary X stalls
  while moving the mouse that could result in the FIFO temporarily becoming

5 years agokernel/npx: Enable printing of npx mask on bootverbose on i386
Markus Pfeiffer [Thu, 12 Jun 2014 21:39:04 +0000 (22:39 +0100)]
kernel/npx: Enable printing of npx mask on bootverbose on i386

5 years agokernel/vkernel: port mxcsr mask probing to i386.
Markus Pfeiffer [Thu, 12 Jun 2014 19:33:05 +0000 (20:33 +0100)]
kernel/vkernel: port mxcsr mask probing to i386.

5 years agokernel: GC never true CPU_DISABLE_SSE checks from x86_64/vkernel64.
Sascha Wildner [Thu, 12 Jun 2014 21:45:27 +0000 (23:45 +0200)]
kernel: GC never true CPU_DISABLE_SSE checks from x86_64/vkernel64.

It is only an option in i386.

No functional changes.

Reported-by: profmakx
5 years agovkernel64: support mxcsr mask on vkernel64 too
Markus Pfeiffer [Thu, 12 Jun 2014 19:14:05 +0000 (20:14 +0100)]
vkernel64: support mxcsr mask on vkernel64 too

5 years agovkernel64: fix compilation after npx mask work
Markus Pfeiffer [Thu, 12 Jun 2014 18:24:45 +0000 (19:24 +0100)]
vkernel64: fix compilation after npx mask work

5 years agokernel/acpi: Tabify
Sascha Wildner [Thu, 12 Jun 2014 17:06:52 +0000 (19:06 +0200)]
kernel/acpi: Tabify

5 years agotcp: Number of netisrs for tcp is ncpus2
Sepherosa Ziehau [Thu, 12 Jun 2014 13:06:48 +0000 (21:06 +0800)]
tcp: Number of netisrs for tcp is ncpus2

While I'm here, simplify tcp_pcblist() cpu migration logic.

5 years agoudp: Cleanup ctlinput related code
Sepherosa Ziehau [Thu, 12 Jun 2014 13:06:12 +0000 (21:06 +0800)]
udp: Cleanup ctlinput related code

In preparation for udp inpcb distribution.

5 years agoudp: Reduce rcvbuf token cover range
Sepherosa Ziehau [Thu, 12 Jun 2014 13:04:39 +0000 (21:04 +0800)]
udp: Reduce rcvbuf token cover range

5 years agoudp: Don't ref/free socket to call in_pcbdisconnect()
Sepherosa Ziehau [Wed, 11 Jun 2014 13:12:05 +0000 (21:12 +0800)]
udp: Don't ref/free socket to call in_pcbdisconnect()

in_pcbdisconnect() no longer calls in_pcbdetach() now.

5 years agosendmail - Apply CVE-2014-3956
Matthew Dillon [Thu, 12 Jun 2014 03:44:57 +0000 (20:44 -0700)]
sendmail - Apply CVE-2014-3956

* Apply CVE-2014-3956, close high numbered file descriptors that were not
  intended to be passed on.

5 years agokernel/npx: Add detection code for default MXCSR mask
Markus Pfeiffer [Wed, 11 Jun 2014 22:09:20 +0000 (23:09 +0100)]
kernel/npx: Add detection code for default MXCSR mask

As per Intel/AMD manuals the default MXCSR mask can be probed
by executing fxstor (if supported) and reading the mask from the
stored state. This patch adds detection of the mask when it is
supported. Otherwise a default mask of 0xFFBF is used as before.

5 years agokernel/ath: Remove wlan_serialize_enter/exit() in ath_led_blink()
Johannes Hofmann [Mon, 9 Jun 2014 20:42:53 +0000 (22:42 +0200)]
kernel/ath: Remove wlan_serialize_enter/exit() in ath_led_blink()

5 years agoRevert "mountd: Stop refusing requests from "unprivileged ports""
François Tigeot [Wed, 11 Jun 2014 14:52:51 +0000 (16:52 +0200)]
Revert "mountd: Stop refusing requests from "unprivileged ports""

This reverts commit ce14e737211ad2bf1592b922fb90392abe96d94f.

Due to popular request.

5 years agomountd: Stop refusing requests from "unprivileged ports"
François Tigeot [Wed, 11 Jun 2014 13:37:36 +0000 (15:37 +0200)]
mountd: Stop refusing requests from "unprivileged ports"

* Security by "privileged ports" is a joke. We don't live in the 1980s
  anymore and everybody can be root on her/his own machine.

* Some mount requests made by super-users on client DragonFly machines
  were done on "unprivileged ports" anyway, possibly due to ephemeral
  port exhaustion.

* Disabling this mechanism by default thus makes DragonFly NFS servers
  more reliable.

5 years agoinpcb: Remove the weird in_pcbdetach() in in_pcbdisconnect()
Sepherosa Ziehau [Wed, 11 Jun 2014 08:49:55 +0000 (16:49 +0800)]
inpcb: Remove the weird in_pcbdetach() in in_pcbdisconnect()

This in_pcbdetach() actually serves no purpose there.

5 years agonetmap: reconstruct vm_page_getfake/vm_page_updatefake
Franco Fichtner [Tue, 10 Jun 2014 19:24:50 +0000 (21:24 +0200)]
netmap: reconstruct vm_page_getfake/vm_page_updatefake

Taken from: FreeBSD

5 years agokernel/oce: Remove some redundant code.
Sascha Wildner [Tue, 10 Jun 2014 13:43:49 +0000 (15:43 +0200)]
kernel/oce: Remove some redundant code.

5 years agodf(1): Fix field widths for iused and ifree when df -hi is used.
Sascha Wildner [Tue, 10 Jun 2014 13:28:10 +0000 (15:28 +0200)]
df(1): Fix field widths for iused and ifree when df -hi is used.

Submitted-by: Robin Hahling <robin.hahling@gw-computing.net>
5 years agoips: initialize local variables
Joris Giovannangeli [Tue, 10 Jun 2014 12:08:24 +0000 (14:08 +0200)]
ips: initialize local variables

found-with: clang

5 years agokernel: fix an invalid self assignment in linker
Joris Giovannangeli [Tue, 10 Jun 2014 11:53:07 +0000 (13:53 +0200)]
kernel: fix an invalid self assignment in linker

found-with: clang

5 years agokernel: Add some more missing crit_exit(), rel_mplock(), etc.
Sascha Wildner [Tue, 10 Jun 2014 09:58:22 +0000 (11:58 +0200)]
kernel: Add some more missing crit_exit(), rel_mplock(), etc.

5 years agounlock_return.cocci: Add a nlookup_init()/done() test (which we pass).
Sascha Wildner [Mon, 9 Jun 2014 21:32:42 +0000 (23:32 +0200)]
unlock_return.cocci: Add a nlookup_init()/done() test (which we pass).

5 years agokernel/hammer2: Add two missing lockmgr(..., LK_RELEASE).
Sascha Wildner [Mon, 9 Jun 2014 20:46:48 +0000 (22:46 +0200)]
kernel/hammer2: Add two missing lockmgr(..., LK_RELEASE).

5 years agokernel/bwn: Improve error handling in bwn_attach().
Imre Vadasz [Mon, 9 Jun 2014 20:36:22 +0000 (22:36 +0200)]
kernel/bwn: Improve error handling in bwn_attach().

* Making sure to call wlan_serialize_exit() when bus_setup_intr() fails.

* Return the proper error values when bwn_attach() fails.

5 years agounlock_return.cocci: Add vn_unlock() and wlan_serialize_exit() tests.
Sascha Wildner [Mon, 9 Jun 2014 20:32:13 +0000 (22:32 +0200)]
unlock_return.cocci: Add vn_unlock() and wlan_serialize_exit() tests.

5 years agokernel/iwn: Add a missing wlan_serialize_exit().
Sascha Wildner [Mon, 9 Jun 2014 20:22:50 +0000 (22:22 +0200)]
kernel/iwn: Add a missing wlan_serialize_exit().

5 years agokernel: Add a missing vn_unlock().
Sascha Wildner [Sun, 8 Jun 2014 12:42:06 +0000 (14:42 +0200)]
kernel: Add a missing vn_unlock().

5 years agohammer - Fix wild free() in 'hammer info' path
Matthew Dillon [Mon, 9 Jun 2014 17:57:23 +0000 (10:57 -0700)]
hammer - Fix wild free() in 'hammer info' path

* Fix a wild free that could cause the program to assert.

Reported-by: shamaz
5 years agodrm/i915: More initialization code from Linux
François Tigeot [Mon, 9 Jun 2014 10:17:39 +0000 (12:17 +0200)]
drm/i915: More initialization code from Linux

5 years agodrm/i915: drm_i915_private_t changed
François Tigeot [Mon, 9 Jun 2014 08:38:11 +0000 (10:38 +0200)]
drm/i915: drm_i915_private_t changed

5 years agodrm/i915: Fix unresponsive X server issues
François Tigeot [Sun, 8 Jun 2014 21:14:56 +0000 (23:14 +0200)]
drm/i915: Fix unresponsive X server issues

* In some circumstances, the drm/i915 driver slept on irq_lock with no
  timeout and never woke up, causing the X server to become unresponsive

* It turns the absence of timeout came from the original FreeBSD version
  of this driver; Linux uses a 1 second timeout by default

* Add the same 1-second timeout to the culprit function calls, hopefully
  fixing this issue for good

5 years agodrm/i915: Partial sync of the ring handling code...
François Tigeot [Sun, 8 Jun 2014 21:13:30 +0000 (23:13 +0200)]
drm/i915: Partial sync of the ring handling code...

... with Linux 3.8.13

A few parts obtained from OpenBSD

5 years agodrm/i915: Reduce differences with Linux 3.8.13
François Tigeot [Sun, 8 Jun 2014 21:12:19 +0000 (23:12 +0200)]
drm/i915: Reduce differences with Linux 3.8.13

5 years agokernel disk/vn: fix locking in vnstrategy
Joris Giovannangeli [Sun, 8 Jun 2014 10:48:15 +0000 (12:48 +0200)]
kernel disk/vn: fix locking in vnstrategy

5 years agoipv6: Silence src xxx is not link-local messages
François Tigeot [Sun, 8 Jun 2014 09:45:34 +0000 (11:45 +0200)]
ipv6: Silence src xxx is not link-local messages

They pollute logs in situations where users have no control
over traffic being transmitted on the local network.

5 years agoImprove our unlock_return.cocci (now finds much more candidates).
Sascha Wildner [Sun, 8 Jun 2014 09:44:48 +0000 (11:44 +0200)]
Improve our unlock_return.cocci (now finds much more candidates).

Unfortunately, the number of false positives goes up proportionally,
so careful review and re-review of the results is advised.

5 years agokernel: Add a number of missing crit_exit, lwkt_reltoken, rel_mplock, etc.
Sascha Wildner [Sun, 8 Jun 2014 09:32:23 +0000 (11:32 +0200)]
kernel: Add a number of missing crit_exit, lwkt_reltoken, rel_mplock, etc.

5 years agokernel: Build modules with -Werror too.
Sascha Wildner [Sun, 8 Jun 2014 08:50:56 +0000 (10:50 +0200)]
kernel: Build modules with -Werror too.

5 years agoMove ed(4), sr(4), and ng_sync_{ar,sr} to being i386 only.
Sascha Wildner [Sun, 8 Jun 2014 08:49:27 +0000 (10:49 +0200)]
Move ed(4), sr(4), and ng_sync_{ar,sr} to being i386 only.

If someone needs them on x86_64, they will first have to fix the various
int <-> pointer conversions which they warn about.

5 years agoinitrd: Create a bin/scp link
François Tigeot [Sun, 8 Jun 2014 08:35:25 +0000 (10:35 +0200)]
initrd: Create a bin/scp link

5 years agoConvert files to UTF-8
Imre Vadasz [Sat, 7 Jun 2014 19:45:17 +0000 (21:45 +0200)]
Convert files to UTF-8

Taken-from: FreeBSD

5 years agopatch: use size_t for line len.
Joris Giovannangeli [Sun, 8 Jun 2014 00:37:55 +0000 (02:37 +0200)]
patch: use size_t for line len.

 * allow file with lines longer than sizeof(short)

Submitted-by: tautolog
5 years agokern/dsched: remove leftover code
Joris Giovannangeli [Sat, 7 Jun 2014 18:08:57 +0000 (20:08 +0200)]
kern/dsched: remove leftover code

 * The found variable has been replaced in 12cdc371fb859682eda7d1c26c5059920a7cf118
   and leftover assertion lead to a panic.

5 years agokernel/dsched: add a missing LK_RELEASE
Joris Giovannangeli [Sat, 7 Jun 2014 17:56:54 +0000 (19:56 +0200)]
kernel/dsched: add a missing LK_RELEASE

5 years agoMerge branch 'vendor/TNFTP'
Peter Avalos [Sat, 7 Jun 2014 16:25:39 +0000 (09:25 -0700)]
Merge branch 'vendor/TNFTP'

5 years agoSync ftp with NetBSD.
Peter Avalos [Sat, 7 Jun 2014 16:15:09 +0000 (09:15 -0700)]
Sync ftp with NetBSD.

* Fix timeout on http fetches.
* Let progressmeter deal with a timeout.

Obtained-from:   NetBSD

5 years agoudp: Dispatch UDP datagrams to the correct netisr to perform ip_output()
Sepherosa Ziehau [Sat, 7 Jun 2014 13:17:08 +0000 (21:17 +0800)]
udp: Dispatch UDP datagrams to the correct netisr to perform ip_output()

Redispatch UDP datagrams to the netisr, whose owner CPU matches the
UDP datagrams hash, to do the ip_output().  As measured bt KTR, the
udp_send() spends most of its time in ip_output().

To properly support this, following stuffs are added/changed:
- Add a network private lwkt message flag to indicate the so_port of
  the netmsg should not be matched against the current netisr's msgport.
  This flag is set when we redispatch the UDP datagrams to other netisrs.
- Don't use priority messages for netisr barrier, so at UDP socket close
  time, UDP datagrams pending on other netisr msgport could be properly

The UDP datagrams redispatch itself:
- If IP options are ever configured (supposely none), a copy of it will
  be carried along w/ the UDP datagram to the target netisr.  The copy
  is made mainly because it is not safe to access the IP options of the
  inpcb in netisr which does not own the inpcb.
  (*) On the other hand accessing inpcb's multicast options is safe since
  multicast UDP datagrams output and multicast options configuration all
  happen in netisr0.
- Add nm_priv into netmsg_pru_send, which saves flags to be passed to
  ip_output() for the UDP datagram.  This does not changes the size of
  netmsg_pru_send on x86_64 due to the implicit 4bytes padding.
- udp_addrcpu_pkt() is added to calculate the "real" CPU for the UDP
- Don't use inpcb route cache for redispatched UDP datagrams.  Since:
  o  The cached route is usually not for the UDP datagrams' destination.
  o  Accessing inpcb route cache in the netisr, which is not the owner
     of the inpcb is not safe.

On i7-3770 w/ 82599ES, this increases 18bytes UDP request/response
performance by ~19% (1.12M trasactions/s  ---> 1.34M transactions/s)

This commit also makes lockless firewall state table doable, since input
and output of UDP datagrams, which have same hash, are running in the
same netisr now!

5 years agotools/udpecho: Tool to test UDP request/response rate
Sepherosa Ziehau [Sat, 7 Jun 2014 12:40:01 +0000 (20:40 +0800)]
tools/udpecho: Tool to test UDP request/response rate

5 years agolocking.9: more editing
Markus Pfeiffer [Fri, 6 Jun 2014 20:01:26 +0000 (21:01 +0100)]
locking.9: more editing

5 years agolocking.9: more updates
Markus Pfeiffer [Fri, 6 Jun 2014 19:57:46 +0000 (20:57 +0100)]
locking.9: more updates

5 years agolocking.9 updates
Markus Pfeiffer [Fri, 6 Jun 2014 18:23:52 +0000 (19:23 +0100)]
locking.9 updates

5 years agoman: Add locking(9) manpage about locking and synchronisation
Markus Pfeiffer [Thu, 5 Jun 2014 21:22:27 +0000 (22:22 +0100)]
man: Add locking(9) manpage about locking and synchronisation

5 years agoopenssl: Adjust manual pages for 1.0.1h.
Sascha Wildner [Fri, 6 Jun 2014 15:57:17 +0000 (17:57 +0200)]
openssl: Adjust manual pages for 1.0.1h.

5 years agoMerge branch 'vendor/OPENSSL'
Sascha Wildner [Fri, 6 Jun 2014 15:51:29 +0000 (17:51 +0200)]
Merge branch 'vendor/OPENSSL'

5 years agoImport OpenSSL-1.0.1h.
Sascha Wildner [Fri, 6 Jun 2014 15:48:23 +0000 (17:48 +0200)]
Import OpenSSL-1.0.1h.

* Fixes for CVE-2014-0224, CVE-2014-0221, CVE-2014-0195, CVE-2014-3470
* Harmonize version and its documentation
* Fix eckey_priv_encode so it immediately returns an error upon a
    failure in i2d_ECPrivateKey
* Fix some double frees. These are not thought to be exploitable.

See also http://www.openssl.org/news/secadv_20140605.txt

Submitted-by: Robin Hahling <robin.hahling@gw-computing.net>
5 years agopktgen: Allow switching dst and src addresses configuration
Sepherosa Ziehau [Fri, 6 Jun 2014 12:47:59 +0000 (20:47 +0800)]
pktgen: Allow switching dst and src addresses configuration

So it could simulate multiple clients and one target server use case.

5 years agobsd-family-tree: Sync with FreeBSD (for OpenBSD 5.5 and DragonFly 3.8.0).
Sascha Wildner [Fri, 6 Jun 2014 02:28:18 +0000 (04:28 +0200)]
bsd-family-tree: Sync with FreeBSD (for OpenBSD 5.5 and DragonFly 3.8.0).

5 years agolibfetch: sync with freebsd
Joris Giovannangeli [Thu, 5 Jun 2014 13:34:12 +0000 (15:34 +0200)]
libfetch: sync with freebsd

5 years agohostapd.conf.5: Add back Mt for email addresses.
Sascha Wildner [Thu, 5 Jun 2014 08:32:33 +0000 (10:32 +0200)]
hostapd.conf.5: Add back Mt for email addresses.

5 years agolibthread_xu: add support for named POSIX semaphores.
Joris Giovannangeli [Wed, 4 Jun 2014 13:48:38 +0000 (15:48 +0200)]
libthread_xu: add support for named POSIX semaphores.

 * this implementation uses files as rendezvous and simply map files
   into the process address space. It means one page per semaphore.

 * by default, semaphores are created in /tmp/sem. If the
   LIBTHREAD_SEM_PREFIX environment variable is defined, its value is
   used as prefix.

5 years agoPER FREEBSD-SA-14:13 Incorrect error handling in PAM policy parser
Robert Garrett [Wed, 4 Jun 2014 13:44:02 +0000 (15:44 +0200)]
PER FREEBSD-SA-14:13  Incorrect error handling in PAM policy parser

This is the original patch submitted to FreeBSD
by as far as I can tell Peter Wemm, and Dag-Erling Smorgrav

Testing: Robert Garrett

5 years agoudp: Wait for address memory
Sepherosa Ziehau [Wed, 4 Jun 2014 08:38:16 +0000 (16:38 +0800)]
udp: Wait for address memory

It's better than wait for the current message to be done, since there
could be piles of messages on the target msgport.  This Improves UDP
sending performance a little bit.