Commit Graph

168430 Commits

Author SHA1 Message Date
Eitan Adler
5bfdf7f990 Remove reference to gsched_as module, which doesn't
actually exist.

PR:		docs/163043
Submitted by:	olgeni
Approved by:	brd
MFC after:	3 days
2012-02-22 04:51:17 +00:00
Andrey V. Elsukov
313157dead Don't use `m' after m_megapullup.
PR:		kern/165373
MFC after:	3 days
2012-02-22 04:19:33 +00:00
Mark Peek
9ccc37e320 Update to tcsh 6.18.01. 2012-02-22 03:36:15 +00:00
David Xu
b13a8fa78f Use unused fourth argument of umtx_op to pass flags to kernel for operation
UMTX_OP_WAIT. Upper 16bits is enough to hold a clock id, and lower
16bits is used to pass flags. The change saves a clock_gettime() syscall
from libthr.
2012-02-22 03:22:49 +00:00
Oleksandr Tymoshenko
57fa7d3101 Refctor address assignment for Octeon's ethernet ports:
- Centralize address assignment
- Make sure managment ports get first MAC address in pool
- Properly propagate fail if address allocation failed

Submitted by:	Andrew Duane <aduane@juniper.net>
2012-02-22 01:30:25 +00:00
Kevin Lo
19ab58bfe3 Return NULL on error rather than ":", per the crypt(3) man page.
Discussed in: http://www.openwall.com/lists/oss-security/2011/11/15/3
2012-02-22 01:23:14 +00:00
Kevin Lo
10e777b0f4 Fix memset sizeof 2012-02-22 01:08:59 +00:00
Jilles Tjoelker
45ff61e969 libc: Add some tests for fmtmsg(). 2012-02-21 23:46:41 +00:00
Dimitry Andric
a0dd79dbdf When building with clang, disable -Wformat-security for
sys/dev/hpt27xx/osm_bsd.c, since it gets the following warnings:

sys/dev/hpt27xx/osm_bsd.c:1180:25: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
            S_IRUSR | S_IWUSR, driver_name);
                               ^~~~~~~~~~~
@/dev/hpt27xx/hpt27xx_config.h:46:21: note: expanded from:
#define driver_name hpt27xx_driver_name
                    ^~~~~~~~~~~~~~~~~~~

Since 'hpt27xx_driver_name' is a constant string symbol (coming from the
proprietary hpt27xx_lib.o file), there is no security problem.

Because this driver is provided by the vendor, and applying changes
requires re-certification and other bureaucratic exercises, just disable
the warning for now.

MFC after:	1 week
2012-02-21 21:20:52 +00:00
Dimitry Andric
8508b79835 When building with clang, disable -Wunneeded-internal-declaration for
several sys/cam/ctl files, since these get the following warnings:

