Commit Graph

167487 Commits

Author SHA1 Message Date
Ulrich Spörlein
4b85a12f71 Spelling fixes for sbin/ 2012-01-07 16:09:33 +00:00
Gleb Smirnoff
dabfce9a5a Merge from OpenBSD:
revision 1.170
  date: 2011/10/30 23:04:38;  author: mikeb;  state: Exp;  lines: +6 -7
  Allow setting big MTU values on the pfsync interface but not larger
  than the syncdev MTU.  Prompted by the discussion with and tested
  by Maxim Bourmistrov;  ok dlg, mpf

Consistently use sc_ifp->if_mtu in the MTU check throughout the
module. This backs out r228813.
2012-01-07 14:39:45 +00:00
Michael Tuexen
ab6174d587 Retire the SCTP sysctl "strict_init". We always perform the validation
and there is no reason to make is configuarable.
Discussed with rrs@.
2012-01-07 14:04:00 +00:00
Michael Tuexen
d68fdc4df6 Improve the handling of received INITs. Send an ABORT when
not accepting the connection. Also fix a crash, which
could happen when the user closed the socket.

MFC after: 1 month.
2012-01-07 13:03:33 +00:00
Gleb Smirnoff
e883df1d1b Fix indentation. 2012-01-07 12:40:45 +00:00
Konstantin Belousov
a7e92fc91c Document comconsole_port and comconsole_pcidev loader variables.
MFC after:	2 weeks
2012-01-07 11:16:23 +00:00
Konstantin Belousov
5d8aec9c02 Implement fdlopen(3), an rtld interface to load shared object by file
descriptor.

Requested and tested by:	des (previous version)
Reviewed by:  des, kan (previous version)
MFC after:    2 weeks
2012-01-07 10:33:01 +00:00
Kevin Lo
5bbe0c5357 ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again
Reviewed by:	yongari
2012-01-07 09:41:57 +00:00
Hajimu UMEMOTO
324930d7f8 Handle the internal scope address representation of the KAME IPv6
stack for the node-local multicast address.

Spotted by:	Rainer Bredehorn <Bredehorn__at__gmx.de>
MFC after:	1 week
2012-01-07 09:01:19 +00:00
Adrian Chadd
93e26ff438 Fix the ar724x shift calculation when writing to the PCI config space.
This was preventing the ath driver from being loaded at runtime.
It worked fine when compiled statically into the kernel but not when
kldload'ed after the system booted.

The root cause was that PCIR_INTLINE (register 60) was being
overwritten by zeros when register 62 was being written to.
A subsequent read of this register would return 0, and thus
the rest of the PCI glue assumed an IRQ resource had already
been allocated.  This caused the device to fail to attach at
runtime as the device itself didn't contain any IRQ resources.

TODO: go back over the ar71xx and ar724x PCI config read/write
code and ensure it's correct.
2012-01-07 04:13:25 +00:00
Dimitry Andric
6d417c1c70 In sys/contrib/rdma/ib_addr.h, bump MAX_ADDR_LEN to 20 bytes (the same
value used in sys/ofed/include/linux/netdevice.h), so there will be no
buffer overruns in the rest of the inline functions in this file.

Reviewed by:	kmacy
MFC after:	1 week
2012-01-07 00:47:27 +00:00
Eitan Adler
316efdb35f - Fix sysctl description
PR:		163623
Submitted by:	Eugene Grosbein <eugen@eg.sd.rdtc.ru>
Approved by:	bz
2012-01-07 00:11:36 +00:00
Pawel Jakub Dawidek
dfb1aece41 fork(2) returns -1 on failure, not some random negative number.
MFC after:	3 days
2012-01-06 23:44:26 +00:00
Jilles Tjoelker
c6791c926e sh: Avoid possible echo options in a testcase. 2012-01-06 23:20:33 +00:00
Guy Helmer
a18e46160b Handle memory allocation failures in devstat_getdevs(), devstat_selectdevs(),
and devstat_buildmatch().

PR:		bin/83359
Reviewed by:	ken
2012-01-06 21:28:29 +00:00
Michael Tuexen
aa1808b71f Use NULL instead of 0.
MFC after: 1 month.
2012-01-06 20:20:59 +00:00
John Baldwin
71eeeaf256 Add 5 spare VOPs as placeholders to avoid breaking the KBI in the future
when new VOPs are MFC'd to a branch.

