dragonfly.git
4 years agokernel/pf: Check size of long at compile time (fixes i386 build).
Sascha Wildner [Sat, 28 Jun 2014 20:10:48 +0000 (22:10 +0200)]
kernel/pf: Check size of long at compile time (fixes i386 build).

4 years agokernel - add toeplitz_piecemeal_addr/port()
Matthew Dillon [Sat, 28 Jun 2014 16:38:38 +0000 (09:38 -0700)]
kernel - add toeplitz_piecemeal_addr/port()

* Add two more inlines to help PF calculate matching cpus for NAT port
  scans.

4 years agoChmod 644 a few scripts in the tree.
Sascha Wildner [Sat, 28 Jun 2014 15:51:11 +0000 (17:51 +0200)]
Chmod 644 a few scripts in the tree.

As usual, 'make install' will take care about setting the wanted mode.

4 years agokernel/acpi: Solve ACPI_DEBUG_{CACHE,LOCKS,MEMMAP} building better.
Sascha Wildner [Sat, 28 Jun 2014 13:31:31 +0000 (15:31 +0200)]
kernel/acpi: Solve ACPI_DEBUG_{CACHE,LOCKS,MEMMAP} building better.

ACPICA 20140627 added a mechanism for having a platform dependent
header that is included _after_ ACPICA headers are included.

So we can now solve compilation with ACPI_DEBUG_{CACHE,LOCKS,MEMMAP}
by adding a new acdragonflyex.h header for the prototypes of the
debug flavors of AcpiOsReleaseObject(), AcpiOsAcquireLock(),
AcpiOsMapMemory() and AcpiOsUnmapMemory() instead of having to put
them into the vendor code (like I did in 3b92a84dc0def, which this
commit reverts).

4 years agokernel/acpi: Fix a kprintf for ACPI_DEBUG_MEMMAP.
Sascha Wildner [Sat, 28 Jun 2014 13:24:00 +0000 (15:24 +0200)]
kernel/acpi: Fix a kprintf for ACPI_DEBUG_MEMMAP.

4 years agovga_pci: Improve vga boot display detection.
Imre Vadasz [Fri, 27 Jun 2014 19:29:04 +0000 (21:29 +0200)]
vga_pci: Improve vga boot display detection.

* Check the "VGA Enable" bit on the parent bridge only if it is a
  PCI-to-PCI bridge.

* Always check the "I/O" and "Memory address space decoding" bits on the
  video card itself.

* Furthermore, vga_pci_attach() logs "Boot video device" if the card
  being attached is the Chosen One:
    vgapci0: <VGA-compatible display> [...]
    vgapci0: Boot video device

This is FreeBSD's r259579.

Tested-by: François Tigeot <ftigeot@wolfpond.org>
4 years agounlock_return.cocci: Add a check for ACPI_SERIAL_{BEGIN,END}.
Sascha Wildner [Sat, 28 Jun 2014 12:00:58 +0000 (14:00 +0200)]
unlock_return.cocci: Add a check for ACPI_SERIAL_{BEGIN,END}.

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

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

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

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

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

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

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

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

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

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

4 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

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

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

4 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

4 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@

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

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

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

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

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

4 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

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

4 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)

4 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)
4 years agodrm/i915: fix notify_ring()
Johannes Hofmann [Mon, 23 Jun 2014 20:53:02 +0000 (22:53 +0200)]
drm/i915: fix notify_ring()

4 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

4 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

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

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

4 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

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

Before:

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

After:

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

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

4 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
  p_ucred.

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

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

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

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

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

4 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

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

4 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

4 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
kern.ipc.rand_initport.

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

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

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

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

4 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
'setlport'.

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

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

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

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

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

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

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

4 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:

Thunderbolt:

LSI MegaRAID SAS 9265
LSI MegaRAID SAS 9266
LSI MegaRAID SAS 9267
LSI MegaRAID SAS 9270
LSI MegaRAID SAS 9271
LSI MegaRAID SAS 9272
LSI MegaRAID SAS 9285
LSI MegaRAID SAS 9286
DELL PERC H810
DELL PERC H710/P

Invader/Fury:

LSI MegaRAID SAS 9380
LSI MegaRAID SAS 9361
LSI MegaRAID SAS 9341
DELL PERC H830
DELL PERC H730/P
DELL PERC H330

Taken-from: FreeBSD

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

4 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

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

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

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

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

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

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

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

4 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
  full.

* 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
  full.

4 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

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

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

4 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

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

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

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

4 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

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

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

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

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

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

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

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

4 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

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

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

4 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

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

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

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

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

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