Commit Graph

161442 Commits

Author SHA1 Message Date
David E. O'Brien
6b4b73920f Add a real dependency on the microcode.
Now when one does 'make kernel ; make kernel' the second invocation
only does:  `kernel.ko' is up to date.
rather than reproduce all the binary microcode files and relink the kernel.
[continuation of r212429]
2011-02-25 09:07:17 +00:00
Maxim Konovalov
c28e9f4cfd o FreeBSD 8.2 and 7.4-RELEASE added. Mac OS X 10.6 added belatedly. 2011-02-25 07:33:42 +00:00
Gabor Kovesdan
bcf205e1ee - Add two more iconv-related files, which were left out from previous commit
Approved by:	delphij (mentor)
2011-02-25 00:10:26 +00:00
Gabor Kovesdan
ad30f8e79b Add the BSD-licensed Citrus iconv to the base system with default off
setting. It can be built by setting the WITH_ICONV knob. While this
knob is unset, the library part, the binaries, the header file and
the metadata files will not be built or installed so it makes no impact
on the system if left turned off.

This work is based on the iconv implementation in NetBSD but a great
number of improvements and feature additions have been included:

- Some utilities have been added. There is a conversion table generator,
  which can compare conversion tables to reference data generated by
  GNU libiconv. This helps ensuring conversion compatibility.
- UTF-16 surrogate support and some endianness issues have been fixed.
- The rather chaotic Makefiles to build metadata have been refactored
  and cleaned up, now it is easy to read and it is also easier to add
  support for new encodings.
- A bunch of new encodings and encoding aliases have been added.
- Support for 1->2, 1->3 and 1->4 mappings, which is needed for
  transliterating with flying accents as GNU does, like "u.
- Lots of warnings have been fixed, the major part of the code is
  now WARNS=6 clean.
- New section 1 and section 5 manual pages have been added.
- Some GNU-specific calls have been implemented:
  iconvlist(), iconvctl(), iconv_canonicalize(), iconv_open_into()
- Support for GNU's //IGNORE suffix has been added.
- The "-" argument for stdin is now recognized in iconv(1) as per POSIX.
- The Big5 conversion module has been fixed.
- The iconv.h header files is supposed to be compatible with the
  GNU version, i.e. sources should build with base iconv.h and
  GNU libiconv. It also includes a macro magic to deal with the
  char ** and const char ** incompatibility.
- GNU compatibility: "" or "char" means the current local
  encoding in use
- Various cleanups and style(9) fixes.

Approved by:	delphij (mentor)
Obtained from:	The NetBSD Project
Sponsored by:	Google Summer of Code 2009
2011-02-25 00:04:39 +00:00
Brooks Davis
95d068b14b Enable the check for negative permissions (the group on a file can't do
something "everyone" can) by default.

X-MFC after:	never
2011-02-24 23:51:59 +00:00
Michael Tuexen
0191fb6de2 * Fix several bugs where the scaled versions of srtt and rttvar
where used incorrectly.
* Use appropriate variable names for RTO instead of RTT.

MFC after: 3 months.
2011-02-24 22:58:15 +00:00
Michael Tuexen
be1d917696 * Cleanup the code computing the retransmission timeout.
* Fix an initialization bug for the scaled variance of the RTO.

MFC after: 3 months.
2011-02-24 22:36:40 +00:00
John Baldwin
056c6c933c Use ffs() to locate free bits in the inode and block bitmaps rather than
loops with bit shifts.
2011-02-24 22:11:36 +00:00
Dimitry Andric
b7f8a68b04 Recently, in upstream clang, a fix was done to add -L/usr/lib to the
arguments passed to ld, when linking.  This was to appease configure
scripts in several ports, that grep for such a -L option in "${CC} -v"
output, to determine the startup objects passed to ld.  Note ld itself
does not need to be told about /usr/lib, since it has this path builtin
anyway.

However, if clang is built as a bootstrap tool during buildworld, it
should not use *anything* outside ${WORLDTMP} to include or link with.
The upstream fix to add -L/usr/lib breaks this assumption, and can thus
cause libraries from /usr/lib to be linked in during buildworld.

This can result in buildworld dying during linking of zinject, where it
picks up the wrong copy of libzpool.so, eventually leading to:

/usr/obj/usr/src/tmp/lib/libthr.so.3: undefined reference to `_rtld_get_stack_prot'

