Commit Graph

12612 Commits

Author SHA1 Message Date
Sean Farley
08c59cc33e Merge from head to stable/8:
r200423:
Remove a dead store.
2009-12-18 20:05:10 +00:00
Brooks Davis
c1dde08ce2 MFC r200366
Add a missing else that negated the truncation of ki_ngroups to NGROUPS.

Submitted by:   Dmitry Pryanishnikov <lynx dot ripe at gmail dot com>
2009-12-18 06:09:43 +00:00
John Baldwin
5ff95453cc MFC 199606, 199614:
Add an internal _once() method.  This works identical to pthread_once(3)
with the additional property that it is safe for routines in libc to use
in both single-threaded and multi-threaded processes.  Multi-threaded
processes use the pthread_once() implementation from the threading library
while single-threaded processes use a simplified "stub" version internal
to libc.
2009-12-17 20:41:27 +00:00
Konstantin Belousov
b6050120db MFC r199826:
sigset() is the name of function specified by SUSv4.
Replace it to avoid conflict.
2009-12-17 18:56:52 +00:00
Marcel Moolenaar
83fe91c2f0 MFC rev 200498:
Work-around a race condition on ia64 while unlocking a contested lock.
2009-12-17 02:06:07 +00:00
Robert Watson
f7000239aa Merge r197841 from head to stable/8:
Add a new errno, ENOTCAPABLE, to be returned when a process requests an
  operation on a file descriptor that is not authorized by the descriptor's
  capability flags.

  Sponsored by:	Google
2009-12-14 13:13:43 +00:00
Doug Barton
391a9677be MFC r199958:
Update to BIND 9.6.1-P2. The vulnerability this is designed to fix is
related to DNSSEC validation on a resolving name server that allows
access to untrusted users. If your system does not fall into all 3 of
these categories you do not need to update immediately.
2009-12-11 01:23:58 +00:00
Andrew Thompson
4b56fe67b6 MFC r199575
- fix a transfer cancelling bug/segfault [1]
  - correct a return code in the transfer cancel function.
  - add new API function, libusb20_tr_bulk_intr_sync().

 Submitted by:	HPS
 Reported by:	Robert Jenssen [1]
2009-12-09 21:34:38 +00:00
Fabien Thomas
d7fbf69d96 MFC 198433:
Not all Intel Core (TM) CPUs implement PMC_CLASS_IAF fixed-function
counters.  For such CPUs, use an alternate mapping of convenience
names to events supported by PMC_CLASS_IAP programmable counters.
2009-12-07 20:44:43 +00:00
Xin LI
931d13672c MFC revision 197579 and 199617:
Add two new fcntls to enable/disable read-ahead:

 - F_READAHEAD: specify the amount for sequential access.  The amount is
   specified in bytes and is rounded up to nearest block size.
 - F_RDAHEAD: Darwin compatible version that use 128KB as the sequential
   access size.

A third argument of zero disables the read-ahead behavior.

Please note that the read-ahead amount is also constrainted by sysctl
variable, vfs.read_max, which may need to be raised in order to better
utilize this feature.

Thanks Igor Sysoev for proposing the feature and submitting the original
version, and kib@ for his valuable comments.
2009-12-07 19:59:28 +00:00
John Baldwin
cd6d7a15cf MFC 200061:
The fd_mask type is an unsigned long, not an int, so treat the mask as a
long instead of an int when examining the results of select() to look for
RPC requests.  Previously this routine would ignore RPC requests to sockets
whose file descriptor mod 64 was greater than 31 on a 64-bit platform.
2009-12-07 19:07:45 +00:00
Christian Brueffer
02a7ccf746 MFC: r200019
Fix the dprintf() prototype.
2009-12-07 08:38:44 +00:00
Jilles Tjoelker
2ffbb2cea1 MFC r198406: wordexp(3): fix some bugs with signals and long outputs
* retry various system calls on EINTR
* retry the rest after a short read (common if there is more than about 1K
  of output)
* block SIGCHLD like system(3) does (note that this does not and cannot
  work fully in threaded programs, they will need to be careful with wait
  functions)

PR:		90580
2009-12-06 22:14:58 +00:00
Jaakko Heinonen
21148e9257 MFC r199843:
Clarify that the value of the fts_info field is different in post-order.

Approved by:	trasz (mentor)
2009-12-04 11:26:52 +00:00
Christian Brueffer
e043b4c399 MFC: r199988
Add an .Nm for strncat.
2009-12-04 07:08:15 +00:00
Garrett Wollman
28f2223875 MFC revs 199781,199782,199784,199785,199786:
Eliminate dead stores.

  In __mbsconv(), if prec was zero, nconv could have been used
  uninitialized.  Initialize it to a safe value so that there's no
  chance of returning an error if stack garbage happens to be equal to
  (size_t)-1 or (size_t)-2.

  In svc_raw_reply(), don't leave stat uninitialized if the MSG_ACCEPTED
  && SUCCESS case succeeds.  The stack garbage might be zero.

  In clnt_raw_create(), avoid minor race condition initializing the
  file-scope variable clntraw_private.

