]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoSimplify ubt_isoc_in_complete2(). Also should fix off by 1 bug.
emax [Tue, 29 Jul 2008 00:17:53 +0000 (00:17 +0000)]
Simplify ubt_isoc_in_complete2(). Also should fix off by 1 bug.

MFC after: 3 months

16 years agoDon't use memcpy() to copy several bytes.
mav [Mon, 28 Jul 2008 22:22:38 +0000 (22:22 +0000)]
Don't use memcpy() to copy several bytes.
Store IDs is host order. It is not so important to bloat code for it.
Combine m_adj() and M_PREPEND() into single M_PREPEND().

16 years agoRe-enable em(4) and igb(4) in NOTES.
jhb [Mon, 28 Jul 2008 22:16:58 +0000 (22:16 +0000)]
Re-enable em(4) and igb(4) in NOTES.

PR: conf/112081

16 years agoIn some cases (such as LC_COLLATE), nb_NO and nn_NO are identical, and it
des [Mon, 28 Jul 2008 21:50:21 +0000 (21:50 +0000)]
In some cases (such as LC_COLLATE), nb_NO and nn_NO are identical, and it
makes sense to have them both link to no_NO.

In other cases (such as LC_TIME), they differ, and the correct solution
is to have no_NO link to nb_NO, rather than the other way around.o

MFC after: 2 weeks

16 years agoRemove a stale reference to sys/dev/ixgbe/tcp_lro.c.
jhb [Mon, 28 Jul 2008 21:47:04 +0000 (21:47 +0000)]
Remove a stale reference to sys/dev/ixgbe/tcp_lro.c.

16 years agoAdd collation sequence for no_NO. The same sequence applies to nb_NO
des [Mon, 28 Jul 2008 21:33:34 +0000 (21:33 +0000)]
Add collation sequence for no_NO.  The same sequence applies to nb_NO
and nn_NO, which are symlinked to no_NO.

The patch in the PR contained a number of errors apparently based on
(sometimes incorrect) pronunciation; for instance, v and w are
distinct letters and should be collated in that order, even if they
are pronounced the same, while <u:> should be collated with u, even
though it is often mispronounced as y.  For lack of a solid reference,
I have taken sv_SE and simply changed the last three letters of the
alphabet.

PR: conf/51920
MFC after: 2 weeks

16 years agoFix a few bugs with the _gettemp() routine which implements mkstemp(),
jhb [Mon, 28 Jul 2008 21:18:59 +0000 (21:18 +0000)]
Fix a few bugs with the _gettemp() routine which implements mkstemp(),
mkstemps(), and mkdtemp().
- Add proper range checking for the 'slen' parameter passed to mkstemps().
- Try all possible permutations of a template if a collision is encountered.
  Previously, once a single template character reached 'z', it would not wrap
  around to '0' and keep going until it encountered the original starting
  letter.  In the edge case that the randomly generated starting name used
  all 'z' characters, only that single name would be tried before giving up.

PR: standards/66531
Submitted by: Jim Luther
Obtained from: Apple
MFC after: 1 week

16 years agoWhen choosing a CPU for a thread in a cpuset, prefer the last CPU that the
jhb [Mon, 28 Jul 2008 20:39:21 +0000 (20:39 +0000)]
When choosing a CPU for a thread in a cpuset, prefer the last CPU that the
thread ran on if there are no other CPUs in the set with a shorter per-CPU
runqueue.

16 years agoMove inpcb lock higher to protect some nonbinding fields reading.
mav [Mon, 28 Jul 2008 19:32:18 +0000 (19:32 +0000)]
Move inpcb lock higher to protect some nonbinding fields reading.
It fixes nothing at this time, but decided to be more correct.

16 years agoDon't attempt authentication at all if it has been disabled via '-a off'.
jhb [Mon, 28 Jul 2008 18:58:16 +0000 (18:58 +0000)]
Don't attempt authentication at all if it has been disabled via '-a off'.
This works around a bug in HP-UX's telnet client and also gives a much
saner user experience when using FreeBSD's telnet client.

PR: bin/19405
Submitted by: Joel Ray Holveck   joelh of gnu.org
MFC after: 1 month

16 years agoReally fix this.
jhb [Mon, 28 Jul 2008 18:33:43 +0000 (18:33 +0000)]
Really fix this.

