]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoUpdate copyright years.
pjd [Thu, 23 Sep 2010 12:02:42 +0000 (12:02 +0000)]
Update copyright years.

MFC after: 1 week

13 years agoUpdate copyright years.
pjd [Thu, 23 Sep 2010 12:02:08 +0000 (12:02 +0000)]
Update copyright years.

MFC after: 1 week

13 years agoDocument AES-XTS.
pjd [Thu, 23 Sep 2010 12:00:40 +0000 (12:00 +0000)]
Document AES-XTS.

MFC after: 1 week

13 years agoAdd support for AES-XTS. This will be the default now.
pjd [Thu, 23 Sep 2010 11:58:36 +0000 (11:58 +0000)]
Add support for AES-XTS. This will be the default now.

MFC after: 1 week

13 years agoAdd support for CRYPTO_AES_XTS.
pjd [Thu, 23 Sep 2010 11:57:25 +0000 (11:57 +0000)]
Add support for CRYPTO_AES_XTS.

MFC after: 1 week

13 years agoAdd support for AES-XTS.
pjd [Thu, 23 Sep 2010 11:52:32 +0000 (11:52 +0000)]
Add support for AES-XTS.

Obtained from: OpenBSD
MFC after: 1 week

13 years agoImplement switching of data encryption key every 2^20 blocks.
pjd [Thu, 23 Sep 2010 11:49:47 +0000 (11:49 +0000)]
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

13 years agoAdd support for CRD_F_KEY_EXPLICIT flag.
pjd [Thu, 23 Sep 2010 11:46:53 +0000 (11:46 +0000)]
Add support for CRD_F_KEY_EXPLICIT flag.

MFC after: 1 week

13 years agoRemove redundant space.
pjd [Thu, 23 Sep 2010 11:33:29 +0000 (11:33 +0000)]
Remove redundant space.

MFC after: 1 week

13 years agoSimplify code a bit.
pjd [Thu, 23 Sep 2010 11:26:38 +0000 (11:26 +0000)]
Simplify code a bit.

MFC after: 1 week

13 years agoMake the code similar to the code in g_eli_integrity.c.
pjd [Thu, 23 Sep 2010 11:23:10 +0000 (11:23 +0000)]
Make the code similar to the code in g_eli_integrity.c.

MFC after: 1 week

13 years agoDefine default overwrite count, so that userland can use it.
pjd [Thu, 23 Sep 2010 11:19:48 +0000 (11:19 +0000)]
Define default overwrite count, so that userland can use it.

MFC after: 1 week

13 years agoVarious changes from various sources:
gavin [Thu, 23 Sep 2010 11:19:03 +0000 (11:19 +0000)]
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

13 years ago- When trashing metadata, repeat overwrite kern.geom.eli.overwrites times.
pjd [Thu, 23 Sep 2010 11:18:02 +0000 (11:18 +0000)]
- When trashing metadata, repeat overwrite kern.geom.eli.overwrites times.
- Flush write cache after each write.

MFC after: 1 week

13 years ago- Use g_*() API when doing backups.
pjd [Thu, 23 Sep 2010 11:04:50 +0000 (11:04 +0000)]
- Use g_*() API when doing backups.
- fsync() created filed.

MFC after: 1 week

13 years agoBecause we first write metadata into new place and then trash old place we
pjd [Thu, 23 Sep 2010 10:58:13 +0000 (10:58 +0000)]
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

13 years ago- Make use of g_*() API.
pjd [Thu, 23 Sep 2010 10:55:45 +0000 (10:55 +0000)]
- Make use of g_*() API.
- Flush cache after writing metadata.

MFC after: 1 week

13 years agoSimplify code a bit by using g_*() API from libgeom.
pjd [Thu, 23 Sep 2010 10:50:17 +0000 (10:50 +0000)]
Simplify code a bit by using g_*() API from libgeom.

MFC after: 1 week

13 years agoWhen trashing metadata, flush after each write.
pjd [Thu, 23 Sep 2010 10:43:37 +0000 (10:43 +0000)]
When trashing metadata, flush after each write.

MFC after: 1 week

13 years agoRemove an explicit assignment of the CFLAGS variable intended for
marius [Thu, 23 Sep 2010 10:03:03 +0000 (10:03 +0000)]
Remove an explicit assignment of the CFLAGS variable intended for
debugging purposes only.

