]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
19 years agoMake callout_reset() return a non-zero value if a pending callout
glebius [Thu, 8 Sep 2005 14:20:39 +0000 (14:20 +0000)]
Make callout_reset() return a non-zero value if a pending callout
was rescheduled. If there was no pending callout, then return 0.

Reviewed by: iedowse, cperciva

19 years agoFix a typo that broke LINT.
scottl [Thu, 8 Sep 2005 14:13:36 +0000 (14:13 +0000)]
Fix a typo that broke LINT.

19 years agoMove hme_stop() after ether_ifdetach() and if_free() to prevent a
kensmith [Thu, 8 Sep 2005 13:50:16 +0000 (13:50 +0000)]
Move hme_stop() after ether_ifdetach() and if_free() to prevent a
memory-referenced-after-free panic if the hme interface fails to
attach.

Patch obtained from: marius
Suggested same thing: brooks

MFC after: 3 days

19 years agoReflect a recent change in /etc/rc.subr that made ``-M''
yar [Thu, 8 Sep 2005 09:22:21 +0000 (09:22 +0000)]
Reflect a recent change in /etc/rc.subr that made ``-M''
appear in tmpmfs and varmfs default flags explicitly.
Explain why -M is good for these file systems (it maximizes
performance and makes the system more stable at low memory
conditions by reducing the chance of thrashing.)

Bump .Dd accordingly.

MFC after: 3 days

19 years agoAdd a new struct buf flag bit, B_PERSISTENT, and use it to tag
truckman [Thu, 8 Sep 2005 06:30:05 +0000 (06:30 +0000)]
Add a new struct buf flag bit, B_PERSISTENT, and use it to tag
struct bufs that are persistently held by ext2fs.  Ignore any buffers
with this flag in the code in boot() that counts "busy" and dirty
buffers and attempts to sync the dirty buffers, which is done before
attempting to unmount all the file systems during shutdown.

This fixes the problem caused by any ext2fs file systems that are
mounted at system shutdown time, which caused boot() to give up on
a non-zero number of buffers and skip the call to vfs_unmountall().
This left all the mounted file systems in a dirty state and caused
them to all require cleanup by fsck on reboot.

Move the two separate copies of the "busy" buffer test in boot()
to a separate function.

Nuke the useless spl() stuff in the ext2fs ULCK_BUF() macro.

Bring the PRINT_BUF_FLAGS definition in sys/buf.h up to date with
this and previous flag changes.

PR: kern/56675, kern/85163
Tested by: "Matthias Andree" matthias.andree at gmx.de
Reviewed by: bde
MFC after: 3 days

19 years agohptmv(4) now works on amd64.
brueffer [Thu, 8 Sep 2005 04:40:11 +0000 (04:40 +0000)]
hptmv(4) now works on amd64.

19 years agoHook up the hptmv driver for amd64.
scottl [Thu, 8 Sep 2005 03:29:18 +0000 (03:29 +0000)]
Hook up the hptmv driver for amd64.

MFC After: 3 days

19 years agoImport new version of the HPTMV driver from Highpoint. The major change
scottl [Wed, 7 Sep 2005 23:33:26 +0000 (23:33 +0000)]
Import new version of the HPTMV driver from Highpoint.  The major change
here is the support for amd64, as well as possible support for PAE.  Many
thanks to Highpoint for continuing to support FreeBSD.

Obtained from:  Steve Chang @ Highpoint
MFC After: 3 days.

19 years agoSorting the belly button lint of history:
imp [Wed, 7 Sep 2005 22:13:31 +0000 (22:13 +0000)]
Sorting the belly button lint of history:

o Note that the first 255 locations are reserved for JEDEC Ids from
  publication 106 (current revision Q, each one verified with
  JEDEC and the PMCICA).
o Move ADAPTEC2 to the right section.
o Sort TOSHIBA2 numerically.

19 years agoFix typo: Cowarly -> Cowardly.
cperciva [Wed, 7 Sep 2005 19:32:15 +0000 (19:32 +0000)]
Fix typo: Cowarly -> Cowardly.

Reported by: Joerg Sonnenberger

19 years agoFree the bpf descriptor array after we are done with it. This probably isnt
csjp [Wed, 7 Sep 2005 19:28:01 +0000 (19:28 +0000)]
Free the bpf descriptor array after we are done with it. This probably isnt
that critical as the program exits after this point anyway, but this may
not always be the case.

19 years agoUpdate usage to reflect the new option.
csjp [Wed, 7 Sep 2005 19:15:43 +0000 (19:15 +0000)]
Update usage to reflect the new option.

Pointed out by: ru

19 years agoSeveral changes: Added a BUGS section with several bugs. And
garys [Wed, 7 Sep 2005 18:40:09 +0000 (18:40 +0000)]
Several changes:  Added a BUGS section with several bugs.  And

--  Made the synopses more precise.
--  Added argument to flag in option description.
--  Moved -b default and limits to option description (to un-hide).
--  Noted several behaviors that were not mentioned.
--  A few more trivial changes.

