6 years agokernel/acpi_thinkpad: Unlock properly before returning.
Sascha Wildner [Sat, 28 Jun 2014 11:58:48 +0000 (13:58 +0200)]
kernel/acpi_thinkpad: Unlock properly before returning.

6 years agoacpi: Sync aapits Makefile with 20140627 ACPICA test suite.
Sascha Wildner [Sat, 28 Jun 2014 11:43:04 +0000 (13:43 +0200)]
acpi: Sync aapits Makefile with 20140627 ACPICA test suite.

6 years agokernel: Sync ACPICA with Intel's version 20140627.
Sascha Wildner [Sat, 28 Jun 2014 11:14:15 +0000 (13:14 +0200)]
kernel: Sync ACPICA with Intel's version 20140627.

* Various bug fixes and enhancements (see changes.txt).

* Use new local printf() like functions for the utilities.

* Use new AcpiLogError for portability.

This that are also changed/new but it don't affect DragonFly so far:

* Support for ACPICA generation within the EFI environment.

* New OSL file I/O interface.

* New global AcpiGbl_VerifyTableChecksum.

For a more detailed list, please see sys/contrib/dev/acpica/changes.txt.

6 years agokernel - merge fixes from FreeBSD
Matthew Dillon [Sat, 28 Jun 2014 03:06:02 +0000 (20:06 -0700)]
kernel - merge fixes from FreeBSD

* Merge 8159278dbd8e019, fixes to pf_get_sport().  Primarily fixes the state
  key used to check whether a port is in-use or not.  NAT could previously
  choose a port that was already in-use.

* bzero() the state key to ensure that uninitialized fields are zero,
  otherwise the RB_FIND is likely to fail.

* Cleanup the case where there is no port range or the protocol is not
  supported.  In this situation, sport must be replicated on the host.

6 years agopfctl - Change default keep-policy to bring more in-line with other BSDs
Matthew Dillon [Sat, 28 Jun 2014 02:05:33 +0000 (19:05 -0700)]
pfctl - Change default keep-policy to bring more in-line with other BSDs

* Change the default keep-policy to the equivalent of:

  set keep-policy keep state (pickups, sloppy)

* This is being done because without keep state PF is simply going to be
  too inefficient for any reasonable set of rules, and we no longer want
  to make users set the keep-policy line when keep state is already the
  default in other BSD systems.

* Note that we also set pickups and sloppy by default.  This allows the
  router and/or PF to be restarted and allows packet routing to change
  mid-stream without causing all active TCP connections to drop.  This
  may not be the default in other BSD systems but it should be.  Being
  ultra strict here to improve security against ICMP-based attacks removes
  too much flexibility to be appropriate.  Proper TCP implementations
  already do sequence space checks for RST packets.

6 years agokernel - Fix pf-based NAT
Matthew Dillon [Sat, 28 Jun 2014 01:02:26 +0000 (18:02 -0700)]
kernel - Fix pf-based NAT

* Concurrency work on PF broke NAT.  Fix NAT for IPV4 TCP.

* This is not a complete fix, the NAT must be able to select from a range
  of local ports to replace sport to properly map the NAT onto the same
  cpu that the originating packet was forwarded to.

* Not fixed for UDP yet.

6 years agokernel - Force manual hash calculation for IP fragments
Matthew Dillon [Fri, 27 Jun 2014 17:24:24 +0000 (10:24 -0700)]
kernel - Force manual hash calculation for IP fragments

* Hardware toeplitz hashes do not always distinguish IP fragments from
  full IP packets.  An IP fragment will typically have the
  (src,dst,srcport,dstport) in the first fragment, but will only have
  (src,dst) in the remaining fragments.  The HW might not understand this
  and generate hashes which prevent the fragments from being directed to
  the same cpu.

* Force a manual recalculation of the hash (ignore the HW hash) for any
  IP fragment.  That is, any IP packet with the IP_MF bit set or with a
  non-zero offset (masked by IP_OFFMASK).

* Direct all IP fragments to a target cpu based on the hash.  We previously
  directed all IP fragments to cpu 0.

* NOTE: The IP fragment handling code in the kernel is still serialized with
a lock.  This will be addressed in a later commit.  However, fragments
which are piped into PF will now be properly distributed across
available cpus.

