]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoFix building with GCC 4.2: define data types before referring to them.
obrien [Thu, 29 Jun 2006 19:37:31 +0000 (19:37 +0000)]
Fix building with GCC 4.2: define data types before referring to them.

18 years agoThere is a consensus that ifaddr.ifa_addr should never be NULL,
yar [Thu, 29 Jun 2006 19:22:05 +0000 (19:22 +0000)]
There is a consensus that ifaddr.ifa_addr should never be NULL,
except in places dealing with ifaddr creation or destruction; and
in such special places incomplete ifaddrs should never be linked
to system-wide data structures.  Therefore we can eliminate all the
superfluous checks for "ifa->ifa_addr != NULL" and get ready
to the system crashing honestly instead of masking possible bugs.

Suggested by: glebius, jhb, ru

18 years agoUse TAILQ_FOREACH in the __FreeBSD__ case, too.
yar [Thu, 29 Jun 2006 17:56:21 +0000 (17:56 +0000)]
Use TAILQ_FOREACH in the __FreeBSD__ case, too.
Funnily enough, rev. 1.15 changed the __Net and __Open cases only.

18 years agoUse TAILQ_FOREACH.
yar [Thu, 29 Jun 2006 17:31:43 +0000 (17:31 +0000)]
Use TAILQ_FOREACH.

18 years agoUse the nifty TAILQ_FOREACH.
yar [Thu, 29 Jun 2006 17:16:13 +0000 (17:16 +0000)]
Use the nifty TAILQ_FOREACH.

18 years agoUse TAILQ_FOREACH consistently.
yar [Thu, 29 Jun 2006 17:09:47 +0000 (17:09 +0000)]
Use TAILQ_FOREACH consistently.

18 years agoUse queue(3) macros instead of accessing list/queue internals directly.
yar [Thu, 29 Jun 2006 16:56:07 +0000 (16:56 +0000)]
Use queue(3) macros instead of accessing list/queue internals directly.

18 years agoFix building with GCC 4.2: ensure types are defined before refering to them.
obrien [Thu, 29 Jun 2006 16:27:19 +0000 (16:27 +0000)]
Fix building with GCC 4.2: ensure types are defined before refering to them.

18 years agoUse the elegant TAILQ_FOREACH() in place of a hand-rolled for() loop.
yar [Thu, 29 Jun 2006 15:37:39 +0000 (15:37 +0000)]
Use the elegant TAILQ_FOREACH() in place of a hand-rolled for() loop.

18 years agoFix semctl(2) breakage from the previous commit. Previously __semctl() had
jhb [Thu, 29 Jun 2006 13:58:36 +0000 (13:58 +0000)]
Fix semctl(2) breakage from the previous commit.  Previously __semctl() had
a local 'semid' variable which was the array index and used uap->semid
as the original IPC id.  During the kern_semctl() conversion those two
variables were collapsed into a single 'semid' variable breaking the
places that needed the original IPC ID.  To fix, add a new 'semidx'
variable to hold the array index and leave 'semid' unmolested as the IPC
id.  While I'm here, explicitly document that the (undocumented, at least
in semctl(2)) SEM_STAT command curiously expects an array index in the
'semid' parameter rather than an IPC id.

Submitted by: maxim

18 years agoFix URL to Bellovin's paper.
glebius [Thu, 29 Jun 2006 13:38:36 +0000 (13:38 +0000)]
Fix URL to Bellovin's paper.

Submitted by: Anton Yuzhaninov <citrin rambler-co.ru>

18 years agoFix a bug when accumulating run time, if a thread calls yield() syscall,
davidxu [Thu, 29 Jun 2006 12:29:20 +0000 (12:29 +0000)]
Fix a bug when accumulating run time, if a thread calls yield() syscall,
its run time may be lost.

18 years agoEliminate the offset argument from send_reject. It's not been
bz [Thu, 29 Jun 2006 11:17:16 +0000 (11:17 +0000)]
Eliminate the offset argument from send_reject. It's not been
used since FreeBSD-SA-06:04.ipfw.
Adopt send_reject6 to what had been done for legacy IP: no longer
send or permit sending rejects for any but the first fragment.

Discussed with: oleg, csjp (some weeks ago)

18 years agoUse INPLOOKUP_WILDCARD instead of just 1 more consistently.
bz [Thu, 29 Jun 2006 10:49:49 +0000 (10:49 +0000)]
Use INPLOOKUP_WILDCARD instead of just 1 more consistently.

OKed by: rwatson (some weeks ago)

18 years agoFix system load count (noticed by dephij). Remove incorrect
davidxu [Thu, 29 Jun 2006 09:49:00 +0000 (09:49 +0000)]
Fix system load count (noticed by dephij). Remove incorrect
comment.