Fix this issue by not adding any hardcoded paths, but by looping through
the run-time library path list, which is already correctly set for the
bootstrap phase.

Reported by:	datastream.freecity@gmail.com
Pointy hat to:	dim
2011-02-24 21:45:58 +00:00
Remko Lodder
0e2924e78a Add sticky.8 to the obsolete files since it had been
moved to sticky.7

Submitted by:	maxim and pluknet
2011-02-24 18:13:53 +00:00
Hans Petter Selasky
f728775b21 - Add missing xhci(4) manual page.
- Minor update in some USB manual pages.

MFC after:	3 days
Approved by:	thompsa (mentor)
2011-02-24 18:08:23 +00:00
Remko Lodder
71e4f6595b Add wording about the priority range and
mention what effect this has at certain
values.

PR:		124469
Obtained from:	NetBSD nice.1 v1.14
MFC after:	1 week
2011-02-24 16:13:33 +00:00
Martin Matuska
124ddf3e83 Update xz to release 5.0.1
MFC after:	1 week
2011-02-24 13:42:35 +00:00
Martin Matuska
92129d14e1 Vendor import of xz (stripped)
Git revision:	7232fcf96bf4bd5f9cd4fc6c93ca2912c665e004
Release:	5.0.1
2011-02-24 13:18:49 +00:00
Remko Lodder
a1f7c49554 Move the sticky manual from section 8 to section
7 like NetBSD has, since this is not a command
on itself.

PR:		124468
MFC after:	1 week
2011-02-24 13:03:47 +00:00
Pietro Cerutti
b7ad88af9d - Fix typo
Approved by:	davidxu
2011-02-24 10:21:26 +00:00
Sergey Kandaurov
7ec9c8d170 Remove sysctl vm.max_proc_mmap used to protect from KVA space exhaustion.
As it was pointed out by Alan Cox, that no longer serves its purpose with
the modern UMA allocator compared to the old one used in 4.x days.

The removal of sysctl eliminates max_proc_mmap type overflow leading to
the broken mmap(2) seen with large amount of physical memory on arches
with factually unbound KVA space (such as amd64).  It was found that
slightly less than 256GB of physmem was enough to trigger the overflow.

Reviewed by:	alc, kib
Approved by:	avg (mentor)
MFC after:	2 months
2011-02-24 09:22:56 +00:00
Hans Petter Selasky
25b74dab1d - Add support for some non-standard USB MIDI devices from Roland, by
means of allowing vendor specific interface class for audio and MIDI devices.
- Add new quirks for this. The vendor and product list in OpenBSD's
dev/usb/umidi_quirks.c was used as reference.

MFC after:	14 days
Approved by:	thompsa (mentor)
2011-02-24 09:13:47 +00:00
Doug Barton
e1c7c9d377 The new accounting file needs to be 644 so that unprivileged users
can use lastcomm(1)
2011-02-24 06:28:48 +00:00
Rebecca Cran
23d5a8b50f Use the cprd_mem field when setting the start and length for a memory
resource - the layout of cprd_port is identical but using cprd_mem
makes the code easier to understand.

PR:		kern/118493
Submitted by:	Weongyo Jeong <weongyo.jeong at gmail.com>
MFC after:	3 days
2011-02-23 21:45:28 +00:00
Dimitry Andric
ceed9a6cf9 Fix the 32-bit build stage on amd64 when WITH_CTF is enabled. It seems
ctfconvert will corrupt object files that are compiled with -g, if it is
not run with -g itself.

To fix it, remove -g from CFLAGS in lib/librt/Makefile.  If you need to
compile this library with debug info, use DEBUG_FLAGS=-g instead, which
will work correctly, even when using WITH_CTF.
2011-02-23 21:17:38 +00:00
Sergey Kandaurov
c0bc8d1008 Clean up the now unused #include statement.
Approved by:	kib (mentor)
MFC after:	1 week
X-MFC with:	r218972
2011-02-23 18:22:40 +00:00
Josh Paetzel
8a20c5a39f Alter comment to reflect change in code.
Try atacontrol if camcontrol fails.