Submitted-by: sephe
6 years agodrm/i915: Reorder function definitions in i915_gem.c
François Tigeot [Fri, 27 Jun 2014 06:57:55 +0000 (08:57 +0200)]
drm/i915: Reorder function definitions in i915_gem.c

* Reducing differences with Linux 3.8.13

* No functional changes

6 years agobuildworld - Add sync/sleep safety before mkinitrd
Matthew Dillon [Fri, 27 Jun 2014 04:04:09 +0000 (21:04 -0700)]
buildworld - Add sync/sleep safety before mkinitrd

* Try to mitigate a bug in earlier versions of DragonFly that can be
  triggered by mkinitrd's use of the VN device by ensuring that the world
  is synced to disk before running mkinitrd.

6 years agopf - make the bulk of PF concurrent under normal operation
Matthew Dillon [Fri, 27 Jun 2014 03:40:32 +0000 (20:40 -0700)]
pf - make the bulk of PF concurrent under normal operation

* state and ip fragment tables are now per-cpu.

* packet paths acquire pf_token shared instead of exclusive.  Packet
  processing runs concurrently.

* Any dynamic rules updates will run synchronously for now.

* State expiration from the pfpurge thread runs synchronously for now.
  More work can be done here.

* ioctl (and also pfsync) paths acquire pf_token exclusively.  That is,
  primarily pfctl commands.  This includes rules updates and state scans.
  More work can be done here.

6 years agopfctl - Fix pf_print_state
Matthew Dillon [Fri, 27 Jun 2014 02:19:30 +0000 (19:19 -0700)]
pfctl - Fix pf_print_state

* Fix a bug where the 'minutes' field in the expiration was not being
  calculated properly.

* Reformat the verbose output so it does not overflow 80 columns, and
  move the rule # printing up a little so it is not confusedly associated
  with the next entry.

6 years agonewsyslog(8): Remove a NULL-check-after-use and instead assert != NULL.
Sascha Wildner [Thu, 26 Jun 2014 20:21:56 +0000 (22:21 +0200)]
newsyslog(8): Remove a NULL-check-after-use and instead assert != NULL.

Taken-from: FreeBSD

6 years agoroute(8): Fix a sizeof bug.
Sascha Wildner [Thu, 26 Jun 2014 17:55:29 +0000 (19:55 +0200)]
route(8): Fix a sizeof bug.

6 years agoAlways check the limits of array index variables before using them.
Sascha Wildner [Thu, 26 Jun 2014 17:24:43 +0000 (19:24 +0200)]
Always check the limits of array index variables before using them.

6 years agonetmap: port if_transmit() to ifq_dispatch()
Franco Fichtner [Thu, 26 Jun 2014 17:10:27 +0000 (19:10 +0200)]
netmap: port if_transmit() to ifq_dispatch()

Suggested by: sephe

6 years agoinet: Handle IP fragments in netisr0
Sepherosa Ziehau [Thu, 26 Jun 2014 12:13:41 +0000 (20:13 +0800)]
inet: Handle IP fragments in netisr0

For packet whose hash is provided by hardware, the processing netisr
may not be netisr0.  Add a IP fragments check at the beginning of
ip_input(): if the current processing netisr is not netisr0 and the
packet is an IP fragment, then redispatch it to netisr0.

Discussed-with: dillon@

6 years agoNote need for most recent 3.6 possible before updating.
Justin C. Sherrill [Thu, 26 Jun 2014 03:47:00 +0000 (23:47 -0400)]
Note need for most recent 3.6 possible before updating.

6 years agoperror.1: Document which locale related env variables affect perror(1).
Sascha Wildner [Wed, 25 Jun 2014 19:29:09 +0000 (21:29 +0200)]
perror.1: Document which locale related env variables affect perror(1).

6 years agokernel/pci: Fix wrong checks for U4B presence.
Sascha Wildner [Wed, 25 Jun 2014 13:07:49 +0000 (15:07 +0200)]
kernel/pci: Fix wrong checks for U4B presence.

I messed this up when switching us to the new USB stack.

Thanks to Markus Pfeiffer for tracking down my mistake.

Reported-by: peeter
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2686>

6 years agokernel/mrsas: Fix memset() size.
Sascha Wildner [Wed, 25 Jun 2014 11:59:34 +0000 (13:59 +0200)]
kernel/mrsas: Fix memset() size.

