Commit Graph

144069 Commits

Author SHA1 Message Date
Luigi Rizzo
31fade0527 Reword some entries for NTFS and DOS.
Add entries for DELL and ASUS recovery partitions.

MFC after:	3 days
2009-01-14 22:05:51 +00:00
Edward Tomasz Napierala
4fee613e42 Add missing 'break' statement.
Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
Found with:	Coverity Prevent(tm)
CID:		3667
2009-01-14 21:31:22 +00:00
Luigi Rizzo
22fccf5ce9 Another change from Christoph:
replace the table of partition with a simpler and faster array of strings.
The change in the array is done mechanically, using vi commands.
Most entries in the table are probably 15+ years old and largely outdated,
so the next step is to remove stale entries with more current values.

Submitted by:	Christoph Mallon, with small changes from me
MFC after:	3 days
2009-01-14 21:31:09 +00:00
Edward Tomasz Napierala
f96b106236 Fix use after free.
Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
Found with:	Coverity Prevent(tm)
CID:		3712
2009-01-14 21:29:20 +00:00
Edward Tomasz Napierala
c654e30995 Remove unused variable.
Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
Found with:	Coverity Prevent(tm)
CID:		3665
2009-01-14 21:27:30 +00:00
Edward Tomasz Napierala
1cec6ef6a9 Add missing 'break' statement.
Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
Found with:	Coverity Prevent(tm)
CID:		3927
2009-01-14 21:25:17 +00:00
Luigi Rizzo
40905b6e22 more changes from Christoph:
pass a pointer instead of an index to print_part()
so it does not depend on a static variable.

Submitted by:	Christoph Mallon
MFC after:	3 days
2009-01-14 21:08:19 +00:00
Luigi Rizzo
fbcb16efdf remove unused argument to print_s0()
Submitted by:	Christoph Mallon
MFC after:	3 days
2009-01-14 20:53:46 +00:00
Oleksandr Tymoshenko
8c7494de12 o Make debug output conditional 2009-01-14 20:36:58 +00:00
Oleksandr Tymoshenko
9f0e1e852e o NO_DMA is no longer required as bug with PIIX4 emulation has been fixed in GXEmul 2009-01-14 20:27:49 +00:00
Oleksandr Tymoshenko
7baa3c0132 o Move $FreeBSD$ from comment to __FBSDID macro
o Be a bit more verbose about CPU type during boot process (print
    manufacturer, chip info, MMU and cache parameters)
2009-01-14 20:16:44 +00:00
Konstantin Belousov
90a017ba64 It seems that there are at least three issues with IPC_RMID operation
on SysV semaphores.

  The squeeze of the semaphore array in the kern_semctl() modifies
  sem_base for the semaphores with sem_base greater then sem_base of
  the removed semaphore, as well as the values of the semaphores,
  without locking their mutex. This can lead to (killable) hangs or
  unexpected behaviour of the processes performing any sem operations
  while other process does IPC_RMID.

  The semexit_myhook() eventhandler unlocks SEMUNDO_LOCK() while
  accessing *suptr. This allows for IPC_RMID for the sem id to be
  performed in parallel with undo hook referenced by the current undo
  structure. This leads to the panic("semexit - semid not allocated") [1].

  The semaphore creation is protected by Giant, while IPC_RMID is done
  while only semaphore mutex is held. This seems to result in invalid
  values for semtot, causing random ENOSPC error returns [2].

Redo the locking of the semaphores lifetime cycle. Delegate the
sem_mtx to the sole purpose of protecting semget() and
semctl(IPC_RMID). Introduce new sem_undo_mtx to protect SEM_UNDO
handling. Remove the Giant remnants from the code.
Note that  mac_sysvsem_check_semget() and mac_sysvsem_create() are
now called while sem_mtx is held, as well as mac_sysvsem_cleanup() [3].

When semaphore is removed, acquire semaphore locks for all semaphores
with sem_base that is going to be changed by squeeze of the sema
array. The lock order is not important there, because the region is
protected by sem_mtx.

Organize both used and free sem_undo structures into the lists,
protected by sem_undo_mtx. In semexit_myhook(), remove sem_undo
structure that is being processed, from used list, without putting it
onto the free to prevent modifications by other threads. This allows
for sem_undo_lock to be dropped to acquire individial semaphore locks
without violating lock order. Since IPC_RMID may no longer find this
sem_undo, do tolerate references to unallocated semaphores in undo
structure, and check sequential number to not undo unrelated semaphore
with the same id.