Approved by:	kib (mentor, implicit)
2011-02-23 17:52:26 +00:00
Rebecca Cran
ce52330412 Handle memory allocation failures in include().
PR:		i386/85652
Submitted by:	Ben Thomas <bthomas at virtualiron.com>
MFC after:	3 days
2011-02-23 17:17:05 +00:00
Nathan Whitehorn
84203a03b7 Add a catch-all for miscellaneous RAID volumes while seeking a better
solution here. It would really help if CAM devices were part of newbus.
2011-02-23 13:51:41 +00:00
Konstantin Belousov
25a9cfc9e8 Move the max_threads_per_proc and max_threads_hits variables to the
file where they are used. Declare the kern.threads sysctl node at the
same location. Since no external use for the variables exists, make them
static.

Discussed with:	dchagin
MFC after:	1 week
2011-02-23 13:50:24 +00:00
John Baldwin
a328d5359c Revert previous change, the existing check was correct.
Pointy hat to:	jhb
2011-02-23 13:25:42 +00:00
John Baldwin
21f8f506fb Use umtx_key objects to uniquely identify futexes. Private futexes in
different processes that happen to use the same user address in the
separate processes will now be treated as distinct futexes rather than the
same futex.  We can now honor shared futexes properly by mapping them to a
PROCESS_SHARED umtx_key.  Private futexes use THREAD_SHARED umtx_key
objects.

In conjunction with:	dchagin
Reviewed by:	kib
MFC after:	1 week
2011-02-23 13:23:28 +00:00
John Baldwin
3379ac59af Expose the umtx_key structure and API to the rest of the kernel.
MFC after:	3 days
2011-02-23 13:19:14 +00:00
John Baldwin
6e2b68aab6 Properly handle BARs bigger than 4G. The '1' was treated as an int
causing the size calculation to be truncated to the size of an int
(32-bits on all current architectures).

Submitted by:	Anish  akgupt3 of gmail
MFC after:	1 week
2011-02-23 12:58:50 +00:00
John Baldwin
329b4acb91 Fix off-by-one error in check against max_threads_per_proc.
Submitted by:	arundel
MFC after:	1 week
2011-02-23 12:56:25 +00:00
Rebecca Cran
65d8409cee Calculate and return the count in vmspace_swap_count as a vm_offset_t
instead of an int to avoid overflow.

While here, clean up some style(9) issues.

PR:		kern/152200
Reviewed by:	kib
MFC after:	2 weeks
2011-02-23 10:28:37 +00:00
Rebecca Cran
974206cf70 Fix typos - remove duplicate "is".
PR:		docs/154934
Submitted by:	Eitan Adler <lists at eitanadler.com>
MFC after:	3 days
2011-02-23 09:22:33 +00:00
Pyun YongHyeon
8f382a1fd0 Remove unnecessary controller reinitialization which resulted in
link flips during alias address insertion or dhclient operation.
While I'm here remove dc_reset() in DC_ISR_BUS_ERR case. Device is
fully reinitialized again in dc_init_locked().
2011-02-23 02:40:31 +00:00
Doug Barton
0a6cd3ac6d Update how accounting log files are rotated.
The old version had a race between the time that the old file was
cp'ed to acct.0 and the time that 'sa -s' was run that prevented
the commands that occurred in the meantime from being backed up.

It's also arguable that the old version was inefficient in using
cp which can be a problem on a space-constrained system.

This version avoids both problems, albeit it's considerably more
complicated. The advantage of putting the log rotation in the rc.d
script is that it can handle the _enable and _file questions without
having to do gymnastics to discover either value in the periodic script.

As a side effect of reviewing the rc.d script I cleaned it up a bit.
2011-02-22 21:13:40 +00:00
Josh Paetzel
6fd359f8f4 Added patch-functions-upgrade which should fix some kernel panics
doing upgrades and uninstalling linux compat ports.

