Commit Graph

158222 Commits

Author SHA1 Message Date
Pawel Jakub Dawidek
9839c97b4d Update copyright years.
MFC after:	1 week
2010-09-23 12:02:08 +00:00
Pawel Jakub Dawidek
07f1d01429 Document AES-XTS.
MFC after:	1 week
2010-09-23 12:00:40 +00:00
Pawel Jakub Dawidek
9a5a1d1e1e Add support for AES-XTS. This will be the default now.
MFC after:	1 week
2010-09-23 11:58:36 +00:00
Pawel Jakub Dawidek
ac970319ff Add support for CRYPTO_AES_XTS.
MFC after:	1 week
2010-09-23 11:57:25 +00:00
Pawel Jakub Dawidek
d295bdee07 Add support for AES-XTS.
Obtained from:	OpenBSD
MFC after:	1 week
2010-09-23 11:52:32 +00:00
Pawel Jakub Dawidek
c6a26d4c88 Implement switching of data encryption key every 2^20 blocks.
This ensures the same encryption key won't be used for more than
2^20 blocks (sectors). This will be the default now.

MFC after:	1 week
2010-09-23 11:49:47 +00:00
Pawel Jakub Dawidek
30bd3bb07b Add support for CRD_F_KEY_EXPLICIT flag.
MFC after:	1 week
2010-09-23 11:46:53 +00:00
Pawel Jakub Dawidek
b428e6ca90 Remove redundant space.
MFC after:	1 week
2010-09-23 11:33:29 +00:00
Pawel Jakub Dawidek
745eb0ccb6 Simplify code a bit.
MFC after:	1 week
2010-09-23 11:26:38 +00:00
Pawel Jakub Dawidek
1f0fb66f30 Make the code similar to the code in g_eli_integrity.c.
MFC after:	1 week
2010-09-23 11:23:10 +00:00
Pawel Jakub Dawidek
b35bfe7e10 Define default overwrite count, so that userland can use it.
MFC after:	1 week
2010-09-23 11:19:48 +00:00
Gavin Atkinson
6c4ea40813 Various changes from various sources:
- Add "children" [1]
- Add "acknowledgement", "acknowledgment", "Austria" and "haunted" [2]
- Add "near", "antidisestablishmentarianism" and "Persephone" [2]
- "Transvaal" should be capitalized [2]
- Correct spelling of "structurelessness" and "Athena" [2]
- Add missing atomic elements [3]
- Add various words from "word of the day" lists [3]

PR:		conf/149756 [1]
Submitted by:	Nick Johnson <freebsd spatula.net> [1]
Obtained from:	NetBSD [2], OpenBSD [3]
MFC after:	1 week
2010-09-23 11:19:03 +00:00
Pawel Jakub Dawidek
d2ac2ff105 - When trashing metadata, repeat overwrite kern.geom.eli.overwrites times.
- Flush write cache after each write.

MFC after:	1 week
2010-09-23 11:18:02 +00:00
Pawel Jakub Dawidek
488186c304 - Use g_*() API when doing backups.
- fsync() created filed.

MFC after:	1 week
2010-09-23 11:04:50 +00:00
Pawel Jakub Dawidek
2ecb2a01e7 Because we first write metadata into new place and then trash old place we
don't want situation where old size is equal to new size, as we will trash
newly written metadata.

MFC after:	1 week
2010-09-23 10:58:13 +00:00
Pawel Jakub Dawidek
429cf66400 - Make use of g_*() API.
- Flush cache after writing metadata.

MFC after:	1 week
2010-09-23 10:55:45 +00:00
Pawel Jakub Dawidek
5cd61a1fb7 Simplify code a bit by using g_*() API from libgeom.
MFC after:	1 week
2010-09-23 10:50:17 +00:00
Pawel Jakub Dawidek
5e6dce4bf0 When trashing metadata, flush after each write.
MFC after:	1 week
2010-09-23 10:43:37 +00:00
Marius Strobl
ce7704b610 Remove an explicit assignment of the CFLAGS variable intended for
debugging purposes only.

MFC after:	3 days
2010-09-23 10:03:03 +00:00
Jayachandran C.
68e53e7549 Add MIPS platform, this will make bsdlabel(8) work on MIPS (when invoked
without a -m option. -m mips is still not supported)
2010-09-23 05:24:50 +00:00
Jayachandran C.
831826341b Add missing byteswap, works on big endian systems now (tested on Netlogic
XLS MIPS processor).

Submitted by:	Sreekanth M. S. <kanthms at netlogicmicro dot com>
Reviewed by:	mav
2010-09-23 05:17:36 +00:00
Xin LI
fb2924e4ac In the past gunzip(1) write()'s after each inflate return. This is
not optimal from a performance standpoint since the write buffer is
not necessarily be filled up when the inflate rountine reached the
end of input buffer and it's not the end of file.

