]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoMFp4:
bz [Sat, 29 Nov 2008 14:32:14 +0000 (14:32 +0000)]
MFp4:
  Bring in updated jail support from bz_jail branch.

This enhances the current jail implementation to permit multiple
addresses per jail. In addtion to IPv4, IPv6 is supported as well.
Due to updated checks it is even possible to have jails without
an IP address at all, which basically gives one a chroot with
restricted process view, no networking,..

SCTP support was updated and supports IPv6 in jails as well.

Cpuset support permits jails to be bound to specific processor
sets after creation.

Jails can have an unrestricted (no duplicate protection, etc.) name
in addition to the hostname. The jail name cannot be changed from
within a jail and is considered to be used for management purposes
or as audit-token in the future.

DDB 'show jails' command was added to aid debugging.

Proper compat support permits 32bit jail binaries to be used on 64bit
systems to manage jails. Also backward compatibility was preserved where
possible: for jail v1 syscalls, as well as with user space management
utilities.

Both jail as well as prison version were updated for the new features.
A gap was intentionally left as the intermediate versions had been
used by various patches floating around the last years.

Bump __FreeBSD_version for the afore mentioned and in kernel changes.

Special thanks to:
- Pawel Jakub Dawidek (pjd) for his multi-IPv4 patches
  and Olivier Houchard (cognet) for initial single-IPv6 patches.
- Jeff Roberson (jeff) and Randall Stewart (rrs) for their
  help, ideas and review on cpuset and SCTP support.
- Robert Watson (rwatson) for lots and lots of help, discussions,
  suggestions and review of most of the patch at various stages.
- John Baldwin (jhb) for his help.
- Simon L. Nielsen (simon) as early adopter testing changes
  on cluster machines as well as all the testers and people
  who provided feedback the last months on freebsd-jail and
  other channels.
- My employer, CK Software GmbH, for the support so I could work on this.

Reviewed by: (see above)
MFC after: 3 months (this is just so that I get the mail)
X-MFC Before:   7.2-RELEASE if possible

15 years agoCheck the return value of config_intrhook_establish().
rpaulo [Sat, 29 Nov 2008 14:26:22 +0000 (14:26 +0000)]
Check the return value of config_intrhook_establish().

Found with: Coverity Prevent(tm)
CID: 2115

15 years agoCheck for non-existing model DMI string.
rpaulo [Sat, 29 Nov 2008 14:20:36 +0000 (14:20 +0000)]
Check for non-existing model DMI string.

Submitted by: ganbold
Found with: Coverity Prevent(tm)
CID:          2434
MFC after: 1 week

15 years agoIn the nfsrv_fhtovp(), after the vfs_getvfs() function found the pointer
kib [Sat, 29 Nov 2008 13:34:59 +0000 (13:34 +0000)]
In the nfsrv_fhtovp(), after the vfs_getvfs() function found the pointer
to the fs, but before a vnode on the fs is locked, unmount may free fs
structures, causing access to destroyed data and freed memory.

Introduce a vfs_busymp() function that looks up and busies found
fs while mountlist_mtx is held. Use it in nfsrv_fhtovp() and in the
implementation of the handle syscalls.

Two other uses of the vfs_getvfs() in the vfs_subr.c, namely in
sysctl_vfs_ctl and vfs_getnewfsid seems to be ok. In particular,
sysctl_vfs_ctl is protected by Giant by being a non-sleeping sysctl
handler, that prevents Giant-locked unmount code to interfere with it.

Noted by: tegge
Reviewed by: dfr
Tested by: pho
MFC after: 1 month

15 years agoImprove KASSERT() call a bit:
pjd [Sat, 29 Nov 2008 12:40:14 +0000 (12:40 +0000)]
Improve KASSERT() call a bit:
- Print flags in hex.
- Note that flags can be fine and panic can be due unexpected error condition.
- Remove redundant new line character.

Eventhough panic message excess 80 characters keep it in one line so it is
easier to grep.

15 years agoMFp4: Remove assertion that is no longer valid - we now use VOP_CLOSE() in
pjd [Sat, 29 Nov 2008 12:32:42 +0000 (12:32 +0000)]
MFp4: Remove assertion that is no longer valid - we now use VOP_CLOSE() in
more places (ie vdev_file.c).

15 years agomake 'make universe' not complain about
bz [Sat, 29 Nov 2008 08:45:20 +0000 (08:45 +0000)]
make 'make universe' not complain about
  In file included from /src/sys/modules/powermac_nvram/../../dev/powermac_nvram/powermac_nvram.c:38:
  @/dev/ofw/ofw_bus.h:36:24: error: ofw_bus_if.h: No such file or directory
I am not sure for how long this had not worked and if it was just the
latest vimage commit that had revealed this or if nobody had built
universe successfully in a while. Btw, the tinderbox did not complain
either so that is probably the reason noone had noticed.

15 years agoUnbreak mips build by taking first WAG at mb(), wmb() and rmb(). The
imp [Sat, 29 Nov 2008 05:16:14 +0000 (05:16 +0000)]
Unbreak mips build by taking first WAG at mb(), wmb() and rmb().  The
latter two are likely pessimal...

15 years agoNoticed the following error message:
imp [Sat, 29 Nov 2008 02:28:05 +0000 (02:28 +0000)]
Noticed the following error message:

mount_msdosfs: /dev/cf0s1: : Operation not supported by device

and thought I'd fix it to be:

mount_msdosfs: /dev/cf0s1: Operation not supported by device

Not sure why errmsg isn't getting filled in, or why this error is even
happening at all... (fsck_msdosfs is clean, and I can mount this same
CF elsewhere).