18 years agoCorrect a typo
delphij [Thu, 29 Jun 2006 09:18:16 +0000 (09:18 +0000)]
Correct a typo

18 years agoUpdate man page.
takawata [Thu, 29 Jun 2006 08:28:18 +0000 (08:28 +0000)]
Update man page.

Pointed out by: netchild
MFC after: 3 days

18 years agoDetach the interface first, do vlan_unconfig() then.
yar [Thu, 29 Jun 2006 07:52:30 +0000 (07:52 +0000)]
Detach the interface first, do vlan_unconfig() then.
Previously, another thread could get a pointer to the
interface by scanning the system-wide list and sleep
on the global vlan mutex held by vlan_unconfig().
The interface was gone by the time the other thread
woke up.

In order to be able to call vlan_unconfig() on a detached
interface, remove the purely cosmetic bzero'ing of IF_LLADDR
from the function because a detached interface has no addresses.

Noticed by: a stress-testing script by maxim
Reviewed by: glebius

18 years agoRemove a few unused things.
yar [Thu, 29 Jun 2006 07:30:39 +0000 (07:30 +0000)]
Remove a few unused things.
Fix some style and consistency points.

18 years agoReduce unneeded code duplication.
yar [Thu, 29 Jun 2006 07:23:49 +0000 (07:23 +0000)]
Reduce unneeded code duplication.

18 years agoSince 5714 family doesn't have Jumbo ring, we do not support
glebius [Thu, 29 Jun 2006 06:38:21 +0000 (06:38 +0000)]
Since 5714 family doesn't have Jumbo ring, we do not support
Jumbos on them, yet. The 5780 is equivalent to the 5714.

Submitted by: brad@OpenBSD, davidch

18 years agoComment fix.
takawata [Thu, 29 Jun 2006 06:31:13 +0000 (06:31 +0000)]
Comment fix.
Pointed out by: ume via IRC

18 years agoWillcom WSIM DD support.
takawata [Thu, 29 Jun 2006 06:17:48 +0000 (06:17 +0000)]
Willcom WSIM DD  support.

18 years agoRemove unused function declaration.
davidxu [Thu, 29 Jun 2006 05:59:36 +0000 (05:59 +0000)]
Remove unused function declaration.
Add else statement in sched_calc_pri.
Fix a bug when checking interrupt thread in sched_add.

18 years agoRemove load balancer code, since it has serious priority inversion problem
davidxu [Thu, 29 Jun 2006 05:36:34 +0000 (05:36 +0000)]
Remove load balancer code, since it has serious priority inversion problem
which really hurts performance on FreeBSD.

18 years agoA small race existed where the lock was dropped between when encif was
thompsa [Wed, 28 Jun 2006 21:57:35 +0000 (21:57 +0000)]
A small race existed where the lock was dropped between when encif was
tested and then set. [1]

Reorganise things to eliminate this, we now ensure that enc0 can not be
destroyed which as the benefit of no longer needing to lock in
ipsec_filter and ipsec_bpf. The cloner will create one interface during the
init so we can guarantee that encif will be valid before any SPD entries are
added to ipsec.

Spotted by: glebius [1]

18 years agoProperly detect the RTL8168(B?) again. RealTek sent me a bunch of sample
wpaul [Wed, 28 Jun 2006 16:04:54 +0000 (16:04 +0000)]
Properly detect the RTL8168(B?) again. RealTek sent me a bunch of sample
cards: the chips are all marked "RTL8111B", but they put stickers on the
back that say "RTL8168B/8111B". The manual says there's only one HWREV code
for both the 8111B and 8168B devices, which is 0x30000000, but the cards
they sent me actually report HWREV of 0x38000000. Deciding to trust the
hardware in front of me rather than a possibly incorrect manual (it wouldn't
be the first time the HWREVs were incorrectly documented), I changed the
8168 revision code. It turns out this was a mistake though: 0x30000000
really is a valid for the 8168.

There are two possible reasons for there to be two different HWREVs:

1) 0x30000000 is used only for the 8168B and 0x38000000 is only for
   the 8111B.
2) There were 8111/8168 rev A devices which both used code 0x30000000,
   and the 8111B/8168B both use 0x38000000.

The product list on the RealTek website doesn't mention the existence of
any 8168/8111 rev A chips being in production though, and I've never seen
one, so until I get clarification from RealTek, I'm going to assume that
0x30000000 is just for the 8168B and 0x38000000 is for the 8111B only.

So, the HWREV code for the 8168 has been put back to 0x30000000,
a new 8111 HWREV code has been added, and there are now separate
entries for recognizing both devices in the device list. This will
allow all devices to work, though if it turns out I'm wrong I may
need to change the ID strings

