Commit Graph

156846 Commits

Author SHA1 Message Date
jilles
b0b0c85b53 Preserve file flags on symlinks in cp -Rp.
This reported ENOSYS before.

PR:		bin/111226 (part of)
Submitted by:	Martin Kammerhofer
Approved by:	ed (mentor)
MFC after:	3 weeks
2009-05-30 10:36:14 +00:00
adrian
ddadeb61d5 Make ipi_cpu() function as intended.
IPI's in Xen are implemented through hypervisor event channels.
The MP code creates a pair of IRQs for each base IPI per CPU
(one for IPI function dispatch calls, one for IPI bitmap dispatch calls.)
Using PCPU_GET() was returning the IRQ of the IPI handler for the
current CPU; thus calls to ipi_cpu() were sending itself a message.
Instead, looking up the IPI in the target CPU ipi-to-irq map is needed.

Note: This doesn't fix Xen SMP (far from it!) but it at least
sends IPI's to the right places. Next - sending IPIs..

PR:	135069
2009-05-30 08:53:13 +00:00
delphij
7059dd02fa Attempt to fix build by updating hostid to follow the new world order. 2009-05-30 07:33:32 +00:00
kientzle
5c79b23a33 Link libarchive against -lmd and -lcrypto.
Thanks to Ed Schouten for the clue.
2009-05-30 07:08:16 +00:00
adrian
9849e67ed2 Correctly report the IPI IRQs being created; make it clear what vectors they are for. 2009-05-30 06:37:03 +00:00
sam
b54272d1c3 fix typo 2009-05-30 01:33:05 +00:00
thompsa
b064d23a53 Revert the size_t part of the last commit for the moment, this blows up the
USB_ADD_BYTES macro.
2009-05-30 00:22:57 +00:00
sam
36bf6c9b02 validate tx rate(s) in the raw xmit path
Tested by:	"Paul B. Mahol" <onemda@gmail.com> (rum, bwi)
2009-05-29 23:41:31 +00:00
sam
a025c3b40e add ieee80211_isratevalid 2009-05-29 23:39:16 +00:00
delphij
33788b835a Code cleanup for nfs4 utilities:
- Mark internal routines as static;
 - Eliminate unused parameters where possible, mark __unused for others;
 - Remove unused variables;
 - Use %jd for int64_t values in printf();
 - Add appropriate %d for printf to match its parameter;
 - Rename a variable to resolve conflict with revoke(2);

Reviewed by:	rmacklem
Tested with:	make universe (bugs are mine)
2009-05-29 22:19:45 +00:00
thompsa
d5497c5f03 Fix function arguments were previously they matched the typedef by accident. 2009-05-29 22:11:22 +00:00
jamie
572db1408a Place hostnames and similar information fully under the prison system.
The system hostname is now stored in prison0, and the global variable
"hostname" has been removed, as has the hostname_mtx mutex.  Jails may
have their own host information, or they may inherit it from the
parent/system.  The proper way to read the hostname is via
getcredhostname(), which will copy either the hostname associated with
the passed cred, or the system hostname if you pass NULL.  The system
hostname can still be accessed directly (and without locking) at
prison0.pr_host, but that should be avoided where possible.

The "similar information" referred to is domainname, hostid, and
hostuuid, which have also become prison parameters and had their
associated global variables removed.

Approved by:	bz (mentor)
2009-05-29 21:27:12 +00:00
jamie
64785ac659 Fix some inaccuracies in the extensible parameter addition.
Approved by:	bz (mentor)
2009-05-29 21:17:22 +00:00
lulf
689dc365dd - Use sig_atomic_t for signal handler variables.
MFC after:	1 week
2009-05-29 20:01:50 +00:00
maxim
7f5b0418df o Add missed quotation mark. 2009-05-29 19:45:39 +00:00
pjd
d747431e06 - Move from mount(2) to nmount(2). This should allow to convert MNT_SNAPSHOT
flag from a mount flag to FS-specific flag.
- Simplify usage. Instead of 'mksnap_ffs /mnt/foo /mnt/foo/snap' allow to
  give only one argument: 'mksnap_ffs /mnt/foo/snap'. Old usage is also
  accepted for now.
