]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoInterim fix for "Login not found" error.
Devin Teske [Fri, 19 Jun 2015 21:32:20 +0000 (21:32 +0000)]
Interim fix for "Login not found" error.

PR: bin/196514
MFC after: 3 days
X-MFC-to: stable/10

9 years agoBack out contested change until dispute is resolved. This proved to be
Warner Losh [Fri, 19 Jun 2015 21:30:45 +0000 (21:30 +0000)]
Back out contested change until dispute is resolved. This proved to be
more contentious than I expected.

9 years agoDocument kern.cam.ada.legacy_aliases, while I'm there also fix some typos.
Xin LI [Fri, 19 Jun 2015 21:26:06 +0000 (21:26 +0000)]
Document kern.cam.ada.legacy_aliases, while I'm there also fix some typos.

MFC after: 2 weeks

9 years agoRemove uneeded NULL check since malloc the malloc is now M_WAITOK
Sean Bruno [Fri, 19 Jun 2015 20:35:17 +0000 (20:35 +0000)]
Remove uneeded NULL check since malloc the malloc is now M_WAITOK

Submitted by: mjg

9 years agoMust have one of either M_WAITOK or M_NOWAIT, read the man page bruno.
Sean Bruno [Fri, 19 Jun 2015 19:57:39 +0000 (19:57 +0000)]
Must have one of either M_WAITOK or M_NOWAIT, read the man page bruno.

Submitted by: mjg

9 years agoDon't leak sockets.
Michael Tuexen [Fri, 19 Jun 2015 19:36:29 +0000 (19:36 +0000)]
Don't leak sockets.

Reported by: Coverity
CID: 1306785

MFC after: 3 days

9 years agoFeedback from commit r284535
Sean Bruno [Fri, 19 Jun 2015 18:57:36 +0000 (18:57 +0000)]
Feedback from commit r284535

davide:  imgact_binmisc_clear_entry() needs to use atomic ops to remove
the enable bit.

kib:  M_NOWAIT is not warranted and comment is invalid.

9 years agosx_sunlock for sx_slock
Simon J. Gerraty [Fri, 19 Jun 2015 17:34:59 +0000 (17:34 +0000)]
sx_sunlock for sx_slock

9 years agofilemon_pid_check needs to hold proctree_lock
Simon J. Gerraty [Fri, 19 Jun 2015 17:19:20 +0000 (17:19 +0000)]
filemon_pid_check needs to hold proctree_lock

Reviewed by: kib
MFC after: few days

9 years agoFix bug in the ubldr introduced in the rev.283035. The new code
Maxim Sobolev [Fri, 19 Jun 2015 17:00:36 +0000 (17:00 +0000)]
Fix bug in the ubldr introduced in the rev.283035. The new code
fails to properly consider memory regions when the loader is
located below of those regions or engulfs their lower limit. This
results in "not enough RAM to load kernel" panic, which is totally
bogus. On top of that, there are some variables that can be left
unitialized in those cases, which might cause it fail with memory
access violation instead of panic while trying to load kernel to
a wrong or non-existing address of memory.

Augment the code to properly deal with the loader being below or
at the lower bound of the memory region in question. Also, don't
leave ununitialized variables behind.

Reviewed by: ian

9 years agoMove include of make.conf back to its old position.
Simon J. Gerraty [Fri, 19 Jun 2015 14:56:24 +0000 (14:56 +0000)]
Move include of make.conf back to its old position.

This means moving include of local.sys.mk and src.sys.mk too.
Introduce new includes to take the early slot, for the purpose
of being able to influence toolchains and the like.

Differential Revision: D2860
Reviewed by: imp

9 years agoFix fallouts from r284590
Baptiste Daroussin [Fri, 19 Jun 2015 14:20:21 +0000 (14:20 +0000)]
Fix fallouts from r284590

Reported by: kib

9 years agoWhen setting the primary address, return an error whenever it fails.
Michael Tuexen [Fri, 19 Jun 2015 12:48:22 +0000 (12:48 +0000)]
When setting the primary address, return an error whenever it fails.

MFC after: 3 days

9 years agoRegenerate usb.conf .
Hans Petter Selasky [Fri, 19 Jun 2015 09:37:37 +0000 (09:37 +0000)]
Regenerate usb.conf .

MFC after: 1 week

9 years agoRestore the td_cookie value for the tmpfs directory entry which was a
Konstantin Belousov [Fri, 19 Jun 2015 07:25:15 +0000 (07:25 +0000)]
Restore the td_cookie value for the tmpfs directory entry which was a
dup entry, upon detach from the parent directory.  If the node is
renamed, the entry is re-attached at the different directory, and
invalud cookie value triggers assert (or corrupts directory rb tree,
it seems).

Reported by: clusteradm (gjb, antoine)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoMFV r284412: 5911 ZFS "hangs" while deleting file
Andriy Gapon [Fri, 19 Jun 2015 06:58:05 +0000 (06:58 +0000)]
MFV r284412: 5911 ZFS "hangs" while deleting file

Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Reviewed by: Alek Pinchuk <alek@nexenta.com>
Reviewed by: Simon Klinkert <simon.klinkert@gmail.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@46e1baa6cf6d5432f5fd231bb588df8f9570c858