This problem gets uncovered by trying to pipe gunzip -c output to
a GEOM device directly, which enforces the writes be multiple of
sector size.

Sponsored by:	iXsystems, Inc.
Reported by:	jpaetzel
MFC after:	2 weeks
2010-09-23 01:24:33 +00:00
Maksim Yevmenkin
ff7e67ac1c Add the following Linux BlueZ compatibility macros: htobs(), htobl(),
btohs() and btohl()

PR:		kern/136386
Submitted by:	Monty Hall < kungfu_disciple at sbcglobal dot net >
MFC after:	1 week
2010-09-22 23:41:02 +00:00
Edwin Groothuis
e160180ef7 And now the 2nd part of the patch: Also fix the year.
PR:		150504
Submitted by:	Douglas Berry <bitnix@bitnix.ca>
2010-09-22 21:14:18 +00:00
Edwin Groothuis
778efe6079 Fix location of the Battle of the Plains of Abraham
PR:		150504
Submitted by:	Douglas Berry <bitnix@bitnix.ca>
MFC after:	1 week
2010-09-22 21:10:45 +00:00
John Baldwin
24f481fde2 - Expand scope of tun/tap softc locks to cover more softc fields and
driver-maintained ifnet fields (such as if_drv_flags).
- Use soft locks as the mutex that protects each interface's knote list
  rather than using the global knote list lock.  Also, use the softc
  for kn_hook instead of the cdev.
- Use mtx_sleep() instead of tsleep() when blocking in the read routines.
  This fixes a lost wakeup race.
- Remove D_NEEDGIANT now that the cdevsw routines use the softc lock
  where locking is needed.
- Lock IFQ when calculating the result for FIONREAD in tap(4).  tun(4)
  already did this.
- Remove remaining spl calls.

Submitted by:	Marcin Cieslak  saper of saper|info (3)
MFC after:	2 weeks
2010-09-22 21:02:43 +00:00
Ed Maste
d290883447 Move test for zero bufp or size before rseq and wseq calculation. This
avoids spinning in an infinite loop for some (possibly corrupt?) core
files at work.
2010-09-22 19:41:01 +00:00
Ed Maste
ce026da7e5 Correct sort order. 2010-09-22 19:26:41 +00:00
Pawel Jakub Dawidek
9dd5a6cb0f Switch to sigprocmask(2) API also in the main process and secondary process.
This way the primary process inherits signal mask from the main process,
which fixes a race where signal is delivered to the primary process before
configuring signal mask.

Reported by:	Mikolaj Golub <to.my.trociny@gmail.com>
MFC after:	3 days
2010-09-22 19:08:11 +00:00
Pawel Jakub Dawidek
196abd3518 Assert that descriptor numbers are sane.
MFC after:	3 days
2010-09-22 19:05:54 +00:00
Pawel Jakub Dawidek
8b70e6ae9c Fix possible deadlock where worker process sends an event to the main process
while the main process sends control message to the worker process, but worker
process hasn't started control thread yet, because it waits for reply from the
main process.

The fix is to start the control thread before sending any events.

Reported and fix suggested by:	Mikolaj Golub <to.my.trociny@gmail.com>
MFC after:	3 days
2010-09-22 19:03:11 +00:00
Pawel Jakub Dawidek
0c24d8e2a1 Fix descriptor leaks: when child exits, we have to close control and event
socket pairs. We did that only in one case out of three.

MFC after:	3 days
2010-09-22 18:57:06 +00:00
Doug Barton
6d7fe90938 Eliminate the --disable-ipv6 string which while technically correct in
terms of the arguments that configure was called with is misleading because
if IPv6 support is present on the system it will be present in BIND.
2010-09-22 18:46:17 +00:00
Pawel Jakub Dawidek
c56cf19ebf If we are unable to receive control message is most likely because the main
process died. Instead of entering infinite loop, terminate.

MFC after:	3 days
2010-09-22 18:39:43 +00:00
Pawel Jakub Dawidek
351b9a37a4 Sort includes.
MFC after:	3 days
2010-09-22 18:38:02 +00:00
Sunpoet Po-Chuan Hsieh
e5d8eb431b Add myself as a ports committer
Approved by:	pgollucci (mentor)
2010-09-22 16:54:22 +00:00
Pyun YongHyeon
4a4dd474db Fix build breakage introduced in r212972. 2010-09-22 16:48:24 +00:00
John Baldwin
7494ee9b63 Copy td_rqindex during fork instead of zero'ing it to match the comments.
I do not believe there is any functional change.
2010-09-22 15:10:03 +00:00
Konstantin Belousov
e8b4ca850e For sparc64 relocations that directly put bits of the symbol value into
the location, apply elf_relocaddr to the symbol value to have right
values for the symbols from dpcpu segment.