MFC after: 3 days

13 years agoAdd MIPS platform, this will make bsdlabel(8) work on MIPS (when invoked
jchandra [Thu, 23 Sep 2010 05:24:50 +0000 (05:24 +0000)]
Add MIPS platform, this will make bsdlabel(8) work on MIPS (when invoked
without a -m option. -m mips is still not supported)

13 years agoAdd missing byteswap, works on big endian systems now (tested on Netlogic
jchandra [Thu, 23 Sep 2010 05:17:36 +0000 (05:17 +0000)]
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

13 years agoIn the past gunzip(1) write()'s after each inflate return. This is
delphij [Thu, 23 Sep 2010 01:24:33 +0000 (01:24 +0000)]
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

13 years agoAdd the following Linux BlueZ compatibility macros: htobs(), htobl(),
emax [Wed, 22 Sep 2010 23:41:02 +0000 (23:41 +0000)]
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

13 years agoAnd now the 2nd part of the patch: Also fix the year.
edwin [Wed, 22 Sep 2010 21:14:18 +0000 (21:14 +0000)]
And now the 2nd part of the patch: Also fix the year.

PR: 150504
Submitted by: Douglas Berry <bitnix@bitnix.ca>

13 years agoFix location of the Battle of the Plains of Abraham
edwin [Wed, 22 Sep 2010 21:10:45 +0000 (21:10 +0000)]
Fix location of the Battle of the Plains of Abraham

PR: 150504
Submitted by: Douglas Berry <bitnix@bitnix.ca>
MFC after: 1 week

13 years ago- Expand scope of tun/tap softc locks to cover more softc fields and
jhb [Wed, 22 Sep 2010 21:02:43 +0000 (21:02 +0000)]
- 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

13 years agoMove test for zero bufp or size before rseq and wseq calculation. This
emaste [Wed, 22 Sep 2010 19:41:01 +0000 (19:41 +0000)]
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.

13 years agoCorrect sort order.
emaste [Wed, 22 Sep 2010 19:26:41 +0000 (19:26 +0000)]
Correct sort order.

13 years agoSwitch to sigprocmask(2) API also in the main process and secondary process.
pjd [Wed, 22 Sep 2010 19:08:11 +0000 (19:08 +0000)]
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

13 years agoAssert that descriptor numbers are sane.
pjd [Wed, 22 Sep 2010 19:05:54 +0000 (19:05 +0000)]
Assert that descriptor numbers are sane.

MFC after: 3 days

13 years agoFix possible deadlock where worker process sends an event to the main process
pjd [Wed, 22 Sep 2010 19:03:11 +0000 (19:03 +0000)]
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

13 years agoFix descriptor leaks: when child exits, we have to close control and event
pjd [Wed, 22 Sep 2010 18:57:06 +0000 (18:57 +0000)]
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

13 years agoEliminate the --disable-ipv6 string which while technically correct in
dougb [Wed, 22 Sep 2010 18:46:17 +0000 (18:46 +0000)]
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.

13 years agoIf we are unable to receive control message is most likely because the main
pjd [Wed, 22 Sep 2010 18:39:43 +0000 (18:39 +0000)]
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

13 years agoSort includes.
pjd [Wed, 22 Sep 2010 18:38:02 +0000 (18:38 +0000)]
Sort includes.

MFC after: 3 days

13 years agoAdd myself as a ports committer
sunpoet [Wed, 22 Sep 2010 16:54:22 +0000 (16:54 +0000)]
Add myself as a ports committer

Approved by: pgollucci (mentor)

13 years agoFix build breakage introduced in r212972.
yongari [Wed, 22 Sep 2010 16:48:24 +0000 (16:48 +0000)]
Fix build breakage introduced in r212972.

13 years agoCopy td_rqindex during fork instead of zero'ing it to match the comments.
jhb [Wed, 22 Sep 2010 15:10:03 +0000 (15:10 +0000)]
Copy td_rqindex during fork instead of zero'ing it to match the comments.
I do not believe there is any functional change.

13 years agoFor sparc64 relocations that directly put bits of the symbol value into
kib [Wed, 22 Sep 2010 12:52:12 +0000 (12:52 +0000)]
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

13 years agoQuick fix for unmotivated C2 state usage during boot, introduced at r212541.
mav [Wed, 22 Sep 2010 11:32:22 +0000 (11:32 +0000)]
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.

13 years agokdb_backtrace: use stack_print_ddb instead of stack_print
avg [Wed, 22 Sep 2010 06:45:07 +0000 (06:45 +0000)]
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

13 years agoacpi_attach: do not explicitly install default handlers for default
avg [Wed, 22 Sep 2010 06:10:22 +0000 (06:10 +0000)]
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

13 years agoIf kernel built with DEVICE_POLLING, keep one CPU always in active state
mav [Wed, 22 Sep 2010 05:32:37 +0000 (05:32 +0000)]
If kernel built with DEVICE_POLLING, keep one CPU always in active state
to handle it.

13 years agoDecrease poll interval from 1000 to 100us. This significantly reduces
mav [Wed, 22 Sep 2010 05:17:18 +0000 (05:17 +0000)]
Decrease poll interval from 1000 to 100us. This significantly reduces
kernel dump time, especially with minidump.

13 years agoMake the labels match the device name that's mounted, not just the
imp [Wed, 22 Sep 2010 04:48:39 +0000 (04:48 +0000)]
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@

13 years agoEnforce that 'pmap_kenter()' is only used to establish cacheable mappings.
neel [Wed, 22 Sep 2010 02:26:07 +0000 (02:26 +0000)]
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

13 years agoAdd new device ids.
sanpei [Tue, 21 Sep 2010 22:42:14 +0000 (22:42 +0000)]
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

13 years agoWhen building world with clang, for gnu/lib/libobjc, sys/boot/i386/boot2
dim [Tue, 21 Sep 2010 21:41:45 +0000 (21:41 +0000)]
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)

13 years agoMinor grammar fixes.
brueffer [Tue, 21 Sep 2010 21:07:46 +0000 (21:07 +0000)]
Minor grammar fixes.

13 years agoWorkaround LLVM bug #4434:
rpaulo [Tue, 21 Sep 2010 20:23:19 +0000 (20:23 +0000)]
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

13 years agoComment nit, set TDF_NEEDRESCHED after the comment describing why it is
jhb [Tue, 21 Sep 2010 19:12:22 +0000 (19:12 +0000)]
Comment nit, set TDF_NEEDRESCHED after the comment describing why it is
done rather than before.

MFC after: 1 week

13 years agoRemove unnecessary controller reinitialization.
yongari [Tue, 21 Sep 2010 17:52:32 +0000 (17:52 +0000)]
Remove unnecessary controller reinitialization.

PR: kern/87506

13 years agoRemove unnecessary controller reinitialization.
yongari [Tue, 21 Sep 2010 17:42:19 +0000 (17:42 +0000)]
Remove unnecessary controller reinitialization.
StarFire controller does not require controller reinitialization to
program perfect filters. While here, make driver immediately exit
from interrupt/polling handler if driver reinitialized controller.

PR: kern/87506

13 years agoIf new callout scheduled to another CPU and we are using global timer,
mav [Tue, 21 Sep 2010 17:37:28 +0000 (17:37 +0000)]
If new callout scheduled to another CPU and we are using global timer,
there is high probability that timer is already programmed by some other
CPU. Especially by one that registered this callout, and so active now.

13 years agoMake sure to clear IFF_DRV_RUNNING to reinitialize controller.
yongari [Tue, 21 Sep 2010 17:31:14 +0000 (17:31 +0000)]
Make sure to clear IFF_DRV_RUNNING to reinitialize controller.
While I'm here update if_oerrors counter when driver encounters
watchdog timeout.

13 years agoRemove unnecessary controller reinitialization.
yongari [Tue, 21 Sep 2010 17:25:15 +0000 (17:25 +0000)]
Remove unnecessary controller reinitialization.

PR: kern/87506

13 years agoRemember last kern.eventtimer.periodic value, explicitly set by user.
mav [Tue, 21 Sep 2010 16:50:24 +0000 (16:50 +0000)]
Remember last kern.eventtimer.periodic value, explicitly set by user.
If timer capabilities forcing us to change periodicity mode, try to restore
it back later, as soon as new choosen timer capable to do it. Without this,
timer change like HPET->RTC->HPET always results in enabling periodic mode.

13 years agoModify devfs_fqpn() for future use in devfs path reference counting
jh [Tue, 21 Sep 2010 16:49:02 +0000 (16:49 +0000)]
Modify devfs_fqpn() for future use in devfs path reference counting
code:

- Accept devfs_mount and devfs_dirent as the arguments instead of a
  vnode. This generalizes the function so that it can be used from
  contexts where vnode references are not available.
- Accept NULL cnp argument. No '/' will be appended, if a NULL cnp is
  provided.
- Make the function global and add its prototype to devfs.h.

Reviewed by: kib

13 years agoFix exec_imgact_shell()'s handling of two error cases: (1) Previously, if
alc [Tue, 21 Sep 2010 16:24:51 +0000 (16:24 +0000)]
Fix exec_imgact_shell()'s handling of two error cases: (1) Previously, if
the first line of a script exceeded MAXSHELLCMDLEN characters, then
exec_imgact_shell() silently truncated the line and passed on the truncated
interpreter name or argument.  Now, exec_imgact_shell() will fail and return
ENOEXEC, which is the commonly used errno among Unix variants for this type
of error. (2) Previously, exec_imgact_shell()'s check on the length of the
interpreter's name was ineffective.  In other words, exec_imgact_shell()
could not possibly fail and return ENAMETOOLONG.  The reason being that the
length of the interpreter name had to exceed MAXSHELLCMDLEN characters in
order that ENAMETOOLONG be returned.  But, the search for the end of the
interpreter name stops after at most MAXSHELLCMDLEN - 2 characters are
scanned.  (In the end, this particular error is eventually discovered
outside of exec_imgact_shell() and ENAMETOOLONG is returned.  So, the real
effect of this second change is that the error is detected earlier, in
exec_imgact_shell().)

Update the definition of MAXINTERP to the actual limit on the size of
the interpreter name that has been in effect since r142453 (from
2005).

In collaboration with: kib

13 years agokdb_backtrace: stack(9)-based code to print backtrace without any backend
avg [Tue, 21 Sep 2010 15:07:44 +0000 (15:07 +0000)]
kdb_backtrace: stack(9)-based code to print backtrace without any backend

The idea is to add KDB and KDB_TRACE options to GENERIC kernels on
stable branches, so that at least the minimal information is produced
for non-specific panics like traps on page faults.
The GENERICs in stable branches seem to already include STACK option.

Reviewed by: attilio
MFC after: 2 weeks

13 years agoBring in OpenSSL checkin 19821:
rpaulo [Tue, 21 Sep 2010 10:22:29 +0000 (10:22 +0000)]
Bring in OpenSSL checkin 19821:

 Make inline assembler clang-friendly [from HEAD].

 openssl/crypto/md32_common.h      1.45.2.1 -> 1.45.2.2
 openssl/crypto/rc5/rc5_locl.h      1.8 -> 1.8.8.1

Approved by: simon

13 years agoAdd a notice to the man page that batteries should be installed.
ed [Tue, 21 Sep 2010 08:25:00 +0000 (08:25 +0000)]
Add a notice to the man page that batteries should be installed.

13 years agoUntil hardclock() and respectively tc_windup() called first time, system
mav [Tue, 21 Sep 2010 08:02:02 +0000 (08:02 +0000)]
Until hardclock() and respectively tc_windup() called first time, system
is running on "dummy" time counter. But to function properly in one-shot
mode, event timer management code requires working time counter. Slow
moving "dummy" time counter delays first hardclock() call by few seconds
on my systems, even though timer interrupts were correctly kicking kernel.
That causes few seconds delay during boot with one-shot mode enabled.

To break this loop, explicitly call tc_windup() first time during
initialization process to let it switch to some real time counter.

13 years agon32 fixes for nlge.
jchandra [Tue, 21 Sep 2010 07:58:47 +0000 (07:58 +0000)]
n32 fixes for nlge.

Use correct define (__mips_n64) for n64 compilation and use correct
parameter type for xlr_paddr_lw() in n32.

13 years agoFix the path to the sys dir when cross compiling after r209510.
thompsa [Tue, 21 Sep 2010 07:03:53 +0000 (07:03 +0000)]
Fix the path to the sys dir when cross compiling after r209510.

Reviewed by: imp

13 years agoIf we are at cancellation point, always work as deferred mode despite
davidxu [Tue, 21 Sep 2010 06:47:04 +0000 (06:47 +0000)]
If we are at cancellation point, always work as deferred mode despite
whether asynchronous mode is turned on or not, this always gives us a
chance to decide whether thread should be canceled or not in
cancellation points.

13 years agozfs_map_page/zfs_unmap_page: do not use sched_pin() and SFB_CPUPRIVATE
avg [Tue, 21 Sep 2010 05:58:45 +0000 (05:58 +0000)]
zfs_map_page/zfs_unmap_page: do not use sched_pin() and SFB_CPUPRIVATE

zfs_map_page/zfs_unmap_page are mostly called around potential I/O paths
and it seems to be a not very good idea to do cpu pinning there.

Suggested by: kib
MFC after: 2 weeks

13 years agozfs_vnops: use zfs_map_page/zfs_unmap_page helper functions in another place
avg [Tue, 21 Sep 2010 05:54:36 +0000 (05:54 +0000)]
zfs_vnops: use zfs_map_page/zfs_unmap_page helper functions in another place

MFC after: 2 weeks

13 years agotools/umastat: more cleanups
avg [Tue, 21 Sep 2010 05:36:30 +0000 (05:36 +0000)]
tools/umastat: more cleanups

PR: misc/146119
Submitted by: pluknet <pluknet@gmail.com>
MFC after: 1 week

13 years agoSupport new variable NANO_LABEL. When set to a non-null string,
imp [Mon, 20 Sep 2010 23:36:54 +0000 (23:36 +0000)]
Support new variable NANO_LABEL.  When set to a non-null string,
nanobsd will build a system that uses this label (via
/dev/ufs/${NANO_LABEL}sX) in preference to NANO_DRIVE (well, it forces
NANO_DRIVE to be ufs/${NANO_LABEL}).  This allows images that will
boot off usb stick or CF card easily well.

There is no change if you don't set this variable.

13 years agoAdd a geli resize subcommand to resize encrypted filesystems prior
brian [Mon, 20 Sep 2010 22:04:59 +0000 (22:04 +0000)]
Add a geli resize subcommand to resize encrypted filesystems prior
to growing the filesystem.

Refuse to attach providers where the metadata provider size is
wrong.  This makes post-boot attaches behave consistently with
pre-boot attaches.  Also refuse to restore metadata to a provider
of the wrong size without the new -f switch.  The new -f switch
forces the metadata restoration despite the provider size, and
updates the provider size in the restored metadata to the correct
value.

Helped by: pjd
Reviewed by: pjd

13 years agotools/umastat: fix build on amd64
avg [Mon, 20 Sep 2010 21:22:15 +0000 (21:22 +0000)]
tools/umastat: fix build on amd64

And perhaps other 64-bit platforms.

Submitted by: Fabian Keil <freebsd-listen@fabiankeil.de>
MFC after: 1 week

13 years agoReplace an XXX comment with the appropriate code.
mdf [Mon, 20 Sep 2010 20:41:59 +0000 (20:41 +0000)]
Replace an XXX comment with the appropriate code.

Submitted by: alc

13 years agoAdd Simplified Chinese messages for BSD grep.
delphij [Mon, 20 Sep 2010 19:42:52 +0000 (19:42 +0000)]
Add Simplified Chinese messages for BSD grep.

13 years agoUse destroy_dev_sched(9) instead of destroy_dev(9) in passcleanup() as
mdf [Mon, 20 Sep 2010 19:42:14 +0000 (19:42 +0000)]
Use destroy_dev_sched(9) instead of destroy_dev(9) in passcleanup() as
it is indirectly a d_close method.

Prompted by: kib
Reviewed by: mav
MFC after: 2 weeks

13 years agoFirst step at adopting FreeBSD to support PSARC/2010/029. This makes
trasz [Mon, 20 Sep 2010 17:10:06 +0000 (17:10 +0000)]
First step at adopting FreeBSD to support PSARC/2010/029.  This makes
acl_is_trivial_np(3) properly recognize the new trivial ACLs.  From
the user point of view, that means "ls -l" no longer shows plus signs
for all the files when running ZFS v28.

13 years agoUpgrade our Clang in base to r114020, from upstream's release_28 branch.
dim [Mon, 20 Sep 2010 16:43:17 +0000 (16:43 +0000)]
Upgrade our Clang in base to r114020, from upstream's release_28 branch.

Approved-by: rpaulo (mentor)

13 years agoTweak the stats exported by the e1000 drivers:
jhb [Mon, 20 Sep 2010 16:04:44 +0000 (16:04 +0000)]
Tweak the stats exported by the e1000 drivers:
- Add a single sysctl procedure to all three drivers to read an arbitrary
  register (the register is passed as arg2).  Use it to replace existing
  routines in igb(4) that used a separate routine for each register, and
  to add support for missing stats in em(4) and lem(4).
- Move the 'rx_overruns' and 'watchdog_timeouts' stats out of the MAC stats
  section as they are driver stats, not MAC counters.
- Simplify the code that creates per-queue stats in igb(4) to use a single
  loop and remove duplicated code.
- Properly read all 64 bits of the 'good octets received/transmitted' in
  em(4) and lem(4).
- Actually read the interrupt count registers in em(4), and drop the
  'host to card' sysctl stats from em(4) as they are not implemented in
  any of the hardware this driver supports.
- Restore several stats to em(4) that were lost in the earlier stats
  conversion including per-queue stats.
- Export several MAC stats in em(4) that were exported in igb(4) but not
  in em(4).
- Export stats in lem(4) using individual sysctls as in em(4) and igb(4).

Reviewed by: jfv
MFC after: 1 week

13 years agoFix an integer overflow in RLE length parsing when decompressing
cperciva [Mon, 20 Sep 2010 14:58:08 +0000 (14:58 +0000)]
Fix an integer overflow in RLE length parsing when decompressing
corrupt bzip2 data.

Approved by: so (cperciva)
Security: FreeBSD-SA-10:08.bzip2

13 years agoAdd __dead2 to functions that we know they are going to exit.
pjd [Mon, 20 Sep 2010 13:23:43 +0000 (13:23 +0000)]
Add __dead2 to functions that we know they are going to exit.

MFC after: 3 days

13 years agoDo not convert some meaningful error value to EINVAL.
glebius [Mon, 20 Sep 2010 12:23:10 +0000 (12:23 +0000)]
Do not convert some meaningful error value to EINVAL.

Reviewed by: will

13 years agoFix a locking issue which resulted in aborted associations
tuexen [Mon, 20 Sep 2010 12:19:11 +0000 (12:19 +0000)]
Fix a locking issue which resulted in aborted associations
due to a corrupted nr-mapping array.

MFC after: 2 weeks.

13 years agoAdd 64 bit support to nlge, and additional fixes
jchandra [Mon, 20 Sep 2010 11:53:57 +0000 (11:53 +0000)]
Add 64 bit support to nlge, and additional fixes

- 64 bit fixes for ifnlge.c
- Use m_nextpkt to save mbuf vaddr on 64 bit, we cannot store the
  64 bit vaddr  in the 40bit freeback field.
- remove unused code and unnecessary variables.
- use xlr_io_mmio macro instead of adding io base address
- rewrite GPIO related code to fixup nlge using xlr_write_reg and DELAY
- support for engg boards major num 11 and 12
- add xlr_paddr_lw() to load 32bit value from physical address, fix
  inline assembly
- style fixes

13 years agoUnbreak the build on strong-aligned architectures (arm, ia64).
marcel [Mon, 20 Sep 2010 04:20:55 +0000 (04:20 +0000)]
Unbreak the build on strong-aligned architectures (arm, ia64).
Casting from (char *) to (struct ufs1_dinode *) changes the
alignment requirement of the pointer and GCC does not know that
the pointer is adequately aligned (due to malloc(3)), and warns
about it. Cast to (void *) first to by-pass the check.

13 years agoAllow a POSIX shared memory object that is opened for read but not for
alc [Sun, 19 Sep 2010 19:42:04 +0000 (19:42 +0000)]
Allow a POSIX shared memory object that is opened for read but not for
write to nonetheless be mapped PROT_WRITE and MAP_PRIVATE, i.e.,
copy-on-write.

(This is a regression in the new implementation of POSIX shared memory
objects that is used by HEAD and RELENG_8.  This bug does not exist in
RELENG_7's user-level, file-based implementation.)

PR: 150260
MFC after: 3 weeks

13 years agoMake refinements to r212824. In particular, don't make
alc [Sun, 19 Sep 2010 17:43:22 +0000 (17:43 +0000)]
Make refinements to r212824.  In particular, don't make
vm_map_unlock_nodefer() part of the synchronization interface for maps.

Add comments to vm_map_unlock_and_wait() and vm_map_wakeup() describing
how they should be used.  In particular, describe the deferred deallocations
issue with vm_map_unlock_and_wait().

Redo the implementation of vm_map_unlock_and_wait() so that it passes
along the caller's file and line information, just like the other map
locking primitives.

Reviewed by: kib
X-MFC after: r212824

13 years agoJust make callout devices and /dev/console force CLOCAL on open().
ed [Sun, 19 Sep 2010 16:35:42 +0000 (16:35 +0000)]
Just make callout devices and /dev/console force CLOCAL on open().

Instead of adding custom checks to wait for DCD on open(), just modify
the termios structure to set CLOCAL. This means SIGHUP is no longer
generated when losing DCD as well.

Reviewed by: kib@
MFC after: 1 week

13 years agoAdd support 'device tpm' for amd64.
nork [Sun, 19 Sep 2010 14:40:37 +0000 (14:40 +0000)]
Add support 'device tpm' for amd64.
Add tpm(4)'s default setting to /boot/defaults/loader.conf.
Add 'device tpm' to NOTES for amd64 and i386.

Discussed with: takawata
Approved by: imp (mentor)

13 years agoIgnore DCD handling on /dev/console entirely.
ed [Sun, 19 Sep 2010 14:21:39 +0000 (14:21 +0000)]
Ignore DCD handling on /dev/console entirely.

This makes /dev/console more fail-safe and prevents a potential console
lock-up during boot.

Discussed on: stable@
Tested by: koitsu@
MFC after: 1 week

13 years agoManual page for the kernel side Secure Neighbor Discovery support.
anchie [Sun, 19 Sep 2010 12:54:18 +0000 (12:54 +0000)]
Manual page for the kernel side Secure Neighbor Discovery support.

Reviewed by: brueffer
Approved by: bz (mentor)

13 years agoFix typo in previous commit.
bschmidt [Sun, 19 Sep 2010 12:52:23 +0000 (12:52 +0000)]
Fix typo in previous commit.

13 years agoRewrite parts of the calibration code which is run while bringing up
bschmidt [Sun, 19 Sep 2010 12:47:41 +0000 (12:47 +0000)]
Rewrite parts of the calibration code which is run while bringing up
the device:
- unobscure some of the code by moving it into its own functions
- get rid of some magic numbers
- create similar structure as the reference driver has, this should
  make further syncs easier

13 years agoGroup functions used for initial calibration.
bschmidt [Sun, 19 Sep 2010 12:39:04 +0000 (12:39 +0000)]
Group functions used for initial calibration.

13 years agoIndicate that POSIX semaphores are always supported.
tijl [Sun, 19 Sep 2010 12:01:50 +0000 (12:01 +0000)]
Indicate that POSIX semaphores are always supported.

Reported by: avilla
Reviewed by: davidxu
Approved by: kib (mentor)

13 years agoAllow the initial congestion window to be configure
tuexen [Sun, 19 Sep 2010 11:57:21 +0000 (11:57 +0000)]
Allow the initial congestion window to be configure
to one MTU. Improve the description.

MFC after: 2 weeks.

13 years agoFix a locking issue which shows up when the code is used
tuexen [Sun, 19 Sep 2010 11:42:16 +0000 (11:42 +0000)]
Fix a locking issue which shows up when the code is used
on Mac OS X.

MFC after: 2 weeks.

13 years agoIn all Makefiles under lib/clang, consistently use tabs instead of
dim [Sun, 19 Sep 2010 10:54:58 +0000 (10:54 +0000)]
In all Makefiles under lib/clang, consistently use tabs instead of
spaces after the '=' sign in macro assignments.

Approved-by: rpaulo (mentor)

13 years agoFix indent.
pjd [Sun, 19 Sep 2010 10:51:55 +0000 (10:51 +0000)]
Fix indent.

13 years agoSupport attaching version 4 metadata
brian [Sun, 19 Sep 2010 10:45:53 +0000 (10:45 +0000)]
Support attaching version 4 metadata

Reviewed by: pjd