https://www.illumos.org/issues/5911
Sometimes ZFS appears to hang while deleting a file. It is actually
making slow progress at the file deletion, but other operations
(administrative and writes via the data path) "hang" until the file
removal completes, which can take a long time if the file has many
blocks. The deletion (or most of it) happens in a single txg, and the
sync thread spends most of its time reading indirect blocks via this
stack trace:
swtch+0x141()
cv_wait+0x70()
zio_wait+0x5b()
dbuf_read+0x2c0()
free_children+0x50()
free_children+0x12a()
free_children+0x12a()
free_children+0x12a()
dnode_sync_free_range_impl+0xdf()
dnode_sync_free_range+0x52()
range_tree_vacate+0x65()
dnode_sync+0x1d8()
dmu_objset_sync_dnodes+0x77()
dmu_objset_sync+0x19f()
dsl_dataset_sync+0x51()
dsl_pool_sync+0x9a()
spa_sync+0x2ff()
txg_sync_thread+0x21f()
thread_start+8()
One way to reproduce the problem is if we are over the arc_meta_limit,
e.g. because lots of indirect blocks are pinned because we have L0
dbufs under them.  It could be that most of the L1 indirects are cached,
in which case when dmu_free_long_range_impl() calls dmu_tx_hold_free(),
it will complete very quickly. This allows dmu_free_long_range_impl() to
put many (perhaps all of its) transactions in the same TXG. However,
dmu_free_long_range_impl() calls dnode_evict_dbufs (and
dnode_free_range()), which removes the L0 dbufs, thus reducing the hold
count on the L1 indirect blocks above it, allowing them to be evicted.
Because we are over the arc_meta_limit(), these L1 blocks will be
evicted ASAP. Thus when we get to syncing context, the L1 indirects are
no longer cached and must be read in.

Obtained from: illumos
MFC after: 15 days

9 years agoAdd USB gold driver to default kernel build.
Hans Petter Selasky [Fri, 19 Jun 2015 06:48:55 +0000 (06:48 +0000)]
Add USB gold driver to default kernel build.

9 years agoillums compat: use flsl/flsll for highbit/highbit64
Andriy Gapon [Fri, 19 Jun 2015 06:41:53 +0000 (06:41 +0000)]
illums compat: use flsl/flsll for highbit/highbit64

Do that only when when fast inline versions are available.
At the moment that can be the case only in the kernel and not for all
platforms.

The original code uses the binary search and that's kept as a fallback.
This is a micro optimization.

Differential Revision: https://reviews.freebsd.org/D2839
Reviewed by: delphij, mahrens, mav
MFC after: 17 days

9 years agoInstall loader(8) and zfsloader(8) only once
Baptiste Daroussin [Fri, 19 Jun 2015 05:42:24 +0000 (05:42 +0000)]
Install loader(8) and zfsloader(8) only once

Differential Revision: https://reviews.freebsd.org/D2841
Reviewed by: imp

9 years agoAdd the ability to detect ZFS and GELI encrypted file systems to fstyp(8)
Allan Jude [Fri, 19 Jun 2015 05:09:02 +0000 (05:09 +0000)]
Add the ability to detect ZFS and GELI encrypted file systems to fstyp(8)

Functionality is hidden behind the -u flag to avoid confusing automounters

PR: 200823
Reviewed by: asomers, eadler, wblock (man page)
Approved by: trasz
MFC after: 10 days
Relnotes: yes
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D2045

9 years agoFirst cut at attempting to buffer frames until we see a beacon.
Adrian Chadd [Fri, 19 Jun 2015 01:44:17 +0000 (01:44 +0000)]
First cut at attempting to buffer frames until we see a beacon.

The iwn(4) firmware forgets most of its channel state after an RXON
command.  This means that any beacons its seen on passive 5GHz channels
are forgotten upon an association/authorisation request.
This unfortuantely means that 5GHz association almost always fails -
the assoc and/or auth frames are dropped with a status of "passive
channel, haven't seen a beacon yet." (0x90.)

So:

* add an xmit queue, global, to buffer frames
* modify the xmit path to use the mbuf tag from net80211
  to specify raw frame details
* buffer xmit frames from both raw and non-raw paths
* if a beacon is seen in the RX path, schedule a taskqueue to
  send said frames and un-buffer things.
* flush frames during state change back to INIT, or NIC
  down/up/detach.

This isn't the final shape I'd like this to be in but it certainly
is better than 5GHz "not working at all".

Tested:

* Intel 5100, STA mode (before spilling coffee)
* Intel 5300, STA mode (after spilling coffee)

Story:

* This has been bugging me at work for months, which I just
  worked around by throwing an ath(4) into my Lenovo T400 cardbus
  slot.

* Our ops director discovered indeed FreeBSD runs well on the
  Lenovo T420p, except for that pesky 5GHz thing.  So now developers
  also can have a T420p running FreeBSD to do work with.
  Their #1 feedback to me - "boy it'd be nice if 5GHz wifi worked."

