Commit Graph

196291 Commits

Author SHA1 Message Date
Jeremie Le Hen
98648ee85e Add a regression test for PR 192108.
I won't go through the hassle of MFCing it since I expect all changes to go
first through HEAD anyway.

PR:		192108
2015-01-10 10:16:22 +00:00
Andrey V. Elsukov
9c0265c6fd Restore Ethernet-within-IP Encapsulation support that was broken after
r273087. Move all checks from gif_output() into gif_transmit(). Previously
they were checked always, because if_start always called gif_output.
Now gif_transmit() can be called directly from if_bridge() code and we need
do checks here.

PR:		196646
MFC after:	1 week
2015-01-10 08:28:50 +00:00
Dmitry Chagin
47ce3e5326 Allow clock_getcpuclockid() on the CPU-time clock for zombie process.
Posix does not prohibit this.

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

Reviewed by:	kib
MFC after:	1 week
2015-01-10 07:22:38 +00:00
Justin Hibbits
615df4c159 Increase default MAXTSIZ to allow execution of larger binaries.
This allows executing static clang built with -O0.

The value is configurable by a sysctl, so if one needs to clamp it down, they
still can.

Discussed with:	nwhitehorn,emaste
2015-01-10 06:54:10 +00:00
Xin LI
6e19f0def0 Improve style and fix a possible use-after-free case introduced in r268384
by reinitializing the 'freestate' pointer after freeing the memory.

Obtained from:	HardenedBSD (71fab80c5dd3034b71a29a61064625018671bbeb)
PR:		194525
Submitted by:	Oliver Pinter <oliver.pinter@hardenedbsd.org>
MFC after:	2 weeks
2015-01-10 06:48:35 +00:00
Andrey V. Elsukov
3a9f9af803 Use if_name() macro instead of ifp->if_xname.
MFH:		1 week
2015-01-10 03:29:17 +00:00
Andrey V. Elsukov
84d03ddad3 Fix an error introduced in r274246.
Pass mtag argument into m_tag_locate() to continue the search from
the last found mtag.

X-MFC after:	r274246
2015-01-10 03:26:46 +00:00
Andrey V. Elsukov
c26230adee Move the recursion detection code into separate function gif_check_nesting().
Also make MTAG_GIF definition private to if_gif.c.

MFC after:	1 week
2015-01-10 03:13:16 +00:00
Baptiste Daroussin
8606363bf9 Install the liblzma pkg-config file
MFC after:	1 week
2015-01-10 00:11:10 +00:00
Baptiste Daroussin
9db922924c Import the lzma pc file 2015-01-10 00:07:34 +00:00
Alexander V. Chernikov
ecf09f8321 Fix typo.
Submitted by:	Olivér Pintér
2015-01-09 20:29:13 +00:00
Andrew Turner
d6a052e0e6 With the update of compiler-rt we try to build a number of files that
don't build on some ARM platforms, provide symbols we already provide in
libc, or don't exist. Remove these from the build. Some of these may
return later on specific targets.

Differential Revision:	https://reviews.freebsd.org/D1468
Reviewed by:	dim, imp
2015-01-09 20:00:37 +00:00
Ed Maste
ce0d1a765e Add MBR EFI partition type definition
Sponsored by:	The FreeBSD Foundation
2015-01-09 19:37:12 +00:00
Ed Maste
8fb02d8847 mkimg: Add MBR EFI partition type
Sponsored by:	The FreeBSD Foundation
2015-01-09 19:34:48 +00:00
Hans Petter Selasky
27aae1967d Add support for USB device side mode to the USB modem driver.
MFC after:	1 week
Submitted by:	br@
2015-01-09 18:40:12 +00:00
Xin LI
d9183a83a2 var/named/etc/namedb/working should be removed as part of namedb.
MFC after:	2 weeks
2015-01-09 18:09:45 +00:00
Xin LI
6552289895 Fixup r276668, /usr/tests/sbin/ifconfig/ shouldn't be removed. 2015-01-09 18:07:08 +00:00
Xin LI
9b8d0f86d4 Properly remove ieee488, gpib and readline from mtree. 2015-01-09 18:05:50 +00:00
Robert Watson
3360ac422e Uninline M_SIZE() in m_align() to reduce direct use of MLEN and MHLEN.
Differential Revision:	https://reviews.freebsd.org/D1471
Reviewed by:	glebius, bz, rpaulo
Sponsored by:	EMC / Isilon Storage Division
2015-01-09 15:21:53 +00:00
Ed Maste
10c9700f3e ANSIfy sys/fs/msdosfs
There are a number of msdosfs improvements in NetBSD that may be worth
bringing over, and this reduces noise in the comparison.