16 years agoProperly check if td_name is empty and if it is, print process name,
pjd [Mon, 28 Jul 2008 18:10:26 +0000 (18:10 +0000)]
Properly check if td_name is empty and if it is, print process name,
instead of empty thread name.

Reviewed by: jhb

16 years agoAdd files to remove when MK_GNU_CPIO = no
antoine [Mon, 28 Jul 2008 18:00:45 +0000 (18:00 +0000)]
Add files to remove when MK_GNU_CPIO = no

16 years agoRemove a file that is not used and does not exist.
antoine [Mon, 28 Jul 2008 17:56:37 +0000 (17:56 +0000)]
Remove a file that is not used and does not exist.

16 years agoRemove an empty directory that is already in ObsoleteFiles.inc from
antoine [Mon, 28 Jul 2008 17:42:37 +0000 (17:42 +0000)]
Remove an empty directory that is already in ObsoleteFiles.inc from
mtree/BSD.usr.dist

16 years agoImplement support for cpusets in the 4BSD scheduler.
jhb [Mon, 28 Jul 2008 17:25:24 +0000 (17:25 +0000)]
Implement support for cpusets in the 4BSD scheduler.
- When a cpuset is applied to a thread, walk the cpuset to see if it is a
  "full" cpuset (includes all available CPUs).  If not, set a new
  TDS_AFFINITY flag to indicate that this thread can't run on all CPUs.
  When inheriting a cpuset from another thread during thread creation, the
  new thread also inherits this flag.  It is in a new ts_flags field in
  td_sched rather than using one of the TDF_SCHEDx flags because fork()
  clears td_flags after invoking sched_fork().
- When placing a thread on a runqueue via sched_add(), if the thread is not
  pinned or bound but has the TDS_AFFINITY flag set, then invoke a new
  routine (sched_pickcpu()) to pick a CPU for the thread to run on next.
  sched_pickcpu() walks the cpuset and picks the CPU with the shortest
  per-CPU runqueue length.  Note that the reason for the TDS_AFFINITY flag
  is to avoid having to walk the cpuset and examine runq lengths in the
  common case.
- To avoid walking the per-CPU runqueues in sched_pickcpu(), add an array
  of counters to hold the length of the per-CPU runqueues and update them
  when adding and removing threads to per-CPU runqueues.

MFC after: 2 weeks

16 years agoAllow kernel config files to include files other than those in the CWD,
obrien [Mon, 28 Jul 2008 17:11:57 +0000 (17:11 +0000)]
Allow kernel config files to include files other than those in the CWD,
using unquoted paths.

16 years agoExport the hardware type (as number and name), the secondary firmware
imp [Mon, 28 Jul 2008 17:00:37 +0000 (17:00 +0000)]
Export the hardware type (as number and name), the secondary firmware
revision and (on Prism cards) the primary firmware revision via
sysctl.  Move the printing of this information under bootverbose,
since it is relatively easy to get to it now.

16 years agoVarious and sundry style and whitespace fixes.
jhb [Mon, 28 Jul 2008 15:52:02 +0000 (15:52 +0000)]
Various and sundry style and whitespace fixes.

16 years agoFix text in the comment why we check for ELF32_R_TYPE
edwin [Mon, 28 Jul 2008 12:49:16 +0000 (12:49 +0000)]
Fix text in the comment why we check for ELF32_R_TYPE

Approved by: bde@
MFC after: 2 days2 days

16 years agoFix the email address formats in some posix_spawn(3) manpages.
ed [Mon, 28 Jul 2008 09:36:56 +0000 (09:36 +0000)]
Fix the email address formats in some posix_spawn(3) manpages.

It seems I made a small bug when writing some of the posix_spawn(3)
manpages. Remove the redundant "Ed Schouten", which broke the AUTHORS
section.

Approved by: philip (mentor, implicit)

16 years agoFix a small typo in the procstat(1) manpage: messsage queue.
ed [Mon, 28 Jul 2008 08:01:24 +0000 (08:01 +0000)]
Fix a small typo in the procstat(1) manpage: messsage queue.

Approved by: philip (mentor)
MFC after: 3 days

16 years agoSome style and assertion fixes to the previous commits hinted by rwatson.
mav [Mon, 28 Jul 2008 06:57:28 +0000 (06:57 +0000)]
Some style and assertion fixes to the previous commits hinted by rwatson.
There is no functional changes.