While there, convert functions definitions to ANSI C and fix small
style(9) glitches.

Reported by:	Omer Faruk Sen <omerfsen gmail com> [1], pho [2]
Reviewed by:	rwatson [3]
Tested by:	pho
MFC after:	1 month
2009-01-14 15:20:13 +00:00
Konstantin Belousov
a353a3455e Disable interrupts, if they were enabled, before doing swapgs.
Otherwise, interrupt may happen while we run with kernel CS and usermode
gsbase.

Reviewed by:	jeff
MFC after:	1 week
2009-01-14 14:20:08 +00:00
Robert Watson
07cd9ab013 Update copyright, P4 version number as audit_bsm_token.c reflects changes
in bsm_token.c through #86 from OpenBSM.

MFC after:	1 month
Sponsored by:	Apple, Inc.
Obtained from:	TrustedBSD Project
2009-01-14 12:16:14 +00:00
Robert Watson
c74c7b73a0 Merge OpenBSM alpha 5 from OpenBSM vendor branch to head, both
contrib/openbsm (svn merge) and src/sys/{bsm,security/audit} (manual
merge).  Hook up bsm_domain.c and bsm_socket_type.c to the libbsm
build along with man pages, add audit_bsm_domain.c and
audit_bsm_socket_type.c to the kernel environment.

OpenBSM history for imported revisions below for reference.

MFC after:      1 month
Sponsored by:   Apple Inc.
Obtained from:  TrustedBSD Project

OpenBSM 1.1 alpha 5

- Stub libauditd(3) man page added.
- All BSM error number constants with BSM_ERRNO_.
- Interfaces to convert between local and BSM socket types and protocol
  families have been added: au_bsm_to_domain(3), au_bsm_to_socket_type(3),
  au_domain_to_bsm(3), and au_socket_type_to_bsm(3), along with definitions
  of constants in audit_domain.h and audit_socket_type.h.  This improves
  interoperability by converting local constant spaces, which vary by OS, to
  and from Solaris constants (where available) or OpenBSM constants for
  protocol domains not present in Solaris (a fair number).  These routines
  should be used when generating and interpreting extended socket tokens.
- Fix build warnings with full gcc warnings enabled on most supported
  platforms.
- Don't compile error strings into bsm_errno.c when building it in the kernel
  environment.
- When started by launchd, use the label com.apple.auditd rather than
  org.trustedbsd.auditd.
2009-01-14 10:44:16 +00:00
Hajimu UMEMOTO
620b9b80bc Fix typo to install 400.status-pkg, again. 2009-01-14 09:00:30 +00:00
Pyun YongHyeon
85b340cb24 Remove local jumbo locator and switch to UMA backed page allocator
for jumbo frame.
  o Nuke unneeded jlist lock which was used to protect jumbo buffer
    management in local allocator.
  o Added a new tunable hw.mskc.jumbo_disable to disable jumbo
    frame support for the driver. The tunable could be set for
    systems that do not need to use jumbo frames and it would
    save (9K * number of Rx descriptors) bytes kernel memory.
  o Jumbo buffer allocation failure is no longer critical error
    for the operation of msk(4). If msk(4) encounter the allocation
    failure it just disables jumbo frame support and continues to
    work without your intervention.

Using local allocator had several drawbacks such as requirement of
large amount of continuous kernel memory and fixed (small) number
of available buffers. The need for large continuous memory resulted
in failure of loading driver with kldload on running systems.
Also small number of buffer used in local allocator showed poor
performance for some applications.
2009-01-14 05:08:52 +00:00
Pyun YongHyeon
f9ad2b2f3c Correct frame length argument of in_cksum_skip. While I'm here
remove intermediate variable csum.

Reported by:	Kim Culhan < w8hdkim <> gmail DOT com >
Tested by:	Kim Culhan < w8hdkim <> gmail DOT com >
2009-01-14 04:47:04 +00:00
Sam Leffler
6fd63a5dbf o note need for options AH_SUPPORT_5416
o mention 5416-class parts
o mention tdma support
2009-01-13 23:57:15 +00:00
Xin LI
d337638129 Remove intermediate variable busaddr and have bus_* operate directly on
softc members upon initialization.