PR:             docs/46787
Approved by:    keramida
MFC after:      3 days

19 years agoUse the more readable empty() syntax.
obrien [Wed, 7 Sep 2005 17:38:46 +0000 (17:38 +0000)]
Use the more readable empty() syntax.

19 years agoMerge bpfstat's functionality into the netstat(1) utility. This adds
csjp [Wed, 7 Sep 2005 17:35:16 +0000 (17:35 +0000)]
Merge bpfstat's functionality into the netstat(1) utility. This adds
a -B option which causes bpf peers to be printed. This option can be
used in conjunction with -I if information about specific interfaces
is desired. This is similar to what NetBSD added to their version of
netstat.

$ netstat -B
  Pid  Netif  Flags      Recv      Drop     Match Sblen Hblen Command
 1137    lo0 p--s--         0         0         0     0     0 tcpdump
  205   sis0 -ifs-l     37331         0         1     0     0 dhclient
$

$ netstat -I lo0 -B
  Pid  Netif  Flags      Recv      Drop     Match Sblen Hblen Command
 1174    lo0 p--s--         0         0         0     0     0 tcpdump
$

-Add bpf.c which stores all the code for retrieving and parsing bpf
 related statistics.
-Modify main.c to add support for the -B option and hook it into the
 program logic.
-Add bpf.c to the build.
-Document this new functionality in the man page and bump the revision
 date.
-Add prototype for bpf_stats function.

19 years agoIn set_mouse_pos(), try to avoid division by zero errors.
rodrigc [Wed, 7 Sep 2005 15:19:03 +0000 (15:19 +0000)]
In set_mouse_pos(), try to avoid division by zero errors.

19 years agoCorrect insecure temporary file usage.
cperciva [Wed, 7 Sep 2005 13:39:44 +0000 (13:39 +0000)]
Correct insecure temporary file usage.

Security: FreeBSD-SA-05:20.cvsbug

19 years agoEnsure the full value is written into inode variables.
obrien [Wed, 7 Sep 2005 10:32:58 +0000 (10:32 +0000)]
Ensure the full value is written into inode variables.

PR: 85503
Submitted by: Dmitry Pryanishnikov <dmitry@atlantis.dp.ua>