Submitted by:	Joerg-Christian Boehme <joerg@chaosdorf.de>
Approved by:	kib (mentor, implicit)
2011-02-22 19:37:12 +00:00
Josh Paetzel
646a7a09f5 Better method for grabbing disk name, dmesg may produce mangled output.
Approved by:	kib (mentor, implicit)
2011-02-22 19:18:56 +00:00
Bernhard Schmidt
893c4d6ef1 Make sure to only accept and handle action frames which are for us. In
promiscuous mode we might receive stuff which otherwise gets filtered
by hardware.
2011-02-22 19:05:42 +00:00
Jaakko Heinonen
75297f6e48 Xref makefs(8).
PR:		154708
Submitted by:	jhs
2011-02-22 15:31:40 +00:00
John Baldwin
4cef260f42 Fix whitespace nit. 2011-02-22 14:58:14 +00:00
Alan Cox
4d2f3d2cde Eliminate two dubious attempts at optimizing the implementation of a
file's last accessed, modified, and changed times:

TMPFS_NODE_ACCESSED and TMPFS_NODE_CHANGED should be set unconditionally
in tmpfs_remove() without regard to the number of hard links to the file.
Otherwise, after the last directory entry for a file has been removed, a
process that still has the file open could read stale values for the last
accessed and changed times with fstat(2).

Similarly, tmpfs_close() should update the time-related fields even if all
directory entries for a file have been removed.  In this case, the effect
is that the time-related fields will have values that are later than
expected.  They will correspond to the time at which fstat(2) is called.

In collaboration with:	kib
MFC after:	1 week
2011-02-22 14:47:10 +00:00
Nathan Whitehorn
addc19a4f4 Add support for optional distributions, installation of the ports tree and
src. Fitting all of this on a single CD along with a full system requires
changing the default compression algorithm from gzip to xz.
2011-02-22 13:56:59 +00:00
Yoshihiro Takahashi
fb260f4f74 MFi386: revision 218926
In sys/boot/i386/boot2/boot2.c, change the type of the 'opts' variable
  from uint16_t back to uint32_t.  The actual option bitmasks (RB_* and
  RBX_*) assume at least a 32 bit variable.

  Submitted by:	rdivacky
2011-02-22 13:52:03 +00:00
Lawrence Stewart
094b50be20 Use a single list to simplify future maintenance and ensure all list items are
aligned the same (no functional change at the moment as both list items are the
same number of characters).

Sponsored by:	FreeBSD Foundation
MFC after:	3 months
X-MFC with:	218912
2011-02-22 10:09:34 +00:00
Maxim Sobolev
8c6269ba81 Make code more friendly to the non-C99 compilers - don't allocate
local variables in the `for' loop declaration. This allows trunk
newsyslog.c to be compiled on 7.x. This change should be no-op from
the functional POV.
2011-02-22 09:11:47 +00:00
Ulrich Spörlein
1bd8df43b8 Regen src.conf(5) after r218941 and r218942. 2011-02-22 08:21:22 +00:00
Ulrich Spörlein
705669adda The default for FDT has changed, rename the flag/options file. 2011-02-22 08:20:12 +00:00
Ulrich Spörlein
423102c6fa Flesh out WITHOUT_GROFF support to DTRT.
A full featured groff is required during buildworld, so build it always
and don't rely on it being present on the host system.

vgrind(1) is tightly coupled to a roff processor and will not be
built/installed when groff is disabled. Also much of the roff'ed
documentation under share/doc will not be built/installed when
WITHOUT_GROFF is defined.

Reviewed by:	ru (partial)
2011-02-22 08:13:49 +00:00
Ulrich Spörlein
3dfe8ce942 Teach tools/install.sh the -d directory mode.
Sync up with flags understood by install(1) [1], and make install(1)'s
usage output not hide the clearly documented -M flag.

PR:		misc/154739 [1]
Submitted by:	arundel
2011-02-22 08:07:17 +00:00
Jayachandran C.
ba8d74d95f Fix bzero() for 64-bit.
The existing implementation of bzero incorrectly clears bytes when the
start address is not word aligned. Fix it by using REG_SHI macro which
works on both 32 and 64 bit.

Submitted by:	Artem Belevich (fbsdlist at src cx)
2011-02-22 07:49:51 +00:00