16 years agoCorrect an off-by-one error in the previous change to pmap_change_attr().
alc [Mon, 28 Jul 2008 05:41:35 +0000 (05:41 +0000)]
Correct an off-by-one error in the previous change to pmap_change_attr().
Change the nearby comment to mention the recursive map.

16 years agoDon't allow pmap_change_attr() to be applied to the recursive mapping.
alc [Mon, 28 Jul 2008 04:59:48 +0000 (04:59 +0000)]
Don't allow pmap_change_attr() to be applied to the recursive mapping.

16 years agoDon't allow pmap_change_attr() to be applied to the recursive mapping.
alc [Mon, 28 Jul 2008 04:13:49 +0000 (04:13 +0000)]
Don't allow pmap_change_attr() to be applied to the recursive mapping.

16 years agoAdd a check for 1GB page mappings to pmap_change_attr() so that it fails
alc [Mon, 28 Jul 2008 03:58:49 +0000 (03:58 +0000)]
Add a check for 1GB page mappings to pmap_change_attr() so that it fails
gracefully.  (On K10 family processors the direct map is implemented using
1GB page mappings.)

16 years agoFix buffer discard index.
yongari [Mon, 28 Jul 2008 02:37:15 +0000 (02:37 +0000)]
Fix buffer discard index.
While I'm here dicard all buffers if errored frame is part of
multi-segmented frames.

Pointed out by: sephe
Reviewd by: sephe
MFC after: 3 days

16 years agoAdd manual pages for posix_spawn() functions.
davidxu [Mon, 28 Jul 2008 02:22:19 +0000 (02:22 +0000)]
Add manual pages for posix_spawn() functions.

PR: standards/122051

16 years ago- track maximum wait time
kmacy [Sun, 27 Jul 2008 21:45:20 +0000 (21:45 +0000)]
- track maximum wait time
- resize columns based on actual observed numerical values

MFC after: 3 days

16 years agoAccording to in_pcb.h protocol binding information has double locking.
mav [Sun, 27 Jul 2008 20:48:22 +0000 (20:48 +0000)]
According to in_pcb.h protocol binding information has double locking.
It allows access it while list travercing holding only global pcbinfo lock.

16 years agoAccording to in_pcb.h protocol binding information has double locking.
mav [Sun, 27 Jul 2008 20:30:34 +0000 (20:30 +0000)]
According to in_pcb.h protocol binding information has double locking.
It allows access it while list travercing holding only global pcbinfo lock.

16 years agoStyle fixes to several function definitions.
alc [Sun, 27 Jul 2008 18:18:50 +0000 (18:18 +0000)]
Style fixes to several function definitions.

16 years agoEnhance pmap_change_attr(). Use pmap_demote_pde() to demote a 2MB page
alc [Sun, 27 Jul 2008 17:32:36 +0000 (17:32 +0000)]
Enhance pmap_change_attr().  Use pmap_demote_pde() to demote a 2MB page
mapping to 4KB page mappings when the specified attribute change only
applies to a portion of the 2MB page.  Previously, in such cases,
pmap_change_attr() gave up and returned an error.

Submitted by: Magesh Dhasayyan

16 years agoAssert for exclusive vnode lock in vinactive(), vrecycle() and vgonel()
pjd [Sun, 27 Jul 2008 11:48:15 +0000 (11:48 +0000)]
Assert for exclusive vnode lock in vinactive(), vrecycle() and vgonel()
functions.

Reviewed by: kib

16 years ago- Move vp test for beeing NULL under IGNORE_LOCK().
pjd [Sun, 27 Jul 2008 11:46:42 +0000 (11:46 +0000)]
- Move vp test for beeing NULL under IGNORE_LOCK().
- Check if panicstr isn't set, if it is ignore the lock. This helps to avoid
  confusion, because lockmgr is a no-op when panicstr isn't NULL, so
  asserting anything at this point doesn't make sense and can just race with
  other panic.

Discussed with: kib

16 years agoAdd the ability to add new addresses for interfacesto just one FIB
julian [Sun, 27 Jul 2008 01:29:28 +0000 (01:29 +0000)]
Add the ability to add new addresses for interfacesto just one FIB
(Other more specific related options will follow)
This allows one to set multiple p2p links to the same place
and select which to use by having each in different FIBS.