18 years agoDont call free on non-alloc'd items.
sos [Wed, 28 Jun 2006 15:04:10 +0000 (15:04 +0000)]
Dont call free on non-alloc'd items.

18 years agoStyle: space after "return".
glebius [Wed, 28 Jun 2006 10:38:38 +0000 (10:38 +0000)]
Style: space after "return".

18 years ago- s/nve/nfe/ in the SYNOPSIS (1)
brueffer [Wed, 28 Jun 2006 10:19:16 +0000 (10:19 +0000)]
- s/nve/nfe/ in the SYNOPSIS (1)
- bump date

PR: 99575
Submitted by: thierry herbelot <thierry@herbelot.com> (1)

18 years agoUpdate AHCI support to be more generic.
sos [Wed, 28 Jun 2006 09:59:09 +0000 (09:59 +0000)]
Update AHCI support to be more generic.
Add support for AHCI on the VIA VT8251.

18 years ago- Recognize more device IDs adding support for BCM5754, BCM5755,
glebius [Wed, 28 Jun 2006 09:12:29 +0000 (09:12 +0000)]
- Recognize more device IDs adding support for BCM5754, BCM5755,
  BCM5787 based NICs.
- Recognize BCM5703 B0 ASIC.
- Rewrite the jumbo capability matching macro, so that chips known
  to work are listed there. [*]

[*] I'm still not sure about this. Probably more corrections
    will be done to this macro after discussion with davidch@
    and brad@OpenBSD.

Obtained from: OpenBSD (brad)

18 years agoRemove the last three calls to strncpy(), two of which would have
gad [Tue, 27 Jun 2006 22:14:09 +0000 (22:14 +0000)]
Remove the last three calls to strncpy(), two of which would have
been bugs if the source had ever been too big for the destination.

MFC after: 3 weeks

18 years agoUpdated the XBOX kernel to use the new nfe(4) driver obtained from
rink [Tue, 27 Jun 2006 20:22:32 +0000 (20:22 +0000)]
Updated the XBOX kernel to use the new nfe(4) driver obtained from
OpenBSD. This driver seems to give a small performance increase, and
should lead to better maintainability in the future.

The nForce Ethernet-specific hack in sys/i386/xbox/xbox.c is still
required, judging from dev/nfe/if_nfe.c. The condition it hacks will
almost certainly only occur on XBOX-es anyway, so it is best left there.

Approved by: imp (mentor)

18 years agoCorrectly calculate a buffer length. It was off by one so a read() returned
netchild [Tue, 27 Jun 2006 20:21:38 +0000 (20:21 +0000)]
Correctly calculate a buffer length. It was off by one so a read() returned
one byte less than needed.

This is a RELENG_x_y candidate, since it fixes a problem with Oracle 10.

Noticed by: Dmitry Ganenko <dima@apk-inform.com>
Testcase by: Dmitry Ganenko <dima@apk-inform.com>
Reviewed by: des
Submitted by: rdivacky
Sponsored by: Google SoC 2006
MFC after: 1 week

18 years agoImprove linprovfs to provide/fix the
netchild [Tue, 27 Jun 2006 20:11:58 +0000 (20:11 +0000)]
Improve linprovfs to provide/fix the
 - process state (idle, sleeping, running, ...) [1]
 - the process group ID of the process which owns the connected tty
 - some page fault stats
 - time spend in kernel/userland
 - priority/nice value
 - starttime [1]
 - memory/swap stats
 - scheduling policy

Additionally add some new fields and correct some not filled out ones.

This brings us down to 15 dummy fields.

The fields marked with [1] are needed to get Oracle 10 running. The starttime
field is not completely right, since it displays the _same_ starttime for
_every_ process, but at least it is not 0 and Oracle accepts this.

This is a RELENG_x_y candidate.

Noticed by: Dmitry Ganenko <dima@apk-inform.com> [1]
Reviewed by: des, rdivacky
MFC after: 1 week

18 years agoRegen.
jhb [Tue, 27 Jun 2006 18:32:16 +0000 (18:32 +0000)]
Regen.

18 years agoUse kern_shmctl() in svr4_sys_shmctl() and drop use of the stackgap. Mark
jhb [Tue, 27 Jun 2006 18:31:36 +0000 (18:31 +0000)]
Use kern_shmctl() in svr4_sys_shmctl() and drop use of the stackgap.  Mark
svr4_sys_shmctl() MPSAFE.

18 years agoAxe the stackgap macros as the Linux ABIs no longer use the stackgap.
jhb [Tue, 27 Jun 2006 18:30:49 +0000 (18:30 +0000)]
Axe the stackgap macros as the Linux ABIs no longer use the stackgap.