* .. then, I was at NANOG but stuck with 5GHz only wifi and no ath(4)
  NIC to put in a laptop - and I snapped.

Thus, the reason this is actually work related.

MFC after: 2 weeks
Sponsored by: Norse Corp, Inc.

9 years agoAdd in library routines not supplied by gcc-4.9 but required by the kernel.
Adrian Chadd [Fri, 19 Jun 2015 01:21:10 +0000 (01:21 +0000)]
Add in library routines not supplied by gcc-4.9 but required by the kernel.

Reviewed by: imp

9 years agoSynaptics: fix a problem with trackpoint passthrough.
Rui Paulo [Fri, 19 Jun 2015 00:10:30 +0000 (00:10 +0000)]
Synaptics: fix a problem with trackpoint passthrough.

There was a inconsistency which led to enable passthrough commands
being interpreted as actual touchpad commands.

Submitted by: Jan Kokemüller <jan.kokemueller at gmail.com>
MFC after: 1 week

9 years agoMerge ACPICA 20150619.
Jung-uk Kim [Thu, 18 Jun 2015 23:14:45 +0000 (23:14 +0000)]
Merge ACPICA 20150619.

9 years agoFix off-by-one error in fstyp(8) and geom_label(4) that made them use
Edward Tomasz Napierala [Thu, 18 Jun 2015 21:55:55 +0000 (21:55 +0000)]
Fix off-by-one error in fstyp(8) and geom_label(4) that made them use
a single space (" ") as a CD9660 label name when no label was present.
Similar problem was also present in msdosfs label recognition.

PR: 200828
Differential Revision: https://reviews.freebsd.org/D2830
Reviewed by: asomers@, emaste@
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

9 years agoFix a typo introduced in r262209.
Jung-uk Kim [Thu, 18 Jun 2015 21:18:43 +0000 (21:18 +0000)]
Fix a typo introduced in r262209.

MFC after: 3 days

9 years agoAdd Makefile.azure, used to upload VHD images to the
Glen Barber [Thu, 18 Jun 2015 19:20:00 +0000 (19:20 +0000)]
Add Makefile.azure, used to upload VHD images to the
Microsoft Azure environment, similar to the EC2 AMIs.

MFC after: 3 days
Tested with: stable/10@r284517 (patched)
Sponsored by: The FreeBSD Foundation

9 years agoFix possible use after free in encap[46]_input().
Andrey V. Elsukov [Thu, 18 Jun 2015 18:28:38 +0000 (18:28 +0000)]
Fix possible use after free in encap[46]_input().
There is small window, when encap_detach() can free matched entry
directly after we release encapmtx. Instead of use pointer to the
matched entry, save pointers to needed variables from this entry
and use them after release mutex.

Pass argument stored in the encaptab entry to encap_fillarg(), instead
of pointer to matched entry. Also do not allocate new mbuf tag, when
argument that we plan to save in this tag is NULL.

Also make encaptab variable static.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

9 years agoImport ACPICA 20150619.
Jung-uk Kim [Thu, 18 Jun 2015 17:27:40 +0000 (17:27 +0000)]
Import ACPICA 20150619.

9 years agoAdd missing driver for TDA19988 HDMI framer
Oleksandr Tymoshenko [Thu, 18 Jun 2015 16:51:49 +0000 (16:51 +0000)]
Add missing driver for TDA19988 HDMI framer

9 years agoDocument title should be in CAPS.
Christian Brueffer [Thu, 18 Jun 2015 16:31:32 +0000 (16:31 +0000)]
Document title should be in CAPS.

9 years agoRemove EOL whitespace.
Christian Brueffer [Thu, 18 Jun 2015 16:29:11 +0000 (16:29 +0000)]
Remove EOL whitespace.

9 years agoUpdate libcxxrt upgrade instructions
Ed Maste [Thu, 18 Jun 2015 14:29:46 +0000 (14:29 +0000)]
Update libcxxrt upgrade instructions

The typeinfo file no longer exists upstream.

9 years agoFix yet another comment typo in NetBSD rev. 1.16, missed when merging
Marius Strobl [Thu, 18 Jun 2015 14:13:16 +0000 (14:13 +0000)]
Fix yet another comment typo in NetBSD rev. 1.16, missed when merging
it in r284447.

Submitted by: yongari
Sponsored by: genua mbh

9 years agoImport libcxxrt master e64e93fe5bba67a6d52cbe5a97f8770c054bfa65.
Ed Maste [Thu, 18 Jun 2015 14:12:08 +0000 (14:12 +0000)]
Import libcxxrt master e64e93fe5bba67a6d52cbe5a97f8770c054bfa65.

This includes a number of demangler fixes obtained from upstream
ELF Tool Chain.

PR: 200913
Sponsored by: The FreeBSD Foundation

9 years agoImport libcxxrt master e64e93fe5bba67a6d52cbe5a97f8770c054bfa65
Ed Maste [Thu, 18 Jun 2015 14:00:44 +0000 (14:00 +0000)]
Import libcxxrt master e64e93fe5bba67a6d52cbe5a97f8770c054bfa65