19 years agoIPv6 was improperly defining its malloc type the same as IPv4 (M_IPMADDR,
obrien [Wed, 7 Sep 2005 10:11:49 +0000 (10:11 +0000)]
IPv6 was improperly defining its malloc type the same as IPv4 (M_IPMADDR,
M_IPMOPTS, M_MRTABLE).  Thus we had conflicting instantiations.
Create an IPv6-specific type to overcome this.

19 years agoForward declaring static variables as extern is invalid ISO-C. Now that
obrien [Wed, 7 Sep 2005 10:06:14 +0000 (10:06 +0000)]
Forward declaring static variables as extern is invalid ISO-C.  Now that
GCC can properly handle forward static declarations, do this properly.

19 years agoReorder code to not depend on an ISO-C illegal forward extern declaration.
obrien [Wed, 7 Sep 2005 09:53:35 +0000 (09:53 +0000)]
Reorder code to not depend on an ISO-C illegal forward extern declaration.

19 years agoFix bug where static forward declarations weren't accepted.
obrien [Wed, 7 Sep 2005 09:23:39 +0000 (09:23 +0000)]
Fix bug where static forward declarations weren't accepted.
This allows us to fix non-ISO-C constructs in our kernel to legal ISO-C.

Submitted by: rodrigc
Obtained from: http://gcc.gnu.org/ml/gcc-patches/2005-09/msg00006.html

19 years agoMention that uuidgen(1) generates DCE version 1 UUIDs only
rse [Wed, 7 Sep 2005 07:49:21 +0000 (07:49 +0000)]
Mention that uuidgen(1) generates DCE version 1 UUIDs only

19 years agoFix the type of the variable 'debug'. It is used as a bitmap, so the
harti [Wed, 7 Sep 2005 07:34:24 +0000 (07:34 +0000)]
Fix the type of the variable 'debug'. It is used as a bitmap, so the
type should be int rather than Boolean.

PR: bin/84528
Submitted by: Max Okumoto <okumoto@ucsd.edu>
MFC after: 3 weeks

19 years agoUnbreak release builds. Now that NO_INFO also affects the installation
marcel [Wed, 7 Sep 2005 04:34:11 +0000 (04:34 +0000)]
Unbreak release builds. Now that NO_INFO also affects the installation
of texinfo and we need makeinfo to build world, we cannot have NO_INFO
anymore when we populate the chroot.

19 years agoConsistancy is the hobgoblin of small minds:
imp [Wed, 7 Sep 2005 03:34:24 +0000 (03:34 +0000)]
Consistancy is the hobgoblin of small minds:
o DLINK -> DL100XX

19 years agoMinor reorg of pccard attach code to fix ax88x90 case broken after fixing
imp [Wed, 7 Sep 2005 03:30:58 +0000 (03:30 +0000)]
Minor reorg of pccard attach code to fix ax88x90 case broken after fixing
dl100xx case.
o We no longer acquire and release resources during attach many times.  We now
  do it once at the beginning.
o Move setting the resource offsets to just after acquiring the ports in
  attach.
o Move ax88x90 code to the end of the file, just after the dl100xx specific
  code.
o Rename ed_pccard_Linksys to ed_pccard_dl100xx to reflect the underlying
  chipset.
o Pass the ed_product structure into ed_pccard_{dl100xx,ax88x90} and have
  those routines test the flags to see if this card should be probed in that
  way.
o transition from ed_probe_Novell to ed_probe_Novell_generic since we already
  have the resources setup.
o Move use of ed_probe_Novell_generic into ed_pccard_dl100xx to be more
  consistant with ax88x90 case.
o simplify the code where we probe for the chipsets

19 years agoo Expose ed_probe_Novel_generic, it is useful for pccard case.
imp [Wed, 7 Sep 2005 03:20:33 +0000 (03:20 +0000)]
o Expose ed_probe_Novel_generic, it is useful for pccard case.
o Fix a now stale comment.  There are likely many others like them, but this
  one definitely hasn't been true since DELAY was introduced into the tree.

19 years agoEliminate an incorrect cast.
alc [Wed, 7 Sep 2005 01:42:30 +0000 (01:42 +0000)]
Eliminate an incorrect cast.

19 years agoFix DL100xx based cards. Don't drop resources. It was approrpiate in
imp [Wed, 7 Sep 2005 00:00:16 +0000 (00:00 +0000)]
Fix DL100xx based cards.  Don't drop resources.  It was approrpiate in
the probe code that this used to be part of, but as part of the
attach, we shouldn't be dropping the resources here.

Also, allocate the proper rid in the ax88x90 setup.

19 years agomove away from K&R function definitions
imp [Tue, 6 Sep 2005 23:15:21 +0000 (23:15 +0000)]
move away from K&R function definitions

19 years agoWork around a bug I've seen on Linksys EC2T cards. For some reason,
imp [Tue, 6 Sep 2005 22:55:32 +0000 (22:55 +0000)]
Work around a bug I've seen on Linksys EC2T cards.  For some reason,
as yet unknown, those cards report their MAC address a byte at a time.
However, other AX88x90 cards report the MAC address a word at a time.
Add a heuristic which looks at the high order bytes of the first 6
words.  If they are all '0', assume the card is behaving like the
Linksys EC2T card.  Since the default prefix for these cards appears
to be 00:e0:98, this appears to be a safe heuristic.  While some cards
have been observed with different prefixes, they all work with this
heuristic.

I'm unsure if this is a bug in the EC2T card, or if it is a bug in the
initialization of the card.  No other OS has this heuristic (although
w/o it, the MAC address that is used works).

19 years agoGo ahead and | in ED_CR_PAGE_0, even though this doesn't change things
imp [Tue, 6 Sep 2005 22:46:41 +0000 (22:46 +0000)]
Go ahead and | in ED_CR_PAGE_0, even though this doesn't change things
at all.  It makes the code clearer.

fix a comment comments about why we need to write i/o address to certain
registers.

19 years agoIt turns out that many of the ambicom cards have their CIS resources
imp [Tue, 6 Sep 2005 22:44:26 +0000 (22:44 +0000)]
It turns out that many of the ambicom cards have their CIS resources
listed in different orders.  Since it is easy to identify the Modem
resources vs the Ethernet resources by looking at the size, use that
rather than hard coded rids.  For such parts, go ahead and guess which
rid we should use based on the size.  This guess appears reliable for
the two example cards that I have with different CIS info.

19 years agoClarify that any firewall that has pfil(9) hooks can be used.
thompsa [Tue, 6 Sep 2005 22:38:40 +0000 (22:38 +0000)]
Clarify that any firewall that has pfil(9) hooks can be used.

Suggested by: sam
Approved by: mlaier (mentor)
MFC after: 3 days

19 years agoAdd support for multicast to the bridge and allow inet6 addresses to be
thompsa [Tue, 6 Sep 2005 21:11:59 +0000 (21:11 +0000)]
Add support for multicast to the bridge and allow inet6 addresses to be
assigned to the interface.

IPv6 auto-configuration is disabled. An IPv6 link-local address has a
link-local scope within one link, the spec is unclear for the bridge case and
it may cause scope violation.

An address can be assigned in the usual way;
  ifconfig bridge0 inet6 xxxx:...

Tested by: bmah
Reviewed by: ume (netinet6)
Approved by: mlaier (mentor)
MFC after: 1 week

19 years agoIn sc_set_text_mode(), reset fontwidth if it is <= 0.
rodrigc [Tue, 6 Sep 2005 20:38:39 +0000 (20:38 +0000)]
In sc_set_text_mode(), reset fontwidth if it is <= 0.
Eliminates division by zero errors in syscons driver.

Reported by: keramida, Slawa Olhovchenkov <slw at zxy dot spb dot ru>,
Kyryll Mirnenko <mirya at matrix dot kiev dot ua>
Tested by: keramida, rodrigc

19 years agoFix build.
glebius [Tue, 6 Sep 2005 20:36:38 +0000 (20:36 +0000)]
Fix build.

19 years agofix typos: decribed -> described, preceeded -> preceded
rse [Tue, 6 Sep 2005 20:14:39 +0000 (20:14 +0000)]
fix typos: decribed -> described, preceeded -> preceded

19 years agoVarious small code cleanups resulting from a code reviewing
rse [Tue, 6 Sep 2005 19:30:00 +0000 (19:30 +0000)]
Various small code cleanups resulting from a code reviewing
and linting procedure:

1. Remove useless sub-expression:

   - if (*start || (!ifsspc && start > string && (nulonly || 1))) {
   + if (*start || (!ifsspc && start > string)) {

   The sub-expression "(nulonly || 1)" always evaluates to true and
   according to CVS logs seems to be just a left-over from some
   debugging and introduced by accident. Removing the sub-expression
   doesn't change semantics and a code inspection showed that the
   variable "nulonly" is also not necessary here in any way (and the
   expression would require fixing instead of removing).

2. Remove dead code:

   -                if (backslash && c == '\\') {
   -                        if (read(STDIN_FILENO, &c, 1) != 1) {
   -                                status = 1;
   -                                break;
   -                        }
   -                        STPUTC(c, p);
   -                } else if (ap[1] != NULL && strchr(ifs, c) != NULL) {
   +                if (ap[1] != NULL && strchr(ifs, c) != NULL) {

   Inspection of the control and data flow showed that variable
   "backslash" is always false (0) when the "if"-expression is
   evaluated, hence the whole block is effectively dead code.
   Additionally, the skipping of characters after a backslash is already
   performed correctly a few lines above, so this code is also not
   needed at all. According to the CVS logs and the ASH 0.2 sources,
   this code existed in this way already since its early days.

3. Cleanup Style:

   - ! trap[signo][0] == '\0' &&
   + ! (trap[signo][0] == '\0') &&

   The expression wants to ensure the trap is not assigned the empty
   string. But the "!" operator has higher precedence than "==", so the
   comparison should be put into parenthesis to form the intended way of
   expression. Nevertheless the code was effectively not really broken
   as both particular NUL comparisons are semantically equal, of course.
   But the parenthesized version is a lot more intuitive.

4. Remove shadowing variable declaration:

   - char *q;

   The declaration of symbol "q" hides another identical declaration of
   "q" in the same context. As the other "q" is already reused multiple
   times and also can be reused again without negative side-effects,
   just remove the shadowing declaration.

5. Just small cosmetics:

   - if (ifsset() != 0)
   + if (ifsset())

   The ifsset() macro is already coded by returning the boolean result
   of a comparison operator, so no need to compare this boolean result
   again against a numerical value. This also aligns the macros usage to
   the remaining existing code.

Reviewed by: stefanf@

19 years agoTeach portsnap how to ignore unwanted parts of the ports tree. A line
cperciva [Tue, 6 Sep 2005 19:28:37 +0000 (19:28 +0000)]
Teach portsnap how to ignore unwanted parts of the ports tree.  A line
of the form "REFUSE foo" in portsnap.conf will result in parts of the
tree matching "^foo" being (a) not extracted by "portsnap extract", (b)
not updated by "portsnap update", and (c) not having any patches or new
ports downloaded by "portsnap fetch" or "portsnap cron". The example
shown in portsnap.conf demonstrates ignoring all the language categories.

As mentioned in portsnap.conf.5, the use of an imcomplete ports tree is
not officially supported; but this is something which many users have
requested, so I'm adding it anyway.

PR: bin/85619 (but not the patch provided therein)
MFC after: 1 month

19 years agoFix problem with finding the still working disk in a broken mirror on VIA.
sos [Tue, 6 Sep 2005 19:17:48 +0000 (19:17 +0000)]
Fix problem with finding the still working disk in a broken mirror on VIA.

19 years agoWhen we read data from socket buffer using soreceive() the socket layer
glebius [Tue, 6 Sep 2005 17:15:42 +0000 (17:15 +0000)]
When we read data from socket buffer using soreceive() the socket layer
does not clear m_nextpkt for us. The mbufs are sent into netgraph and
then, if they contain a TCP packet delivered locally, they will enter
socket code again. They can pass the first assert in sbappendstream()
because m_nextpkt may be set not in the first mbuf, but deeper in the
chain. So the problem will trigger much later, when local program
reads the data from socket, and an mbuf with m_nextpkt becomes a
first one.

This bug was demasked by revision 1.54, when I made upcall queueable.
Before revision 1.54 there was a very small probability to have 2
mbufs in GRE socket buffer, because ng_ksocket_incoming2() dequeued
the first one immediately.

 - in ng_ksocket_incoming2() clear m_nextpkt on all mbufs
   read from socket.
 - restore rev. 1.54 change in ng_ksocket_incoming().

PR: kern/84952
PR: kern/82413
In collaboration with: rwatson

19 years agoIn soreceive(), when a first mbuf is removed from socket buffer use
glebius [Tue, 6 Sep 2005 17:05:11 +0000 (17:05 +0000)]
In soreceive(), when a first mbuf is removed from socket buffer use
sockbuf_pushsync(). Previous manipulation could lead to an inconsistent
mbuf.

Reviewed by: rwatson

19 years agoIn INVARIANTS case also check that nodes do not pass queues of mbufs
glebius [Tue, 6 Sep 2005 17:02:13 +0000 (17:02 +0000)]
In INVARIANTS case also check that nodes do not pass queues of mbufs
each other.

19 years agoRaise one more bit in READER_MASK. I believe that before this change
glebius [Tue, 6 Sep 2005 16:58:25 +0000 (16:58 +0000)]
Raise one more bit in READER_MASK. I believe that before this change
it was possible to have 1 reader and 1 writer thread working on
a node simultaneously.

Reviewed by: julian

19 years agofix typo: ommitted -> omitted
rse [Tue, 6 Sep 2005 16:08:37 +0000 (16:08 +0000)]
fix typo: ommitted -> omitted

19 years agoNotable quote by Theodore Roosevelt.
wilko [Tue, 6 Sep 2005 14:59:55 +0000 (14:59 +0000)]
Notable quote by Theodore Roosevelt.

MFC after: 3 days

19 years agoDocument flags of a pollrec.
glebius [Tue, 6 Sep 2005 11:09:18 +0000 (11:09 +0000)]
Document flags of a pollrec.

19 years agoRemove WANT_FORCE_OPTIMIZATION_DOWNGRADE and out dated warnings about
obrien [Tue, 6 Sep 2005 09:01:18 +0000 (09:01 +0000)]
Remove WANT_FORCE_OPTIMIZATION_DOWNGRADE and out dated warnings about
libalias(3) exposing compiler bugs.

19 years agoupdates:
sam [Tue, 6 Sep 2005 03:59:22 +0000 (03:59 +0000)]
updates:
o note all pci/cardbus parts are supported (modulo hal updates)
o use ath_rate_sample instead of ath_rate_onoe
o note SuperG support is missing
o note WPA not supported on 5210
o remove stuff about needing a better tx rate control algorithm

MFC after: 3 days

19 years agoConvert the primary ACL allocator from malloc(9) to using a UMA zone instead.
csjp [Tue, 6 Sep 2005 00:06:30 +0000 (00:06 +0000)]
Convert the primary ACL allocator from malloc(9) to using a UMA zone instead.
Also introduce an aclinit function which will be used to create the UMA zone
for use by file systems at system start up.

MFC after: 1 month
Discussed with: rwatson

19 years agoNow that the PID is constantly refreshed, introduce a pidname function which
csjp [Mon, 5 Sep 2005 23:13:05 +0000 (23:13 +0000)]
Now that the PID is constantly refreshed, introduce a pidname function which
when given a PID consults the kern.proc.pid sysctl variable to pull out the
pcomm data.

19 years agoInstead of caching the PID which opened the bpf descriptor, continuously
csjp [Mon, 5 Sep 2005 23:08:04 +0000 (23:08 +0000)]
Instead of caching the PID which opened the bpf descriptor, continuously
refresh the PID which has the descriptor open. The PID is refreshed in various
operations like ioctl(2), kevent(2) or poll(2). This produces more accurate
information about current bpf consumers. While we are here remove the bd_pcomm
member of the bpf stats structure because now that we have an accurate PID we
can lookup the via the kern.proc.pid sysctl variable. This is the trick that
NetBSD decided to use to deal with this issue.

Special care needs to be taken when MFC'ing this change, as we have made a
change to the bpf stats structure. What will end up happening is we will leave
the pcomm structure but just mark it as being un-used. This way we keep the ABI
in tact.

MFC after: 1 month
Discussed with: Rui Paulo < rpaulo at NetBSD dot org >

19 years agoRetain generation count when writing zeroes instead of an inode to disk.
tegge [Mon, 5 Sep 2005 22:14:33 +0000 (22:14 +0000)]
Retain generation count when writing zeroes instead of an inode to disk.

Don't free a struct inodedep if another process is allocating saved inode
memory for the same struct inodedep in initiate_write_inodeblock_ufs[12]().

Handle disappearing dependencies in softdep_disk_io_initiation().

Reviewed by: mckusick

19 years agoMilestone: enable SMP by default.
marcel [Mon, 5 Sep 2005 21:36:28 +0000 (21:36 +0000)]
Milestone: enable SMP by default.

19 years agoo In pmap_remove_pte: always invalidate the page. Previously the page
marcel [Mon, 5 Sep 2005 21:32:02 +0000 (21:32 +0000)]
o  In pmap_remove_pte: always invalidate the page. Previously the page
   was not invalidated if the PTE was not actually being removed.  In
   an UP kernel this didn't cause problems, because the new mapping
   would preempt the old one. In an SMP kernel this could lead to the
   use of stale translations when processes move between CPUs at the
   "right" moment.  This fixes the last of the obvious SMP problems
   and it should be safe to enable SMP by default now.
o  In pmap_remove_pte: minor code refactoring to avoid duplication.
o  Test all PTE pointers against NULL. Don't use implicit boolean
   tests.

19 years agoImprove an error message.
jkoshy [Mon, 5 Sep 2005 18:31:09 +0000 (18:31 +0000)]
Improve an error message.

MFC after: 3 days

19 years agoPrint pointers with %p rather than casting them to long.
stefanf [Mon, 5 Sep 2005 17:57:19 +0000 (17:57 +0000)]
Print pointers with %p rather than casting them to long.

19 years agoReword nic driver MPSAFEness entries to be in line with earlier release notes.
brueffer [Mon, 5 Sep 2005 17:16:50 +0000 (17:16 +0000)]
Reword nic driver MPSAFEness entries to be in line with earlier release notes.

19 years agoRemove reference to el(4).
joel [Mon, 5 Sep 2005 17:09:59 +0000 (17:09 +0000)]
Remove reference to el(4).

Approved by: brueffer (mentor)

19 years agoFix panic when loading libiconv.ko on sparc64.
imura [Mon, 5 Sep 2005 17:03:40 +0000 (17:03 +0000)]
Fix panic when loading libiconv.ko on sparc64.
It seems that this issue only become obvious when compiled with -O2
on sparc64.

Since each struct iconv_converter_class has been initialized by
DEFINE_CLASS macro, not all members of struct iconv_converter_class
has been allocated on memory and cc_link member has not been
initialized, while iconv_register_converter() wanted to access it
with TAILQ.
Now we modify KICONV_CONVERTER macro and fix this bug.

Problem reported on: freebsd-sparc64
Pointed out by: yongari
Discussed with: yongari
Tested by: yongari
MFC after: 3 days

19 years agoRemove Giant mutex from polling(4) and use a separate poll_mtx(4)
glebius [Mon, 5 Sep 2005 16:02:11 +0000 (16:02 +0000)]
Remove Giant mutex from polling(4) and use a separate poll_mtx(4)
instead. Detailed changelist:

o Add flags field to struct pollrec, to indicate that
  are particular entry is being worked on.
o Define a macro PR_VALID() to check that a pollrec
  is valid and pollable.
o Mark ISRs as mpsafe.

o ether_poll()
  - Acquire poll_mtx while traversing pollrec array.
  - Skip pollrecs, that are being worked on.
  - Conditionally acquire Giant when entering handler.

o netisr_pollmore()
  - Conditionally assert Giant.
  - Acquire poll_mtx while working with statistics.

o netisr_poll()
  - Conditionally assert Giant.
  - Acquire poll_mtx while working with statistics
    and traversing pollrec array.

o ether_poll_register(), ether_poll_deregister()
  - Conditionally assert Giant.
  - Acquire poll_mtx while working with pollrec array.

o poll_idle()
  - Remove all strange manipulations with Giant.

In collaboration with: ru, pjd
In collaboration with: Oleg Bulyzhin <oleg rinet.ru>
In collaboration with: dima <_pppp mail.ru>

19 years agoIn accordance with my intentions announced (and not objected to)
dougb [Mon, 5 Sep 2005 13:42:22 +0000 (13:42 +0000)]
In accordance with my intentions announced (and not objected to)
on -arch, and RFC 4159 (http://www.rfc-editor.org/rfc/rfc4159.txt)
which officially deprecates all usage of IP6.INT, remove the
reference to that zone from the example named.conf file.

19 years agoAdd a regression test to test two variations on the same bug: joining a
rwatson [Mon, 5 Sep 2005 13:23:01 +0000 (13:23 +0000)]
Add a regression test to test two variations on the same bug: joining a
multicast group using a raw socket, then removing the interface on which
the group is found, and joining a multicast group using a udp socket,
then removing the interface on which the group is found.  An if_disc
interface is used as the interface on which to attach.

NB: A panic currently results from running this regression test, so do
so with caution.

PR: 77665
Reported by: Gavin Atkinson <gavin dot atkinson at ury dot york dot ac dot uk>
Reported by: Brooks Davis <brooks at FreeBSD dot org>

19 years agoTerminate metadata restore early only on failure, not success.
kientzle [Mon, 5 Sep 2005 10:23:55 +0000 (10:23 +0000)]
Terminate metadata restore early only on failure, not success.
In particular, this bug was preventing the restore of fflags.

19 years agoRemove all references to nonexistent FreeBSD Security Architecture
tjr [Mon, 5 Sep 2005 10:03:07 +0000 (10:03 +0000)]
Remove all references to nonexistent FreeBSD Security Architecture
document.

19 years agoRemove references to nonexistent "FreeBSD Security Architecture" document.
tjr [Mon, 5 Sep 2005 09:49:33 +0000 (09:49 +0000)]
Remove references to nonexistent "FreeBSD Security Architecture" document.

19 years ago- Add tests for hash and return and more tests for set -e.
stefanf [Mon, 5 Sep 2005 09:42:10 +0000 (09:42 +0000)]
- Add tests for hash and return and more tests for set -e.
- Simplify regress.sh, sort tests.

19 years agoAttempt to complete the userspace integration of POSIX.1e extended ACLs.
csjp [Mon, 5 Sep 2005 04:36:08 +0000 (04:36 +0000)]
Attempt to complete the userspace integration of POSIX.1e extended ACLs.
This includes adding support for ACLs into cp(1) and mv(1) userspace
utilities.

For mv(1), if _PC_ACL_EXTENDED is in effect for the source AND destination
operands, the destination file's ACLs shall reflect the source.

For cp(1), if _PC_ACL_EXTENDED is in effect for both source and destination
operands, and -p has been specified, the ACLs from the source shall be
preserved on the destination.

MFC after: 1 month

19 years agoRemove duplicate "at" from comment.
keramida [Sun, 4 Sep 2005 21:57:23 +0000 (21:57 +0000)]
Remove duplicate "at" from comment.

19 years agoSimplify and add PR 77067 which addresses the same bug.
stefanf [Sun, 4 Sep 2005 21:29:09 +0000 (21:29 +0000)]
Simplify and add PR 77067 which addresses the same bug.

19 years agoRemove a race condition that could result in processes being stuck
phk [Sun, 4 Sep 2005 19:14:19 +0000 (19:14 +0000)]
Remove a race condition that could result in processes being stuck
waiting for geom events to happen:

Instead of maintaining a count of outstanding events, simply look if
the queue is empty.  Make sure to not remove events from the queue
until they are executed in order to not open a new race.

Much work by: pjd
Tested by: kris
MT6: yes, should be.

19 years agoEliminate unnecessary TLB invalidations by pmap_enter(). Specifically,
alc [Sun, 4 Sep 2005 19:06:27 +0000 (19:06 +0000)]
Eliminate unnecessary TLB invalidations by pmap_enter().  Specifically,
eliminate TLB invalidations when permissions are relaxed, such as when a
read-only mapping is changed to a read/write mapping.  Additionally,
eliminate TLB invalidations when bits that are ignored by the hardware,
such as PG_W ("wired mapping"), are changed.

Reviewed by: tegge

19 years agoFix syntax error that crept in somehow.
stefanf [Sun, 4 Sep 2005 18:12:21 +0000 (18:12 +0000)]
Fix syntax error that crept in somehow.

19 years agoWhen padding with zero, do pad after prefixes rather than padding
delphij [Sun, 4 Sep 2005 18:03:45 +0000 (18:03 +0000)]
When padding with zero, do pad after prefixes rather than padding
before prefixes.

Use cases:
printf("%05d", -42);   -->   "00-42"   (should be "-0042")
printf("%#05x", 12);   -->   "000xc"   (should be "0x00c")

Submitted by: Oliver Fromme
PR: kern/85520
MFC After: 1 week

19 years agoclear lock on error in O_LIMIT case of install_state
sam [Sun, 4 Sep 2005 17:33:40 +0000 (17:33 +0000)]
clear lock on error in O_LIMIT case of install_state

Submitted by: Ted Unangst
MFC after: 3 days

19 years agoreclaim sbuf and clear lock on error in ifconf
sam [Sun, 4 Sep 2005 17:32:47 +0000 (17:32 +0000)]
reclaim sbuf and clear lock on error in ifconf

Submitted by: Ted Unangst
Reviewed by: rwatson
MFC after: 3 days

19 years agoAdd a couple of regression tests for /bin/sh.
stefanf [Sun, 4 Sep 2005 11:59:59 +0000 (11:59 +0000)]
Add a couple of regression tests for /bin/sh.

19 years agoWhen bge_stop() is called from bge_detach(), mii is already NULL, so check
pjd [Sun, 4 Sep 2005 06:35:59 +0000 (06:35 +0000)]
When bge_stop() is called from bge_detach(), mii is already NULL, so check
before trying to use it.
This fix allows to 'kldunload if_bge' without panicing.

Reviewed by: bz
MFC after: 3 days

19 years agode(4) is now properly busdma'ed.
obrien [Sun, 4 Sep 2005 05:37:55 +0000 (05:37 +0000)]
de(4) is now properly busdma'ed.

Reviewed by: jhb

19 years agoo s/vhpt_size/pmap_vhpt_log2size/g
marcel [Sat, 3 Sep 2005 23:53:50 +0000 (23:53 +0000)]
o  s/vhpt_size/pmap_vhpt_log2size/g
o  s/vhpt_base/pmap_vhpt_base/g
o  s/vhpt_bucket/pmap_vhpt_bucket/g
o  Declare the above in <machine/pmap.h>
o  Move the vm.stats.vhpt.* sysctls to machdep.vhpt.*
o  Create a tunable machdep.vhpt.log2size, with corresponding sysctl.
   The tunable allows the user to specify the VHPT size from the loader.
o  Don't keep track of the number of PTEs in the VHPT. Calculate the
   population when necessary by iterating the buckets and summing up
   the length of the buckets.
o  Don't perform the tpa instruction with a bucket lock held. The
   instruction can (theoretically) fault and locking is not needed.

19 years agoMore consistantly return the correct BAR size. Before, we'd only
imp [Sat, 3 Sep 2005 23:15:46 +0000 (23:15 +0000)]
More consistantly return the correct BAR size.  Before, we'd only
return the correct bar size if we encountered a 64-bit BAR that had
its resources already assigned.  If the resources weren't yet
assigned, we'd bogusly assume it was a 32-bit bar and return 1.

19 years agoUnbreak hpfs/ntfs/udf/ext2fs/reiserfs mounting.
ssouhlal [Sat, 3 Sep 2005 20:23:41 +0000 (20:23 +0000)]
Unbreak hpfs/ntfs/udf/ext2fs/reiserfs mounting.

Another pointyhat to: ssouhlal

19 years agoFix collision chain termination checks. The result of IA64_PHYS_TO_RR7
marcel [Sat, 3 Sep 2005 19:43:15 +0000 (19:43 +0000)]
Fix collision chain termination checks. The result of IA64_PHYS_TO_RR7
is never 0, so one cannot test for a NULL pointer after a physical
address is translated into a virtual pointer with said macro. Instead,
keep the physical address around and test it against 0. Note that
this obviously implies that a PTE can never be allocated at physical
address 0. This isn't exactly guaranteed, but hasn't been a problem
so far. We test the physical address against 0 for as long as the ia64
port exists...

19 years agoPass a value of type vm_prot_t to pmap_enter_quick() so that it determine
alc [Sat, 3 Sep 2005 18:20:20 +0000 (18:20 +0000)]
Pass a value of type vm_prot_t to pmap_enter_quick() so that it determine
whether the mapping should permit execute access.

19 years agoMoved descriptions of securelevels from init(7) to security(7).
garys [Sat, 3 Sep 2005 17:16:00 +0000 (17:16 +0000)]
Moved descriptions of securelevels from init(7) to security(7).

Files used both "securelevel" and either "secure level" or
"security level"; all are now "security level".

PR:             docs/84266
Submitted by:   garys
Approved by:    keramida
MFC after:      3 days

19 years agoDocument that `in word ...' is optional in the for command.
stefanf [Sat, 3 Sep 2005 16:06:04 +0000 (16:06 +0000)]
Document that `in word ...' is optional in the for command.

19 years agoTypo.
phk [Sat, 3 Sep 2005 11:03:10 +0000 (11:03 +0000)]
Typo.

19 years agoIf we ignore an unknown % sequence, we must stop interpreting the
phk [Sat, 3 Sep 2005 10:28:08 +0000 (10:28 +0000)]
If we ignore an unknown % sequence, we must stop interpreting the
remaining % arguments because the varargs are now out of sync and
there is a risk that we might for instance dereference an integer
in a %s argument.

Sponsored by: Napatech.com

19 years agoUpdate for OpenSSH 4.2p1.
des [Sat, 3 Sep 2005 07:10:33 +0000 (07:10 +0000)]
Update for OpenSSH 4.2p1.

19 years agoRegenerate
des [Sat, 3 Sep 2005 07:08:51 +0000 (07:08 +0000)]
Regenerate

19 years agoResolve conflicts.
des [Sat, 3 Sep 2005 07:04:25 +0000 (07:04 +0000)]
Resolve conflicts.

19 years agoThis commit was generated by cvs2svn to compensate for changes in r149749,
des [Sat, 3 Sep 2005 06:59:33 +0000 (06:59 +0000)]
This commit was generated by cvs2svn to compensate for changes in r149749,
which included commits to RCS files with non-trunk default branches.

19 years agoVendor import of OpenSSH 4.2p1.
des [Sat, 3 Sep 2005 06:59:33 +0000 (06:59 +0000)]
Vendor import of OpenSSH 4.2p1.

19 years agofine-tune.
des [Sat, 3 Sep 2005 06:42:11 +0000 (06:42 +0000)]
fine-tune.

19 years agoUnbreak the build.
ssouhlal [Sat, 3 Sep 2005 00:40:19 +0000 (00:40 +0000)]
Unbreak the build.

Pointyhat to: ssouhlal

19 years agoReturn 1 from the unalias builtin if _any_ removal fails, not just the last
stefanf [Fri, 2 Sep 2005 22:43:28 +0000 (22:43 +0000)]
Return 1 from the unalias builtin if _any_ removal fails, not just the last
one.

19 years agoRemove extra getenv() declaration.
stefanf [Fri, 2 Sep 2005 22:28:27 +0000 (22:28 +0000)]
Remove extra getenv() declaration.

19 years agoIn version 1.8 I botched findval()'s type, fix.
stefanf [Fri, 2 Sep 2005 21:51:18 +0000 (21:51 +0000)]
In version 1.8 I botched findval()'s type, fix.