Found by:		Clang static analyzer
2009-12-02 02:47:29 +00:00
Fabien Thomas
9e5aec3978 MFC 198339:
Fix the NO_PROXY handling.

PR: 139751
2009-12-01 23:23:52 +00:00
Peter Pentchev
c6a4ef661d Merge rev. 199180 to 8.x-STABLE, the change to isblank(3):
Fix the grammar as in the PR, and then some.

PR:             140454
Submitted by:   Jeremy Huddleston <jeremyhu@apple.com>
2009-11-25 10:52:07 +00:00
Marcel Moolenaar
374a76c186 MFC r198450:
Implement _umtx_op_err() for ia64.
2009-11-24 03:23:40 +00:00
Christian Brueffer
25cf40cbc9 MFC: r199320
Fix grammar.
2009-11-23 09:44:08 +00:00
Christian Brueffer
234c497e6a MFC: r199317
Fix a memory leak in acl_from_text() in case the conversion succeeded.
2009-11-23 09:10:08 +00:00
Hajimu UMEMOTO
1b05fd6074 MFC r199092: Add gai_strerror() catalog for ja_JP.UTF-8
and ja_JP.eucJP.
2009-11-22 17:08:52 +00:00
Hajimu UMEMOTO
b119cf74a1 MFC r199083: Add NLS catalogs support to gai_strerror(3).
Controlled by NLS define.
2009-11-22 17:05:46 +00:00
Christian Brueffer
a154a457ff MFC: r199255, r199257
Improved the manpage description.  The committed wording
was provided by jhb.

Remove a note about vfork(4) going to be eliminated, it's here to stay.
2009-11-20 06:55:35 +00:00
Hajimu UMEMOTO
a1a32e5e31 MFC r199188: ANSIfy. 2009-11-18 14:40:00 +00:00
John Baldwin
41f114f107 MFC 198986:
Fix a copy-paste bug when reading data from the last 3 (7 for PAE) bytes of
a page mapped by a large page in the kernel.
2009-11-17 16:50:57 +00:00
Christian Brueffer
841de8ae65 MFC: r199046
Fix a copy+paste error by checking the correct variable against MM_NULLACT.
2009-11-16 08:26:56 +00:00
Hajimu UMEMOTO
26520868bc MFC r199080, r199081, r199082:
Add ja_JP.UTF-8 and ja_JP.eucJP catalogs.
2009-11-16 03:52:18 +00:00
Andrew Thompson
1110a4604f MFC r199055
- fix refcounting error during data transfer
 - fix a memory leak on the USB backend
 - fix invalid pointer computations (in one case memory outside the allocated
   area was written in LibUSB v1.0)
 - make sure memory is always initialised, also in failing cases
 - add missing functions from v1.0.4

PR:		usb/140325
2009-11-11 01:27:58 +00:00
Christian Brueffer
d5c7a9c3d9 MFC: r198542
Initialize f_rabuf in the raw device case. A subsequent close()
later on would try to free it, leading to a crash.
2009-11-04 13:40:04 +00:00
Alan Cox
225da9692c MFC r197524
Make malloc(3) superpage aware.
2009-11-02 18:44:01 +00:00
Alan Cox
12e8008e6d MFC r197163
Add the FBSD_1.2 namespace.

Reminded by:	kib
2009-11-01 20:24:17 +00:00
Alan Cox
588b5e6ee8 MFC r197331, r197394
Add getpagesizes(3).
2009-11-01 19:22:07 +00:00
Stacey Son
83613795b2 MFC 197240,197241,197242,197243,197293,197294,197407:
Add EVFILT_USER filter and EV_DISPATCH/EV_RECEIPT flags to kevent(2).

Approved by: rwatson (mentor)
2009-10-31 21:22:18 +00:00
Edwin Groothuis
05edd60be4 MFCs of r197764, r197765, r197766, r197847:
Modified locale(1) to be able to show the altmon_X fields and the
[cxX]_fmt's.  Also modify the "-k list" option to display only
fields with a certain prefix.

Add the comment "(FreeBSD only)" to the altmonth_x keywords
2009-10-31 06:35:40 +00:00
Alexander Motin
e4692ffe5b MFC rev. 197621:
Fix bug, when RADIUS client gave up after single sendto() error, do not
trying backup servers.

PR:		kern/103764, misc/139214
2009-10-30 13:02:08 +00:00
Alexander Motin
22c6623dc4 MFC rev. 197086:
Add simple embedded RADIUS server support to libradius, by extending existing
API, keeping backward compatibility.