16 years agodon't deauth a station because it sends a ps-poll w/ a bogus aid in it;
sam [Sat, 26 Jul 2008 23:50:27 +0000 (23:50 +0000)]
don't deauth a station because it sends a ps-poll w/ a bogus aid in it;
turns out some devices do this and since we otherwise validate the station
is associated and don't use the aid for anything being lenient here allows
them to function

Submitted by: Chris Zimmermann
MFC after: 2 weeks

16 years agoIncrease UDBHASHSIZE from 16 to 128 items.
mav [Sat, 26 Jul 2008 23:07:34 +0000 (23:07 +0000)]
Increase UDBHASHSIZE from 16 to 128 items.
Previous value was chosen 10 years ago and not very effective now.
This change gives several percents speedup on 1000 L2TP mpd links.

16 years agoAccording to in_pcb.h protocol binding information has double locking.
mav [Sat, 26 Jul 2008 21:12:00 +0000 (21:12 +0000)]
According to in_pcb.h protocol binding information has double locking.
It allows access it while list travercing holding only global pcbinfo lock.
This relaxed locking noticably increses receive socket lookup performance.

16 years ago2020447 IPFilter's NAT can undo name server random port selection
darrenr [Sat, 26 Jul 2008 19:46:00 +0000 (19:46 +0000)]
2020447 IPFilter's NAT can undo name server random port selection
        (fix output port range, was a random number in [0,max-min]
 (byteswapped on litle endian), instead of [min,max])

Submitted by: darrenr

16 years agoAdd a few clarifications to this man page. Also, add a table that
imp [Sat, 26 Jul 2008 18:31:39 +0000 (18:31 +0000)]
Add a few clarifications to this man page.  Also, add a table that
describes the minimum versions of each feature and each chipset type
supported by this driver.  Basically, unless you have a very modern
version of firmware on a Prism card, you won't be able to use these
cards for much on modern networks that have any kind of protection
enabled, except for the few WEP-only stranglers that appear at some
conferences...

16 years agoAdd hash table lookup for a fully connected raw sockets.
mav [Sat, 26 Jul 2008 17:32:15 +0000 (17:32 +0000)]
Add hash table lookup for a fully connected raw sockets.

This gives significant performance improvements when many raw sockets used.
Benchmarks of mpd handeling 1000 simultaneous PPTP connections show up to 50%
performance boost. With higher number of connections benefit becomes even
bigger. PopTop snd others should also get some benefits.

16 years ago- Fix mtree example so it works.
simon [Sat, 26 Jul 2008 17:22:40 +0000 (17:22 +0000)]
- Fix mtree example so it works.
- Document --version.

Reviewed by: kientzle
MFC after: 1 week

16 years agoRegister the interrupt handler at the end of wi_attach rather than at
imp [Sat, 26 Jul 2008 17:04:30 +0000 (17:04 +0000)]
Register the interrupt handler at the end of wi_attach rather than at
the beginning.  There's a race in the shared interrutp case.  If
another interrupt happens after the interrupt is setup, then we'd try
to lock an uninitialized mutex.  In addition, if we bailed out due to
a too old version of firmware, we'd leave the interrupt enabled with
all the fun that ensues....

16 years agoReturn arc4_i = arc4_j = 0; line from previous backing out since
ache [Sat, 26 Jul 2008 16:42:45 +0000 (16:42 +0000)]
Return arc4_i = arc4_j = 0; line from previous backing out since
just found it in OpenBSD, see their sys/crypto/arc4.c, function
rc4_keysetup, line ctx->x = ctx->y = 0;

Obtained from:  OpenBSD

16 years agoChange arc4random to arc4random_uniform since modulo is not power of 2,
ache [Sat, 26 Jul 2008 15:46:39 +0000 (15:46 +0000)]
Change arc4random to arc4random_uniform since modulo is not power of 2,
as OpenBSD does.

Obtained from:  OpenBSD

16 years agoChange 2 arc4random modulo operations to arc4random_uniform() as
ache [Sat, 26 Jul 2008 15:39:32 +0000 (15:39 +0000)]
Change 2 arc4random modulo operations to arc4random_uniform() as
OpenBSD does, since modulo is not power of 2.

Obtained from:  OpenBSD

16 years agoNote that snapshots may cause a panic on the full UFS filesystem.
kib [Sat, 26 Jul 2008 13:18:33 +0000 (13:18 +0000)]
Note that snapshots may cause a panic on the full UFS filesystem.