Reviewed by:	kib, bz
MFC after:	3 days
2012-01-06 20:06:45 +00:00
John Baldwin
908cac07ce Use proper argument structure types for the extattr post-VOP hooks.
The wrong structure happened to work since the only argument used was
the vnode which is in the same place in both VOP_SETATTR() and the two
extattr VOPs.

MFC after:	3 days
2012-01-06 20:05:48 +00:00
Ed Schouten
305bf119f8 Last attempt at <tgmath.h>: do enable the new code for C11 compilers.
I was thinking by myself, if the new code doesn't work with GCC 4.2, why
not simply turn it into an efficient version for C11 compilers? By
changing the code to use _Generic() directly in that case, I can build
the tgmath regression test in a matter of milliseconds with Clang,
instead of the 8 seconds it used to take.

So by the time C11 becomes the default, it will pick up the new code
automatically. And now I will refrain from making more changes to
<tgmath.h>.
2012-01-06 19:04:59 +00:00
Andreas Tobler
ca3759b5de Silence a warning about redefinition of TARGET_ELF on powerpc. 2012-01-06 18:37:49 +00:00
Navdeep Parhar
db3cee5170 Always release the inp lock before returning from tcp_detach.
MFC after:	5 days
2012-01-06 18:29:40 +00:00
Ed Schouten
81ec6b6b47 Add an even faster implementation of <tgmath.h> for the future.
Instead of using an exponential number of cases with respect to the
number of arguments, this version only uses a linear number.
Unfortunately, it works with Clang, GCC 4.6 and GCC 4.7, but not GCC
4.2. Therefore, leave it commented out.
2012-01-06 16:20:17 +00:00
Gleb Smirnoff
48df024e0f Fix build. 2012-01-06 15:01:05 +00:00
Pawel Jakub Dawidek
e3bf08680d Add 'nojail' keyword as auditd(8) can't really do anything useful when
inside a jail.

Discussed with:	rwatson
MFC after:	1 week
2012-01-06 14:00:31 +00:00
John Baldwin
0ff93ca524 Tweak the last fix to match what was actually tested.
Pointy hat to:	jhb
2012-01-06 12:49:01 +00:00
Pawel Jakub Dawidek
f78fe2608a Constify argument.
MFC after:	3 days
2012-01-06 12:27:17 +00:00
Gleb Smirnoff
dcb39bd84a Since r228571 CARP is no longer an interface. 2012-01-06 12:05:43 +00:00
Ulrich Spörlein
09655d35a0 Fix mdoc date from previous commit. 2012-01-06 11:42:03 +00:00
Jaakko Heinonen
d467c9472a r222004 changed sbuf_finish() to not clear the buffer error status. As a
consequence sbuf_len() will return -1 for buffers which had the error
status set prior to sbuf_finish() call. This causes a problem in
pfs_read() which purposely uses a fixed size sbuf to discard bytes which
are not needed to fulfill the read request.

Work around the problem by using the full buffer length when
sbuf_finish() indicates an overflow. An overflowed sbuf with fixed size
is always full.

PR:		kern/163076
Approved by:	des
MFC after:	2 weeks
2012-01-06 10:12:59 +00:00
Andreas Tobler
b286f80c2d Use the macro WEAK_ALIAS. Tested on 32 and 64-bit. 2012-01-06 09:21:40 +00:00
Jaakko Heinonen
9cb24e3c98 Check the return value of sbuf_finish() in pfs_readlink() and return
ENAMETOOLONG if the buffer overflowed.

Approved by:	des
MFC after:	2 weeks
2012-01-06 09:17:34 +00:00
Adrian Chadd
ff23e401a5 Flip these options on so the modules build correctly for now. 2012-01-06 08:51:20 +00:00
Oleksandr Tymoshenko
6cc1d135cd - Add better COP2 (crypto coprocessor) context handler for Octeon. Keep
COP2 disabled and lazily allocate COP2 context structure in exception
    handler. Keep kernel and userland contexts separated.
2012-01-06 01:23:26 +00:00
Adrian Chadd
6b1dcfcd83 Import the first cut of "bsdbox".
This uses the existing crunchgen infrastructure to build
a series of tools designed to replace the base and networking
tools on an embedded system.

It reuses 'bsd.crunchgen.mk' to drive the actual file
creation. The rescue build system also uses this.

Unlike busybox, it doesn't include its own source - instead,
it just builds from the sources in /usr/src/ and leverages
the existing BSD framework.