Differential Revision:	https://reviews.freebsd.org/D1466
Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
2015-01-09 14:50:08 +00:00
Alexander V. Chernikov
d63e657c04 * Deal with ARCNET L2 multicast mapping for IPv6 the same way as in IPv4:
handle it in arc_output() instead of nd6_storelladdr().
* Remove IFT_ARCNET check from arpresolve() since arc_output() does not
  use arpresolve() to handle broadcast/multicast. This check was there
  since r84931. It looks like it was not used since r89099 (initial
  import of Arcnet support where multicast is handled separately).
* Remove IFT_IEEE1394 case from nd6_storelladdr() since firewire_output()
  calles nd6_storelladdr() for unicast addresses only.
* Remove IFT_ARCNET case from nd6_storelladdr() since arc_output() now
  handles multicast by itself.

As a result, we have the following pattern: all non-ethernet-style
media have their own multicast map handling inside their appropriate
routines. On the other hand, arpresolve() (and nd6_storelladdr()) which
meant to be 'generic' ones de-facto handles ethernet-only multicast maps.

MFC after:	3 weeks
2015-01-09 12:56:51 +00:00
Gleb Smirnoff
40c1416a62 Use nitems(). 2015-01-09 12:26:08 +00:00
Robert Watson
3df42f654e Remove a 'This is dumb' comment that has been incorrect for at least a
decade: m_pulldown() is willing to consider ordinary mbufs writable.
Retain another, related, and also outdated comment, but with a caveat
that it is partially stale.  Do not, for now, address the problem that
it raises (that only EXT_CLUSTER external storage is considered
writable, regardless of the results of M_WRITABLE() on the mbuf).

MFC after:	3 days
Sponsored by:	EMC / Isilon Storage Division
2015-01-09 12:08:51 +00:00
Edward Tomasz Napierala
1e9685eeaa Improve documentation for autofs variables and executable maps;
also some markup fixes.

Differential Revision:	https://reviews.freebsd.org/D1447
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-01-09 10:59:49 +00:00
Baptiste Daroussin
7c5c8a589b Remove junk added during testing phase 2015-01-09 07:48:22 +00:00
Baptiste Daroussin
c1a66a97f9 Synchronize libedit with NetBSD and activate UTF-8 support [1]
Differences with NetBSD
Reapply our local patches on top of it
Fix Unicode environement detection
Fix reading a line in unicode environment.
It allows /bin/sh to works in UTF-8 envs

Differential Revision:	https://reviews.freebsd.org/D1455
Reviewed by:	jilles, pfg
Obtained from:	NetBSD [1]
MFC after:	1 month
Relnotes:	yes
2015-01-09 07:40:56 +00:00
Hans Petter Selasky
ec680ff8a8 Don't mask the IP-address when doing multicast IP over infiniband.
PR:		196631
MFC after:	3 days
Sponsored by:	Mellanox Technologies
2015-01-09 06:39:07 +00:00
Konstantin Belousov
b29d186cb9 Fix DMAR context allocations for the devices behind PCIe->PCI bridges
after dmar driver was converted to use rids.  The bus component to
calculate context page must be taken from the requestor rid, which is
a bridge, and not from the device bus number.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-01-09 02:10:44 +00:00
Ed Maste
2d4f9ccd88 Remove extraneous period
Reported by:	rodrigc
2015-01-09 01:57:11 +00:00
Jung-uk Kim
de496999fe MFV: r276862
Fix build.
2015-01-09 00:42:10 +00:00
Jung-uk Kim
973cfcbfe1 Fix build failure on Windows due to undefined cflags identifier.
5c5e7e1a7e
2015-01-09 00:12:20 +00:00
Jung-uk Kim
751d29910b Merge OpenSSL 1.0.1k. 2015-01-08 23:42:41 +00:00
Dimitry Andric
91d03e2e18 Now compiler-rt has been updated in r276851, bring in the various
sanitizer libraries that already work on FreeBSD:

* asan:    Address Sanitizer
* ubsan:   Undefined Behavior Sanitizer
* profile: Profile Guided Optimization support

Please note that these libraries are *experimental* at this stage, so
the main Makefile is not yet connected to the build.

Since I didn't want to needlessly edit BSD.usr.dist, you will also have
to create the install directory /usr/lib/clang/3.5.0/lib/freebsd
manually for now.
2015-01-08 22:40:56 +00:00
Jung-uk Kim
c6485458b3 Import OpenSSL 1.0.1k. 2015-01-08 22:40:39 +00:00
John Baldwin
7a635f0d70 Change the default method for device_quiesce() to return 0 instead of
EOPNOTSUPP.  The current behavior can mask real quiesce errors since
devclass_quiesce_driver() stops iterating over drivers as soon as it
gets an error (incluiding EOPNOTSUPP), but the caller it returns the
error to explicitly ignores EOPNOTSUPP.

Reviewed by:	imp
2015-01-08 21:46:28 +00:00
Dimitry Andric
18ecc14c78 Apparently more Makefiles use stuff from compiler-rt, so fix them up
too.  (This did not show during a make universe, strangely.)
2015-01-08 20:11:38 +00:00
Dimitry Andric
28f42739a5 Follow up to r276851 by also committing a necessary update to
lib/libblocksruntime.

Pointy hat to:	dim
2015-01-08 20:08:00 +00:00
Dimitry Andric
f4341a5a66 Update compiler-rt to trunk r224034. This brings a number of new
builtins, and also the various sanitizers.  Support for these will be
added in a later commit.
2015-01-08 19:47:10 +00:00
John Baldwin
bbf686ed60 Reject attempts to read the cpuset mask of a negative domain ID. 2015-01-08 19:11:14 +00:00
John Baldwin
e275993995 Document CPU_WHICH_DOMAIN and bump Dd for cpuset.1.
Missed in:	r276829
2015-01-08 18:53:11 +00:00
Mark Johnston
db3cb3640f Revert r274569. It seems to be causing a crash when merging CTF data for
recent i386 GENERIC kernels.

Reported by:	David Wolfskill
2015-01-08 18:45:16 +00:00
Alexander V. Chernikov
abc1be9062 Add forgotten definition for nd6_output_ifp(). 2015-01-08 18:29:54 +00:00
Warner Losh
c4765af73f Add infrastructure to build dtb files from dts files. 2015-01-08 18:28:06 +00:00
Alexander V. Chernikov
d7968c29ec * Use newly-created nd6_grab_holdchain() function to retrieve lle
hold mbuf chain instead of calling full-blown nd6_output_lle()
  for each packet. This simplifies both callers and nd6_output_lle()
  implementation.
* Make nd6_output_lle() static and remove now-unused lle and chain
  arguments.
* Rename nd6_output_flush() -> nd6_flush_holdchain() to be consistent.
* Move all pre-send transmit hooks to newly-created nd6_output_ifp().
  Now nd6_output(), nd6_output_lle() and nd6_flush_holdchain() are using
  it to send mbufs to if_output.
* Remove SeND hook from nd6_na_input() because it was implemented
  incorrectly since the beginning (r211501):
  - it tagged initial input mbuf (m) instead of m_hold
  - tagging _all_ mbufs in holdchain seems to be wrong anyway.
2015-01-08 18:02:05 +00:00
Warner Losh
76e1ce6f68 We don't want tests on these embedded boxes. 2015-01-08 18:00:38 +00:00
Kenneth D. Merry
5704e6f06c Close a race in the isp(4) driver that caused devices to disappear
and not automatically come back if they were gone for a short
period of time.