Submitted by: pho
MFC after: 3 days

16 years agoFill in a few sysctl descriptions.
trhodes [Sat, 26 Jul 2008 00:55:35 +0000 (00:55 +0000)]
Fill in a few sysctl descriptions.

Approved by: rwatson

16 years agoFill in sysctl descriptions.
trhodes [Sat, 26 Jul 2008 00:01:19 +0000 (00:01 +0000)]
Fill in sysctl descriptions.

Approved by: philip

16 years agoFill in BPF sysctl descriptions.
trhodes [Fri, 25 Jul 2008 23:58:09 +0000 (23:58 +0000)]
Fill in BPF sysctl descriptions.

Reviewed by: csjp

16 years agoBegin the sysctl descriptions with a capital letter.
trhodes [Fri, 25 Jul 2008 23:54:07 +0000 (23:54 +0000)]
Begin the sysctl descriptions with a capital letter.
Make some slight wording tweaks.

16 years agoAdd support for a new login capability, cpumask which allows login
brooks [Fri, 25 Jul 2008 19:58:14 +0000 (19:58 +0000)]
Add support for a new login capability, cpumask which allows login
sessions to be pinned to cpus by login class.

16 years ago- Connect ds1339 to the build infrastructure.
stas [Fri, 25 Jul 2008 19:35:40 +0000 (19:35 +0000)]
- Connect ds1339 to the build infrastructure.

Reviewed by: raj
Approved by: imp

16 years ago- Add driver for Dallas Semiconductor DS1339 RTC sitting
stas [Fri, 25 Jul 2008 19:34:44 +0000 (19:34 +0000)]
- Add driver for Dallas Semiconductor DS1339 RTC sitting
  on I2C bus.

Reviewed by: raj
Approved by: imp
MFC after: 2 week

16 years agoPer rwatson's request:
ache [Fri, 25 Jul 2008 15:53:32 +0000 (15:53 +0000)]
Per rwatson's request:
"If you don't get a review within a day or two, I would firmly recommend
backing out the changes"

back out all my changes as unreviewed by secteam@ yet.

16 years agoPer rwatson's request:
ache [Fri, 25 Jul 2008 15:42:22 +0000 (15:42 +0000)]
Per rwatson's request:
"If you don't get a review within a day or two, I would firmly recommend
backing out the changes"

back out all my changes, i.e. not comes from merging from OpenBSD as
unreviewed by secteam@ yet.
(OpenBSD changes stays in assumption they are reviewd by OpenBSD)

Yes, it means some old bugs returned, like not setted rs_stired = 1 in
arc4random_stir(3) causing double stirring.

16 years agoMove ttyinfo() into its own C file.
ed [Fri, 25 Jul 2008 14:31:00 +0000 (14:31 +0000)]
Move ttyinfo() into its own C file.

The ttyinfo() routine generates the fancy output when pressing ^T. Right
now it is stored in tty.c. In the MPSAFE TTY code it is already stored
in tty_info.c. To make integration of the MPSAFE TTY code a little
easier, take the same approach.

This makes the TTY code a little bit more readable, because having the
proc_*/thread_* routines in tty.c is very distractful.

Approved by: philip (mentor)

16 years agoRemove <sgtty.h> now it has no practical usage.
ed [Fri, 25 Jul 2008 12:37:46 +0000 (12:37 +0000)]
Remove <sgtty.h> now it has no practical usage.

When I turned sgtty into a binary-only interface (last month), I added
this explicit #error to the header file, to make sure nobody forgot to
remove the header file after updating world.

I think it is now a good moment to remove this header file.

Approved by: philip (mentor)

16 years agoCall pargs_drop() unconditionally in do_execve(), the function correctly
kib [Fri, 25 Jul 2008 11:55:32 +0000 (11:55 +0000)]
Call pargs_drop() unconditionally in do_execve(), the function correctly
handles the NULL argument.
Make pargs_free() static.

MFC after: 1 week

16 years agos/alredy/already/ in the comments and the log message.
kib [Fri, 25 Jul 2008 11:22:25 +0000 (11:22 +0000)]
s/alredy/already/ in the comments and the log message.

16 years agoo Trim whitespaces.
maxim [Fri, 25 Jul 2008 09:30:53 +0000 (09:30 +0000)]
o Trim whitespaces.

