195088 Commits

Author SHA1 Message Date
jhb
98708b1b49 MFC 259635:
Add an option to ignore accesses by the guest to unimplemented MSRs.

Also, ignore a couple of SandyBridge uncore PMC MSRs that Centos 6.4 writes
to during boot.
2014-04-08 20:40:54 +00:00
delphij
7ec723c6ae Fix NFS deadlock vulnerability. [SA-14:05]
Fix "Heartbleed" vulnerability and ECDSA Cache Side-channel
Attack in OpenSSL. [SA-14:06]
2014-04-08 18:27:39 +00:00
gjb
6f50d7f091 MFC r264027, r264028, r264029, r264030, r264046, r264073:
r264027:
  Add a new release build variable, WITH_COMPRESSED_IMAGES.

  When set to a non-empty value, the installation medium is
  compressed as part of the 'install' target in the release/
  directory.

r264028:
  Clean up trailing whitespace in release/Makefile.

r264029:
  Fix logic error.

r264030:
  If WITH_COMPRESSED_IMAGES is set, add the compressed images
  to the CLEANFILES list.

r264046:
  Use xz(1) instead of gzip(1) to compress release images
  when WITH_COMPRESSED_IMAGES is used.

r264073:
  Allow overriding xz(1) path.

Sponsored by:	The FreeBSD Foundation
2014-04-08 00:53:31 +00:00
ae
d32682111b MFC r263969,263971:
Don't generate an ICMPv6 error message if packet was consumed by filter.
  Remove unused label.

Sponsored by:	Yandex LLC
2014-04-07 12:58:54 +00:00
ae
92efc4b623 MFC r263966:
Don't copy the MF flag from original IP header to ICMP error message.

PR:		188092
Sponsored by:	Yandex LLC
2014-04-07 12:50:08 +00:00
pfg
f0fa402e84 MFC r264121;
gcc: define __block when block support is enabled

This mimics the behaviour in clang and lets us build cleanly
the libdispatch port on platforms where the base gcc is still
the default compiler.

Bump __FreeBSD_version for ports.

Tested by:	theraven
2014-04-07 01:55:54 +00:00
pfg
0a0ec7aed4 MFC r263973;
ddb: Minor style cleanups.

#define should be followed by tab.
2014-04-07 01:49:30 +00:00
jilles
68268e8fb3 login: Clean up PAM and audit, then exit, on SIGHUP and SIGTERM.
This avoids leaving stale entries in utmpx after the connection is closed on
an open login session. It also allows a clean way (SIGTERM) to forcibly
terminate a user's terminal session.

This does not affect the situation for "hung" processes after the connection
is closed. The foreground process group receives SIGHUP and the tty becomes
inaccessible.

Also replace all use of the obsolete signal() function with sigaction() (not
only the part where it is actually required: SIGHUP and SIGTERM must mask
the other as well when caught).

PR:		misc/183495
2014-04-06 10:56:27 +00:00
jilles
a3f8ed8103 MFC r262872: fts: Don't abort if an empty pathname is given.
Make fts_open(3) treat an empty pathname like any other pathname that cannot
be lstatted because of [ENOENT].

It is rather confusing if  rm -rf file1 "" file2  does not remove file1 and
file2.

PR:		bin/187264
2014-04-05 20:26:17 +00:00
jilles
15366d2a0d MFC r258794: chmod(2): Document S_ISVTX following SUSv3/SUSv4.
S_ISTXT is non-standard.

While here, also update fchmodat() standards entry to POSIX.1-2008.
2014-04-05 20:11:40 +00:00
jilles
738573dde6 waitid(2): Do not tell userland programmers to include <sys/signal.h>.
Userland should get these definitions by including <signal.h>.
2014-04-05 20:09:51 +00:00
jilles
af95ef01bb MFC r263244: find: When performing -quit, finish pending -exec ... + command
lines.

This avoids unexpected partial processing when a find command uses both
-quit and -exec ... +.

GNU find does the same.
2014-04-05 20:05:50 +00:00
jilles
b37f0c842b MFC r263195: sh: Add some consts. 2014-04-05 20:01:08 +00:00
jilles
76e2b229a4 MFC r262755: sh: Make argstr() return where it stopped and simplify expari()
using this.
2014-04-05 19:43:47 +00:00
kib
660fbf80db MFC r263912:
Clear the kernel grab of the FPU state on fork.
2014-04-05 14:24:29 +00:00
gjb
0e5fcf594c Document a potential panic or hang when using sas2flash to
update firmware on mps(4) LSI controllers.