In file included from sys/cam/ctl/ctl_backend.c:60:
sys/cam/ctl/ctl_private.h:300:30: error: variable 'page_index_template' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
static struct ctl_page_index page_index_template[] = {
                             ^

These warnings are tricky to fix without a lot of overhaul, and they are
harmless, so disable them for now.

MFC after:	1 week
2012-02-21 20:55:43 +00:00
Mikolaj Golub
a95852edf3 unp_connect() may use a shared lock on the vnode to fetch the socket.
Suggested by:	jhb
Reviewed by:	jhb, kib, rwatson
MFC after:	2 weeks
2012-02-21 19:40:13 +00:00
Mikolaj Golub
f62f6c88ee Make vnode_if.awk parse vnode operations with underscores, like VOP_FOO_BAR.
Reviewed by:	kib
MFC after:	1 week
2012-02-21 19:35:59 +00:00
Ed Maste
9a2856b439 Avoid error log for transfer stop w/o error code.
A number of tftp clients, including the one in Intel's pxe boot loader,
may intentionally stop a transfer using error code 0 (i.e., EUNDEF).
These are not real errors.  Avoid spamming log files with these by
logging them at level LOG_DEBUG instead.

Discussed on -hackers with an initial patch proposal; this change is an
improved approach suggested by kan@.
2012-02-21 14:59:07 +00:00
Konstantin Belousov
526d0bd547 Fix found places where uio_resid is truncated to int.
Add the sysctl debug.iosize_max_clamp, enabled by default. Setting the
sysctl to zero allows to perform the SSIZE_MAX-sized i/o requests from
the usermode.

Discussed with:	bde, das (previous versions)
MFC after:	1 month
2012-02-21 01:05:12 +00:00
Pawel Jakub Dawidek
57a82ba4d9 Document the fact that getgrouplist(3) returns 0 on success.
MFC after:	3 days
2012-02-20 20:46:27 +00:00
Christian Brueffer
e4c7674164 Add oce(4) to the hardware notes.
MFC after:	3 days
2012-02-20 19:35:54 +00:00
Aleksandr Rybalko
0fecd54d7a Remove redundant forward declaration of struct ieee80211com.
Approved by:	bschmidt
2012-02-20 15:05:21 +00:00
Guy Helmer
fde4439701 Set the O_CLOEXEC flag when opening the pidfile to avoid leaking the
file descriptor via exec(3).

Now that daemon(8) has been fixed to resolve the issue noted by trociny,
the consensus is that this change should be OK.
2012-02-20 13:59:24 +00:00
Christian Brueffer
56799b608d More improvements, the biggest one using list environments for enumerations. 2012-02-20 13:22:00 +00:00
Kevin Lo
3d74f18ba4 Remove an unnecessary cast. 2012-02-20 09:56:14 +00:00
Xin LI
fcdd3d322b Revert r231923 for now. Further work is needed to make sure that the
behavior is consistent.
2012-02-20 09:32:32 +00:00
Andrey V. Elsukov
5357f27569 If nested scheme allows dump kernel to its partition, we may allow
dump for the parent partition too.

MFC after:	2 weeks
2012-02-20 06:35:52 +00:00
Andrey V. Elsukov
c3f9f306d2 Add alias for the partition type 0x0f. Now "ebr" name is used for both
types 0x05 and 0x0f, but 0x05 is preferred and used when partition is
created with "gpart add -t ebr ...".
This should keep EBR partitions accessible after r231754 for those,
who have EBR on the partition with type 0x0f.
2012-02-20 05:48:57 +00:00
Adrian Chadd
7b1144d245 Break out the radar code into a separate source file.
This mirrors the internal HAL organisation and reduces the differences
between the HAL codebases slightly.

Obtained from:	Atheros
2012-02-20 03:07:07 +00:00
Xin LI
033892980c Return BUS_PROBE_DEFAULT instead of 0 because this is an in-tree driver.
MFC after:	1 month
2012-02-20 01:18:32 +00:00
Xin LI
5bfbb59851 Use uprintf instead of printf for the reason why a kernel module can not
be loaded.  This way, the administrator can get response immediately from
the shell session rather than relying on dmesg.

MFC after:	1 month
2012-02-20 01:05:17 +00:00
Mark Peek
0bc8d6575f Import of tcsh-6.18.01 2012-02-20 00:53:59 +00:00
Sergey Kandaurov
d75a2818b7 - Trim empty lines resulting in bad rendering, EOL whitespaces
- Convert to our standard SYNOPSIS language
- Consistently use "The .Nm driver"
- Rewrite .nf .fi block with mdoc
- Add pci dependency to SYNOPSIS
- Start .Bl list with new paragraph

Approved by:	luigi
2012-02-19 18:16:42 +00:00
Marius Strobl
4bcbb398c4 Probe the National DP83849, which is a dual-port version of the PHYTER.
Obtained from:	NetBSD
2012-02-19 12:25:58 +00:00
Marius Strobl
8a731a126b - Probe BCM57780.
- In case the parent is bge(4), don't set the Jumbo frame settings unless
  the MAC actually is Jumbo capable as otherwise the PHY might not have the
  corresponding registers implemented. This is also in line with what the
  Linux tg3 driver does.

PR:		165032
Submitted by:	Alexander Milanov
Obtained from:	OpenBSD
MFC after:	3 days
2012-02-19 12:09:17 +00:00
Mikolaj Golub
53c49998d5 If permitted protect the supervisor against pageout kill.
Suggested by:	Andrey Zonov <andrey zonov org>
MFC after:	2 weeks
2012-02-19 10:38:55 +00:00
Mikolaj Golub
b6193c2409 Add -r option to restart the program if it has been terminated.
Suggested by:	Andrey Zonov <andrey zonov org>
MFC after:	2 weeks
2012-02-19 10:36:29 +00:00
Mikolaj Golub
195fc497a2 If the supervising process receives SIGTERM, forward it to the spawned
process.  Normally it will cause the child to exit followed by the
termination of the supervisor after removing the pidfile.

This looks like desirable behavior, because termination of a
supervisor usually supposes termination of its charge. Also it will
fix the issue with stale pid files after reboot due to init kills a
supervisor before its child exits.

MFC after:	2 weeks
2012-02-19 10:23:51 +00:00
Mikolaj Golub
2ad4302785 The pidfile_open(3) is going to be fixed to set close-on-exec in order
not to leak the descriptor after exec(3). This raises the issue for
daemon(3) of the pidfile lock to be lost when the child process
executes.

To solve this and also to have the pidfile cleaned up when the program
exits, if a pidfile is specified, spawn a child to exec the command
and wait in the parent keeping the pidfile locked until the child
process exits and remove the file.

Reported by:	Andrey Zonov <andrey zonov org>
Suggested by:	pjd
Reviewed by:	pjd
MFC after:	2 weeks
2012-02-19 10:20:37 +00:00
Andreas Tobler
3f07025a76 Enable the new PCI-PCI bridge driver by default.
Tested on 32- and 64-bit PowerMac.
2012-02-19 10:10:12 +00:00
David Xu
879d152454 Check both seconds and nanoseconds are zero, only checking nanoseconds
is zero may trigger timeout too early. It seems a copy&paste bug.
2012-02-19 08:17:14 +00:00
Alan Cox
7dc0ace10e Close a race due to dropping of the map lock between creating a map entry
for a shared mapping and marking the entry for inheritance.

Reviewed by:	kib
X-MFC after:	r231526
2012-02-19 00:28:49 +00:00
Konstantin Belousov
3e2f30f6dd Document PL_FLAG_CHILD.
MFC after:	3 days
2012-02-18 22:26:32 +00:00
Michael Tuexen
310a027788 Remove two clang warnings.
MFC after: 1 month.
2012-02-18 16:06:15 +00:00
Adrian Chadd
107fdf9681 Try to ensure that ieee80211_newstate() and the vap_newstate methods
hold the lock.

This is part of my series of work to try and capture when net80211
locking isn't.

ObNote: it'd be nice to be able to mark a lock as "assert if the lock
is dropped", so I could capture functions which decide that dropping
and reacquiring the lock is a good idea (without re-checking the
sanity of the state protected by the lock.)
2012-02-18 09:18:06 +00:00
Xin LI
3a12c0461b Use ANSI prototypes. 2012-02-18 00:55:54 +00:00
Xin LI
90de8d2a65 Put the signal trap output to standard error instead of standard output.
Without this change, pressing ^T could result in rc.d script putting
junk strings like:

	Script <filename> running

in configuration files when redirecting standard output to these files.

MFC after:	2 weeks
2012-02-18 00:46:18 +00:00
Konstantin Belousov
3494f31ad2 Fix misuse of the kernel map in miscellaneous image activators.
Vnode-backed mappings cannot be put into the kernel map, since it is a
system map.

Use exec_map for transient mappings, and remove the mappings with
kmem_free_wakeup() to notify the waiters on available map space.

Do not map the whole executable into KVA at all to copy it out into
usermode.  Directly use vn_rdwr() for the case of not page aligned
binary.

There is one place left where the potentially unbounded amount of data
is mapped into exec_map, namely, in the COFF image activator
enumeration of the needed shared libraries.

Reviewed by:   alc
MFC after:     2 weeks
2012-02-17 23:47:16 +00:00
Justin T. Gibbs
45cbfcdabc Fix regression in the handling of blkback close events for
devices that are unplugged via QEMU.

sys/dev/xen/blkback/blkback.c:
	Toolstack initiated closures change the frontend's state
	to Closing.  The backend must change to Closing as well,
	even if we can't actually close yet, in order for the
	frontend to notice and start the closing process.

MFC after:	3 days
2012-02-17 22:33:46 +00:00
Luigi Rizzo
babc7c1258 Various cleanups for readability (no functional changes)
- remove the KEVENT code, which was incomplete and not compiled anyways;
- change some while() loops into for()
- adjust indentation
- remove extra whitespace

MFC after:	1 week
2012-02-17 14:09:04 +00:00
Luigi Rizzo
f6a92b8803 add manpage for the "oce" driver
Submitted by:	Naresh Raju Gottumukkala (Emulex)
MFC after:	3 days
2012-02-17 14:02:44 +00:00
Luigi Rizzo
9bd3250a02 Patches from Naresh Raju Gottumukkala
- Feature: UMC - Universal Multi Channel support
- Bugfix: BE3 Firmware Flashing bug.
- Code improvements:
  - Removed duplicate switch cases in the oce_ioctl routine.
  - Made changes to mcc_async notifications routine(oce_mq_handler)

MFC after:	1 week
2012-02-17 13:55:17 +00:00
Konstantin Belousov
1c90f07c45 Fix cross-references.
Submitted by:	pluknet
MFC after:  2 weeks
2012-02-17 12:40:27 +00:00
Christian Brueffer
026dbd291e Switch the license boilerplates to our standard one.
Advantages:
- Reduces the number of different license versions in the tree
- Eliminates a typo
- Removes some incorrect author attributions due to c/p
- Removes c/p error potential for future pmc manpages

Approved by:	jkoshy, gnn, rpaulo, fabient (copyright holders)
MFC after:	1 week
2012-02-17 11:09:51 +00:00
Konstantin Belousov
ab8f652cd7 Document dl_iterate_phdr(3).
Man page is based on the OpenBSD version, extended and corrected for
the FreeBSD implementation.

MFC after:  2 weeks
2012-02-17 10:51:40 +00:00