18 years ago- Add a kern_semctl() helper function for __semctl(). It accepts a pointer
jhb [Tue, 27 Jun 2006 18:28:50 +0000 (18:28 +0000)]
- Add a kern_semctl() helper function for __semctl().  It accepts a pointer
  to a copied-in copy of the 'union semun' and a uioseg to indicate which
  memory space the 'buf' pointer of the union points to.  This is then used
  in linux_semctl() and svr4_sys_semctl() to eliminate use of the stackgap.
- Mark linux_ipc() and svr4_sys_semsys() MPSAFE.

18 years agoResolve conflicts from OpenBSM 1.0 alpha 7 import.
rwatson [Tue, 27 Jun 2006 18:09:54 +0000 (18:09 +0000)]
Resolve conflicts from OpenBSM 1.0 alpha 7 import.

Obtained from: TrustedBSD Project

18 years agoThis commit was generated by cvs2svn to compensate for changes in r159985,
rwatson [Tue, 27 Jun 2006 18:06:41 +0000 (18:06 +0000)]
This commit was generated by cvs2svn to compensate for changes in r159985,
which included commits to RCS files with non-trunk default branches.

18 years agoVendor import of OpenBSM 1.0 alpha 7, with the following change history
rwatson [Tue, 27 Jun 2006 18:06:41 +0000 (18:06 +0000)]
Vendor import of OpenBSM 1.0 alpha 7, with the following change history
notes:

- Adopted Solaris-compatible format for subject32_ex and subject64_ex
  tokens, which previously did not correctly implement variable length
  address storage.
- Prefer inttypes.h to stdint.h; enhance queue.h detection to test for
  TAILQ_FOREACH_SAFE(), which is present in recent BSD queue.h's, but not
  older ones.  OpenBSM now builds on some FreeBSD 4.x version.
- New event types for extended attributes, ACLs, and scheduling.

Obtained from: TrustedBSD Project

18 years agoModify import instructions to include "-n" in the sample command line for
rwatson [Tue, 27 Jun 2006 17:55:38 +0000 (17:55 +0000)]
Modify import instructions to include "-n" in the sample command line for
the CVS import, and suggest removing it for the real import, rather than
suggesting it for testing.  This will hopefully prevent me (and others)
from making errors.

18 years agoRegen.
jhb [Tue, 27 Jun 2006 14:47:08 +0000 (14:47 +0000)]
Regen.

18 years ago- Expand the scope of Giant some in mount(2) to protect the vfsp structure
jhb [Tue, 27 Jun 2006 14:46:31 +0000 (14:46 +0000)]
- Expand the scope of Giant some in mount(2) to protect the vfsp structure
  from going away.  mount(2) is now MPSAFE.
- Expand the scope of Giant some in unmount(2) to protect the mp structure
  (or rather, to handle concurrent unmount races) from going away.
  umount(2) is now MPSAFE, as well as linux_umount() and linux_oldumount().
- nmount(2) and linux_mount() were already MPSAFE.

18 years agoFix breakage of CHIP_I855 in the last revision.
anholt [Tue, 27 Jun 2006 14:05:11 +0000 (14:05 +0000)]
Fix breakage of CHIP_I855 in the last revision.

Submitted by: Ted Faber <faber@ISI.EDU>

18 years ago- Convert to our new SYNOPSIS style
brueffer [Tue, 27 Jun 2006 12:48:15 +0000 (12:48 +0000)]
- Convert to our new SYNOPSIS style
- Correct tcpdump reference

18 years agoA netgraph node that can do different manipulations with
glebius [Tue, 27 Jun 2006 12:45:28 +0000 (12:45 +0000)]
A netgraph node that can do different manipulations with
mbuf_tags(9) on packets.

Submitted by: Vadim Goncharov <vadimnuclight tpu.ru>
mdoc(7) reviewed by: ru

18 years ago- Use suser_cred(9) instead of directly comparing cr_uid.
pjd [Tue, 27 Jun 2006 11:41:21 +0000 (11:41 +0000)]
- Use suser_cred(9) instead of directly comparing cr_uid.
- Compare pointer with NULL.

Reviewed by: rwatson

18 years ago- Use suser_cred(9) instead of directly comparing cr_uid.
pjd [Tue, 27 Jun 2006 11:40:05 +0000 (11:40 +0000)]
- Use suser_cred(9) instead of directly comparing cr_uid.
- Compare pointer with NULL, instead of 0.

Reviewed by: rwatson

18 years ago- Use suser_cred(9) instead of directly checking cr_uid.
pjd [Tue, 27 Jun 2006 11:35:53 +0000 (11:35 +0000)]
- Use suser_cred(9) instead of directly checking cr_uid.
- Change the order of conditions to first verify that we actually need
  to check for privileges and then eventually check them.

Reviewed by: rwatson

