Commit Graph

133773 Commits

Author SHA1 Message Date
Warner Losh
dc0c82bc3f For both interrupt and isochronous (the patch was unclear which one it
applied to, but I'd think both), honor the timeout that's been set.
Return 0 bytes to be consistant with what libusb expects.  By default,
the timeout will be zero, so only applications that change the default
will see a change.  The patch only seems to apply to the interrupt end
points, but it should also apply to isochronous endpoints as well.

Submitted by: Maurice Castro
PR: 110122
Approved by: re (blanket)
2007-06-28 05:15:33 +00:00
Warner Losh
dcf43907af Quirk for Denver MP3 player usb.
Submitted by: Ed Schouten
PR: 107101
Approved by: re (blanket for device supprot)
2007-06-28 04:51:19 +00:00
Xin LI
a321f489a5 Space/style cleanups after last set of commits.
Approved by:	re (tmpfs blanket)
2007-06-28 02:39:31 +00:00
Xin LI
a96539bf8f Staticify most of fifo/vn operations, they should not
be directly exposed outside.

Approved by:	re (tmpfs blanket)
2007-06-28 02:36:41 +00:00
Xin LI
8d5892eeab Use vfs_timestamp instead of nanotime when obtaining
a timestamp for use with timekeeping.

Approved by:	re (tmpfs blanket)
2007-06-28 02:34:32 +00:00
Xin LI
5ff9b9158f Reorder tf_gen and tf_id in struct tmpfs_fid. This
saves 8 bytes on amd64 architecture.

Obtained from:	NetBSD
Approved by:	re (tmpfs blanket)
2007-06-28 02:32:44 +00:00
Christian S.J. Peron
cac465aa7f - Add audit_arg_audinfo_addr() for auditing the arguments for setaudit_addr(2)
- In audit_bsm.c, make sure all the arguments: ARG_AUID, ARG_ASID, ARG_AMASK,
  and ARG_TERMID{_ADDR} are valid before auditing their arguments. (This is done
  for both setaudit and setaudit_addr.
- Audit the arguments passed to setaudit_addr(2)
- AF_INET6 does not equate to AU_IPv6. Change this in au_to_in_addr_ex() so the
  audit token is created with the correct type. This fixes the processing of the
  in_addr_ex token in users pace.
- Change the size of the token (as generated by the kernel) from 5*4 bytes to
  4*4 bytes (the correct size of an ip6 address)
- Correct regression from ucred work which resulted in getaudit() not returning
  E2BIG if the subject had an ip6 termid
- Correct slight regression in getaudit(2) which resulted in the size of a pointer
  being passed instead of the size of the structure. (This resulted in invalid
  auditinfo data being returned via getaudit(2))

Reviewed by:	rwatson
Approved by:	re@ (kensmith)
Obtained from:	TrustedBSD Project
MFC after:	1 month
2007-06-27 17:01:15 +00:00
Remko Lodder
f074250999 Fix reference within TIOCNOTTY from TIOSCTTY to TIOCSCTTY.
PR:		docs/114058
Submitted by:	David Sanderson <dsanderson at panasas dot com>
Approved by:	re (bmah)
MFC After:	3 days
2007-06-27 15:14:06 +00:00
Robert Watson
dc2e1e3fae Use vm_offset_t for kmembase and kmemlimit rather than char *, avoiding
unnecessary casts, and making it possible to compile kern_malloc.c with
strict aliasing.

Submitted by:	rdivacky
Approved by:	re (kensmith)
2007-06-27 13:39:38 +00:00
Doug Rabson
7761242694 In zfs_vget, if we fail to translate an inode number to the corresponding
vnode, make sure we return an error code to the caller.

Reviewed by: pjd
Approved by: re
2007-06-27 12:00:24 +00:00
Kevin Lo
17ca0f3c6c Remove a section on the area of the debugging sysctls used to tune
enforcement.

Approved by: re (rwatson)
2007-06-27 09:32:50 +00:00
Alexander Kabaev
db97450987 Fix sbrk.S to use _end symbol the same way brk.s was fixed some time
ago. sbrk.S should have gotten the same change then but was forgotten.

Approved by:	re (bmah)
PR:		kern/114049
2007-06-27 02:45:37 +00:00
Rong-En Fan
72a504d944 Force commit to note in rev. 1.1435 the correct discussion for
removing warning about nullfs is

http://docs.freebsd.org/cgi/mid.cgi?6eb82e0706182246q6563ba03x31038082125b50ae

Approved by:	re (implicit)
Reminded by:	des
2007-06-27 02:34:22 +00:00
Robert Watson
6b25fa2abb Update suser(9) and priv(9) to document that the 'flags' argument is now
unused -- SUSER_RUID and SUSER_ALLOWJAIL are no longer defined or used.

Approved by:	re (bmah)
2007-06-26 23:12:05 +00:00
Matt Jacob
baa219ed6f Pointy hat to me. Committed with building.
Approved by:	re (ken, implicit)
2007-06-26 23:08:57 +00:00
Robert Watson
cc9bdf2a62 Sync comments to code: we now use priv_check() rather than suser() to
determine privilege.

Approved by:	re (bmah)
2007-06-26 23:01:01 +00:00
Xin LI
ef29ac7f76 MFp4: Bugfixes for truss(1):
- Fix logic handling execve().  We will not be able to
   obtain information otherwise.
 - truss coredump [1].
 - truss does not work against itself [2].

PR:		bin/58970 [1], bin/45193 [2]
Submitted by:	Howard Su
Approved by:	re (kensmith)
2007-06-26 22:42:37 +00:00
Remko Lodder
266d3a7a09 Add Viking Interworks 256MB as an ata device; this might give
some false positives but at this moment it is better to add
support then to dont have it at all (comment from Soren).

PR:		kern/111516
Submitted by:	Thomas Nystrom <thn at saeab dot se>
Approved by:	re (kensmith)
Approved by:	imp (mentor)
OK'ed by:	sos (With the comment noted above about false
		positives).
2007-06-26 22:13:43 +00:00
Attilio Rao
6a0ce57d10 Fix an old standing LOR between callout_lock and sleepqueues chain (which
could lead to a deadlock).
- sleepq_set_timeout acquires callout_lock (via callout_reset()) only
  with sleepq chain lock held
- msleep_spin in _callout_stop_safe lock the sleepqueue chain with
  callout_lock held

In order to solve this don't use msleep_spin in _callout_stop_safe() but
use directly sleepqueues as inline msleep_spin code. Rearrange the
wakeup path in order to have it consistent too.

Reported by: kris (via stress2 test suite)
Tested by: Timothy Redaelli <drizzt@gufi.org>
Reviewed by: jhb
Approved by: jeff (mentor)
Approved by: re
2007-06-26 21:42:01 +00:00
Attilio Rao
f08945a7d2 Introduce a new rwlocks initialization function: rw_init_flags.
This is very similar to sx_init_flags: it initializes the rwlock using
special flags passed as third argument (RW_DUPOK, RW_NOPROFILE,
RW_NOWITNESS, RW_QUIET, RW_RECURSE).
Among these, the most important new feature is probabilly that rwlocks
can be acquired recursively now (for both shared and exclusive paths).

Because of the recursion counter, the ABI is changed.

Tested by: Timothy Redaelli <drizzt@gufi.org>
Reviewed by: jhb
Approved by: jeff (mentor)
Approved by: re
2007-06-26 21:31:56 +00:00
Matt Jacob
458570f736 Extension of previous commit- when we have 2k login firmware, we need to
put out a ispreqt2e_t structure onto the request queue- not a ispreqt2_t
structure. I forgot that the 23XX can use a t2 structure.

Approved by:    re (ken, implicitly)
MFC after:	3 days
2007-06-26 20:53:07 +00:00
Remko Lodder
4907faa674 Make zoneinfo optional so that a filesystem upgrade/update does not overwrite
possibly installed thirdparte zoneinfo databases (from ports for example).

PR:		bin/104713
Submitted by:	Mark Andrews <Mark_Andrews at isc dot org> (original patch
		rewritten by me to be more consistent with the new practise).
Approved by: 	re (kensmith)
Approved by:	imp (mentor)
Reviewed by:	ru (some time ago already)
2007-06-26 19:40:03 +00:00
Andrey A. Chernov
3f5b2c267b This is temp workaround of nasty gcc 4.2.0 -O2 bug which may skip the rest
of the loop when arrays used inside.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32500

Approved by:    re (kensmith)
2007-06-26 19:10:20 +00:00
Alan Cox
97824da382 Eliminate the use of Giant from vm_daemon(). Replace the unconditional
use of Giant in vm_pageout_scan() with VFS_LOCK_GIANT().

Approved by:	re (kensmith)
MFC after:	3 weeks
2007-06-26 18:24:05 +00:00
Robert Watson
f1e8bf6dd4 Add a new MAC framework and policy entry point,
mpo_check_proc_setaudit_addr to be used when controlling use of
setaudit_addr(), rather than mpo_check_proc_setaudit(), which takes a
different argument type.

Reviewed by:	csjp
Approved by:	re (kensmith)
2007-06-26 14:14:01 +00:00
Xin LI
544970d64e Fix a obsecure coredump while testing with tmpfs on amd64.
Approved by:	re (kensmith)
2007-06-26 13:51:53 +00:00
Remko Lodder
c6feae7224 Fix Rocketport so that it does not crash the system when a device pointer
changes for example:

(From Craig Leres):

tip to a rocketport line
run "/etc/rc.d/devfs restart"
exit tip
(wait for the system to reboot)

Thanks to Robert Watson for poking me to fix this.

PR:		kern/109152
Approved by:	imp (mentor)
Approved by:	re (kensmith)
Reviewed by:	jhb
Submitted by:	Craig Leres <leres@ee dot lbl dot gov>
2007-06-26 13:50:48 +00:00
Warner Losh
67c4e28638 Partially updated usbdevs from OpenBSD's usbdevs. Also, some sorting
of the file numerically for vendors and then each product numerically
by vendor (with all the foo2's sorting after the foo's).  Someday, all
the usbdevs will be merged, I hope, but until then, we have these
mega-merges.

This also finishes the LINKSYS4 -> CISCOLINKSYS rename.

Approved by: re@ (blanket)
2007-06-26 05:29:27 +00:00
Tim Kientzle
3f6c3bcd84 Fix 'bsdtar -t' on tape drives. Libarchive uses the
skip() callback to skip over data when reading uncompressed
archives.  This gets invoked, for example, during tar -t
or tar -x with a filename argument.  The revised code
only calls [lf]seek() on regular files, instead of depending
on the kernel to return an error.

Thanks to: bde for explaining the implementation of lseek()
Thanks to: Daniel O'Connor for testing
Approved by: re (Ken Smith)
MFC after: 5 days
2007-06-26 03:06:48 +00:00
Xin LI
6ca4416347 Remove two function prototypes that are no longer used.
Approved by:	re (tmpfs blanket)
2007-06-26 02:08:29 +00:00
Matt Jacob
f1d305391f Add missing semi-colon.
Approved by:	re (not really, but it's better to have things compile than not for right now. Sorry)
2007-06-26 02:07:47 +00:00
Xin LI
974fd8c650 - Sync with NetBSD's RCSID (HEAD preferred).
- Correct a typo.

Approved by:	re (tmpfs blanket)
2007-06-26 02:07:08 +00:00
Andrew Thompson
163ee27671 The config.use_protection option can not be used in 802.11b mode and causes a
firmware reset. Also zero out struct iwi_rateset although its not strictly
necessary.

Reported by:	Maxim Konovalov
Reviewed by:	sam
Approved by:	re (bmah)
2007-06-25 20:56:33 +00:00
Warner Losh
b19eb2f4c1 LINKSYS4 is going to be going away. Migrate to CISCOLINKSYS instead.
There is no md5 delta for this change.

Approved by: re@ (blanket)
2007-06-25 20:51:58 +00:00
Randall Stewart
97c76f10a0 - Update bindx address checking to properly screen out address
per the socket api, adding port validation. We allow port 0
  or the already bound port number and no others.

Approved by:	re@freebsd.org (Ken Smith)
2007-06-25 19:05:26 +00:00
Randall Stewart
25d63f19e6 - Fix wrong error return (the errno was being returned and not placed
in errno) - Found by Weongyo Jeong
- Remove two extra un-needed memset() after calloc()'s - Found by
  Weongyo Jeong
- Tightened up parameter requirement checking on input to
  bindx/connectx per socket api spec.
Approved by:	re@freebsd.org(Ken Smith)
2007-06-25 18:58:27 +00:00
Xin LI
6e347527f4 id generation is now handled by uma(9) subsystem,
so remove the (now) irrevelent test case.

Requested by:	Howard Su
Approved by:	re (tmpfs blanket)
2007-06-25 18:47:09 +00:00
Xin LI
7adb177693 MFp4: Several clean-ups and improvements over tmpfs:
- Remove tmpfs_zone_xxx KPI, the uma(9) wrapper, since
   they does not bring any value now.
 - Use |= instead of = when applying VV_ROOT flag.
 - Remove tm_avariable_nodes list.  Use uma to hold the
   released nodes.
 - init/destory interlock mutex of node when init/fini
   instead of ctor/dtor.
 - Change memory computing using u_int to fix negative
   value in 2G mem machine.
 - Remove unnecessary bzero's
 - Rely uma logic to make file id allocation harder to
   guess.
 - Fix some unsigned/signed related things.  Make sure
   we respect -o size=xxxx
 - Use wire instead of hold a page.
 - Pass allocate_zero to obtain zeroed pages upon first
   use.

Submitted by:	Howard Su
Approved by:	re (tmpfs blanket, kensmith)
2007-06-25 18:46:13 +00:00
Matt Jacob
16dbcac063 Yet another bug- when we have 2k login firmware, we need
to put out a ispreqt3e_t structure onto the request queue-
not a ispreqt3_t structure. We weren't. This turns out only
to really matter for big endian machines.

Approved by:	re (ken)
MFC after:	3 days
2007-06-25 17:21:16 +00:00
Philip Paeps
8375edb4bb Fix a number of documentation-lags-behind-reality bugs in sysinstall(8).
While here, fix a couple of comments too.

Submitted by:	Oliver Fromme <olli -at- lurza.secnetix.de>
Approved by:	re (kensmith)
2007-06-25 16:37:17 +00:00
Sean Farley
e2ebaca52a Add myself as a src committer.
Approved by:  wes (mentor)
Approved by:  re (bmah)
2007-06-25 14:28:12 +00:00
Søren Schmidt
27568384f3 Add support for the nVidia MCP61 series chipset.
Approved by: re (mux@)
2007-06-25 08:21:21 +00:00
Warner Losh
5acfdb129b Starting in version 1.56, ucomstop started calling ucomstart to work
around an output freezing problem (see the CVS log for details).  This
is the same approach that sio takes to solve that problem.  However,
ucom has a problem that sio doesn't have.

Consider the case where output is pending, and the device is closed.
ttyclose calls tt_close (which indirects to ucomclose) and then calls
ttyflush which calls tt_stop (which indirects to ucomstop).  Since
ucomclose removed all the usb transfer points, sc_oxfer will be NULL
when ucomstop calls ucomstart.  This results in a null pointer
dereference.

Since calling ucomstart in ucomstart solves other problems, we need to
work with this calling sequence.  The easiest way to do that is to
bail early if sc_oxfer is NULL.

Kazuaki ODA-san came up with this patch, and filed a PR.  I had seen
this bug at work and this patch does seem to solve it.  He had no idea
why it worked, but knew that either this patch, or backing out ucom.c
1.56 fixed his panic.  I just did the legwork of chasing down the code
paths that would cause this, and added a comment.  This is obscure
enough to warrant a comment, I think.

Submitted by: Kazuaki ODA-san
PR: 113964
Approved by: re (bmah)
2007-06-25 06:40:20 +00:00
Rong-En Fan
534046e301 - Remove UMAP filesystem. It was disconnected from build three years ago,
and it is seriously broken.

Discussed on:   freebsd-arch@
Approved by:	re (mux)
2007-06-25 05:06:57 +00:00
Sam Leffler
b038594e17 Correct msecs_to_ticks macro. This fixes problems when hz is not the
default 1000 setting.

Reviewed by:	thompsa, rpaulo
Approved by:	re (bmah)
2007-06-25 03:26:10 +00:00
Nate Lawson
81cd8a5bf0 Make acpica include path relative, not absolute.
Approved by:	re
2007-06-24 20:36:51 +00:00
Nate Lawson
41621cb408 The viapm module build had what appear to be some debugging CFLAGS left
around to force the IO port to a fixed address.  They were only turned
on in the module build and were present since the original import.  This
breaks soft power-off on the Asus A7V since it reprograms the SMBus base
address to a different one than the BIOS expects.  A similar issue was
found in the alpm(4) module build.

PR:		kern/113986, i386/97468
MFC after:	3 days
Approved by:	re
2007-06-24 20:35:59 +00:00
Alan Cox
fe8606ac9e Eliminate GIANT_REQUIRED from swap_pager_putpages().
Approved by:	re (mux)
MFC after:	1 week
2007-06-24 18:40:30 +00:00
Christian Brueffer
6c65055cf4 Document hw.bce.msi_enable tunable.
Approved by:	re (blanket)
2007-06-24 18:36:07 +00:00
Darren Reed
a909f8869b ipfstat should parse "any" when used with -D/-S command line options
PR:	bin/113879
Submitted by:	kabe@sra-tohoku.co.jp
Reviewed by:	darrenr
Approved by:	re
2007-06-24 16:39:12 +00:00