6 years agoinpcb: Reorganize localgroup manages functions.
Sepherosa Ziehau [Sun, 22 Jun 2014 12:00:41 +0000 (20:00 +0800)]
inpcb: Reorganize localgroup manages functions.

This is in preparation for conditionally tokenize inpcb lists/tables.

6 years agoboot - Return proper sense from probe_keyboard()
Matthew Dillon [Tue, 24 Jun 2014 22:33:56 +0000 (15:33 -0700)]
boot - Return proper sense from probe_keyboard()

* The sense was reversed.  Return the proper sense.

Taken-From: FreeBSD

6 years agoboot - consistently reload v86.ctl/v86.addr (non-bug)
Matthew Dillon [Tue, 24 Jun 2014 22:32:09 +0000 (15:32 -0700)]
boot - consistently reload v86.ctl/v86.addr (non-bug)

* This is not a bug.  Be more consistent when loading the v86 structure,
  do not try to optimize out fields that are already loaded in distinct
  code sections.

6 years agoboot - Timeout seta20 for normal boots as well as for cd boots.
Matthew Dillon [Tue, 24 Jun 2014 22:29:47 +0000 (15:29 -0700)]
boot - Timeout seta20 for normal boots as well as for cd boots.

* Bring code from cdboot into boot1.S

* Also use a more correct segment:offset when trying to reboot.

Reported-by: karu.pruun (karu.pruun@gmail.com),
     Roman Neuhauser (neuhauser@sigpipe.cz)

6 years agoboot - Fix BIOS lockup due to H2 probe on small medias
Matthew Dillon [Tue, 24 Jun 2014 22:10:31 +0000 (15:10 -0700)]
boot - Fix BIOS lockup due to H2 probe on small medias

* Some BIOSes (found w/Intel atom D525 w/Foxconn mobo, AMIBIOS) will
  implode when asked to read a disk address beyond the EOM.  The HAMMER2
  probe tries to read a volume header at the 0, 2G, 4G, and 6G marks.
  This appears to blow up the BIOS when booting from USB media.

* To work around the problem, for now we do not proceed to test all four
  volume header offsets if the first one (at offset 0) does not have a
  HAMMER2 signature.

* Thanks to tm512 (Kyle Davis) for spending ~4+ hours helping us find
  the problem.

Reported-by: tm512 (Kyle Davis)
6 years agodrm/i915: fix notify_ring()
Johannes Hofmann [Mon, 23 Jun 2014 20:53:02 +0000 (22:53 +0200)]
drm/i915: fix notify_ring()

6 years agoauthor style fixes in manual pages
Franco Fichtner [Sat, 21 Jun 2014 14:16:50 +0000 (16:16 +0200)]
author style fixes in manual pages

6 years agodrm/i915: Sync intel_pm.c with Linux 3.8.13
François Tigeot [Sat, 21 Jun 2014 09:00:30 +0000 (11:00 +0200)]
drm/i915: Sync intel_pm.c with Linux 3.8.13

* Add a workaround for a hardware issue making the GPU get stuck at
  some particular frequency

* Add initialization code to enable Haswell power wells

* Little fixes and adjustements for various GPUs up to Haswell

6 years agokernel/vinum: Use %jx in a number of places instead of %llx.
Sascha Wildner [Fri, 20 Jun 2014 09:30:57 +0000 (11:30 +0200)]
kernel/vinum: Use %jx in a number of places instead of %llx.

6 years agokernel: Correct function names in comments.
Sascha Wildner [Fri, 20 Jun 2014 06:12:19 +0000 (08:12 +0200)]
kernel: Correct function names in comments.

6 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

6 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

6 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).

6 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)
6 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.

6 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.

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

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

6 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.

6 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

6 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.

6 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

6 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

6 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.

6 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'

6 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.

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

6 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

6 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.

6 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.

6 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().

6 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.

6 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/

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

6 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.

6 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

6 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.

6 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

6 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
6 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.

6 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.

6 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).

6 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).

6 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.

6 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.

6 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.

6 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

6 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

6 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.

6 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
6 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

6 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

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

6 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.

6 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.

6 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

6 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.

6 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.

6 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.

6 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()

6 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.

6 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.

6 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.

6 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

6 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.

6 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>
6 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

6 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

6 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.

6 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).

6 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).

6 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.

6 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.

6 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().

6 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().

6 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
6 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

6 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

6 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

6 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