Commit Graph

195670 Commits

Author SHA1 Message Date
Dimitry Andric
e65720e1ac Merge ^/head r275759 through r275911. 2014-12-18 18:44:22 +00:00
Warner Losh
b9a2a3f1cf Don't deselect the card too soon. To set the block size or switch the
function parameters, the card has to be in transfer state. If it is in
the idle state, the commands are ignored. This caused us not to set
the proper parameters that we later assume to be present, leading to
downstream failures of the card / interface as our state machine
mismatches the card's.

Submitted by: Svatopluk Kraus <onwahe at gmail.com>, Michal Meloun
<meloun at miracle.cz>
2014-12-18 16:57:22 +00:00
Warner Losh
8bc65725c7 Remove -fno-strict-alias, as it is no longer needed. 2014-12-18 16:57:19 +00:00
Andrew Turner
7f5a9777e7 Add AArch64 64-bit relocation values. These will be needed by rtld when
we import it along with utilities in elftoolchain.

Differential Revision:	https://reviews.freebsd.org/D1330
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
2014-12-18 14:31:30 +00:00
Konstantin Belousov
6c21f6edb8 The VOP_LOOKUP() implementations for CREATE op do not put the name
into namecache, to avoid cache trashing when doing large operations.
E.g., tar archive extraction is not usually followed by access to many
of the files created.

Right now, each VOP_LOOKUP() implementation explicitely knowns about
this quirk and tests for both MAKEENTRY flag presence and op != CREATE
to make the call to cache_enter().  Centralize the handling of the
quirk into VFS, by deciding to cache only by MAKEENTRY flag in VOP.
VFS now sets NOCACHE flag for CREATE namei() calls.

Note that the change in semantic is backward-compatible and could be
merged to the stable branch, and is compatible with non-changed
third-party filesystems which correctly handle MAKEENTRY.

Suggested by:	Chris Torek <torek@pi-coral.com>
Reviewed by:	mckusick
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2014-12-18 10:01:12 +00:00
Adrian Chadd
9c75c3d4ba Fix the scan handling for 11b->11g upgrades in a world where, well,
it's not just 11b/11g.

The following was happening, and it's quite .. annoyingly grr-y.

* create vap, setup wpa_supplicant with no bgscanning, etc - there's
  no call to ieee80211_media_change, so vap->iv_des_mode is
  IEEE80211_MODE_AUTO;
* do ifconfig wlan0 scan - same thing, media_change doesn't get called,
  iv_des_mode stays as auto.
* But then, run wpa_cli and do 'scan' - it'll do a media change.
* if you're on 11ng, vap->iv_des_mode gets changed to IEEE80211_MODE_11NG
* Then makescanlist() is called.  There's a block of code that gets
  called if iv_des_mode != IEEE80211_MODE_AUTO, and it does this:

		if (vap->iv_des_mode != IEEE80211_MODE_11G ||
			    mode != IEEE80211_MODE_11B)
			continue;
		mode = IEEE80211_MODE_11G;	/* upgrade */

* .. now, iv_des_mode is not IEEE80211_MODE_11G, so it always runs
  'continue'
* .. and thus the scan list stays empty and no further channel
  scans occur. Ever.(1)

If you then disassociate and try associating to something, your
scan table has likely been purged / aged out and you'll never
see anything in the scan list.

(1) You need to do 'ifconfig wlan0 mode auto' or just destroy/re-create
    the VAP to get working wireless again.

Tested:

* iwn(4) - intel 5300 wifi; STA mode; using wpa_supplicant; bgscan
  enabled -and- wpa_supplicant scanning.

Thanks to:

* Everyone who kept poking me about this and wondering why the hell
  their wifi would eventually stop seeing scan lists.  Grr.
  I eventually snapped this evening and dug back into this code.
2014-12-18 05:17:18 +00:00
Devin Teske
4ff1fc3b17 In bsdinstall's distextract, replace mixed_gauge() of dialog(3) with
new dpv(3) wrapper to dialog(3) dialog_gauge(). The dpv(3) library provides
a more flexible and refined interface similar to dialog_mixedgauge() however
is implemented atop the more generalized dialog_gauge() for portability.
Noticeable improvements in bsdinstall's distextract will be a status line
showing data rate information (with support for localeconv(3) to format
numbers according to $LANG or $LC_ALL conversion information), i18n support,
improved auto-sizing of gauge widget, a ``wheel barrow'' to keep the user
informed that things are moving (even if status/progress has not changed),
improved color support (mini-progress bars use the same color, if enabled,
as the main gauge bar), and several other improvements (some not visible).
dpv stands for "dialog progress view" (dpv was introduced in SVN r274116).