First consumer for this functionality is going to become forthcoming MPD-5.4,
supporting CoA and DR of RFC 3576: Dynamic Authorization Extensions to RADIUS.
2009-10-30 12:57:28 +00:00
Andrew Thompson
de411f4cd2 MFC r198376
Prevent wraparound of the timeout variable.

Submitted by:	HPS
Approved by:	re (kib)
2009-10-23 12:02:01 +00:00
Alexander Kabaev
8ed4544ca7 MFC Revision 197277:
Make libc.a provide __stack_chk_fail_local weak alias. This is
needed to satisfy static libraries that are compiled with -fpic
and linked into static binary afterwards. Several libraries in
gcc are examples of such static libs.

Approved by: re (kib)
2009-10-20 19:05:43 +00:00
Konstantin Belousov
f7bca35675 MFC r197958:
In nanosleep(2), note that the calling thread is put to sleep, not the
whole process. Also explicitely name the parameter that specifies
sleep interval.

Approved by:	re (kensmith)
2009-10-14 14:26:19 +00:00
Christian Brueffer
225cdb4e6c MFC: r197312
Fix setfib(1) section number.

Approved by:	re (kib)
2009-10-09 13:52:49 +00:00
Joe Marcus Clarke
6c09384ae8 MFC: rev. 197681
Correct the pthread stub prototype for pthread_mutexattr_settype to allow for
the type argument.  This is known to fix some pthread_mutexattr_settype()
invocations, especially when it comes to pulseaudio.

Approved by:	re (kib)
2009-10-04 21:46:43 +00:00
Brooks Davis
ad00749016 MFC r196990:
cr_groups is no longer embedded in struct ucred and is instead stored
in a seperate array.  As such we need to use kvm_read rather than bcopy
to populate the ki_groups field.

This fixes a crash when running ps -ax on a coredump.

Reported by:	brucec
Tested by:	brucec
MFC after:	3 days
Approved by:	re@ (kib)
2009-09-24 21:35:13 +00:00
Yoshihiro Takahashi
8b1e4172cb MFC: r197322 and r197374
Revision: 197322
  Log:
    Correct BIOS header sanitizing on pc98.

  Revision: 197374
  Log:
    Disable a check on a disk size because it's too strict.  This change is
    to avoid using incorrect geometry.

   It seems that this is the same problem in g_part_bsd_read()@g_part_bsd.c.

   Reviewed by: rink

Approved by:	re (kib)
2009-09-24 15:34:18 +00:00
Attilio Rao
917c07ca1d MFC r197445:
Let fall down in the hard path (thus handling shared waiters wakeup
correctly) for the shared waiters also in the rwlock held in shared mode
as well, fixing possible deadlocks.

Please note that this is a special condition as we want this fix in
before RC2 as we assume it is critical and so it has been handled
as an instant-merge.  For the STABLE_7 branch, 1 week before the MFC
is assumed.

Approved by:	re (kib)
2009-09-24 08:35:17 +00:00
Tim Kientzle
52bd177ff7 MFC r196962: Fix /usr/bin/unzip: A bug deep in libarchive's read-ahead logic
(incorrect handling of zero-length reads before the copy buffer is
allocated) is masked by the iso9660 taster.  Tar and cpio both enable
that taster so were protected from the bug; unzip is susceptible.

This both fixes the bug and updates the test harness to exercise
this case.

Submitted by: Ed Schouten diagnosed the bug and drafted a patch
Approved by:	re (kib)
2009-09-17 06:31:59 +00:00
Attilio Rao
623b4aa57e MFC r197224:
Use explicit int values for the device states in order to allow, if
necessary, in the future, adds of new states without breaking ABI
between revisions.

Please note that this is a special condition as we want this fix in
before RC1 as we assume it is critical and so it has been handled
as an instant-merge.

Approved by:	re (kib)
2009-09-15 19:24:18 +00:00
Konstantin Belousov
80bc871bdd MFC r196861:
Handle zero size for posix_memalign. Return NULL or unique address
according to the 'V' option.

Approved by:	re (kensmith)
2009-09-12 18:16:46 +00:00
Ken Smith
ac7d4c93c6 Remove extra debugging support that is turned on for head but turned off
for stable branches:

	- shift to MALLOC_PRODUCTION
	- turn off automatic crash dumps
	- Remove kernel debuggers, INVARIANTS*[1], WITNESS* from
	  GENERIC kernel config files[2]

[1] INVARIANTS* left on for ia64 by request marcel
[2] sun4v was left as-is

Reviewed by:	marcel, kib
Approved by:	re (implicit)
2009-09-10 14:04:00 +00:00
Edward Tomasz Napierala
b9d99ec84d MFC r196740:
Fix regression introduced with NFSv4 ACL support - make acl_to_text(3)
and acl_calc_mask(3) return error instead of crashing when acl passed
to them is NULL.

Submitted by:	markus
Reviewed by:	rwatson
Approved by:	re (kib)
2009-09-05 15:01:56 +00:00