This includes a number of fixes to the C++ demangler (obtained from
upstream ELF Tool Chain).

9 years agoFix a bug reported by coverity. Since AF_UNIX sockets don't
Michael Tuexen [Thu, 18 Jun 2015 13:45:07 +0000 (13:45 +0000)]
Fix a bug reported by coverity. Since AF_UNIX sockets don't
have multiple addresses, the problem didn't show up during testing.

Reported by: Coverity
CID: 1306787

9 years agoFix compilation of this macro under gcc-4.9 for MIPS32.
Adrian Chadd [Thu, 18 Jun 2015 13:40:08 +0000 (13:40 +0000)]
Fix compilation of this macro under gcc-4.9 for MIPS32.

Some point after gcc-4.2 the MIPS inline assembly restrictions changed -
=h (hi register) disappeared from the list of restrictions and can no
longer be used.

So, until someone requires an assembly version of this function,
just use a non-assembly version and let the compiler sort it out.

Suggested by: kan

9 years agoRemove duplicate defines.
Ruslan Bukin [Thu, 18 Jun 2015 10:33:04 +0000 (10:33 +0000)]
Remove duplicate defines.

Sponsored by: HEIF5

9 years agoIncrease the FreeBSD/arm image sizes back to 1G for 11-CURRENT.
Glen Barber [Thu, 18 Jun 2015 10:26:27 +0000 (10:26 +0000)]
Increase the FreeBSD/arm image sizes back to 1G for 11-CURRENT.
While 480M is sufficient for 10-STABLE, 11-CURRENT images at
this size fail due to insufficient space.

This commit is solely for the sake of getting updated snapshot
builds out, after which I'll analyze the resulting images to
figure out what a more sane value is, even if the image size
for 11-CURRENT needs to differ from 10-STABLE.

Sponsored by: The FreeBSD Foundation

9 years agoAllow '@' in unquoted strings, such as with the "path" statement. Note
Edward Tomasz Napierala [Thu, 18 Jun 2015 10:17:47 +0000 (10:17 +0000)]
Allow '@' in unquoted strings, such as with the "path" statement.  Note
that one can use any character they like by using double quotes.

PR: 200895
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

9 years agoChange ATIO/INOT counting to prevent periph destruction while requests
Alexander Motin [Thu, 18 Jun 2015 09:39:51 +0000 (09:39 +0000)]
Change ATIO/INOT counting to prevent periph destruction while requests
are still running inside CTL.

MFC after: 1 week

9 years agoIn case of target mode disable at least ISP2532 return invalid zero
Alexander Motin [Thu, 18 Jun 2015 07:50:27 +0000 (07:50 +0000)]
In case of target mode disable at least ISP2532 return invalid zero
ct_rxid value on CTIO completion.  Try to workaround that using tag_id
from the CCB, pointed by still valid ct_syshandle.

I don't know whether this is valid fix or dirty hack, but considering that
alternative is indefinitely stuck command -- it worth trying.

MFC after: 1 week

9 years agoRestructure memory allocation in bhyve to support "devmem".
Neel Natu [Thu, 18 Jun 2015 06:00:17 +0000 (06:00 +0000)]
Restructure memory allocation in bhyve to support "devmem".

devmem is used to represent MMIO devices like the boot ROM or a VESA framebuffer
where doing a trap-and-emulate for every access is impractical. devmem is a
hybrid of system memory (sysmem) and emulated device models.

devmem is mapped in the guest address space via nested page tables similar
to sysmem. However the address range where devmem is mapped may be changed
by the guest at runtime (e.g. by reprogramming a PCI BAR). Also devmem is
usually mapped RO or RW as compared to RWX mappings for sysmem.

Each devmem segment is named (e.g. "bootrom") and this name is used to
create a device node for the devmem segment (e.g. /dev/vmm/testvm.bootrom).
The device node supports mmap(2) and this decouples the host mapping of
devmem from its mapping in the guest address space (which can change).

Reviewed by: tychon
Discussed with: grehan
Differential Revision: https://reviews.freebsd.org/D2762
MFC after: 4 weeks

9 years agoThe build and installation of rmail(8) is only related to the SENDMAIL option
Baptiste Daroussin [Thu, 18 Jun 2015 05:58:15 +0000 (05:58 +0000)]
The build and installation of rmail(8) is only related to the SENDMAIL option

9 years agoDo not remove mailwrapper(8) in case WITHOUT_SENDMAIL is used
Baptiste Daroussin [Thu, 18 Jun 2015 05:54:04 +0000 (05:54 +0000)]
Do not remove mailwrapper(8) in case WITHOUT_SENDMAIL is used

It is required for other tools in base and/or ports like dma(8) or any MTA
available in ports. It is also build and installed anyway even if world is built
WITHOUT_SENDMAIL