16 years agoo Fix grammar: see -> See.
maxim [Fri, 25 Jul 2008 09:13:18 +0000 (09:13 +0000)]
o Fix grammar: see -> See.

16 years ago - Provide kernelname as the name for process with P_KTHREAD set as
jeff [Fri, 25 Jul 2008 05:49:48 +0000 (05:49 +0000)]
 - Provide kernelname as the name for process with P_KTHREAD set as
   otherwise their textvp is NULL.

Reviewed by: jkoshy
Sponsored by: Nokia

16 years agoFix cut-n-paste-o
julian [Fri, 25 Jul 2008 01:09:36 +0000 (01:09 +0000)]
Fix cut-n-paste-o

Submitted by: Kostik Belousov

16 years agoAdd tweak for AMD Geode "companion" chip, AMD CS5536, which is apparently
ivoras [Thu, 24 Jul 2008 23:22:19 +0000 (23:22 +0000)]
Add tweak for AMD Geode "companion" chip, AMD CS5536, which is apparently
USB 2.0 capable but is shy and doesn't adwertise it much.

PR: 120017
Reviewed by: imp
Approved by: gnn (mentor)
MFC after: 2 weeks

16 years agoFix spelling error in comment
julian [Thu, 24 Jul 2008 19:05:58 +0000 (19:05 +0000)]
Fix spelling error in comment

16 years agoNote that setfib is not a terminal rule.
julian [Thu, 24 Jul 2008 18:39:36 +0000 (18:39 +0000)]
Note that setfib is not a terminal rule.

16 years agoSwitch to using the setfib syscall instead of a syscall(175,...)
julian [Thu, 24 Jul 2008 18:01:50 +0000 (18:01 +0000)]
Switch to using the setfib syscall instead of a syscall(175,...)

16 years agoPrefer the opt_global.h from KERNBUILDDIR if existent so we obtain all
marius [Thu, 24 Jul 2008 14:07:52 +0000 (14:07 +0000)]
Prefer the opt_global.h from KERNBUILDDIR if existent so we obtain all
macros that might be relevant.

16 years agoTry again not to use a userspace pointer in the kernel when trying to record
dfr [Thu, 24 Jul 2008 14:02:03 +0000 (14:02 +0000)]
Try again not to use a userspace pointer in the kernel when trying to record
the hostname which we need for NLM requests. The previous patch was incomplete.

PR: 125849
Pointy hat: dfr

16 years agoDon't use a userspace pointer in the kernel when trying to record the hostname
dfr [Thu, 24 Jul 2008 13:42:28 +0000 (13:42 +0000)]
Don't use a userspace pointer in the kernel when trying to record the hostname
which we need for NLM requests.

PR: 125849

16 years ago2020447 IPFilter's NAT can undo name server random port selection
darrenr [Thu, 24 Jul 2008 12:35:05 +0000 (12:35 +0000)]
2020447 IPFilter's NAT can undo name server random port selection

Approved by: darrenr
MFC after: 1 week
Security: CERT VU#521769

16 years agoDon't include <sys/tty.h> in non-TTY drivers.
ed [Thu, 24 Jul 2008 09:54:10 +0000 (09:54 +0000)]
Don't include <sys/tty.h> in non-TTY drivers.

The kbd, kbdmux, ugen and uhid drivers included <sys/tty.h>, because
they needed clists, which have been moved to <sys/clist.h> some time
ago. In the MPSAFE TTY branch, <sys/tty.h> does not include
<sys/clist.h>, which means we have to teach these drivers to include
this header file directly.

Approved by: philip (mentor, implicit)

16 years agoAdd TIOCPKT and TIOCSPTLCK to the Linuxolator.
ed [Wed, 23 Jul 2008 17:47:44 +0000 (17:47 +0000)]
Add TIOCPKT and TIOCSPTLCK to the Linuxolator.

We're very lucky, because the flags used by our TIOCPKT implementation
are the same as flags used by Linux. We can safely enable TIOCPKT,
assuming EXTPROC is not used.

TIOCSPTLCK is used by unlockpt(). Because we don't need unlockpt() in
our implementation, make this ioctl a no-op.