Reviewed by:	davidch
MFC after:	1 month
2009-01-13 23:46:45 +00:00
Luigi Rizzo
c4898ccb7c Some small fixes submitted by Christoph Mallon, specifically:
+ Remove a dead field of a struct. It serves no purpose anymore.
+ Remove a \n at the end of the format string of err(); the err()
  function already adds a \n ;
+ remove many unnecessary casts which obfuscate the code.

This file has a huge number of indentation bugs, but I'd rather fix
them when/if we happen to modify the relevant parts of the code.

Submitted by:	Christoph Mallon
MFC after:	3 days
2009-01-13 23:36:38 +00:00
Alexander Motin
a1cfce010b Correct spelling in comment. 2009-01-13 23:03:07 +00:00
Edward Tomasz Napierala
abb0cbf9c9 Turn a "panic: non-decreasing id" into an error printf. This seems
to be caused by a metadata corruption that occurs quite often after
unplugging a pendrive during write activity.

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
2009-01-13 22:35:26 +00:00
Luigi Rizzo
3f2721ea44 remove a file which is, as far as I can tell, totally unused. 2009-01-13 22:15:47 +00:00
Alexander Motin
12f2031fd5 Improve AD1983 codec support:
- force playback via mixer to get PCM volume control,
 - make cleanup on recoring source selection.
2009-01-13 22:10:01 +00:00
Luigi Rizzo
789a82a6db Extend the geom-related info and put in the NOTE section, not
in BUGS, as this is a feature.

Bump the date, as it was forgotten in previous commits and the
page has had significant changes recently
2009-01-13 21:55:39 +00:00
Simon L. B. Nielsen
2568138fcd Correct ntpd(8) cryptographic signature bypass [SA-09:04].
Correct BIND DNSSEC incorrect checks for malformed signatures
[SA-09:04].

Security:	FreeBSD-SA-09:03.ntpd
Security:	FreeBSD-SA-09:04.bind
Obtained from:	ISC [SA-09:04]
Approved by:	so (simon)
2009-01-13 21:19:27 +00:00
Andrew Thompson
a8e4c71c30 Restore the if_*var.h and if_*reg.h to their original names, they dont need to
be different.
2009-01-13 21:18:14 +00:00
Andrew Thompson
19d4850e2c Hook up the u3g2 driver.
Submitted by:	Hans Petter Selasky
2009-01-13 19:18:43 +00:00
Andrew Thompson
33ec76e402 Sync to p4 156093
- Add quirks for Parallels

These snuck in as part of a perforce IFC.
2009-01-13 19:14:51 +00:00
Andrew Thompson
fc577776dc Regen. 2009-01-13 19:07:23 +00:00
Andrew Thompson
20d54a8a61 MFp4: //depot/projects/usb@156092
Make sure all claimed interfaces gets released at close.

Submitted by: Hans Petter Selasky
2009-01-13 19:06:02 +00:00
Andrew Thompson
d9e340a1af MFp4: //depot/projects/usb@156055
Compile fix for AVR-GCC

Submitted by: Hans Petter Selasky
2009-01-13 19:05:51 +00:00
Andrew Thompson
922dd044db MFp4: //depot/projects/usb@156005
Add missing set frame data pointer call. The
	function call was missed when zero copy was
	introduced in UMASS.
	Reported by: WATANABE Kazuhiro.

Submitted by: Hans Petter Selasky
2009-01-13 19:05:20 +00:00
Andrew Thompson
ea8f960c13 MFp4: //depot/projects/usb@155990
Add USB scanner support to USB2 config files.

Submitted by: Hans Petter Selasky
2009-01-13 19:05:10 +00:00
Andrew Thompson
0239859bda MFp4: //depot/projects/usb@155957
Make code more compliant with SuperSpeed USB and Wireless USB.

Submitted by: Hans Petter Selasky
2009-01-13 19:04:58 +00:00
Andrew Thompson
1697b02185 MFp4: //depot/projects/usb@155948
Remove duplicate USB device ID's. These ID's are already
	present in the U3G driver.
	Reported by: Paul-Henning Kamp.