Submitted by:	smh
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2014-04-04 21:35:17 +00:00
kib
5e4b8bc0fd MFC r263878:
Several fixes for the PCID implementation.
2014-04-04 19:17:33 +00:00
royger
382b727d12 MFC r263001
Move asm IPIs handlers to C code, so both Xen and native IPI handlers
share the same code.

Approved by: gibbs
Sponsored by: Citrix Systems R&D
2014-04-04 14:54:54 +00:00
emaste
d7785b5ded MFC r261521 by antoine: Add files to remove WITHOUT_NIS
PR:		misc/186412
Sponsored by:	The FreeBSD Foundation
2014-04-04 14:18:37 +00:00
ray
6c8c52eb6b MFC r263885
o Add new vd_driver method to do bitblt with mask, named vd_maskbitbltchr.
o Move vd_bitbltchr vga's driver method to vd_maskbitbltchr.
o Implement new vd_bitbltchr method for vga driver. (It do single write for 8
	pixels, have to be a bit faster).

Sponsored by:	The FreeBSD Foundation
2014-04-04 11:17:49 +00:00
glebius
be0e4274f5 Merge r262341:
- Improve logging of send errors, reporting error code and interface.
  - Reduce code duplication between INET and INET6.
2014-04-04 10:33:59 +00:00
gjb
d9741dcfe6 MFC r264107:
Remove only-works-on-amd64 restriction.

Sponsored by:	The FreeBSD Foundation
2014-04-04 07:43:11 +00:00
gjb
5be2c88184 MFC r262810, r262862, r264105:
r262810:
  Merge enabling building FreeBSD/arm images as part of the
  release build process.

r262862:
  Provide backwards-compatibility with release.conf SVNROOT
  entries that do not have a trailing '/'.

r264105:
  Add ZEDBOARD support for release builds.

* Local modifications:
  - Set SRCBRANCH from head/ to stable/10/.
  - Strip svn:merginfo from ^/projects/release-embedded to avoid
    pollution.

Sponsored by:	The FreeBSD Foundation
2014-04-04 07:34:46 +00:00
asomers
9bf97c415d MFC r263428
share/man/man7/tests.7
	Added a section on test suite configuration, and cleaned up up grammar
	errors and awkward prose.  The config variables were discussed on
	freebsd-testing.
2014-04-03 17:26:45 +00:00
asomers
6b6e4c2d32 MFC r263116
Replace 4.4BSD Lite's unix domain socket backpressure hack with a cleaner
mechanism, based on the new SB_STOP sockbuf flag.  The old hack dynamically
changed the sending sockbuf's high water mark whenever adding or removing
data from the receiving sockbuf.  It worked for stream sockets, but it never
worked for SOCK_SEQPACKET sockets because of their atomic nature.  If the
sockbuf was partially full, it might return EMSGSIZE instead of blocking.

The new solution is based on DragonFlyBSD's fix from commit
3a6117bbe0ed6a87605c1e43e12a1438d8844380 on 2008-05-27.  It adds an SB_STOP
flag to sockbufs.  Whenever uipc_send surpasses the socket's size limit, it
sets SB_STOP on the sending sockbuf.  sbspace() will then return 0 for that
sockbuf, causing sosend_generic and friends to block.  uipc_rcvd will
likewise clear SB_STOP.  There are two fringe benefits: uipc_{send,rcvd} no
longer need to call chgsbsize() on every send and receive because they don't
change the sockbuf's high water mark.  Also, uipc_sense no longer needs to
acquire the UIPC linkage lock, because it's simpler to compute the
st_blksizes.

There is one drawback: since sbspace() will only ever return 0 or the
maximum, sosend_generic will allow the sockbuf to exceed its nominal maximum
size by at most one packet of size less than the max.  I don't think that's
a serious problem.  In fact, I'm not even positive that FreeBSD guarantees a
socket will always stay within its nominal size limit.

sys/sys/sockbuf.h
	Add the SB_STOP flag and adjust sbspace()

sys/sys/unpcb.h
	Delete the obsolete unp_cc and unp_mbcnt fields from struct unpcb.

sys/kern/uipc_usrreq.c
	Adjust uipc_rcvd, uipc_send, and uipc_sense to use the SB_STOP
	backpressure mechanism.  Removing obsolete unpcb fields from
	db_show_unpcb.