18 years agoCompress direct cr_ruid comparsion and jailed() call to suser_cred(9).
pjd [Tue, 27 Jun 2006 11:32:08 +0000 (11:32 +0000)]
Compress direct cr_ruid comparsion and jailed() call to suser_cred(9).

Reviewed by: rwatson

18 years agoUse suser_cred(9) instead of checking cr_uid directly.
pjd [Tue, 27 Jun 2006 11:29:38 +0000 (11:29 +0000)]
Use suser_cred(9) instead of checking cr_uid directly.

Reviewed by: rwatson

18 years ago- Use suser_cred(9) instead of checking cr_ruid directly.
pjd [Tue, 27 Jun 2006 11:28:50 +0000 (11:28 +0000)]
- Use suser_cred(9) instead of checking cr_ruid directly.
- For privileged processes safe two mutex operations.

We may want to consider if this is good idea to use SUSER_ALLOWJAIL here,
but for now I didn't wanted to change the original behaviour.

Reviewed by: rwatson

18 years agoMake several changes to pmap_enter_quick_locked():
alc [Tue, 27 Jun 2006 05:05:05 +0000 (05:05 +0000)]
Make several changes to pmap_enter_quick_locked():

1. Make the caller responsible for performing pmap_install().  This reduces
the number of times that pmap_install() is performed by
pmap_enter_object() from twice per page to twice overall.

2. Don't block if pmap_find_pte() is unable to allocate a PTE.  If it did
block, then it might wind up mapping a cache page.  Specifically, if
pmap_enter_quick_locked() slept when called from pmap_enter_object(), the
page daemon could change an active or inactive page into a cache page just
before it was to be mapped.

3. Bail out of pmap_enter_quick_locked() if pv entries aren't plentiful.
In other words, don't force the allocation of a pv entry if they aren't
readily available.

Reviewed by: marcel@

18 years agoCorrect a very old and very obscure bug: vmspace_fork() calls
alc [Tue, 27 Jun 2006 04:28:23 +0000 (04:28 +0000)]
Correct a very old and very obscure bug: vmspace_fork() calls
pmap_copy() if the mapping is VM_INHERIT_SHARE.  Suppose the mapping
is also wired.  vmspace_fork() clears the wiring attributes in the vm
map entry but pmap_copy() copies the PG_W attribute in the PTE.  I
don't think this is catastrophic.  It blocks pmap_remove_pages() from
destroying the mapping and corrupts the pmap's wiring count.

This revision fixes the problem by changing pmap_copy() to clear the
PG_W attribute.

Reviewed by: tegge@

18 years agoSimplify ipsec_bpf by using bpf_mtap2().
thompsa [Tue, 27 Jun 2006 01:53:12 +0000 (01:53 +0000)]
Simplify ipsec_bpf by using bpf_mtap2().

18 years agoRemove the "oldorder" processing. The "neworder" processing has
gad [Tue, 27 Jun 2006 00:18:15 +0000 (00:18 +0000)]
Remove the "oldorder" processing.  The "neworder" processing has
been the default for two years now, without any problems reported.

MFC after: 3 weeks

18 years agoAdd a pure open source nForce Ethernet driver, under BSDL.
obrien [Mon, 26 Jun 2006 23:41:07 +0000 (23:41 +0000)]
Add a pure open source nForce Ethernet driver, under BSDL.
This driver was ported from OpenBSD by Shigeaki Tagashira
<shigeaki@se.hiroshima-u.ac.jp> and posted at
http://www.se.hiroshima-u.ac.jp/~shigeaki/software/freebsd-nfe.html
It was additionally cleaned up by me.
It is still a work-in-progress and thus is purposefully not in GENERIC.
And it conflicts with nve(4), so only one should be loaded.

18 years agoHook enc(4) to the build.
thompsa [Mon, 26 Jun 2006 22:31:26 +0000 (22:31 +0000)]
Hook enc(4) to the build.

18 years agoAdd a pseudo interface for packet filtering IPSec connections before or after
thompsa [Mon, 26 Jun 2006 22:30:08 +0000 (22:30 +0000)]
Add a pseudo interface for packet filtering IPSec connections before or after
encryption. There are two functions, a bpf tap which has a basic header with
the SPI number which our current tcpdump knows how to display, and handoff to
pfil(9) for packet filtering.

Obtained from: OpenBSD
Based on: kern/94829
No objections: arch, net
MFC after: 1 month

18 years agoBacked out the change by request from rwatson.
babkin [Mon, 26 Jun 2006 22:03:22 +0000 (22:03 +0000)]
Backed out the change by request from rwatson.

PR: kern/14584

18 years agoAdd support for the RealTek 8169SC/8110SC and RTL8101E devices. The
wpaul [Mon, 26 Jun 2006 20:31:32 +0000 (20:31 +0000)]
Add support for the RealTek 8169SC/8110SC and RTL8101E devices. The
latter is a PCIe 10/100 chip.