Submitted by: Hans Petter Selasky
2009-01-13 19:04:48 +00:00
Andrew Thompson
9d2f688aa3 MFp4: //depot/projects/usb@155936
Save an USB transfer in UHUB driver by using
	the builtin clear-stall mechanism.

Submitted by: Hans Petter Selasky
2009-01-13 19:04:37 +00:00
Andrew Thompson
2c8e37aa5c MFp4: //depot/projects/usb@155923
Fix remaining xfer->udev variable changes.

Submitted by: Hans Petter Selasky
2009-01-13 19:04:12 +00:00
Andrew Thompson
62005a2d11 MFp4: //depot/projects/usb@155917
Remove dependancy towards the USB config thread in
	the USB serial core. Use USB process msignalling
	instead. Saves a little memory and hopefully makes
	the code more understandable.

Submitted by: Hans Petter Selasky
2009-01-13 19:03:47 +00:00
Andrew Thompson
3fa39bbbed MFp4: //depot/projects/usb@155906
Remove "vbus_interrupt" method from bus methods and use
	a global function instead for the various drivers using it.
	The reason for the removal is to simplify the code.

Submitted by: Hans Petter Selasky
2009-01-13 19:03:33 +00:00
Andrew Thompson
edf1048c85 MFp4: //depot/projects/usb@155842
Reduce the number of callback processes to 4 per
	USB controller. There are two rough categories:
	1) Giant locked USB transfers.
	2) Non-Giant locked USB transfers.
	On a real system with many USB devices plugged in the
	number of processes reported by "ps auxw | grep USBPROC"
	was reduced from 40 to 18.

Submitted by: Hans Petter Selasky
2009-01-13 19:03:23 +00:00
Andrew Thompson
13bd84042e MFp4: //depot/projects/usb@155839
This change is about removing three fields from "struct usb2_xfer"
	which can be reached from "struct usb2_xfer_root" instead and cleaning
	up the code after this change. The fields are "xfer->udev",
	"xfer->xfer_mtx" and "xfer->usb2_sc". In this process the following
	changes were also made:
	Rename "usb2_root" to "xroot" which is short for "xfer root".
	Rename "priv_mtx" to "xfer_mtx" in USB core.
	The USB_XFER_LOCK and USB_XFER_UNLOCK macros should only be used in
	the USB core due to dependency towards "xroot". Substitute macros
	for the real lock in two USB device drivers.

Submitted by: Hans Petter Selasky
2009-01-13 19:03:12 +00:00
Andrew Thompson
f892798d89 MFp4: //depot/projects/usb@155834
Factor out roothub process into the USB bus structure for
	all USB controller drivers. Essentially I am trying to
	save some processes on the root HUB and get away
	from the config thread pradigm. There will be a follow up
	commit where the root HUB control and interrupt callback
	will be moved over to run from the roothub process.
	Total win: 3 processes become 1 for every USB controller.

Submitted by: Hans Petter Selasky
2009-01-13 19:03:01 +00:00
Andrew Thompson
ee6d7582e9 MFp4: //depot/projects/usb@155829
Code style changes requested by:
	M. Warner Losh

Submitted by: Hans Petter Selasky
2009-01-13 19:02:50 +00:00
Andrew Thompson
cba1b53d88 MFp4: //depot/projects/usb@155820
USB memory usage reduction patch.

Submitted by: Hans Petter Selasky
2009-01-13 19:02:40 +00:00
Andrew Thompson
f3396b74be MFp4: //depot/projects/usb@155810
Usability improvement. Make sure that setting
	power mode ON resurrects the device if powered OFF.
	Reported by: Alexander Best.

Submitted by: Hans Petter Selasky
2009-01-13 19:02:30 +00:00
Andrew Thompson
63812bb50a MFp4: //depot/projects/usb@155807
Fix a typo.
	Reported by Alexander Best.

Submitted by: Hans Petter Selasky
2009-01-13 19:02:17 +00:00
Andrew Thompson
abc96a038c MFp4: //depot/projects/usb@155759
Optimise: Remove extra flush calls.

Submitted by: Hans Petter Selasky
2009-01-13 19:02:07 +00:00
Andrew Thompson
90de96dd02 MFp4: //depot/projects/usb@155755
Fix a race causing the explore thread to
	hang when tearing down USB transfers at
	detach.

Submitted by: Hans Petter Selasky
2009-01-13 19:01:56 +00:00