Approved by: philip (mentor, implicit), rdivacky
Obtained from: P4 (//depot/projects/mpsafetty/...)

16 years agoMerge from p4:
imp [Wed, 23 Jul 2008 17:38:33 +0000 (17:38 +0000)]
Merge from p4:

Implement openssl config needed for mips.

Submitted by: gonzo@
Reviewed by: simon@

16 years agoFix linux_alarm, the linux behaviour is to limit the
rdivacky [Wed, 23 Jul 2008 17:19:02 +0000 (17:19 +0000)]
Fix linux_alarm, the linux behaviour is to limit the
secs to INT_MAX when the passed in parameter is bigger
than INT_MAX.

Submitted by: Dmitry Chagin <chagin.dmitry gmail com>
Approved by: kib (mentor)

16 years agoRemove a bunch of files we don't need to build OpenSSH. They are still
des [Wed, 23 Jul 2008 17:02:25 +0000 (17:02 +0000)]
Remove a bunch of files we don't need to build OpenSSH.  They are still
available in base/vendor-crypto/openssh/dist/.

16 years agoRemove debugging cruft.
des [Wed, 23 Jul 2008 16:44:20 +0000 (16:44 +0000)]
Remove debugging cruft.

16 years agopjd@'s r180759 was intended to revert r180755 due to ipfilter breakage,
des [Wed, 23 Jul 2008 16:40:07 +0000 (16:40 +0000)]
pjd@'s r180759 was intended to revert r180755 due to ipfilter breakage,
but removed too much, breaking the build in other places instead.  Now
that the ipfilter issue has been fixed (or hacked around), address the
second issue by restoring r180755, with one small change.  I don't feel
comfortable using assert(3) in a header that will be included in userland
code that may or may not already have an assertion mechanism in place,
so KASSERT() evaluates to a no-op in the !_KERNEL case.

16 years agoFor unfathomable reasons, ipfilter abuses kernel data structures for its
des [Wed, 23 Jul 2008 16:34:53 +0000 (16:34 +0000)]
For unfathomable reasons, ipfilter abuses kernel data structures for its
own purposes.  To pull this off, it defines _KERNEL before including the
headers where these structures are defined.  This leads to no end of
trouble when some of these headers, or other headers that they include,
change, as demonstrated by r180755.

The quick fix in this particular case is to define _WANT_FILE instead of
_KERNEL, conditional on __FreeBSD__.  A better long-term fix is left as
an exercise to the reader.

16 years agoFurther refine the probe order of devices to more closely match the previous
jhb [Wed, 23 Jul 2008 15:13:06 +0000 (15:13 +0000)]
Further refine the probe order of devices to more closely match the previous
behavior.  Specifically, probe Host-PCI bridges in the order they are
encountered in the tree.  For CPUs, just use an order of 100000 and assume
that no Host-PCI bridges will be more than 10000 levels deep in the
namespace.  This fixes an issue on some boxes where the HPET timer stopped
attaching.

16 years agoBack out this change, as it breaks the build and I don't have time for
pjd [Wed, 23 Jul 2008 15:12:45 +0000 (15:12 +0000)]
Back out this change, as it breaks the build and I don't have time for
a better fix today.

16 years agoThe ffs_balloc_ufs{1,2} functions call bdwrite() while having several
kib [Wed, 23 Jul 2008 14:32:44 +0000 (14:32 +0000)]
The ffs_balloc_ufs{1,2} functions call bdwrite() while having several
vnode buffers locked at once. In particular, there are indirect buffers
among locked ones. The bdwrite() may start the flushing to keep dirty
buffer list at the bounds. If any buffer on the dirty list requires
translation from logical to physical block number, code may ends up
trying to lock an indirect buffer already locked in ffs_balloc_ufsX.

Prevent the bdflush() activity when several buffers are locked at once
by setting the TDP_INBDFUSH for the problematic code blocks.

Reported and tested by: pho, Josef Buchsteiner at Juniper
In collaboration with: kan
MFC after: 1 month

16 years agoo DragonFly BSD 2.0 added.
maxim [Wed, 23 Jul 2008 14:25:39 +0000 (14:25 +0000)]
o DragonFly BSD 2.0 added.

16 years agoUnbreak cc -pg support on i386. In gcc 4.2, %ecx is used as the arg pointer
luoqi [Wed, 23 Jul 2008 11:37:20 +0000 (11:37 +0000)]
Unbreak cc -pg support on i386. In gcc 4.2, %ecx is used as the arg pointer
when stack realignment is turned on (it is ALWAYS on for main), however
in a profiling build %ecx would be clobbered by mcount(), this would lead
to a segmentation fault when the code tries to reference any argument.
This fix changes mcount() to preserve %ecx.

PR: bin/119709
Reviewed by: bde
MFC after: 1 week

16 years agoCheck for negative reference count.
pjd [Wed, 23 Jul 2008 11:17:46 +0000 (11:17 +0000)]
Check for negative reference count.

Reviewed by: des

16 years agowhen NDIS framework try to query/set informations NDIS drivers can
weongyo [Wed, 23 Jul 2008 10:49:27 +0000 (10:49 +0000)]
when NDIS framework try to query/set informations NDIS drivers can
return NDIS_STATUS_PENDING.  In this case, it's waiting for 5 secs to
get the response from drivers now.  However, some NDIS drivers can send
the response before NDIS framework gets ready to receive it so we might
always be blocked for 5 secs in current implementation.  NDIS framework
should reset the event before calling NDIS driver's callback not after.

MFC after: 1 month

16 years agoSATA device on some nForce based boards could get confused if MSI is not
luoqi [Wed, 23 Jul 2008 09:44:36 +0000 (09:44 +0000)]
SATA device on some nForce based boards could get confused if MSI is not
used but MSI to HyperTransport IRQ mapping is enabled, and would act as
if MSI is turned on, resulting in interrupt loss.

This commit will,
1. enable MSI mapping on a device only when MSI is enabled for that
   device and the MSI address matches the HT mapping window.
2. enable MSI mapping on a bridge only when a downstream device is
   allocated an MSI address in the mapping window

PR: kern/118842
Reviewed by: jhb
MFC after: 1 week

16 years agoRe-work the code slightly to avoid a possible livelock.
dfr [Wed, 23 Jul 2008 09:18:08 +0000 (09:18 +0000)]
Re-work the code slightly to avoid a possible livelock.

MFC after: 2 weeks

16 years agoDo the pargs_hold() on the copy of the pointer to the p_args of the
kib [Wed, 23 Jul 2008 08:45:25 +0000 (08:45 +0000)]
Do the pargs_hold() on the copy of the pointer to the p_args of the
child process immediately after bulk bcopy() without dropping the
process lock.

Since process is not single-threaded when forking, dropping and
reacquiring the lock allows an other thread to change the process title
of the parent in between, and results in hold being done on the invalid
pointer. The problem manifested itself as the double free of the old
p_args.

Reported by: kris
Reviewed by: jhb
MFC after: 1 week

16 years agoMinor white space tweak.
rwatson [Wed, 23 Jul 2008 07:42:31 +0000 (07:42 +0000)]
Minor white space tweak.

Obtained from: Apple Inc.
MFC after: 3 days

16 years agoFirst cut at doing the kvm file needed for mips.
imp [Wed, 23 Jul 2008 07:24:55 +0000 (07:24 +0000)]
First cut at doing the kvm file needed for mips.

Obtained from: gonzo@

16 years agoOnly descend into the boot directory for the architecture if it
imp [Wed, 23 Jul 2008 07:23:33 +0000 (07:23 +0000)]
Only descend into the boot directory for the architecture if it
actually exists and is a directory or symlink to a directory.

16 years agoDisable SSP for mips until support is added to the base architecture.
imp [Wed, 23 Jul 2008 06:16:34 +0000 (06:16 +0000)]
Disable SSP for mips until support is added to the base architecture.

16 years agoTurn of SSP for mips for now until support is added to the base
imp [Wed, 23 Jul 2008 06:14:21 +0000 (06:14 +0000)]
Turn of SSP for mips for now until support is added to the base
architecture.

16 years agoremove reference for unexisting ndisapi(9)
weongyo [Wed, 23 Jul 2008 05:50:17 +0000 (05:50 +0000)]
remove reference for unexisting ndisapi(9)

16 years agoAdding myself as a new ports committer
pgollucci [Wed, 23 Jul 2008 01:37:04 +0000 (01:37 +0000)]
Adding myself as a new ports committer

Reviewed by:    gabor (mentor)
Approved by: araujo (mentor)

16 years agoRetroactively add my entry and link to garga. Forgot to do this when I
wxs [Wed, 23 Jul 2008 01:19:56 +0000 (01:19 +0000)]
Retroactively add my entry and link to garga.  Forgot to do this when I
got my commit bit.