Finally fix the EEPROM reading code so that we can access the EEPROMs on all
devices. In order to access the EEPROM, we must select 'EEPROM programming'
mode, and then set the EEPROM chip select bit. Previously, we were setting
both bits simultaneously, which doesn't work: they must be set in the
right sequence.

Always obtain the station address from the EEPROM, now that EEPROM
reading works correctly.

Make the TX interrupt moderation code based on the internal timer
optional and turned off by default.

Make the re_diag() routine conditional and off by default. When it is
on, only use it for the original 8169, which was the only device that
that really needed it.

Modify interrupt handling to use a fast interrupt handler and fast
taskqeueue.

Correct the rgephy driver so that it only applies the DSP fixup for
PHY revs 0 and 1. Later chips are fixed and don't need the fixup.

Make the rgephy driver advertise both 1000_FD and 1000_HD bits in
autoneg mode. A couple of the devices don't autoneg correctly unless
configured this way.

18 years agoRegen.
jhb [Mon, 26 Jun 2006 18:37:36 +0000 (18:37 +0000)]
Regen.

18 years agoChange svr4_sys_break() to just call obreak() and mark it MPSAFE.
jhb [Mon, 26 Jun 2006 18:36:57 +0000 (18:36 +0000)]
Change svr4_sys_break() to just call obreak() and mark it MPSAFE.

Not objected to by: alc

18 years agolinux_brk() is MPSAFE.
jhb [Mon, 26 Jun 2006 18:36:16 +0000 (18:36 +0000)]
linux_brk() is MPSAFE.

18 years ago- Sync with master: rmdir(), mkdir(), and extattr_*() are all MPSAFE.
jhb [Mon, 26 Jun 2006 18:35:57 +0000 (18:35 +0000)]
- Sync with master: rmdir(), mkdir(), and extattr_*() are all MPSAFE.
- freebsd32_utimes() is MPSAFE.

18 years agoAddress a problem I missed in removing Giant from the kernel linker. Not
jhb [Mon, 26 Jun 2006 18:34:45 +0000 (18:34 +0000)]
Address a problem I missed in removing Giant from the kernel linker.  Not
all of the module event handlers are MP safe yet, so always acquire Giant
for now when invoking module event handlers.  Eventually we can add an
MPSAFE flag or some such and add appropriate locking to all module event
handlers.

18 years agoRemove duplicate security checks already performed in kern_kldload().
jhb [Mon, 26 Jun 2006 18:33:32 +0000 (18:33 +0000)]
Remove duplicate security checks already performed in kern_kldload().

18 years agoIn syncache_respond() do not reply with a MSS that is larger than what
andre [Mon, 26 Jun 2006 17:54:53 +0000 (17:54 +0000)]
In syncache_respond() do not reply with a MSS that is larger than what
the peer announced to us but make it at least tcp_minmss in size.

Sponsored by: TCP/IP Optimization Fundraise 2005

18 years agoThis commit was generated by cvs2svn to compensate for changes in r159952,
obrien [Mon, 26 Jun 2006 17:25:22 +0000 (17:25 +0000)]
This commit was generated by cvs2svn to compensate for changes in r159952,
which included commits to RCS files with non-trunk default branches.

18 years agoImport the nfe (nForce Ethernet) driver from OpenBSD.
obrien [Mon, 26 Jun 2006 17:25:22 +0000 (17:25 +0000)]
Import the nfe (nForce Ethernet) driver from OpenBSD.
This is a pure open source NIC driver with a BSD license.
These bits were taken from the OpenBSD public CVS repository on 1-May-06.

18 years agoTrim basically unused 'unp' in uipc_connect().
rwatson [Mon, 26 Jun 2006 16:18:22 +0000 (16:18 +0000)]
Trim basically unused 'unp' in uipc_connect().

18 years agoSome cleanups and janitorial work to tcp_syncache:
andre [Mon, 26 Jun 2006 16:14:19 +0000 (16:14 +0000)]
Some cleanups and janitorial work to tcp_syncache:

 o don't assign remote/local host/port information manually between provided
   struct in_conninfo and struct syncache, bcopy() it instead
 o rename sc_tsrecent to sc_tsreflect in struct syncache to better capture
   the purpose of this field
 o rename sc_request_r_scale to sc_requested_r_scale for ditto reasons
 o fix IPSEC error case printf's to report correct function name
 o in syncache_socket() only transpose enhanced tcp options parameters to
   struct tcpcb when the inpcb doesn't has TF_NOOPT set
 o in syncache_respond() reorder stack variables
 o in syncache_respond() remove bogus KASSERT()

No functional changes.

Sponsored by: TCP/IP Optimization Fundraise 2005