Thie is still quite messy and could do with a whole lot of
cleaning up.   However it is proving to be very useful with
my current build framework, allowing me to build binary root
images that are about 30% less than simply cherrypicking files
and libraries from an installworld.
2012-01-06 00:56:31 +00:00
Adrian Chadd
0d9f40f219 Fix the broken non-cross compile build. Oops!
Another pointy hat to:	adrian, for stirring up more trouble.
2012-01-06 00:34:27 +00:00
Sergey Kandaurov
4f7fca1ca1 Fix a typo.
X-MFC-with:	229665
2012-01-06 00:23:17 +00:00
Jim Harris
9bea89c1b0 Add 0x2826 device ID for C600 (Patsburg) SATA controller in RAID mode.
Reviewed by: mav
Approved by: scottl
2012-01-06 00:22:55 +00:00
Robert Watson
460b3e8f1d Replace an OpenBSDism with a FreeBSDism in the pfctl(8) man page: we put
configuration file man pages in section 5, and we prefer rc.conf to
rc.conf.local.

MFC after:	3 days
2012-01-05 23:11:05 +00:00
Guy Helmer
532b72687e Fix a memory leak in addgroup() by ensuring the allocated memory
is freed if an error occurs.

PR:		bin/161510
MFC after:	4 weeks
2012-01-05 23:08:11 +00:00
Guy Helmer
074db536b3 Allow daemon(8) to run pidfile_open() before relenquishing privileges
so pid files can be written in /var/run when started as root.

I do not expect this to cause any security issues, but if anyone objects
it could be easily reverted.

PR:		bin/159568
MFC after:	4 weeks
2012-01-05 22:48:36 +00:00
John Baldwin
1e96ae8193 Remove the assertion from tcp_input() that rcv_nxt is always greater
than or equal to rcv_adv and fix tcp_twstart() to handle this case by
assuming the last window was zero rather than a negative value.

The code in tcp_input() already safely handled this case.  It can happen
due to delayed ACKs along with a remote sender that sends data beyond
the window we previously advertised.  If we have room in our socket buffer
for the extra data beyond the advertised window, we will accept it.
However, if the ACK for that segment is delayed, then we will not
effectively fixup rcv_adv to account for that extra data until the
next segment arrives and forces out an ACK.  When that next segment
arrives, rcv_nxt will be beyond rcv_adv.

Tested by:	pjd
MFC after:	1 week
2012-01-05 22:29:11 +00:00
Pawel Jakub Dawidek
62859c9061 - Allow to change vfs.zfs.arc_meta_limit at runtime.
- Change vfs.zfs.arc_meta_used from CTLFLAG_RDTUN to CTLFLAG_RD, as it is
  not a tunable.

MFC after:	3 days
2012-01-05 22:16:41 +00:00
Andreas Tobler
8d252f7868 Fix build on powerpc64 too. The same as r229640. 2012-01-05 22:06:01 +00:00
Adrian Chadd
9b428cfab6 Allow extra directories to be added to the build-tools target.
Things such as "sh" require local tools to be built before
cross-compiling. This allows for extra software (that's
built via LOCAL_DIRS) to also have a build-tools target where
required.
2012-01-05 21:50:50 +00:00
Adrian Chadd
030b95d479 Allow crunchgen binary link generation to be disabled.
If CRUNCH_GENERATE_LINKS is set to "no", then no links will be
generated.

This defaults to "yes" so things like release crunch building
still works.
2012-01-05 21:49:43 +00:00
Ulrich Spörlein
8948622005 Apply Typo-B-Gone 2000 [TM] 2012-01-05 21:43:33 +00:00
Ulrich Spörlein
381edcda1e Convert files over to UTF-8.
These files contained various combinations of Big5, eucJP and KOI8-U
encoded strings. The byte representations of their respective encodings
have been translated to $'...' escape sequences as understood by our sh(1).

With help from:	jilles
2012-01-05 21:36:53 +00:00
Ulrich Spörlein
389ae6c65d Touch up some more small typos missed in the previous round.
Reported by:	Ben Kaduk <minimarmot@gmail.com> et al.
2012-01-05 21:36:45 +00:00
Ulrich Spörlein
f7bcc1c411 Further fix a typo and spelling classic correctly in function names,
too.

Submitted by:	Ben Kaduk <minimarmot@gmail.com>
2012-01-05 21:36:36 +00:00
Ulrich Spörlein
b81da4450d Partial backout of r228990, restore original MIB object name.
It's too late to change this in 9.0 -- so we have a release with the
misspelling in the wild and should not break users that depend on it.

Deprecating/replacing it because of a one-char typo seems excessive.
2012-01-05 21:36:28 +00:00