Differential Revision:	https://reviews.freebsd.org/D714
Discussed on:	-current
Reviewed by:	julian
MFC after:	3 days
X-MFC-to:	stable/10
Relnotes:	Improved installer feedback from bsdinstall distextract
2014-12-18 03:51:09 +00:00
Justin Hibbits
e5701220a8 Make gas parse '__tls_get_addr(foo@tlsgd)'.
Corresponds to 727fc41e077139570ea8b8ddfd6c546b2a55627c.

This allows us to use -no-integrated-as with clang, if we prefer.

Obtained from:	binutils-gdb (Relicensed from Alan Modra as GPLv2)
MFC after:	2 weeks
X-MFC-with:	r275718
2014-12-18 03:12:46 +00:00
Adrian Chadd
d13ccc6ac2 Update the use of bus space macros to be more correct.
This was a problem on i386 PAE builds.
2014-12-17 21:27:27 +00:00
Adrian Chadd
e03905177a Use the correct macro for listing the maximum bus space size.
Without this, it fails to compile on i386 PAE builds.
2014-12-17 21:26:25 +00:00
Michael Tuexen
142a4d9e86 Add a missing break.
Reported by:	Coverity
CID:		1232014
MFC after: 	3 days
2014-12-17 20:34:38 +00:00
Michael Tuexen
caeae63f97 Plug a memory leak in an error code path.
Reported by:	Coverity
CID:		1018936
MFC after: 	3 days
2014-12-17 20:19:57 +00:00
Enji Cooper
f9d93ea775 Fix sporadic build failures due to race when running make installworld
when strip gets replaced at install time by adding it to ITOOLS for the
default usr.bin/xinstall STRIP_CMD

This will fix the failure noted in this Jenkins build step:
https://jenkins.freebsd.org/job/Build-UFS-image/688/

This will also fix the issue reported by alfred@ dealing with installing on
targets that differ from build hosts (e.g. installing on i386/i386 when built
on amd64/amd64)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2014-12-17 20:02:07 +00:00
Enji Cooper
e92bda2e4b Parallelize building gnu/usr.bin/groff
This speeds up building the directory from the bootstrap-tools stage in
buildworld as well as building from the subdirectory

Based on a patch submitted via -arch:
https://lists.freebsd.org/pipermail/freebsd-arch/2014-December/016493.html

MFC after: 1 week
Submitted by: Jia-Shiun Li <jiashiun@gmail.com>
Sponsored by: EMC / Isilon Storage Division
2014-12-17 19:46:12 +00:00
Alexander Motin
34961f407d Add configuration options to override physical and UNMAP blocks geometry.
While in most cases CTL should correctly fetch those values from backing
storages, there are some initiators (like MS SQL), that may not like large
physical block sizes, even if they are true.  For such cases allow override
fetched values with supported ones (like 4K).

MFC after:	1 week
2014-12-17 17:30:54 +00:00
Alexander Motin
2124e3b07f Make sequence numbers checks more strict.
While we don't support MCS, hole in received sequence numbers may mean
only PDU loss.  While we don't support lost PDU recovery, terminate the
connection to avoid stuck commands.

While there, improve handling of sequence numbers wrap after 2^32 PDUs.

MFC after:	2 weeks
2014-12-17 15:13:21 +00:00
Ed Maste
a356a1f51f Do not strip all when stripping an explicit symbol
When requested to strip specific symbols (-N flag) the default should be
to strip nothing (other than the requested symbols). This is consistent
with binutils strip(1).

PR:		196038
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1327
2014-12-17 14:46:21 +00:00
Ruslan Bukin
49506d6809 Add configuration files for BERI soft-core synthesized on
Terasic SoCKit board (Altera FPGA).

Use virtio block as root filesystem device.