tests/sys/kern/unix_seqpacket_test.c
	Clear expected failures from ATF.
2014-04-03 16:57:16 +00:00
glebius
1e3b300892 o Provide a compatibility shim for netstat(1) to obtain output queue
drops via NET_RT_IFLISTL sysctl. The sysctl handler appends oqdrops
  at the end of struct if_msghdrl, and netstat(1) sees that as an
  additional field of struct if_data. This allows us to fetch the data
  keeping ABI and API compatibility.
  This is direct commit to stable/10.

o Merge r263331 from head, to restore printing of queue drops.

Sponsored by:	Nginx, Inc.
Sponsored by:	Netflix
2014-04-03 14:58:52 +00:00
bdrewery
17127387c5 MFC r263812:
Update build(7) with LOCAL_* vars
2014-04-03 14:47:36 +00:00
gjb
5eff512a51 Document that the FreeBSD/i386 instability with
vfs.unmapped_buf_allowed=1 may be present on VMs
running on hypervisors other than VirtualBox.

Sponsored by:	The FreeBSD Foundation
2014-04-03 14:13:57 +00:00
ray
003ac1d9a0 MFC r263809
Fix crash on resume in vt(9).
Statically allocated terminal window have not initialized callout handler, so we
have to initialize it even for existing window if it is console window.

Sponsored by:	The FreeBSD Foundation
2014-04-03 11:59:04 +00:00
delphij
60e600a585 MFC r263385:
Remove unused option -r from zpool.

Submitted by:	Richard Yao <ryao gentoo org>
2014-04-03 01:00:51 +00:00
dim
cc435e800f MFC r263775:
Avoid "cc1: warning: is shorter than expected" when using GNU cpp in
combination with dtrace scripts, which have "#!/usr/sbin/dtrace -Cs"
shebang lines.  This is because dtrace positions the file pointer after
the shebang line, before passing the file to GNU cpp.

To fix the warning, adjust the size downwards by the current position,
after a bit of sanity checking.

Suggested by:	avg
2014-04-02 06:17:57 +00:00
mav
e28755359a MFC r263118:
Report ZVOL block size as GEOM stripesize.
2014-04-01 12:07:15 +00:00
dim
962d0a5759 MFC r263891:
Make clang default to DWARF2 debug info format for FreeBSD 10.x and
earlier.  For head, this commit does not change anything, but it is
purely meant to be MFC'd.
2014-04-01 08:19:30 +00:00
dteske
33929c7923 MFC revisions 260894,260899,262895-262902,262904,262908-262910,262982,
262984,263133-263137,263139,263141,263144-263150, and (partially) 263249
(31 revisions; summarized below)...
r260894: Optimize f_expand_number(), improving performance
r260899: s/__number/__num/ in f_expand_number()
r262895: Allow dispatched reswords to carry arguments
r262896: Add missing local declaration
r262897: Fix a typo in a comment
r262898: Fix incorrect return status if var_to_set and var_to_get are same
r262899: Make f_show_err non-fatal
r262900: Centralize function name; Update a comment while here
r262901: s/__num/__number/ in f_expand_number()
r262902: Comment to go with NL global introduced by previous commit
r262904: Rewrite groupmgmt -- hooking it into the scripting system
r262908: Change dispatch words from group* to *Group for backward compat
r262909: Fix copy/paste error in a comment
r262910: Take a group name on the command-line if available
r262982: Whitespace
r262984: Remove vestigial global, no longer used since r262904
r263133: Remove indexfile from debug statement (already logged)
r263134: Add debug statement just before attempting to exec a module
r263135: Comments
r263136: Update copyright
r263137: Fix future namespace issues for functions taking $var_to_set
r263139: Remove useless NULL string in compound strings
r263141: Pointy hat! Fix a broken f_isinteger()
r263144: Fix a code-typo that prevented auto-sizing of a dialog
r263145: Fix comments and whitespace
r263146: Reduce the sleep cycle when using dialog(1) [infobox] to 1-second
r263147: Fix a bug preventing errors from pw(8) from appearing
r263148: For non-interactive scripts, forgot to check argument
r263149: Add protection against input containing single-quotes
r263150: Rewrite usermgmt
r263249: (partial) Add more obsolete files
2014-04-01 00:19:13 +00:00
asomers
2b41b2e904 MFC r263271
share/man/man9/counter.9
	Fix logic error in the description of counter_u64_alloc: the command
	may fail only if M_NOWAIT is specified, not M_WAITOK.