15 years agoRenamed the FRAMELEN macro to TRUEPHY_FRAMELEN as for powerpc
bz [Fri, 28 Nov 2008 23:44:13 +0000 (23:44 +0000)]
Renamed the FRAMELEN macro to TRUEPHY_FRAMELEN as for powerpc
it seems to be possible to collide with FRAMELEN from machine/frame.h.

Found by: zec

15 years agoAdd an essential .h file that skipped from the last commit (r185419).
zec [Fri, 28 Nov 2008 23:39:25 +0000 (23:39 +0000)]
Add an essential .h file that skipped from the last commit (r185419).

Pointy hat #1 on...

Pointed out by: bz

15 years agoUnhide declarations of network stack virtualization structs from
zec [Fri, 28 Nov 2008 23:30:51 +0000 (23:30 +0000)]
Unhide declarations of network stack virtualization structs from
underneath #ifdef VIMAGE blocks.

This change introduces some churn in #include ordering and nesting
throughout the network stack and drivers but is not expected to cause
any additional issues.

In the next step this will allow us to instantiate the virtualization
container structures and switch from using global variables to their
"containerized" counterparts.

Reviewed by: bz, julian
Approved by: julian (mentor)
Obtained from: //depot/projects/vimage-commit2/...
X-MFC after: never
Sponsored by: NLnet Foundation, The FreeBSD Foundation

15 years agoo FreeBSD 6.4-RELEASE added.
maxim [Fri, 28 Nov 2008 19:35:48 +0000 (19:35 +0000)]
o FreeBSD 6.4-RELEASE added.

15 years agoWith the permissions of phk@ change the license on kern_jail.c
bz [Fri, 28 Nov 2008 19:23:46 +0000 (19:23 +0000)]
With the permissions of phk@ change the license on kern_jail.c
to a 2 clause BSD license.

15 years agoAdd missing 'THE'. This was discussed with core@ in the larger
imp [Fri, 28 Nov 2008 19:21:10 +0000 (19:21 +0000)]
Add missing 'THE'.  This was discussed with core@ in the larger
context of making this text match the OSL text, but the changes that
OSL silently made to the license to approve it haven't been brought
back yet.  Still working on that issue.

We likely should start using the UTF-8 copyright symbol (What ©
expands to in HTML), but I'm not 100% confident in my ability to tell
Emacs to save it like that.  And I haven't gotten approval for that
change.

Approved by: core@

15 years agoUpdate for 185401, errors now go to stderr.
stefanf [Fri, 28 Nov 2008 18:59:04 +0000 (18:59 +0000)]
Update for 185401, errors now go to stderr.

15 years agoReport error messages of the builtins 'type' and 'command -V' to stderr instead
stefanf [Fri, 28 Nov 2008 18:55:42 +0000 (18:55 +0000)]
Report error messages of the builtins 'type' and 'command -V' to stderr instead
of stdout.

Noticed by: Zajcev Evgeny

15 years agoFix a printing problem when using the -L flag to netstat caused
gnn [Fri, 28 Nov 2008 18:35:14 +0000 (18:35 +0000)]
Fix a printing problem when using the -L flag to netstat caused
by adding the -x flag earlier.

Submitted by: Anton Yuzhaninov
MFC after: 3 days

15 years agoFix matching of message queues by name.
ed [Fri, 28 Nov 2008 14:53:18 +0000 (14:53 +0000)]
Fix matching of message queues by name.

The mqfs_search() routine uses strncmp() to match message queue objects
by name. This is because it can be called from environments where the
file name is not null terminated (the VFS for example).

Unfortunately it doesn't compare the lengths of the message queue names,
which means if a system has "Queue12345", the name "Queue" will also
match.

I noticed this when a student of mine handed in an exercise using
message queues with names "Queue2" and "Queue".

Reviewed by: rink

15 years agomissing V_
des [Fri, 28 Nov 2008 13:13:44 +0000 (13:13 +0000)]
missing V_

15 years agoAdd a reference to hwpmc_core.c most likely missed in r185363
bz [Fri, 28 Nov 2008 12:23:02 +0000 (12:23 +0000)]
Add a reference to hwpmc_core.c most likely missed in r185363
to try to unbreak universe (untested).

15 years agoRemove duplicate 2610SA entry.
emaste [Thu, 27 Nov 2008 20:26:02 +0000 (20:26 +0000)]
Remove duplicate 2610SA entry.

Submitted by: jkim

15 years agoLet ARM loader(8) build with the man page.
raj [Thu, 27 Nov 2008 16:53:01 +0000 (16:53 +0000)]
Let ARM loader(8) build with the man page.

15 years agoProvide manual page for the mge(4) device driver.
raj [Thu, 27 Nov 2008 16:50:23 +0000 (16:50 +0000)]
Provide manual page for the mge(4) device driver.

15 years agoExplicitely note that destroy_dev() sleeps.
kib [Thu, 27 Nov 2008 16:47:25 +0000 (16:47 +0000)]
Explicitely note that destroy_dev() sleeps.

Requested by: ed (some time ago), Jaakko Heinonen <jh saunalahti fi>

15 years agoReplace most INP_CHECK_SOCKAF() uses checking if it is an
bz [Thu, 27 Nov 2008 13:19:42 +0000 (13:19 +0000)]
Replace most INP_CHECK_SOCKAF() uses checking if it is an
IPv6 socket by comparing a constant inp vflag.
This is expected to help to reduce extra locking.

Suggested by: rwatson
Reviewed by: rwatson
MFC after: 6 weeks

15 years agoMerge in6_pcbfree() into in_pcbfree() which after the previous
bz [Thu, 27 Nov 2008 12:04:35 +0000 (12:04 +0000)]
Merge in6_pcbfree() into in_pcbfree() which after the previous
IPsec change in r185366 only differed in two additonal IPv6 lines.
Rather than splattering conditional code everywhere add the v6
check centrally at this single place.