PR:	kern/147769
Discussed with:	avg
Tested by:	marius
MFC after:	2 weeks
2010-09-22 12:52:12 +00:00
Alexander Motin
48fe2e6719 Quick fix for unmotivated C2 state usage during boot, introduced at r212541.
That caused LAPIC timer failure and huge delays during boot on some systems.
2010-09-22 11:32:22 +00:00
Andriy Gapon
61548876b1 kdb_backtrace: use stack_print_ddb instead of stack_print
This is a followup to r212964.
stack_print call chain obtains linker sx lock and thus potentially may
lead to a deadlock depending on a kind of a panic.
stack_print_ddb doesn't acquire any locks and it doesn't use any
facilities of ddb backend.
Using stack_print_ddb outside of DDB ifdef required taking a number of
helper functions from under it as well.

It is a good idea to rename linker_ddb_* and stack_*_ddb functions to
have 'unlocked' component in their name instead of 'ddb', because those
functions do not use any DDB services, but instead they provide unlocked
access to linker symbol information.  The latter was previously needed
only for DDB, hence the 'ddb' name component.

Alternative is to ditch unlocked versions altogether after implementing
proper panic handling:
1. stop other cpus upon a panic
2. make all non-spinlock lock operations (mutex, sx, rwlock) be a no-op
   when panicstr != NULL

Suggested by:	mdf
Discussed with:	attilio
MFC after:	2 weeks
2010-09-22 06:45:07 +00:00
Andriy Gapon
9c2d052943 acpi_attach: do not explicitly install default handlers for default
address spaces

There has been no need to do that starting with ACPICA 20040427 as
AcpiEnableSubsystem() installs the handlers automatically.
Additionaly, explicitly calling AcpiInstallAddressSpaceHandler before
AcpiEnableSubsystem is not supported by ACPICA and leads to too early
execution of _REG methods in some DSDTs, which may result in problems.

Big thanks to Robert Moore of ACPICA/Intel for explaining the above.

Reported by:	Daniel Bilik <daniel.bilik@neosystem.cz>
Tested by:	Daniel Bilik <daniel.bilik@neosystem.cz>
Reviewed by:	jkim
Suggested by:	"Moore, Robert" <robert.moore@intel.com>
MFC after:	1 week
2010-09-22 06:10:22 +00:00
Alexander Motin
9dfc483c4a If kernel built with DEVICE_POLLING, keep one CPU always in active state
to handle it.
2010-09-22 05:32:37 +00:00
Alexander Motin
0069293b2b Decrease poll interval from 1000 to 100us. This significantly reduces
kernel dump time, especially with minidump.
2010-09-22 05:17:18 +00:00
Warner Losh
12d455a6b1 Make the labels match the device name that's mounted, not just the
slice they are on.  When NANO_LABEL is not defined, the fstab
generates entries that specify /dev/ad0s1a.  When NANO_LABEL is
defined, it generates /dev/usb/${NANO_LABEL}s1a.  The prior code
created the file system with a label of ${NANO_LABEL}s1, leading to
problems on boot.

Pointy hat to: imp@
2010-09-22 04:48:39 +00:00
Neel Natu
5df4b6be91 Enforce that 'pmap_kenter()' is only used to establish cacheable mappings.
Mappings with other cacheability attributes can be established, if needed,
by using 'pmap_kenter_attr()'.

Suggested by:	jchandra, imp
2010-09-22 02:26:07 +00:00
MIHIRA Sanpei Yoshiro
87b6f1855b Add new device ids.
Buffalo (Melco Inc.) LUA3-U2-AGT
 Logitec LAN-GTJ/U2A(usb/119981)

PR:		usb/119981 and me
Submitted by:	"Y.Okabe" <be_works_us at yahoo.com>, hiroo at oikumene.gcd.org
Reviewed by:	thompsa
MFC after:	3 days
2010-09-21 22:42:14 +00:00
Dimitry Andric
d205253515 When building world with clang, for gnu/lib/libobjc, sys/boot/i386/boot2
and sys/boot/pc98/boot2, do not simply assign 'gcc' to CC, since compile
flags are sometimes passed via this variable, for example during the
build32 stage on amd64.  This caused the 32-bit libobjc build on amd64
to fail.

Instead, only replace the first instance of clang (if any, including
optional path) with gcc, and leave the arguments alone.

Approved-by:	rpaulo (mentor)
2010-09-21 21:41:45 +00:00
Christian Brueffer
bed6f18493 Minor grammar fixes. 2010-09-21 21:07:46 +00:00
Rui Paulo
7e78863707 Workaround LLVM bug #4434:
Reorder inline assembly arguments temp2, temp, value and texp to follow
the st(0), st(1), etc. style.
Also mark the temp2 variable as volatile to workaround another clang
bug.
This allows clang to buildworld FreeBSD/i386.

Submitted by:	dim
2010-09-21 20:23:19 +00:00