18 years agoSome cleanups and janitorial work to tcp_dooptions():
andre [Mon, 26 Jun 2006 15:35:25 +0000 (15:35 +0000)]
Some cleanups and janitorial work to tcp_dooptions():

 o redefine the parameter 'is_syn' to 'flags', add TO_SYN flag and adjust its
   usage accordingly
 o update the comments to the tcp_dooptions() invocation in
   tcp_input():after_listen to reflect reality
 o move the logic checking the echoed timestamp out of tcp_dooptions() to the
   only place that uses it next to the invocation described in the previous
   item
 o adjust parsing of TCPOPT_SACK_PERMITTED to use the same style as the others
 o add comments in to struct tcpopt.to_flags #defines

No functional changes.

Sponsored by: TCP/IP Optimization Fundraise 2005

18 years agoFix a minor typo in rev 1.950
keramida [Mon, 26 Jun 2006 12:12:09 +0000 (12:12 +0000)]
Fix a minor typo in rev 1.950

18 years agoReverse the source/destination parameters to in[6]_pcblookup_hash() in
andre [Mon, 26 Jun 2006 09:43:55 +0000 (09:43 +0000)]
Reverse the source/destination parameters to in[6]_pcblookup_hash() in
syncache_respond() for the #ifdef MAC case.

Submitted by: Tai-hwa Liang <avatar-at-mmlab.cse.yzu.edu.tw>

18 years agoIn tcp6_usr_attach(), return immediately if SS_ISDISCONNECTED, to
rwatson [Mon, 26 Jun 2006 09:38:08 +0000 (09:38 +0000)]
In tcp6_usr_attach(), return immediately if SS_ISDISCONNECTED, to
avoid dereferencing an uninitialized inp variable.

Submitted by: Michiel Boland <michiel at boland dot org>
MFC after: 1 month

18 years agoVMWare ESX reports > 16 targets for the LSI-Logic
mjacob [Mon, 26 Jun 2006 05:44:18 +0000 (05:44 +0000)]
VMWare ESX reports > 16 targets for the LSI-Logic
U320 model it emulates. Then it crashes and burns
when you probe that high.

18 years agoGrumble. VMWare ESX and VMWare WorkStation have *slightly* different
mjacob [Mon, 26 Jun 2006 05:41:11 +0000 (05:41 +0000)]
Grumble. VMWare ESX and VMWare WorkStation have *slightly* different
inquiry data (pointlessly different I might add). Pick the common
parts.

MFC after: 1 day

18 years agoenable rx of control frames when in monitor mode
sam [Mon, 26 Jun 2006 04:31:36 +0000 (04:31 +0000)]
enable rx of control frames when in monitor mode

Submitted by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>
MFC after: 1 week

18 years agoFix a memory leak and a nested 'for' loop in the spare table handling.
scottl [Mon, 26 Jun 2006 03:21:19 +0000 (03:21 +0000)]
Fix a memory leak and a nested 'for' loop in the spare table handling.

Submitted by: Pedro Martelletto

18 years agoClose race in handling mcast traffic when operating as an ap with
sam [Mon, 26 Jun 2006 03:10:45 +0000 (03:10 +0000)]
Close race in handling mcast traffic when operating as an ap with
stations in power save: add a new q where mcast frames are stashed
and on beacon update (at DTIM) move frames from the mcast q to the
cabq and start it.  This ensures the cabq is only manipulated in
one place.

Sponsored by: Hobnob
MFC after: 2 weeks

18 years agoImprove check for protective MBR. Instead of assiming that protective
sobomax [Mon, 26 Jun 2006 00:32:54 +0000 (00:32 +0000)]
Improve check for protective MBR. Instead of assiming that protective
MBR should have only one entry of type 0xEE, consider protective MBR
to be one, that has at least one entry of type 0xEE covering the whole
unit. This makes GEOM_GPT compatible with disks partitioned by the
Apple's BootCamp.

Approved in principle by:       marcel
MFC After: 1 month

18 years agoEliminate a comment that became stale after revision 1.540.
alc [Sun, 25 Jun 2006 22:22:37 +0000 (22:22 +0000)]
Eliminate a comment that became stale after revision 1.540.

Wrap a nearby line.

18 years agoEliminate a comment that became stale after revision 1.547.
alc [Sun, 25 Jun 2006 22:15:02 +0000 (22:15 +0000)]
Eliminate a comment that became stale after revision 1.547.

18 years agoSynchronize accesses to the PTEG table.
alc [Sun, 25 Jun 2006 19:07:01 +0000 (19:07 +0000)]
Synchronize accesses to the PTEG table.

Add many lock assertions.

Tested by: grehan@