Reviewed by: rwatson (as part of a larger changset)
MFC after: 6 weeks (*)
(*) possibly need to leave a stub wrapper in 7 to keep the symbol.

15 years agoAdd two rtld exported symbols, _rtld_atfork_pre and _rtld_atfork_post.
kib [Thu, 27 Nov 2008 11:27:59 +0000 (11:27 +0000)]
Add two rtld exported symbols, _rtld_atfork_pre and _rtld_atfork_post.
Threading library calls _pre before the fork, allowing the rtld to
lock itself to ensure that other threads of the process are out of
dynamic linker. _post releases the locks.

This allows the rtld to have consistent state in the child. Although
child may legitimately call only async-safe functions, the call may
need plt relocation resolution, and this requires working rtld.

Reported and debugging help by: rink
Reviewed by: kan, davidxu
MFC after: 1 month (anyway, not before 7.1 is out)

15 years agoUnify ipsec[46]_delete_pcbpolicy in ipsec_delete_pcbpolicy.
bz [Thu, 27 Nov 2008 10:43:08 +0000 (10:43 +0000)]
Unify ipsec[46]_delete_pcbpolicy in ipsec_delete_pcbpolicy.
Ignoring different names because of macros (in6pcb, in6p_sp) and
inp vs. in6p variable name both functions were entirely identical.

Reviewed by: rwatson (as part of a larger changeset)
MFC after: 6 weeks (*)
(*) possibly need to leave a stub wrappers in 7 to keep the symbols.

15 years agoUpdate description of an event.
jkoshy [Thu, 27 Nov 2008 09:21:37 +0000 (09:21 +0000)]
Update description of an event.

Submitted by: "Verplanke, Edwin" <edwin dot verplanke at intel dot com>