2014-03-31 14:51:45 +00:00
ae
ed08ddc2a1 MFC r263468:
When loader(8) inspects MBR, it chooses GPT as main partition table,
  when MBR contains only PMBR entry or it is bootcamp-compatible.
  If MBR has PMBR entry and some other, the loader rejects it.

  Make these checks to be less strict. If loader decided that PMBR
  isn't suitable for GPT, it will use MBR.

  Reported by:	Paul Thornton
2014-03-31 09:34:46 +00:00
mjg
b357774f50 MFC r263758:
Update userspace users of hw.bus.devctl_disable.

This switches the code to use hw.bus.devctl_queue instead.
2014-03-31 02:53:15 +00:00
mjg
e7b96c1d34 MFC r263755:
Document a known problem with handling the process intended to receive
SIGIO in /dev/devctl.
2014-03-31 02:44:43 +00:00
mjg
0cdb222abb MFC r263704:
Make /dev/devctl mpsafe.

MFC r263753:
Remove lockless check in devopen, while correct it does not make much sense.
2014-03-31 02:30:55 +00:00
mjg
08656a370c MFC r263458:
audit: plug FILEDESC_LOCK leak in audit_canon_path.
2014-03-31 02:24:29 +00:00
mjg
ae2823466f MFC r263530:
Mark the following sysctls as MPSAFE:
kern.file
kern.proc.filedesc
kern.proc.ofiledesc
2014-03-31 02:19:57 +00:00
mjg
11fbc59f9b MFC r263460:
Take filedesc lock only for reading when allocating new fdtable.

Code populating the table does this already.
2014-03-31 02:17:58 +00:00
gjb
8a8ec2ebba MFC r263863:
Dereference nonexistent md2(3) manual.

Sponsored by:	The FreeBSD Foundation
2014-03-31 00:28:54 +00:00
bdrewery
1416559ea4 MFC r263131,r263174,r263175:
Tmpfs readdir() redundant logic and code readability cleanup.

  r263131:
    Cleanup redundant logic and add some comments to help explain how it works
    in lieu of potentially less clear code.

  r263174:
    Rename cnt to maxcookies and change its use as the condition for when to
    lookup cookies to be less obscure.

  r263175:
    Add missing FALLTHROUGH comment in tmpfs_dir_getdents for looking up '.'
    and '..'.
2014-03-30 18:22:10 +00:00
bdrewery
6dfd032c57 MFC r263130:
Fix -o size less than PAGE_SIZE resulting in SIZE_MAX being used.
2014-03-30 16:51:12 +00:00
bdrewery
e696b793ca MFC r263129:
Combine similar code from vprintf(9) and log(9).
2014-03-30 16:48:04 +00:00
bdrewery
7760b07bb6 MFC r263937:
Give hint on how to disable the default repository.
2014-03-30 15:29:54 +00:00
dim
ebd9ec5dee MFC r260880 (by kaiw, from projects/elftoolchain):
* Make die_mem_offset() be able to handle DW_AT_data_member_location
    attributes generated by Clang 3.4.
  * Document how different compilers generate DW_AT_data_member_location
    attributes differently.
  * Document the quirks about DW_FORM_data[48].

This is a slightly modified version, adapted to work with the old
libdwarf in stable/9 and stable/10.  It should fix DTrace on these
branches, when the kernel is compiled with clang 3.4.

Note that you have to build *and* install the CTF tools first, before
building the kernel.  Otherwise you can possibly still get error
messages similar to "failed to copy type of 'pr_uid': Type information
is in parent and unavailable", when attempting to run dtrace(1).

Submitted by:	kaiw
2014-03-29 17:18:23 +00:00
dim
16ced98065 MFC r263774:
Revert r263694, and apply a better fix to squelch unnecessary warnings
from clang about possible keywords being treated as identifiers for the
remainder of the translation unit (a.k.a. -Wkeyword-compat), when using
libstdc++ in combination with -Wsystem-headers.  This will not only fix
devd, but any C++ program using libstdc++.
2014-03-29 11:33:52 +00:00
edwin
24df444399 MFC of 263901, tzdata2014b
- Update antartica.
 - Comments about historical data for Hawaii.
 - Update details for Crimea on 30 March
 - Move location data Simferopol.
2014-03-29 04:44:24 +00:00