9 years agoThis change replaces the mutex with a sx lock for the interpreter list to
Sean Bruno [Thu, 18 Jun 2015 02:04:20 +0000 (02:04 +0000)]
This change replaces the mutex with a sx lock for the interpreter list to
avoid the problem of holding a non-sleep lock during a page fault as
reported by witness. It also uses atomics where possible to avoid having
to acquire the exclusive lock. In addition, it consistently uses
memset()/memcpy() instead of bzero()/bcopy().

Differential Revision: https://reviews.freebsd.org/D1971
Submitted by: sson
Reviewed by: jhb

9 years agoAdd HDMI support to Beaglebone Black:
Oleksandr Tymoshenko [Thu, 18 Jun 2015 00:57:52 +0000 (00:57 +0000)]
Add HDMI support to Beaglebone Black:

- Add driver for TDA19988 HDMI framer
- Add simple interface to communicate with HDMI sink: read EDID and set videomode
- Add event-based API to notify LCD controller when HDMI sink is available
- Add HDMI framer node and add refernce to it to lcdc node. This part of
    DTS tree is custom and does not match Linux DTS because Linux uses
    combination of pseudo-node in DTS and hardcoded driver information
    that does not map to our model.

9 years agoAdd hskew field to struct videomode. It is required by some controllers
Oleksandr Tymoshenko [Thu, 18 Jun 2015 00:22:14 +0000 (00:22 +0000)]
Add hskew field to struct videomode. It is required by some controllers
that are not 100% VESA-compatible (e.g. TDA19988 HDMI framer)

9 years ago- Add clk_set_source_freq field to struct ti_clock_dev so clock device
Oleksandr Tymoshenko [Wed, 17 Jun 2015 23:26:00 +0000 (23:26 +0000)]
- Add clk_set_source_freq field to struct ti_clock_dev so clock device
   consumers can configure clock frequency
- Add ti_prcm_clk_set_source_freq wrapper for clk_set_source_freq
- Add am335x_clk_set_arm_disp_freq function to control pixel clock
   frequency for LCD and HDMI output. Both of them are sensitive
   to frequency skews and we need to get pixel clock matching requested
   frequency as close to possible

9 years agoDocument that a forced dismount of an NFSv3 mount when the
Rick Macklem [Wed, 17 Jun 2015 23:24:46 +0000 (23:24 +0000)]
Document that a forced dismount of an NFSv3 mount when the
NLM (rpc.lockd) is running can crash the system.
Unfortunately this is not easy to fix, but I have left
PR#200585 open.

PR: 200585
MFC after: 3 days

9 years agoo Un-inline vm_pager_get_pages(), vm_pager_get_pages_async().
Gleb Smirnoff [Wed, 17 Jun 2015 22:44:27 +0000 (22:44 +0000)]
o Un-inline vm_pager_get_pages(), vm_pager_get_pages_async().
o Provide an extensive set of assertions for input array of pages.
o Remove now duplicate assertions from different pagers.

Sponsored by: Nginx, Inc.
Sponsored by: Netflix

9 years agoBump date.
Warner Losh [Wed, 17 Jun 2015 22:06:27 +0000 (22:06 +0000)]
Bump date.

Submitted by: Xin Li

9 years agoUpdate style.9 to reflect consensus on developer's mailing list
Warner Losh [Wed, 17 Jun 2015 21:25:36 +0000 (21:25 +0000)]
Update style.9 to reflect consensus on developer's mailing list
allowing redundant braces.

Differential Revision: https://reviews.freebsd.org/D2842

9 years agoFix a bug related to flow assignment I introduce in
Michael Tuexen [Wed, 17 Jun 2015 19:26:23 +0000 (19:26 +0000)]
Fix a bug related to flow assignment I introduce in
https://svnweb.freebsd.org/base?view=revision&revision=275483

MFC after: 3 days

9 years agoRevert r284511 because it caused build failures on many platforms
Andriy Gapon [Wed, 17 Jun 2015 17:16:06 +0000 (17:16 +0000)]
Revert r284511 because it caused build failures on many platforms

The problem is that when inline versions of flsl and flsll are not
available, then libkern.h must be included for their declarations
in kernel sources.
The fix would be trivial, but I would like to figure out first if
it even makes sense to use the libkern provided implementations.

Reported by: bz
Pointyhat to: avg

9 years agoRemove all internal macros and cast various invocations as necessary.
Jung-uk Kim [Wed, 17 Jun 2015 17:11:44 +0000 (17:11 +0000)]
Remove all internal macros and cast various invocations as necessary.

https://github.com/acpica/acpica/commit/47d22a7

9 years agoAdd FIB support for SCTP.
Michael Tuexen [Wed, 17 Jun 2015 15:20:14 +0000 (15:20 +0000)]
Add FIB support for SCTP.
This fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200379

MFC after: 3 days

9 years agoInitialise pr_enforce_statfs from the "default" sysctl value and
Bjoern A. Zeeb [Wed, 17 Jun 2015 13:15:54 +0000 (13:15 +0000)]
Initialise pr_enforce_statfs from the "default" sysctl value and
not from the compile time constant.  The sysctl value is seeded
from the compile time constant.

MFC after: 2 weeks