- Add an example of how to mount a snapshot.
2009-05-29 19:18:41 +00:00
trasz
13ace3be9e Update __FreeBSD_version after addition of mnt_xflag. Add a note
to UPDATING.
2009-05-29 18:50:27 +00:00
thompsa
44c17bdf07 s/usb2_/usb_/ on all typedefs for the USB stack. 2009-05-29 18:46:57 +00:00
alc
40062c9280 Modify vm_hold_load_pages() to allocate pages using VM_ALLOC_NOOBJ rather
than using the kernel object.  This allows the elimination of page queues
locking from vm_hold_free_pages().
2009-05-29 18:35:51 +00:00
stas
b6666822bf - Prevent buffer overflow in IPFilter's load_http function used to load
ipfilter tables via http by the user-level ippool utility. Previously
  the 1024-byte buffer used to store a http request coudld easily overflow
  if the length of the hostname part of the url passes exceeded 496 bytes. [1]
- Use snprintf to prevent possieble buffer overflows in future. [2]
- Do not try to close the descriptor twice on failure. [2]

Reported by:	Maksymilian Arciemowicz <cxib@securityreason.com> [1]
Obtained from:	NetBSD CVS [2]
MFC after:	2 weeks
2009-05-29 16:24:23 +00:00
thompsa
7411c6484b Free device strings.
Spotted by:	HPS
2009-05-29 16:15:56 +00:00
trasz
a3d3f095b1 There is only one spare MNT_ flag left, and I want to use it for NFSv4 ACLs.
Make room for additional filesystem flags now, to avoid breaking ABI later.

Reviewed by:	kib@
2009-05-29 15:00:04 +00:00
rwatson
24aebfac43 Minor style tweak. 2009-05-29 14:25:51 +00:00
rwatson
baa6dded68 Since sched_pin() and sched_unpin() are already inlined, don't manually
inline in rmlocks.
2009-05-29 14:20:10 +00:00
jhb
9f31bca435 Remove extra cpu_spinwait() invocations. This should really only be used
in tight spin loops, not in these edge cases where we restart a much
larger loop only a few times.

Reviewed by:	attilio
2009-05-29 14:03:34 +00:00
jhb
cdcee493a2 Tweak a few comments on adaptive spinning. 2009-05-29 13:56:34 +00:00
adrian
9217f2901b Revert to 2-clause. 2009-05-29 13:48:42 +00:00
adrian
cf3db32dfd Fix the Xen TOD update when the hypervisor wall clock is nudged.
The "wall clock" in the current code is actually the hypervisor start time.
The time of day is the "start time" plus the hypervisor "uptime".

Large enough bumps in the dom0 clock lead to a hypervisor "bump" which is
implemented as a bump in the start time, not the uptime. The clock.c routines
were reading in the hypervisor start time and then using this as the TOD.
This meant that any hypervisor time bump would cause the FreeBSD DomU to
set its TOD to the hypervisor start time, rather than the actual TOD.

This fix is a bit hacky and some reshuffling should be done later on
to clarify what is going on. I've left the wall clock code alone.
(The code which updates shadow_tv and shadow_tv_version.)
A new routine adds the uptime to the shadow_tv, which is then used to
update the TOD.

I've included some debugging so it is obvious when the clock is nudged.

PR:	135008
2009-05-29 13:43:21 +00:00
adrian
a5c69d4a68 Migrate the Xen hypervisor clock reading routines into something
sharable.
2009-05-29 13:36:06 +00:00
rwatson
52ba259960 Make the rmlock(9) interface a bit more like the rwlock(9) interface:
- Add rm_init_flags() and accept extended options only for that variation.
- Add a flags space specifically for rm_init_flags(), rather than borrowing
  the lock_init() flag space.
- Define flag RM_RECURSE to use instead of LO_RECURSABLE.
- Define flag RM_NOWITNESS to allow an rmlock to be exempt from WITNESS
  checking; this wasn't possible previously as rm_init() always passed
  LO_WITNESS when initializing an rmlock's struct lock.
- Add RM_SYSINIT_FLAGS().
- Rename embedded mutex in rmlocks to make it more obvious what it is.
- Update consumers.
- Update man page.
2009-05-29 10:52:37 +00:00
weongyo
be2772a684 adds new device IDs.
PR:		usb/135009
Submitted by:	Bill Squire <billsf at 2600.COM>
2009-05-29 10:10:23 +00:00
des
ae136aabf0 Let vfs_lookup() return ENOTDIR if the path has a trailing slash and
the last component is a symlink to something that isn't a directory.

We introduce a new namei flag, TRAILINGSLASH, which is set by lookup()
if the last component is followed by a slash.  The trailing slash is
then stripped, as before.  If the final component is a symlink,
lookup() will return to namei(), which will expand the symlink and
call lookup() with the new path.  When all symlinks have been
resolved, lookup() checks if the TRAILINGSLASH flag is set, and if it
is, and the vnode it ended up with is not a directory, it returns
ENOTDIR.