The isp(4) driver has a 30 second gone device timer that gets
activated whenever a device goes away.  If the device comes back
before the timer expires, we don't send a notification to CAM that
it has gone away.  If, however, there is a command sent to the
device while it is gone and before it comes back, the isp(4) driver
sends the command back with CAM_SEL_TIMEOUT status.

CAM responds to the CAM_SEL_TIMEOUT status by removing the device.
In the case where a device comes back within the 30 second gone
device timer window, though, we weren't telling CAM the device
came back.

So, fix this by tracking whether we have told CAM the device is
gone, and if we have, send a rescan if it comes back within the 30
second window.

ispvar.h:
	In the fcportdb_t structure, add a new bitfield,
	reported_gone.  This gets set whenever we return a command
	with CAM_SEL_TIMEOUT status on a Fibre Channel device.

isp_freebsd.c:
	In isp_done(), if we're sending CAM_SEL_TIMEOUT for for a
	command sent to a FC device, set the reported_gone bit.

	In isp_async(), in the ISPASYNC_DEV_STAYED case, rescan the
	device in question if it is mapped to a target ID and has
	been reported gone.

	In isp_make_here(), take a port database entry argument,
	and clear the reported_gone bit when we send a rescan to
	CAM.

	In isp_make_gone(), take a port database entry as an
	argument, and set the reported_gone bit when we send an
	async event telling CAM consumers that the device is gone.

Sponsored by:	Spectra Logic
MFC after:	1 week
2015-01-08 17:51:12 +00:00
Craig Rodrigues
7259906eb0 Do not initialize pfi_unlnkdkifs_mtx and pf_frag_mtx.
They are already initialized by MTX_SYSINIT.

Submitted by: Nikos Vassiliadis <nvass@gmx.com>
2015-01-08 17:49:07 +00:00
Warner Losh
6d2950a898 Need to include opt_cpu.h to access CPU_DISABLE_SSE option. Thankfully, this
only broke i686 configs that disabled SSE.

Submitted by: nyan@
2015-01-08 17:46:42 +00:00
Kenneth D. Merry
fb4a43562a Fix Fibre Channel Command Reference Number handling in the isp(4) driver.
The Command Reference Number is used for precise delivery of
commands, and is part of the FC-Tape functionality set.  (This is
only enabled for devices that support precise delivery of commands.)
It is an 8-bit unsigned number that increments from 1 to 255.  The
commands sent by the initiator must be processed by the target in
CRN order if the CRN is non-zero.

There are certain scenarios where the Command Reference Number
sequence needs to be reset.  When the target is power cycled, for
instance, the initiator needs to reset the CRN to 1.  The initiator
will know this because it will see a LIP (when directly connected)
or get a logout/login event (when connected to a switch).

The isp(4) driver was not resetting the CRN when a target
went away and came back.  When it saw the target again after a
power cycle, it would continue the CRN sequence where it left off.
The target would ignore the command because the CRN sequence is
supposed to be reset to 1 after a power cycle or other similar
event.

The symptom that the user would see is that there would be lots of
aborted INQUIRY commands after a tape library was power cycled, and
the library would fail to probe.  The INQUIRY commands were being
ignored by the tape drive due to the CRN issue mentioned above.

isp_freebsd.c:
	Add a new function, isp_fcp_reset_crn().  This will reset
	all of the CRNs for a given port, or the CRNs for all LUNs
	on a target.

	Reset the CRNs for all targets on a port when we get a LIP,
	loop reset, or loop down event.

	Reset the CRN for a particular target when it arrives, is changed
	or departs.  This is less precise behavior than the
	clearing behavior specified in the FCP-4 spec (which says
	that it should be reset for PRLI, PRLO, PLOGI and LOGO),
	but this is the level of information we have here.  If this
	is insufficient, then we will need to add more precise
	notification from the lower level isp(4) code.

isp_freebsd.h:
	Add a prototype for isp_fcp_reset_crn().

Sponsored by:	Spectra Logic
MFC after:	1 week
2015-01-08 17:41:28 +00:00
Pedro F. Giffuni
bfffbac603 Partial revert of r276832:
Do not bump the warns level as it still breaks the gcc build on sparc64

Reported by:	jenkins
2015-01-08 17:23:59 +00:00