15 years ago- Add support for PMCs in Intel CPUs of Family 6, model 0xE (Core Solo
jkoshy [Thu, 27 Nov 2008 09:00:47 +0000 (09:00 +0000)]
- Add support for PMCs in Intel CPUs of Family 6, model 0xE (Core Solo
  and Core Duo), models 0xF (Core2), model 0x17 (Core2Extreme) and
  model 0x1C (Atom).

  In these CPUs, the actual numbers, kinds and widths of PMCs present
  need to queried at run time.  Support for specific "architectural"
  events also needs to be queried at run time.

  Model 0xE CPUs support programmable PMCs, subsequent CPUs
  additionally support "fixed-function" counters.

- Use event names that are close to vendor documentation, taking in
  account that:
  - events with identical semantics on two or more CPUs in this family
    can have differing names in vendor documentation,
  - identical vendor event names may map to differing events across
    CPUs,
  - each type of CPU supports a different subset of measurable
    events.

  Fixed-function and programmable counters both use the same vendor
  names for events.  The use of a class name prefix ("iaf-" or
  "iap-" respectively) permits these to be distinguished.

- In libpmc, refactor pmc_name_of_event() into a public interface
  and an internal helper function, for use by log handling code.

- Minor code tweaks: staticize a global, freshen a few comments.

Tested by: gnn

15 years agoRevert r184509: don't encourage the use of sysexits.h with err() and
rwatson [Thu, 27 Nov 2008 08:42:58 +0000 (08:42 +0000)]
Revert r184509: don't encourage the use of sysexits.h with err() and
errx(),, as there seems to be a general preference against this
practice.

Suggested by: bde, des, jhb

15 years agoThe timezone byte is a signed value, treat it as such.
kientzle [Thu, 27 Nov 2008 06:21:04 +0000 (06:21 +0000)]
The timezone byte is a signed value, treat it as such.
Otherwise, time zone information for time zones west of
GMT gets discarded.

PR: kern/128934
Submitted by: J.R. Oldroyd
MFC after: 4 days

15 years agoAfter visiting a subdirectory, we use chdir("..") or
kientzle [Thu, 27 Nov 2008 05:49:52 +0000 (05:49 +0000)]
After visiting a subdirectory, we use chdir("..") or
fchdir() to return back to the parent.  If those fail,
we're just dead in the water.  Add a new error value
TREE_ERROR_FATAL to indicate that directory traversal
cannot continue.  Have write.c honor that by exiting
immediately.

MFC after: 30 days

15 years agoIf we're unable to chdir() to a directory that we know exists,
kientzle [Thu, 27 Nov 2008 05:14:36 +0000 (05:14 +0000)]
If we're unable to chdir() to a directory that we know exists,
that should result in a non-zero return value.

In particular, this should address the issue that David Wolfskill
ran into with a somewhat flaky NFS mount resulting in a damaged
archive even though tar returned success.

MFC after: 4 days

15 years agoRemove unused variable.
ganbold [Thu, 27 Nov 2008 04:40:37 +0000 (04:40 +0000)]
Remove unused variable.

Found with:     Coverity Prevent(tm)
CID: 3664

Approved by: kib

15 years agoDon't let ata_completed() dereference a null request->dma pointer to
peter [Thu, 27 Nov 2008 03:37:46 +0000 (03:37 +0000)]
Don't let ata_completed() dereference a null request->dma pointer to
print dma status after a media error.

15 years agoSmall nit I just noticed, a pre-decrement should be post.
jfv [Thu, 27 Nov 2008 02:19:44 +0000 (02:19 +0000)]
Small nit I just noticed, a pre-decrement should be post.

15 years agoThanks to the reminder from Ganbold, small fix in the RX failure
jfv [Thu, 27 Nov 2008 02:18:43 +0000 (02:18 +0000)]
Thanks to the reminder from Ganbold, small fix in the RX failure
path for an infinite loop. Problem originally noticed in ixgbe
by Jeff Roberson and fixed there. Thanks to everyone involved.

15 years agoAdd basic WOL support for 82550/82551/82558 and 82559 based
yongari [Thu, 27 Nov 2008 01:57:23 +0000 (01:57 +0000)]
Add basic WOL support for 82550/82551/82558 and 82559 based
controllers. ICH based controllers are treated as 82559. 82557,
earlier revision of 82558 and 82559ER have no WOL capability.
 o WOL support requires help of a firmware so add check whether
   hardware is capable of handling magic frames by reading EEPROM.
 o Enable accepting WOL frames only when hardware is about to
   suspend or shutdown. Previously fxp(4) used to allow receipt of
   magic frame under normal operation mode which could cause
   hardware hang if magic frame is received by hardware. Datasheet
   clearly states driver should not allow WOL frames under normal
   operation mode.
 o Disable WOL frame reception in device attach so have fxp(4)
   immunize against system hang which can be triggered by magic
   packets when the hardware is not in fully initialized state.
 o Don't reset all hardware configuration data in fxp_stop()
   otherwise important configuration data is lost and this would
   reset WOL configuration to default state which in turn cause
   hardware hang on receipt of magic frames. To fix the issue,
   preserve hardware configuration data by issuing a selective
   reset.
 o Explicitly disable interrupts after issuing selective reset as
   reset may unmask interrupts.

Tested by: Alexey Shuvaev < shuvaev <> physik DOT uni-wuerzburg DOT de >

15 years agoThis delta is primarily a fix for es2lan devices that
jfv [Wed, 26 Nov 2008 23:57:23 +0000 (23:57 +0000)]
This delta is primarily a fix for es2lan devices that
will sometimes fail to initialize problem due to a lock
contention with management hardware. However, in order to
deliver that fix it was necessary to take a shared code
update as a whole, and this required scattered changes in
the core code to be compatible.

The em driver now has VLAN HW support added as the igb
driver had previously.

MFC after:  ASAP - in time for 7.1 RELEASE

15 years agoUpdated ixgbe driver - version 1.6.2
jfv [Wed, 26 Nov 2008 23:41:18 +0000 (23:41 +0000)]
Updated ixgbe driver - version 1.6.2

-This version has header split, and as a result a number of
 aspects of the code have been improved/simplified.
- Interrupt handling refined for performance
- Many small bugs fixed along the way

MFC after: ASAP - in time for 7.1

15 years agoRemove an unused variable.
jkim [Wed, 26 Nov 2008 22:33:55 +0000 (22:33 +0000)]
Remove an unused variable.

Found with: Coverity Prevent(tm)
CID: 3677

15 years agoMerge more of currently non-functional (i.e. resolving to
zec [Wed, 26 Nov 2008 22:32:07 +0000 (22:32 +0000)]
Merge more of currently non-functional (i.e. resolving to
whitespace) macros from p4/vimage branch.

Do a better job at enclosing all instantiations of globals
scheduled for virtualization in #ifdef VIMAGE_GLOBALS blocks.

De-virtualize and mark as const saorder_state_alive and
saorder_state_any arrays from ipsec code, given that they are never
updated at runtime, so virtualizing them would be pointless.

Reviewed by:  bz, julian
Approved by:  julian (mentor)
Obtained from:        //depot/projects/vimage-commit2/...
X-MFC after:  never
Sponsored by: NLnet Foundation, The FreeBSD Foundation

15 years agoImport an initial revision of the pmcannotate tool.
attilio [Wed, 26 Nov 2008 21:44:57 +0000 (21:44 +0000)]
Import an initial revision of the pmcannotate tool.
For further explanations please check this e-mail on freebsd-arch@:
http://lists.freebsd.org/pipermail/freebsd-arch/2008-November/008698.html

Tested by: gnn
Sponsored by: Nokia

15 years agoFix a typo in previous commit: must call "putn" to print a crlf,
luigi [Wed, 26 Nov 2008 21:38:43 +0000 (21:38 +0000)]
Fix a typo in previous commit: must call "putn" to print a crlf,
instead of "puts" which prints whatever is at %si, followed by a CRLF.

It was not noticed during tests because at that point %si points
to a partition entry whose first byte is 0x80, which is both a
terminator for the string and a non printable character.

Submitted by: Christoph Mallon

15 years agoCreate a fake geometry (16 heads, 64 sectors) when dealing with
luigi [Wed, 26 Nov 2008 21:05:03 +0000 (21:05 +0000)]
Create a fake geometry (16 heads, 64 sectors) when dealing with
a plain file and a geometry is not explicitly supplied through
command line or disktab entry.

This way you can a FAT image on a file as simply as this:

newfs_msdos ./some/file

(right now you need a much longer command

newfs_msdos -h 32 -u 64 -S 512 -s $total_blocks -o 0 ./some/file

Will be merged after 7.1 and 6.4 are released.
See also the related PR which suggests a similar change.

PR: bin/121182
MFC after: 4 weeks

15 years agoRemove in6_pcbdetach() as it is exactly the same function
bz [Wed, 26 Nov 2008 20:52:26 +0000 (20:52 +0000)]
Remove in6_pcbdetach() as it is exactly the same function
as in_pcbdetach() and we don't need the code twice.

Reviewed by: rwatson
MFC after: 6 weeks (*)
(*) possibly need to leave a stub wrapper in 7 to keep the symbol.

15 years agoUse newly introduced cpu_vendor_id to make invariant TSC detection more
jkim [Wed, 26 Nov 2008 19:29:33 +0000 (19:29 +0000)]
Use newly introduced cpu_vendor_id to make invariant TSC detection more
clearer and merge r185295 to amd64.

15 years agoIntroduce cpu_vendor_id and replace a lot of strcmp(cpu_vendor, "...").
jkim [Wed, 26 Nov 2008 19:25:13 +0000 (19:25 +0000)]
Introduce cpu_vendor_id and replace a lot of strcmp(cpu_vendor, "...").

Reviewed by: jhb, peter (early amd64 version)

15 years agoPass the pointer to the selected partition in %si to the next stage
luigi [Wed, 26 Nov 2008 18:01:21 +0000 (18:01 +0000)]
Pass the pointer to the selected partition in %si to the next stage
boot code. The bug was introduced in rev.1.13, and went unnoticed
because FreeBSD's boot1 does not use it, but other systems might.

(I have been struggling for almost a full day trying to figure out
why a syslinux'ed partition would not boot when started with the
FreeBSD /boot/boot0, only to realize that the bug was ours!)

The space for the two extra bytes (push %si and pop %si) is reclaimed
by removing an extra CRLF that is printed before booting.

The bug is not a major one but if there is time it might be a good
thing to merge it into the upcoming releases.

15 years ago- Add the device ID for the HP HS2300 MC8775 clone (michael)
n_hibma [Wed, 26 Nov 2008 17:16:54 +0000 (17:16 +0000)]
- Add the device ID for the HP HS2300 MC8775 clone (michael)
- Bugfix: Don't excede static number of ports allowed when iterating
  over endpoints within an interface.
- u3g_speeds contains speeds in baud, not bytes per second, so divide
  the buffer size by 10.

15 years agoDocument that all the other commands are either
rdivacky [Wed, 26 Nov 2008 16:38:43 +0000 (16:38 +0000)]
Document that all the other commands are either
identical to the FreeBSD ones or rejected by
kern_msgctl().

Found with: Coverity Prevent(tm)
CID: 3456
Approved by: kib (mentor)

15 years agoRemove unused variable.
ganbold [Wed, 26 Nov 2008 13:44:11 +0000 (13:44 +0000)]
Remove unused variable.

Found with:     Coverity Prevent(tm)
CID: 3695,3696

Approved by: harti

15 years agoIn null_lookup(), do the needed cleanup instead of panicing saying
kib [Wed, 26 Nov 2008 13:41:15 +0000 (13:41 +0000)]
In null_lookup(), do the needed cleanup instead of panicing saying
the cleanup is needed.

Reported by: kris, pho
Tested by: pho
MFC after: 2 weeks

15 years ago- Support IEEE_P1282 and IEEE_1282 tags in the rock ridge extensions record.
lulf [Wed, 26 Nov 2008 13:09:45 +0000 (13:09 +0000)]
- Support IEEE_P1282 and IEEE_1282 tags in the rock ridge extensions record.

PR: kern/128942
Submitted by: "J.R. Oldroyd" <fbsd - at - opal.com>

15 years agoUnify the v4 and v6 versions of pcbdetach and pcbfree as good
bz [Wed, 26 Nov 2008 12:54:31 +0000 (12:54 +0000)]
Unify the v4 and v6 versions of pcbdetach and pcbfree as good
as possible so that they are easily diffable.

No functional changes.

Reviewed by: rwatson
MFC after: 6 weeks

15 years agoPlug a credential leak in case the inpcb is freed by
bz [Wed, 26 Nov 2008 12:24:18 +0000 (12:24 +0000)]
Plug a credential leak in case the inpcb is freed by
in6_pcbfree() instead of in_pcbfree(); missed in r183606.

Reviewed by: rwatson
MFC after: 3 days (instantly for 7.1-RC?)

15 years agoAdd Pentium D cores into the list that can't handle 12.5% and 25%
sobomax [Wed, 26 Nov 2008 09:46:35 +0000 (09:46 +0000)]
Add Pentium D cores into the list that can't handle 12.5% and 25%
throttle. My SMP kernel hangs when one of those is selected by
powerd. Errata AA21 here:

ftp://download.intel.com/design/PentiumXE/specupdt/31030717.pdf

MFC after: 2 weeks

15 years agoImplement TSO for 82550/82551 controllers.
yongari [Wed, 26 Nov 2008 07:36:17 +0000 (07:36 +0000)]
Implement TSO for 82550/82551 controllers.
 o Configure controller to use dynamic TBD as TSO requires that
   operation mode.
 o Add a dummy TBD to tx_cb_u as TSO can access one more TBD in TSO
   operation.
 o Increase a DMA segment size to 4096 to hold a full IP segment
   with link layer header.
 o Unlike other TSO capable controllers, 82550/82551 does not
   modify the first IP packet in TSO operation so driver should
   create an IP packet with proper header. Subsequent IP packets
   are generated from the header information in the first IP packet
   header. Likewise pseudo checksum also should be computed by
   driver for the first packet.
 o TSO requires one more TBD to hold total TCP payload. To make
   code simple for TSO/non-TSO case, increase the index of the
   first available TBD array.
 o Remove KASSERT that checks the size of a DMA segment should be
   less than or equal to MCLBYTES as it's no longer valid in TSO.
 o Tx threshold and number of TBDs field is used to store MSS in
   TSO. So don't set the Tx threshold in TSO case.

15 years agoImplement Rx checksum offload for 82559 or later controllers.
yongari [Wed, 26 Nov 2008 06:36:53 +0000 (06:36 +0000)]
Implement Rx checksum offload for 82559 or later controllers.
82559 or later controllers added simple checksum calculation logic
in RU. For backward compatibility the computed checksum is appended
at the end of the data posted to Rx buffer. This type of simple
checksum calculation support had been used on several vendors such
as Sun HME/GEM, SysKonnect GENESIS and Marvell Yukon controllers.
Because this type of checksum offload support requires parsing of
received frame and pseudo checksum calculation with software
routine it still consumes more CPU cycles than that of full-fledged
checksum offload controller. But it's still better than software
checksum calculation.

15 years ago o Introduce a new function, fxp_new_rfabuf which allocates a new
yongari [Wed, 26 Nov 2008 05:51:49 +0000 (05:51 +0000)]
 o Introduce a new function, fxp_new_rfabuf which allocates a new
   Rx buffer and loads DMA map. Also add a function
   fxp_discard_rfabuf that handles reusing Rx buffer/DMA map. With
   this change fxp_add_rfabuf just handles appending a new RFA to
   existing chain.
 o Initialize mbuf length in fxp_new_rfabuf.
 o Don't reset rnr and have fxp(4) handle received frames even if
   it couldn't allocate new Rx buffer. This will make fxp(4) reload
   updated RFA under rnr case. The rnr would still be reset to 0 if
   polling is active and fxp(4) processed number of allowed Rx
   events.
 o Update if_iqdrops if fxp(4) couldn't allocate Rx buffer.

Previously fxp(4) used to try to reuse Rx buffer when new buffer
allocation is failed. But fxp(4) didn't take into account loaded
DMA map such that the same DMA map was loaded again without
unloading the map. There is no reason to unload the loaded map and
reload the same map again, just reusing the map is enough. I
believe the spare DMA map in softc was introduced to implement this
behaviour. Also fxp(4) used to stop Rx processing if once Rx buffer
allocation or DMA map load fails which in turn resulted in losing
incoming frames under heavy network load. With this change fxp(4)
should survive from resource shortage condition.

15 years agoAllow dumpon to a partition of type FS_UNUSED as well.
marcel [Wed, 26 Nov 2008 05:18:27 +0000 (05:18 +0000)]
Allow dumpon to a partition of type FS_UNUSED as well.

15 years agoFix buglets.
jkoshy [Wed, 26 Nov 2008 03:48:20 +0000 (03:48 +0000)]
Fix buglets.

15 years agoAdd the -m option to pmcstat.
attilio [Tue, 25 Nov 2008 23:24:29 +0000 (23:24 +0000)]
Add the -m option to pmcstat.
This option prints the list of sampled PCs along with the function name,
the start and end addresses of this where their live within.

Reviewed by: jkoshy
Tested by: gnn
Sponsored by: Nokia

15 years agoMFp4: We don't support TX_CREATE_ACL_ATTR nor TX_MKDIR_ACL_ATTR; code found
trasz [Tue, 25 Nov 2008 23:05:46 +0000 (23:05 +0000)]
MFp4: We don't support TX_CREATE_ACL_ATTR nor TX_MKDIR_ACL_ATTR; code found
in zfs_replay.c will panic if it encounters transactions of this type.
Make sure we don't put these into the ZIL.

Approved by: rwatson (mentor), pjd

15 years agoStraighten out those pesky SDP records for the Bluetooth
emax [Tue, 25 Nov 2008 21:54:42 +0000 (21:54 +0000)]
Straighten out those pesky SDP records for the Bluetooth
Service Discovery Application Profile.

Discussed with: Iain Hibbert of NetBSD plunky at rya dash online dot net
MFC after: 3 weeks

15 years agoFix locking (file descriptor table and Giant around VFS).
pjd [Tue, 25 Nov 2008 21:14:00 +0000 (21:14 +0000)]
Fix locking (file descriptor table and Giant around VFS).

Most submitted by: kib
Reviewed by: kib

15 years ago- Fix a potential NULL pointer reference. Note that this should not happen in
lulf [Tue, 25 Nov 2008 20:28:33 +0000 (20:28 +0000)]
- Fix a potential NULL pointer reference. Note that this should not happen in
  practice, but it is a good programming practice and allows the kernel to not
  depend on userland correctness.
- While there, make sizeof usage match the rest of the code.

Found with: Coverity Prevent(tm)
CID: 660, 662

15 years agoRemove unused variable.
ganbold [Tue, 25 Nov 2008 19:25:54 +0000 (19:25 +0000)]
Remove unused variable.

Found with:     Coverity Prevent(tm)
CID: 3669,3671

Approved by: jb

15 years ago- Fix a potential NULL pointer reference. Note that this cannot happen in
lulf [Tue, 25 Nov 2008 19:13:58 +0000 (19:13 +0000)]
- Fix a potential NULL pointer reference. Note that this cannot happen in
  practice, but it is a good programming practice nontheless and it allows the
  kernel to not depend on userland correctness.

Found with:   Coverity Prevent(tm)
CID:          655-659, 664-667

15 years agoRemove unused variable.
ganbold [Tue, 25 Nov 2008 19:06:20 +0000 (19:06 +0000)]
Remove unused variable.

Found with:     Coverity Prevent(tm)
CID: 3678

Approved by: njl

15 years agoConvert BWCT and HL200 over to new board mechanism as well. The
imp [Tue, 25 Nov 2008 19:05:46 +0000 (19:05 +0000)]
Convert BWCT and HL200 over to new board mechanism as well.  The
TSC4370 config file wasn't committed to this tree, so I don't know if
my changes will work on it or not.

15 years agoRemove unused variable.
ganbold [Tue, 25 Nov 2008 18:48:13 +0000 (18:48 +0000)]
Remove unused variable.

Found with:     Coverity Prevent(tm)
CID: 3685

Approved by: scottl

15 years agoStart to make it easier to add AT91RM9200 based boards:
imp [Tue, 25 Nov 2008 18:40:40 +0000 (18:40 +0000)]
Start to make it easier to add AT91RM9200 based boards:
o Copy kb920x_machdep.c to at91_machdep.c
o Move board_init to new board_kb920x.c
o rename ramsize to at91_ramsize and make it accessible to board_* files.
o Delete files.kb920x.  We can do this selection with the new boards.
o Add a stub for the tsc4370 board init, which will be added in
  a future commit.
o Add new 'devices' at91_board_kb920x and at91_board_tsc4370.  More are
  needed and will be added in future commits.

Reviewed by: stass, cognet

15 years agoAdd tools-level test for POSIX.1e functionality.
trasz [Tue, 25 Nov 2008 18:29:33 +0000 (18:29 +0000)]
Add tools-level test for POSIX.1e functionality.

Approved by: rwatson (mentor)

15 years agoWhitespace nit.
imp [Tue, 25 Nov 2008 16:38:10 +0000 (16:38 +0000)]
Whitespace nit.

15 years agoFix standalone module build by generating opt_kgssapi.h.
dfr [Tue, 25 Nov 2008 16:11:41 +0000 (16:11 +0000)]
Fix standalone module build by generating opt_kgssapi.h.

Submitted by: n_hibma

15 years agoMove vn_fullpath1() outside of FILEDESC locking. This is being done in
marcus [Tue, 25 Nov 2008 15:36:15 +0000 (15:36 +0000)]
Move vn_fullpath1() outside of FILEDESC locking.  This is being done in
advance of teaching vn_fullpath1() how to query file systems for
vnode-to-name mappings when cache lookups fail.

Thanks to kib for guidance and patience on this process.

Reviewed by: kib
Approved by: kib

15 years agoCore i7 supports invaliant TSC and the presense is presented on
takawata [Tue, 25 Nov 2008 13:35:06 +0000 (13:35 +0000)]
Core i7 supports invaliant TSC and the presense is presented on
this CPUID information, according to recently updated AP485.

15 years agoRegularize /* FALLTHROUGH */ comments in the BSM event type switch, and
rwatson [Tue, 25 Nov 2008 11:25:45 +0000 (11:25 +0000)]
Regularize /* FALLTHROUGH */ comments in the BSM event type switch, and
add one that was missing.

MFC after: 3 weeks
Coverity ID: 3960

15 years agoUnbreak the build without INET6.
bz [Tue, 25 Nov 2008 09:49:05 +0000 (09:49 +0000)]
Unbreak the build without INET6.

15 years agoUnbreak the build until alfred@ is back to fix it correctly.
bz [Tue, 25 Nov 2008 09:17:01 +0000 (09:17 +0000)]
Unbreak the build until alfred@ is back to fix it correctly.
For now disconnect the nonexistent serial_3g.

15 years agosrc/lib/libusb20/libusb20_compat01.c
alfred [Tue, 25 Nov 2008 08:04:40 +0000 (08:04 +0000)]
src/lib/libusb20/libusb20_compat01.c

Fix some issues about re-scanning of the devices.

src/lib/libusb20/libusb20_ugen20.c

Fix issue about libusb20 having to release the
USB transfers before doing a SET_CONFIG, else
the kernel will kill the file handle.

src/sys/dev/usb2/core/usb2_device.
src/sys/dev/usb2/core/usb2_generic.c
src/sys/dev/usb2/core/usb2_generic.h

Add support for U3G devices.
Improve and cleanup FIFO free handling.
Improve device re-enumeration.

src/sys/dev/usb2/core/usb2_msctest.c
src/sys/dev/usb2/core/usb2_msctest.h

Fix some problems in the USB Mass Storage Test.
Add Huawei vendor specific quirks.

src/sys/dev/usb2/core/usb2_request.c

Improve device re-enumeration.

src/sys/dev/usb2/ethernet/if_aue2.c
src/sys/dev/usb2/include/usb2_devid.h
src/sys/dev/usb2/include/usb2_devtable.h
src/sys/dev/usb2/quirk/usb2_quirk.c

Integrate changes from the old USB driver.

src/sys/dev/usb2/include/usb2_standard.h

Add definition of USB3.0 structures from USB.org.

src/sys/dev/usb2/serial/u3g2.c
src/sys/dev/usb2/serial/ugensa2.c
src/sys/modules/usb2/Makefile
src/sys/modules/usb2/serial_3g/Makefile

Import U3G driver.

Submitted by: Hans Petter Selasky (usb4bsd)

15 years agoBig update to the iSCSI initiator code. Highlights include IPv6 support,
scottl [Tue, 25 Nov 2008 07:17:11 +0000 (07:17 +0000)]
Big update to the iSCSI initiator code.  Highlights include IPv6 support,
many bugs fixes, many more performance improvements.

Submitted by: Danny Braniss

M    sbin/iscontrol/iscsi.conf.5
M    sbin/iscontrol/iscontrol.8
M    sbin/iscontrol/iscontrol.h
M    sbin/iscontrol/config.c
M    sbin/iscontrol/fsm.c
M    sbin/iscontrol/login.c
M    sbin/iscontrol/pdu.c
M    sbin/iscontrol/misc.c
M    sbin/iscontrol/auth_subr.c
M    sbin/iscontrol/iscontrol.c
M    sys/dev/iscsi/initiator/isc_cam.c
M    sys/dev/iscsi/initiator/iscsi.h
M    sys/dev/iscsi/initiator/isc_soc.c
M    sys/dev/iscsi/initiator/iscsi_subr.c
M    sys/dev/iscsi/initiator/iscsivar.h
M    sys/dev/iscsi/initiator/isc_subr.c
M    sys/dev/iscsi/initiator/iscsi.c
M    sys/dev/iscsi/initiator/isc_sm.c

15 years agoSave boot args.
imp [Tue, 25 Nov 2008 05:17:39 +0000 (05:17 +0000)]
Save boot args.

15 years agomore silly whitespace changes.
imp [Tue, 25 Nov 2008 05:12:19 +0000 (05:12 +0000)]
more silly whitespace changes.

15 years agoSimplify Tx checksum offload configuration. Also clear CSUM_IP if
yongari [Tue, 25 Nov 2008 04:33:02 +0000 (04:33 +0000)]
Simplify Tx checksum offload configuration. Also clear CSUM_IP if
we've computed IP checksum with software method.

15 years ago- Allow fxp_encap() enqueue failed transmissions and set
yongari [Tue, 25 Nov 2008 04:16:16 +0000 (04:16 +0000)]
- Allow fxp_encap() enqueue failed transmissions and set
  IFF_DRV_OACTIVE to note resource shortage to upper stack.
- Don't count number of mbuf chains. Default 32 DMA segments for a
  frame is enough for most cases. If bus_dmamap_mbuf_sg fails use
  m_collapse(9) to collapse the mbuf chain instead of relying on
  expensive m_defrag(9).
- Move bpf handling to fxp_start_body() which is supposed to be
  more appropriate place.
- Always arm watchdog timer whenever a new Tx request is made.
  Previously fxp(4) used to arm watchdog timer only when
  FXP_CXINT_THRESH-th Tx request is made. Because fxp(4) does not
  rely on Tx interrupt to reclaim transmitted mbufs it's better to
  arm watchdog timer to detect potential lockups.
- Add more aggresive Tx buffer reclaiming in fxp_start_body to make
  room for new Tx requests. Since fxp(4) does not request Tx
  completion interrupt for every frames it's necessary to clean
  TXCBs in advance to saturate link.
- Make fxp(4) try to start more packets transmitting regardless of
  interrupt type in fxp_intr_body.

15 years agoSimplify mode_t check treatment (suggested by trasz).
daichi [Tue, 25 Nov 2008 03:49:41 +0000 (03:49 +0000)]
Simplify mode_t check treatment (suggested by trasz).
By semantical view, trasz's code is better than prior one.

Submitted by: trasz
Reviewed by: Masanori OZAWA <ozawa@ongs.co.jp>

15 years agoFixes Unionfs socket issue reported as kern/118346.
daichi [Tue, 25 Nov 2008 03:18:35 +0000 (03:18 +0000)]
Fixes Unionfs socket issue reported as kern/118346.

PR: 118346
Submitted by: Masanori OZAWA <ozawa@ongs.co.jp>
Discussed at: devsummit Strassburg, EuroBSDCon2008
Discussed with: rwatson, gnn, hrs
MFC after: 2 week

15 years ago- improve AL2230 RF handling when the device type is zd1211. After this
weongyo [Tue, 25 Nov 2008 02:19:02 +0000 (02:19 +0000)]
- improve AL2230 RF handling when the device type is zd1211.  After this
  patch the RX/TX performance becomes about 17~18 Mbps comparing with
  the previous whose values were RX 7~8Mbps and TX 13~14Mbps.
- improve AL2230 RF handling in zd1211b
- support AL2230S RF that PV2000 is renamed to AL2230S
- use register ZYD_CR244, ZYD_CR243, ZYD_CR242 when the driver writes
  values on RF.  This routine is more faster than the original one
- use private TX lock to avoid LOR at zyd_raw_xmit()
- increase TX slots from 1 to 5
- needs to set the channel at IEEE80211_S_AUTH not IEEE80211_S_RUN
- detailed error handling.  In previous the next command was sent to the
  device even if there was errors
- setting ZYD_MAC_RX_THRESHOLD value should be different between 1211
  and 1211b
- only try to stop the device at zyd_init_locked() if the device is
  UPed
- do not use MTX_RECURSE
- do not try to grap Giant lock when the channel is changing
- move the device initialization routines from zyd_attach to zyd_init to
  give a device full-reset chance to the driver.
- code cleanup at zyd_raw_xmit()
- simplify zyd_attach() routines
- resort functions and clean up variables
- DPRINTF style change.
- style(9)

Reviewed by: sam

15 years agoFixing !INET6 builds.
avatar [Tue, 25 Nov 2008 02:15:09 +0000 (02:15 +0000)]
Fixing !INET6 builds.

15 years agoMove unarming watchdog timer and pending multicast configuration
yongari [Tue, 25 Nov 2008 02:05:01 +0000 (02:05 +0000)]
Move unarming watchdog timer and pending multicast configuration
check to fxp_txeof(). While I'm here unarm watchdog timer only if
there are no pending queued Tx requests.
Previously the watchdog timer was unarmed whenever Tx interrupt is
raised. This could be resulted in hiding root cause of watchdog
timeouts.

15 years agoFix Tx/Rx checksum offload ioctl handling and make Rx handler honor
yongari [Tue, 25 Nov 2008 01:33:16 +0000 (01:33 +0000)]
Fix Tx/Rx checksum offload ioctl handling and make Rx handler honor
checksum offload configuration. Now checksum offload can be
controlled by ifconfig(8).
While I'm here add an additional check for interface capabilities
before applying user's request.

15 years agoMake fxp(4) build with FXP_IP_CSUM_WAR.
yongari [Tue, 25 Nov 2008 01:01:48 +0000 (01:01 +0000)]
Make fxp(4) build with FXP_IP_CSUM_WAR.

15 years agoSort head files and removed ununsed header file.
yongari [Tue, 25 Nov 2008 00:59:11 +0000 (00:59 +0000)]
Sort head files and removed ununsed header file.

15 years agoFix various whitespace botches, mostly having them at the end of a line.
imp [Tue, 25 Nov 2008 00:48:15 +0000 (00:48 +0000)]
Fix various whitespace botches, mostly having them at the end of a line.

15 years agoWhitespace fix.
yongari [Tue, 25 Nov 2008 00:48:05 +0000 (00:48 +0000)]
Whitespace fix.

15 years agoAdd support for Marvell PATA M88SX6121.
rpaulo [Tue, 25 Nov 2008 00:39:03 +0000 (00:39 +0000)]
Add support for Marvell PATA M88SX6121.

PR: 129154
Submitted by: João Barros <joao.barros at gmail.com>
MFC after: 1 month