Sponsored by:	DARPA, AFRL
2014-12-17 11:36:31 +00:00
Ruslan Bukin
628920c43b Move memory node to the root, so fdt_get_mem_regions() can find it. 2014-12-17 11:05:44 +00:00
Ruslan Bukin
28dcb50c72 o Add PIO[2,3] devices information
o Enable Virtio Block
2014-12-17 10:48:53 +00:00
Ruslan Bukin
e2d5f675a0 Use memory regions information provided in FDT.
Reviewed by:	brooks
Sponsored by:	DARPA, AFRL
2014-12-17 09:34:54 +00:00
Michael Tuexen
2b8a4d8033 Initilize the msg_flags field consistently in all code paths.
Reported by:	Coverity
CID:		1018726
2014-12-17 07:47:25 +00:00
Gleb Kurtsou
dde58752db Adjust printf format specifiers for dev_t and ino_t in kernel.
ino_t and dev_t are about to become uint64_t.

Reviewed by:	kib, mckusick
2014-12-17 07:27:19 +00:00
Gleb Kurtsou
9b33705411 Adjust printf format specifiers for dev_t and ino_t in user space.
ino_t and dev_t are about to become uint64_t.

Reviewed by:	kib, mckusick
2014-12-17 07:10:48 +00:00
Xin LI
52df462f7f MFV r275844:
Fix unbound remote denial of service vulnerability.

Security:	FreeBSD-SA-14:30.unbound
Security:	CVE-2014-8602
2014-12-17 06:55:44 +00:00
Bryan Venteicher
c6e32006e1 Prefix all the vxlan ifconfig commands so they are unique
And rehook ifvxlan back into the build.
2014-12-17 05:36:34 +00:00
Neel Natu
e64c5af3f8 Fix 8259 IRQ priority resolver.
Initialize the 8259 such that IRQ7 is the lowest priority.

Reviewed by:		tychon
Differential Revision:	https://reviews.freebsd.org/D1322
MFC after:		1 week
2014-12-17 03:04:43 +00:00
Bryan Drewery
4bb90cbe18 Bump Dd for r275846
MFC after:	3 weeks
2014-12-17 01:36:00 +00:00
Kirk McKusick
27ae6f4af7 Add some additional clarification and fix a few gammer nits.
Reviewed by: kib
MFC after:   3 weeks
2014-12-17 01:32:27 +00:00
Will Andrews
9ad184a98c Initialize an argument to NULL instead of expecting dlinfo() to do it.
dlinfo() is a weak reference that may not be initialized at the time of
execution. The default implementation (in lib/libc/gen/dlfcn.c) neither
modifies the address pointed to by the third argument nor returns an error.

Differential Revision:	https://reviews.freebsd.org/D1326
Reviewed by:		markj
MFC after:		1 week
2014-12-17 00:22:41 +00:00
Xin LI
c40c0dcc50 Bring in unbound fixes for CVE-2014-8602 to ease future code import. 2014-12-16 23:25:12 +00:00
Alexander Motin
cb7430346d Do not count RCTD bit set as an error.
We can not really implement it, but specification tells that it "shall"
work, so it can be safely ignored.

MFC after:	1 week
2014-12-16 21:51:21 +00:00
Brooks Davis
5f25ee9cef Add an UPDATING entry and warning about the change in r274807 to help users
transition to the new behavior.

Discussed with:	jmallett
Sponsored by:	DARPA, AFRL
2014-12-16 20:45:17 +00:00
Pedro F. Giffuni
a34b42e43c sed: Bounds check the file path used in the 'w' command.
Modified version of a diff from Sebastien Marie to prevent a crash found
with the afl fuzzer.

Obtained from:	OpenBSD (CVS Rev. 1.37)
MFC after:	1 week
2014-12-16 20:26:11 +00:00
Konstantin Belousov
2d45c2d52d The iret instruction may generate #np and #ss fault, besides #gp.
When returning to usermode, the handler for that exceptions is also
executed with wrong gs base.  Handle all three possible faults in the
same way, checking for iret fault, and performing full iret.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2014-12-16 18:28:33 +00:00
Will Andrews
6b8c8dee3c Make NanoBSD source-able from other scripts.
Summary:
This change converts NanoBSD into a two-script bundle.
- defaults.sh contains all non-CLI code.  Most NanoBSD code is moved into
  this file.
- nanobsd.sh now consists just of a command line interface that calls into
  functions in defaults.sh.

Test Plan: Run NanoBSD using a previously-working configuration.

Reviewers: imp

Reviewed By: imp

Differential Revision: https://reviews.freebsd.org/D1321
2014-12-16 17:59:05 +00:00
Ed Maste
2c23cb7c27 Copy elftoolchain readelf from vendor branch 2014-12-16 16:23:54 +00:00
Andrey V. Elsukov
8150c3ec36 Add ability to not specify a zone identifier twice, when both source and
destination addresses are specified.
For example:
	# ping6 -S fe80::1%ix0 ff02::1