PR:		kern/21768
Submitted by:	Eygene Ryabinkin <rea-fbsd@codelabs.ru>
MFC after:	3 weeks
2009-05-29 10:02:44 +00:00
des
0df4f0c59f Fix misleading comment.
MFC after:	1 week
2009-05-29 09:52:13 +00:00
rwatson
e29b09f9c2 Reduce vertical whitespace and other minor style tweaks.
Remove unused rm_initialized() macro.
2009-05-29 09:40:57 +00:00
attilio
4ae494ac2c The patch for r193011 was partially rejected when applied, complete it. 2009-05-29 08:01:48 +00:00
delphij
fb4a68cc3a Document how to enable strict RFC 1034 enforcements.
PR:		kern/129477
2009-05-29 07:55:44 +00:00
delphij
dafeb495e6 Add an option to enforce strict RFC 1034 compliance.
PR:		kern/129477
2009-05-29 07:34:54 +00:00
brian
4647ce79b7 Make dump -W show the level correctly.
PR:		129110
Submitted by:	Mike Voorhis <mvoorhis@cs.wpi.edu>
MFC after:	3 weeks
2009-05-29 07:26:44 +00:00
delphij
a62a3b6e1f Add an EXIT STATUS section to the manual page. Currently, nc(1)
does not follow sysexits(3), and returns 1 for all error cases.

PR:		docs/126451
2009-05-29 07:18:31 +00:00
ed
8d73adc757 Last minute TTY API change: remove mutex argument from tty_alloc().
I don't want people to override the mutex when allocating a TTY. It has
to be there, to keep drivers like syscons happy. So I'm creating a
tty_alloc_mutex() which can be used in those cases. tty_alloc_mutex()
should eventually be removed.

The advantage of this approach, is that we can just remove a function,
without breaking the regular API in the future.
2009-05-29 06:41:23 +00:00
delphij
fa743d1903 Implement SI_ISALIST.
PR:		kern/91293
Submitted by:	"Pedro f. Giffuni" <giffunip asme org>
Obtained from:	NetBSD
2009-05-29 06:27:30 +00:00
delphij
10c7a24940 Fix the sysinfo(SI_HW_SERIAL, emulation so that we actually get the
hostid of the machine rather than always getting "0".

PR:		kern/91293
Submitted by:	"Pedro f. Giffuni" <giffunip asme org>
Obtained from:	NetBSD
2009-05-29 06:19:37 +00:00
delphij
0339972dd9 copyinstr(9) takes parameter 'len' as a size_t *, not int *.
PR:		kern/91293
Submitted by:	"Pedro f. Giffuni" <giffunip asme org>
Obtained from:	NetBSD
2009-05-29 06:04:26 +00:00
delphij
5abf6d12a5 de-register.
Submitted by:	"Pedro f. Giffuni" <giffunip asme org>
Obtained from:	NetBSD
PR:		kern/91293
2009-05-29 05:58:46 +00:00
delphij
88adf607ea svr4_sys_getdents64() should not assume that the cookie would exist
everywhere.

PR:		kern/91293
Submitted by:	"Pedro f. Giffuni" <giffunip asme org>
Obtained from:	NetBSD
2009-05-29 05:51:19 +00:00
delphij
2095d11d4e Add new sysconfig bits, Fix the bogus numbering of the old bits.
Submitted by:	"Pedro f. Giffuni" <giffunip asme org>
Obtained from:	NetBSD
PR:		kern/91293
2009-05-29 05:37:27 +00:00
attilio
e05714ba70 Reverse the logic for ADAPTIVE_SX option and enable it by default.
Introduce for this operation the reverse NO_ADAPTIVE_SX option.
The flag SX_ADAPTIVESPIN to be passed to sx_init_flags(9) gets suppressed
and the new flag, offering the reversed logic, SX_NOADAPTIVE is added.

Additively implements adaptive spininning for sx held in shared mode.
The spinning limit can be handled through sysctls in order to be tuned
while the code doesn't reach the release, after which time they should
be dropped probabilly.

This change has made been necessary by recent benchmarks where it does
improve concurrency of workloads in presence of high contention
(ie. ZFS).

KPI breakage is documented by __FreeBSD_version bumping, manpage and
UPDATING updates.

Requested by:	jeff, kmacy
Reviewed by:	jeff
Tested by:	pho
2009-05-29 01:49:27 +00:00
delphij
7515df23bd Update netcat to the version carried with OpenBSD 4.5. 2009-05-28 23:23:49 +00:00
delphij
9d1364448b Use prototype for usage(). This makes perror(1) WARNS=6 clean.
Approved by:	gnn
2009-05-28 21:37:40 +00:00
delphij
9c4052a028 Use strlcpy(). 2009-05-28 21:12:43 +00:00