9 years agol2arc: pass correct size to trim requests
Andriy Gapon [Wed, 17 Jun 2015 12:28:13 +0000 (12:28 +0000)]
l2arc: pass correct size to trim requests

b_size is a logical size of a buffer in memory, b_asize is its physical
size that accounts for possible compression.
Currently the latter is the best approximation for the allocated, on-disk
size.

L2ARC TRIM support was committed a few weeks before L2ARC compression
was imported, so originally the code was correct, because b_size was
the size.

Further thoughts.  Given that the cache device is being overwritten
in a circular fashion it is not clear if a TRIM per each evicted L2ARC
buffer has any benefits.
Maybe it would be sufficient to issue a single trim request for the whole
device when it is loaded, e.g. after a bootup, or when it is unloaded, e.g.
before a shutdown.  At least as long as L2ARC is not persistent across
reboots.

Discussed with: smh
MFC after: 19 says

9 years agoIf there is a system with a bpf consumer running and a packet is wanted
Ermal Luçi [Wed, 17 Jun 2015 12:23:04 +0000 (12:23 +0000)]
If there is a system with a bpf consumer running and a packet is wanted
to be transmitted but the arp cache entry expired, which triggers an arp request
to be sent, the bpf code might want to sleep but crash the system due
to a non sleep lock held from the arp entry not released properly.

Release the lock before calling the arp request code to solve the issue
as is done on all the other code paths.

PR: 200323
Approved by: ae, gnn(mentor)
MFC after: 1 week
Sponsored by: Netgate
Differential Revision: https://reviews.freebsd.org/D2828

9 years agoillumos compat: use flsl/flsll for highbit/highbit64
Andriy Gapon [Wed, 17 Jun 2015 12:05:04 +0000 (12:05 +0000)]
illumos compat: use flsl/flsll for highbit/highbit64

This is a micro optimization.
The upstream code uses the binary search.

Differential Revision: https://reviews.freebsd.org/D2839
Reviewed by: delphij, mav
MFC after: 15 days

9 years agoCorrect the function name in catch-all error handling case.
Bjoern A. Zeeb [Wed, 17 Jun 2015 10:20:59 +0000 (10:20 +0000)]
Correct the function name in catch-all error handling case.

MFC after: 1 week

9 years agovfs_msync(), called from syncer vnode fsync VOP, only iterates over
Konstantin Belousov [Wed, 17 Jun 2015 04:46:58 +0000 (04:46 +0000)]
vfs_msync(), called from syncer vnode fsync VOP, only iterates over
the active vnode list for the given mount point, with the assumption
that vnodes with dirty pages are active.  This is enforced by
vinactive() doing vm_object_page_clean() pass over the vnode pages.

The issue is, if vinactive() cannot be called during vput() due to the
vnode being only shared-locked, we might end up with the dirty pages
for the vnode on the free list.  Such vnode is invisible to syncer,
and pages are only cleaned on the vnode reactivation.  In other words,
the race results in the broken guarantee that user data, written
through the mmap(2), is written to the disk not later than in 30
seconds after the write.

Fix this by keeping the vnode which is freed but still owing
inactivation, on the active list.  When syncer loops find such vnode,
it is deactivated and cleaned by the final vput() call.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoContinue ubreaking ``env LANG=ru_RU.KOI8-R ls -l''.
Alexander Kabaev [Wed, 17 Jun 2015 04:26:48 +0000 (04:26 +0000)]
Continue ubreaking ``env LANG=ru_RU.KOI8-R ls -l''.

File names are in current locale as well.

9 years agoUnbreak ``env LANG=ru_RU.KOI8-R ls -l''.
Marcel Moolenaar [Wed, 17 Jun 2015 03:12:08 +0000 (03:12 +0000)]
Unbreak ``env LANG=ru_RU.KOI8-R ls -l''.
Time strings are in the current locale.

9 years ago- Add acm@ entry
Jose Alonso Cardenas Marquez [Wed, 17 Jun 2015 02:43:20 +0000 (02:43 +0000)]
- Add acm@ entry

9 years agoAdd compatibility with $2y$ bcrypt hashes
Allan Jude [Tue, 16 Jun 2015 23:57:29 +0000 (23:57 +0000)]
Add compatibility with $2y$ bcrypt hashes

crypt_blowfish and many implementations based on it (Apache, PHP, PostgreSQL) implemented $2y$ before OpenBSD went with $2b$. This changes marks them as equivalent.

http://www.openwall.com/lists/announce/2011/07/17/1

This change is required for applications that use the base crypt() implementation (including nginx) to be able to validate $2y$ hashes

Reviewed by: eadler
Approved by: delphij
MFC after: 1 week
Relnotes: yes
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D2742

9 years agoSupport WITH_LLDB
Simon J. Gerraty [Tue, 16 Jun 2015 23:38:44 +0000 (23:38 +0000)]
Support WITH_LLDB

Remove entries from userland/gnu that conflict with toolchain

9 years agonew depends
Simon J. Gerraty [Tue, 16 Jun 2015 23:37:19 +0000 (23:37 +0000)]
new depends