or
	# ping6 -S fe80::1 fe80::2%ix0

Obtained from:	Yandex LLC
Sponsored by:	Yandex LLC
2014-12-16 14:59:20 +00:00
Brad Davis
d03f0c5199 Add tests for pw -N
PR:		150449
Submitted by:	Robert O'Neil <oneil.rs@gmail.com>
Approved by:	will
2014-12-16 14:50:33 +00:00
Konstantin Belousov
5b73811feb Add missed break.
CID:	1258587
Sponsored by:	The FreeBSD Foundation
MFC after:	20 days
2014-12-16 09:49:07 +00:00
Konstantin Belousov
917dd39084 Add missed break.
CID:	1258586
Sponsored by:	The FreeBSD Foundation
MFC after:	4 days
2014-12-16 09:48:23 +00:00
Ed Schouten
2cec876a59 Rename cpack*() to CMPLX*().
The C11 standard introduced a set of macros (CMPLX, CMPLXF, CMPLXL) that
can be used to construct complex numbers from a pair of real and
imaginary numbers. Unfortunately, they require some compiler support,
which is why we only define them for Clang and GCC>=4.7.

The cpack() function in libm performs the same task as CMPLX(), but
cannot be used to generate compile-time constants. This means that all
invocations of cpack() can safely be replaced by C11's CMPLX(). To keep
the code building with GCC 4.2, provide copies of CMPLX() that can at
least be used to generate run-time complex numbers.

This makes it easier to build some of the functions outside of libm.
2014-12-16 09:21:56 +00:00
Gleb Kurtsou
c7d73a4d23 sbin/shutdown: Support time units as in 'shutdown -r +5sec'
Units supported: s, sec, m, min, h, hour.

Differential Revision:	https://reviews.freebsd.org/D1272
2014-12-16 08:29:02 +00:00
Neel Natu
09eced2549 For level triggered interrupts clear the PIC IRR bit when the interrupt pin
is deasserted. Prior to this change each assertion on a level triggered irq
pin resulted in two interrupts being delivered to the CPU.

Differential Revision:	https://reviews.freebsd.org/D1310
Reviewed by:	tychon
MFC after:	1 week
2014-12-16 06:33:57 +00:00
Pyun YongHyeon
e01343ccd7 Fix a bug introdiced in r217548. According to NS DP83815 data
sheet, RX filter should be disabled before programming.
Previously it was clearing wrong bits so RX filter was not
disabled in RX filter configuration.

Reported by:	brad@OpenBSD.org
2014-12-16 06:13:30 +00:00
Ed Maste
55629a87ab Use standard BSD license disclaimer text
Approved by:	benno, nwhitehorn
2014-12-15 22:20:14 +00:00
Dmitry Chagin
9972df7d13 Properly sort Xr to silence mandoc warnings.
Differential Revision:	https://reviews.freebsd.org/D1314
Reviewed by:	wblock
MFC after:	1 Month
2014-12-15 20:48:06 +00:00
Xin LI
51515b6d7c MFV r275784:
Plug a memory leak in libzfs.  In zfs_iter_bookmarks, an nvlist is allocated
before calling lzc_get_bookmarks, which allocates the nvlist again (and
overwrites the pointer to previously allocated list).

Illumos issue:
    5427 memory leak in libzfs when doing rollback

MFC after:	2 weeks
2014-12-15 18:28:22 +00:00
Xin LI
a771fba68c MFV r275783:
Convert ARC flags to use enum.  Previously, public flags are defined in
arc.h and private flags are defined in arc.c which can lead to confusion
and programming errors.

Consistently use 'hdr' (when referencing arc_buf_hdr_t) instead of 'buf'
or 'ab' because arc_buf_t are often named 'buf' as well.

Illumos issue:
    5369 arc flags should be an enum
    5370 consistent arc_buf_hdr_t naming scheme

MFC after:	2 weeks
2014-12-15 18:22:45 +00:00
Ed Maste
30568ad37e Correct elftoolchain strip(1) memory size calculation
Calculate the segment's memory size (p_memsz) using the virtual
addresses, not the file offsets. Otherwise padding preceeding SHT_NOBITS
sections may be excluded from the calculation, resulting in a segment
that is too small.

PR:		195653
Sponsored by:	The FreeBSD Foundation
2014-12-15 18:18:57 +00:00