18 years agoThe common UID/GID space implementation. It has been discussed on -arch
babkin [Sun, 25 Jun 2006 18:37:44 +0000 (18:37 +0000)]
The common UID/GID space implementation. It has been discussed on -arch
in 1999, and there are changes to the sysctl names compared to PR,
according to that discussion. The description is in sys/conf/NOTES.
Lines in the GENERIC files are added in commented-out form.
I'll attach the test script I've used to PR.

PR: kern/14584
Submitted by: babkin

18 years agoReplace the three copies of the list of pci ids with a single centralized list.
anholt [Sun, 25 Jun 2006 14:44:43 +0000 (14:44 +0000)]
Replace the three copies of the list of pci ids with a single centralized list.
Add the i945 PCI IDs commented out -- I think it should just work, but it hasn't
been tested yet.

18 years agoUse suser_cred() instead of a direct comparison of cr_uid with 0 in
rwatson [Sun, 25 Jun 2006 13:54:59 +0000 (13:54 +0000)]
Use suser_cred() instead of a direct comparison of cr_uid with 0 in
rip6_output().

MFC after: 1 week

18 years agoIf linker_release_module() fails then we still hold a reference on
iedowse [Sun, 25 Jun 2006 12:36:21 +0000 (12:36 +0000)]
If linker_release_module() fails then we still hold a reference on
the linker_file, so record this by restoring the linker_file pointer
in fp->file.

18 years agoNew release notes:
hrs [Sun, 25 Jun 2006 12:33:57 +0000 (12:33 +0000)]
New release notes:
apm(4) suspend/resume support improvement,
read(2) vn lock now protected by FOFFSET_LOCKED flag,
cardbus(4), pccard(4), pccbb(4), and exca(4) buildable as KLDs,
midi(4) driver added again,
ath(4) and related drivers included in GENERIC by default,
wi(4) builable as KLD,
wlan_*(4) crypto drivers included in GENERIC by default,
ipfw(4) tag/untag keyword support,
the default retransmit timer for NFS over TCP changed to 60s,
the default value of vfs.nfs.iodmin changed to 0,
numeric arguments for find(1) -user/-group now work as expected,
hccontrol(8) HCI node autodetection,
id(1) prints euid with gid,
kdump(1) can print syscall flags in symbol names,
"mount -u -o rw" on read-only mount now works as expected,
sed(1) incorrect calculation of pattern space length fixed,
time(1) SIGINFO support added,
rc.d/mdconfig added,
DRM updated to a snapshot as of 20060517,
/media directory for removable media mount points added,
pc98 release CDROMs now boolable, and
kernel subsystem API doc generating framework with doxygen added.

Reviewed in part by: bmah

18 years agoDecrement the global syncache counter in syncache_expand() when the entry
andre [Sun, 25 Jun 2006 11:11:33 +0000 (11:11 +0000)]
Decrement the global syncache counter in syncache_expand() when the entry
is removed from the bucket.  This fixes the syncache statistics.

18 years agoMajor Fixes:
mjacob [Sun, 25 Jun 2006 04:23:26 +0000 (04:23 +0000)]
Major Fixes:

  Don't enable/disable I/O space except for SAS adapters.
  This fixes a problem with VMware 4.5 Workstation.

  Fix an egregious bug introduced to target mode so it actually
  will not panic when you first enable a lun.

Minor fixes:

  Take more infor from port facts and configuration pages.

MFC after: 1 week

18 years agoSimplify the code and remove two mutex operations.
pjd [Sat, 24 Jun 2006 22:55:43 +0000 (22:55 +0000)]
Simplify the code and remove two mutex operations.

MFC after: 2 weeks

18 years agoUpdate to SDM 2.2:
marcel [Sat, 24 Jun 2006 19:21:11 +0000 (19:21 +0000)]
Update to SDM 2.2:
o  Add tf (test feature) instruction,
o  Add vmsw (VM switch) instruction.

While here, update copyright.

MFC after: 1 week

18 years agoremove duplicate ifname in debug msg
sam [Sat, 24 Jun 2006 18:00:17 +0000 (18:00 +0000)]
remove duplicate ifname in debug msg

MFC after: 1 week

18 years agoVMware disk volumes are only on LUN 0, and
mjacob [Sat, 24 Jun 2006 16:40:59 +0000 (16:40 +0000)]
VMware disk volumes are only on LUN 0, and
some VMware HBAs have known bugs with commands
sent to other than LUN 0.

MFC after: 1 day

18 years agoSync up with SDM 2.1:
marcel [Sat, 24 Jun 2006 01:19:52 +0000 (01:19 +0000)]
Sync up with SDM 2.1:
o  Add nop/hint formats F16, I18, M48 and X5,
o  Add format M47 for ptc.e,
o  Add hint instruction,
o  Fix decoding of cmp8xchg16.