9 years agoHook extra libs to _LIBS so bsd.lib.mk can do its thing
Simon J. Gerraty [Tue, 16 Jun 2015 23:36:20 +0000 (23:36 +0000)]
Hook extra libs to _LIBS so bsd.lib.mk can do its thing

Differential Revision: D2843
Reviewed by: imp

9 years agoMake mention of make.conf being included earlier and what to do about it.
Simon J. Gerraty [Tue, 16 Jun 2015 23:32:28 +0000 (23:32 +0000)]
Make mention of make.conf being included earlier and what to do about it.

Reviewed by: NGie

9 years agoNormally a staging conflict causes an error.
Simon J. Gerraty [Tue, 16 Jun 2015 23:06:43 +0000 (23:06 +0000)]
Normally a staging conflict causes an error.
When bootstrapping different options, it is handy to be able to
make those warnings.

9 years agoBump the version since we now handle openat
Simon J. Gerraty [Tue, 16 Jun 2015 23:03:15 +0000 (23:03 +0000)]
Bump the version since we now handle openat

9 years agosyslogd: re-read the timezone when receive a SIGHUP.
Rui Paulo [Tue, 16 Jun 2015 22:42:19 +0000 (22:42 +0000)]
syslogd: re-read the timezone when receive a SIGHUP.

syslogd already re-reads the configuration file and the hostname when
receiving a SIGHUP, so it makes sense to reset the timezone.
Special care was taken to ensure we don't break installations running
with a custom TZ variable.

PR: 196905
Submitted by: Kurt Lidl <lidl pix.net>
Sponsored by: Pi-Coral, Inc.

9 years agosyslogd: don't leak finet0.
Rui Paulo [Tue, 16 Jun 2015 22:31:38 +0000 (22:31 +0000)]
syslogd: don't leak finet0.

Submitted by: Kurt Lidl <lidl pix.net>
Sponsored by: Pi-Coral, Inc.

9 years agosyslogd: support multiple -b options.
Rui Paulo [Tue, 16 Jun 2015 22:26:22 +0000 (22:26 +0000)]
syslogd: support multiple -b options.

It's now possible to bind multiple sockets to different IP addresses.

PR: 159305
Submitted by: Kurt Lidl <lidl pix.net>
Sponsored by: Pi-Coral, Inc.

9 years agoMove the universe done dependency on the worlds completing out of the
Andrew Turner [Tue, 16 Jun 2015 21:29:46 +0000 (21:29 +0000)]
Move the universe done dependency on the worlds completing out of the
loop, we only need to add it once.

Obtained from: ABT Systems Ltd

9 years agoIn bxe_init_mcast_macs_list(): mc_mac->mac needs to point to the multicast mac address
David C Somayajulu [Tue, 16 Jun 2015 21:11:32 +0000 (21:11 +0000)]
In bxe_init_mcast_macs_list(): mc_mac->mac needs to point to the multicast mac address
In bxe_set_mc_list(): added missing BXE_MCAST_UNLOCK()
In __ecore_vlan_mac_h_exec_pending(): need to check for ECORE_PENDING

Submitted by:gary.zambrano@qlogic.com

9 years agoRemove unneeded dependencies, these are now handled through the _done
Andrew Turner [Tue, 16 Jun 2015 21:11:31 +0000 (21:11 +0000)]
Remove unneeded dependencies, these are now handled through the _done
target.

Obtained from: ABT Systems Ltd

9 years agoRemove old fmake. It wasn't built by default for some time. Users that
Warner Losh [Tue, 16 Jun 2015 20:58:33 +0000 (20:58 +0000)]
Remove old fmake. It wasn't built by default for some time. Users that
really need it can find it in the devel/fmake port or pkg install fmake.
Note: This commit is orthogonal to the question 'can we fmake buildworld'.

Differential Revision: https://reviews.freebsd.org/D2840

9 years agoUse nitems() macro instead of __arraycount()
Pedro F. Giffuni [Tue, 16 Jun 2015 20:19:00 +0000 (20:19 +0000)]
Use nitems() macro instead of __arraycount()

9 years agoImport ACPICA 20150616.
Jung-uk Kim [Tue, 16 Jun 2015 19:48:16 +0000 (19:48 +0000)]
Import ACPICA 20150616.

9 years agoAdd a new target universe_${target}_done to print the completion message.
Andrew Turner [Tue, 16 Jun 2015 19:23:34 +0000 (19:23 +0000)]
Add a new target universe_${target}_done to print the completion message.
Without this we could print this message in the wrong place when building
with MAKE_JUST_WORLDS is set.

Obtained from: ABT Systems Ltd

9 years agoAdd a universe_${target}_worlds target to simplify the logic to find when
Andrew Turner [Tue, 16 Jun 2015 18:43:08 +0000 (18:43 +0000)]
Add a universe_${target}_worlds target to simplify the logic to find when
to start building kernels.

Obtained from: ABT Systems Ltd

9 years agoA more compatible fix to MK_META_MODE not being defined. Also, encase
Warner Losh [Tue, 16 Jun 2015 17:55:20 +0000 (17:55 +0000)]
A more compatible fix to MK_META_MODE not being defined. Also, encase
bmake specific constructs not needed for make bootstrap so fmake
doesn't see them. This works with fmake just well enough for us to
build bmake to build the rest of the tree without fatal errors. Tested
only with fmake package.

9 years agoAdd a comment to the end of the world and kernel cases in the universe
Andrew Turner [Tue, 16 Jun 2015 17:27:53 +0000 (17:27 +0000)]
Add a comment to the end of the world and kernel cases in the universe
target to help follow the make magic.

Obtained from: ABT Systems Ltd

9 years agoWrite to the PRRR (Primary Region Remap Register) rather than reading from
Andrew Turner [Tue, 16 Jun 2015 17:24:20 +0000 (17:24 +0000)]
Write to the PRRR (Primary Region Remap Register) rather than reading from
it during the early boot.

Found By: Patrick Wildt <patrick@bitrig.org>
Sponsored by: ABT Systems Ltd

9 years agoExport the ARM __aeabi_mem* functions from libc, they are needed by the gcc
Andrew Turner [Tue, 16 Jun 2015 16:40:25 +0000 (16:40 +0000)]
Export the ARM __aeabi_mem* functions from libc, they are needed by the gcc
from ports as it doesn't include these in the copy of libgcc it installs
uses.

Obtained from: ABT Systems Ltd

9 years agoFix miss from r284320.
Gleb Smirnoff [Tue, 16 Jun 2015 15:39:34 +0000 (15:39 +0000)]
Fix miss from r284320.

Coverity: 1018895

9 years agoTrying to unbreak arm.LINT by properly putting the conditional include
Bjoern A. Zeeb [Tue, 16 Jun 2015 15:14:40 +0000 (15:14 +0000)]
Trying to unbreak arm.LINT by properly putting the conditional include
for dtrace further down in the include list where it belongs.

Reviewed by: andrew

9 years agoMerge from NetBSD:
Marius Strobl [Tue, 16 Jun 2015 13:27:06 +0000 (13:27 +0000)]
Merge from NetBSD:
o rev. 1.10: Nuke trailing whitespace.
o rev. 1.15: Fix typo in comment.
o rev. 1.16: Add the following registers from IEEE 802.3-2009 Clause 22:
 - PSE control register (0x0b)
 - PSE status register (0x0c)
 - MMD access control register (0x0d)
 - MMD access address data register (0x0e)
o rev. 1.17 (comments only): The bit location of link ability is different
  between 1000Base-X and others (see Annex 28B.2 and 28D).
o rev. 1.18: Nuke dupe word.

Obtained from: NetBSD
MFC after: 1 week
Sponsored by: genua mbh

9 years agoReplace struct filedesc argument in getvnode with struct thread
Mateusz Guzik [Tue, 16 Jun 2015 13:09:18 +0000 (13:09 +0000)]
Replace struct filedesc argument in getvnode with struct thread

This is is a step towards removal of spurious arguments.

9 years agocxgbe(4): Add the ability to dump mailbox commands and replies. It is
Navdeep Parhar [Tue, 16 Jun 2015 12:36:29 +0000 (12:36 +0000)]
cxgbe(4): Add the ability to dump mailbox commands and replies.  It is
enabled/disabled via bit 0 of adapter->debug_flags (which is available
at dev.t5nex.<n>.debug_flags).

MFC after: 1 week

9 years agofd: make rights a mandatory argument to fget_unlocked
Mateusz Guzik [Tue, 16 Jun 2015 09:52:36 +0000 (09:52 +0000)]
fd: make rights a mandatory argument to fget_unlocked

9 years agofd: don't unnecessary copy capabilities in _fget
Mateusz Guzik [Tue, 16 Jun 2015 09:08:30 +0000 (09:08 +0000)]
fd: don't unnecessary copy capabilities in _fget

9 years agoThe fix for the issue described in the 20150614 sendmail entry has
Gregory Neil Shapiro [Tue, 16 Jun 2015 03:03:26 +0000 (03:03 +0000)]
The fix for the issue described in the 20150614 sendmail entry has
been been committed in revision 284436.

MFC after: 1 day

9 years agoThe import of openssl to address the FreeBSD-SA-15:10.openssl security
Gregory Neil Shapiro [Tue, 16 Jun 2015 02:58:50 +0000 (02:58 +0000)]
The import of openssl to address the FreeBSD-SA-15:10.openssl security
advisory includes a change which rejects handshakes with DH parameters
below 768 bits.  sendmail releases prior to 8.15.2 (not yet released),
defaulted to a 512 bit DH parameter setting for client connections.
This commit chages that default to 1024 bits.  sendmail 8.15.2, when
released well use a default of 2048 bits.

MFC after: 1 day

9 years agoDeshallify.
Sergey Kandaurov [Mon, 15 Jun 2015 23:30:54 +0000 (23:30 +0000)]
Deshallify.

9 years agoRemove extra blank lines
Simon J. Gerraty [Mon, 15 Jun 2015 22:04:29 +0000 (22:04 +0000)]
Remove extra blank lines