Commit Graph

95974 Commits

Author SHA1 Message Date
Daniel Eischen
dc17710e7c Libpthread uses the convention that all of its (non-weak) symbols
begin with underscores and provide weak definitions without
underscores.  Make the pthread spinlock conform to this convention.
2003-11-04 19:56:12 +00:00
Daniel Eischen
ee574ccc3e Add the ability to reinitialize a mutex (internally, not a userland
API).

Reviewed by:	davidxu
2003-11-04 19:53:32 +00:00
Daniel Eischen
358702366c Externalize malloc's spinlock so that a thread library can take
it around an application's fork() call.  Our new thread libraries
(libthr, libpthread) can now have threads running while another
thread calls fork().  In this case, it is possible for malloc
to be left in an inconsistent state in the child.  Our thread
libraries, libpthread in particular, need to use malloc internally
after a fork (in the child).

Reviewed by:	davidxu
2003-11-04 19:49:56 +00:00
Ceri Davies
2a2cfa95ff Correct a typo; two permutations of ACPI are plenty already. 2003-11-04 19:42:55 +00:00
Simon L. B. Nielsen
c9753c5870 mdoc(7) cleanup:
- Add reference to atapicam(4).
- Fix hard sentence breaks.
- Fix spelling of .Nm macro.
- Remove a bit of EOL whitespace.
2003-11-04 19:35:27 +00:00
John Baldwin
7542a92afa Tweak the version string output for ioapic devices. 2003-11-04 19:22:20 +00:00
John Baldwin
3de744b5d8 Use a wrapper around the driver interrupt handler. The wrapper accepts the
isa_device pointer as its argument and uses that to call the driver's
interrupt handler passing the unit number as its argument.  This should
fix COMPAT_OLDISA devices with a unit number of 0.

Reviewed by:	peter
Reported by:	bde
2003-11-04 19:04:54 +00:00
Hajimu UMEMOTO
0f9ade718d - cleanup SP refcnt issue.
- share policy-on-socket for listening socket.
- don't copy policy-on-socket at all.  secpolicy no longer contain
  spidx, which saves a lot of memory.
- deep-copy pcb policy if it is an ipsec policy.  assign ID field to
  all SPD entries.  make it possible for racoon to grab SPD entry on
  pcb.
- fixed the order of searching SA table for packets.
- fixed to get a security association header.  a mode is always needed
  to compare them.
- fixed that the incorrect time was set to
  sadb_comb_{hard|soft}_usetime.
- disallow port spec for tunnel mode policy (as we don't reassemble).
- an user can define a policy-id.
- clear enc/auth key before freeing.
- fixed that the kernel crashed when key_spdacquire() was called
  because key_spdacquire() had been implemented imcopletely.
- preparation for 64bit sequence number.
- maintain ordered list of SA, based on SA id.
- cleanup secasvar management; refcnt is key.c responsibility;
  alloc/free is keydb.c responsibility.
- cleanup, avoid double-loop.
- use hash for spi-based lookup.
- mark persistent SP "persistent".
  XXX in theory refcnt should do the right thing, however, we have
  "spdflush" which would touch all SPs.  another solution would be to
  de-register persistent SPs from sptree.
- u_short -> u_int16_t
- reduce kernel stack usage by auto variable secasindex.
- clarify function name confusion.  ipsec_*_policy ->
  ipsec_*_pcbpolicy.
- avoid variable name confusion.
  (struct inpcbpolicy *)pcb_sp, spp (struct secpolicy **), sp (struct
  secpolicy *)
- count number of ipsec encapsulations on ipsec4_output, so that we
  can tell ip_output() how to handle the packet further.
- When the value of the ul_proto is ICMP or ICMPV6, the port field in
  "src" of the spidx specifies ICMP type, and the port field in "dst"
  of the spidx specifies ICMP code.
- avoid from applying IPsec transport mode to the packets when the
  kernel forwards the packets.

Tested by:	nork
Obtained from:	KAME
2003-11-04 16:02:05 +00:00
David Xu
7430623f55 Be sure to restore foreground group to parent su before parent su
exits, otherwise shell will be confused and does not set foreground
group correctly for next su command. This sounds like a bug in sh.
2003-11-04 14:51:34 +00:00
Ian Dowse
155ea0634c In mapdirs(), do not use the `dp' inode pointer after searchdir()
has been called, since it points to a shared inode buffer that may
be overwritten. The two cases where `dp' was used incorrectly appear
to have been overlooked when "nodump" inheritance was first added
in revision 1.12.

This is reported to correct propagation of the nodump flag on
directories that are larger than one block in size.

PR:		bin/58912
Submitted by:	Volker Paepcke <vpaepcke@incore.de>
MFC after:	1 week
2003-11-04 14:20:14 +00:00
Hajimu UMEMOTO
4835e2c745 use nd6log().
Obtained from:	KAME
2003-11-04 14:09:37 +00:00
Hajimu UMEMOTO
4a201dfc18 - update comments to refrect recent BSDs.
- nuke unused macro PSUEDO_SET().
- I believe our if_xname stuff is nothing strange against other BSDs.

Obtained from:	KAME
2003-11-04 14:08:31 +00:00
Yoshihiro Takahashi
dc5f261df8 Fix LINT 2003-11-04 14:02:13 +00:00
Yoshihiro Takahashi
6628d2596a 'options APIC_IO' is replaced by 'device apic'. 2003-11-04 13:52:09 +00:00
Yoshihiro Takahashi
87780dc517 'options APIC_IO' is replaced by 'device apic'. 2003-11-04 13:31:44 +00:00
Søren Schmidt
688e92fc6d Start of new ATA man page that reflects the curretn state of art.
mdoc handling possibly fragile :)
2003-11-04 13:16:07 +00:00
Yoshihiro Takahashi
6469c6629c MFi386: revision 1.206 2003-11-04 13:15:12 +00:00
Yoshihiro Takahashi
18cf8bfb1c MFi386: revision 1.580 2003-11-04 13:14:14 +00:00
Yoshihiro Takahashi
0ca1bf3907 Fix to support pc98. 2003-11-04 13:13:04 +00:00
Yoshihiro Takahashi
1a16033398 MFi386: revision 1.456 2003-11-04 13:11:58 +00:00
Dag-Erling Smørgrav
f54cda1467 Reimplement in-place editing in a slightly less disgusting manner. Also,
make an effort to preserve the ownership and mode of the file we are
editing.

Sponsored by:	Registrar AS
2003-11-04 13:09:16 +00:00
Yoshihiro Takahashi
95755cc99b Split pc98 support into pc98/pc98/nmi.c. 2003-11-04 13:01:41 +00:00
Ian Dowse
ec3f495c76 Add missing prototype for cread(). 2003-11-04 12:27:18 +00:00
Yoshihiro Takahashi
83f3d4e5e5 MFi386: revision 1.200 2003-11-04 12:19:54 +00:00
Dag-Erling Smørgrav
9cde9a2e85 Whitespace cleanup 2003-11-04 12:16:47 +00:00
Dag-Erling Smørgrav
e6478125c8 ANSIfy 2003-11-04 12:15:20 +00:00
Dag-Erling Smørgrav
9df25dda8c Correct style bugs in the in-place editing code. 2003-11-04 12:07:09 +00:00
Tim J. Robbins
a27a4b3690 Pass mbrtowc() and wcrtomb() NULL instead of a pointer to a freshly zeroed
mbstate_t object that they ignore. The zeroing is fairly expensive, and it
will never be necessary in these functions; when we support state-dependent
encodings, we will pass in a pointer to the file's mbstate_t object, and
only zero it at the time the file gets opened.
2003-11-04 11:05:55 +00:00
Peter Pentchev
92797e8470 Fix a typo: 'in cloud' -> 'in a cloud'.
PR:		58909
Submitted by:	Chris Pepper <pepper@rockefeller.edu>
MFC after:	1 week
2003-11-04 09:21:59 +00:00
Tim J. Robbins
e90363f285 Add a reference to the new utrace(2) manual page. 2003-11-04 09:15:42 +00:00
Kirk McKusick
b932dd9b28 Get rid of DIAGNOSTIC that gives false positives on slow CPUs. 2003-11-04 08:03:11 +00:00
Jeff Roberson
9bacd788a1 - Add initial support for pinning and binding. 2003-11-04 07:45:41 +00:00
Kirk McKusick
524ee1107f Create a .snap directory mode 770 group operator in the root of
a new filesystem. Dump and fsck will create snapshots in this
directory rather than in the root for two reasons:

1) For terabyte-sized filesystems, the snapshot may require many
   minutes to build. Although the filesystem will not be suspended
   during most of the snapshot build, the snapshot file itself is
   locked during the entire snapshot build period. Thus, if it is
   accessed during the period that it is being built, the process
   trying to access it will block holding its containing directory
   locked. If the snapshot is in the root, the root will lock and
   the system will come to a halt until the snapshot finishes. By
   putting the snapshot in a subdirectory, it is out of the likely
   path of any process traversing through the root and hence much
   less likely to cause a lock race to the root.

2) The dump program is usually run by a non-root user running with
   operator group privilege. Such a user is typically not permitted
   to create files in the root of a filesystem. By having a directory
   in group operator with group write access available, such a user
   will be able to create a snapshot there. Having the dump program
   create its snapshot in a subdirectory below the root will benefit
   from point (1) as well.

Sponsored by:   DARPA & NAI Labs.
2003-11-04 07:34:32 +00:00
Jeff Roberson
09c01e4542 - Clean up comments to reflect the KSE pushout.
- Add the following functions to the api: sched_bind(), sched_unbind(),
   sched_pin(), and sched_unpin().  Bind/unbind are used for traditional
   cpu binding.  Pin and unpin are meant to allow the kernel to hold a thread
   on a particular cpu so that it may cache per-cpu data without fear of
   being migrated.
2003-11-04 07:18:18 +00:00
Kirk McKusick
d62e006473 Check that the user running mksnap_ffs has permission to create and
remove a snapshot file from the directory in which they have requested
to have it made. If they do not have write permission in the directory
or the directory is sticky and not owned by the user, then they
will not be able to remove the snapshot when they are done with it.
2003-11-04 07:04:01 +00:00
Marcel Moolenaar
199c91ab79 Update avail_ssize for rstacks after growing them. 2003-11-04 06:48:58 +00:00
Brian Feldman
afdc68c42f Add a "-f" flag for asf(8) which performs a search to find the each module
no matter where in the directory structure it may be.  Use this and the "-k"
flag in the generated gdbinit files so that the "getsyms" function in gdb
requires no user intervention to run and will find every module if they're
in the kernel build's module directory.  This is still quite useful for
cases where gdb knows that the path for some modules is /boot/kernel and
others are in the object directory for /usr/src/sys/$ARCH/compile/kernel.

Approved by:	grog
2003-11-04 06:38:37 +00:00
Warner Losh
a93efa3c97 Use %#jx for both args.
Non-use of %# mocked by: bde
2003-11-04 06:30:59 +00:00
Kirk McKusick
15a93fcc31 Allow the bufdaemon and update daemon processes to skip the
waitrunningbufspace() calls so that they are always able to
proceed and clean up buffer space.

Submitted by:	Brian Fundakowski Feldman <green@freebsd.org>
2003-11-04 06:30:00 +00:00
Brian Feldman
fe1e903532 Remove a reference to part of the pcap API not yet merged. 2003-11-04 06:16:55 +00:00
Brian Feldman
3267cc18e1 * Modify libpcap to work a bit better with our 802.11 code. This means
tcpdump -y ieee802_11 will work in the basic senses, including the
  code compilation for filters (where you may specify "link[]" to refer
  to parts of the 802.11 header, as well as treat it like a normal
  Ethernet header).  Previously, it was just too far off to do anything
  useful for us.
* While I'm here, fix some compile problems that will result from lex
  and yacc namespace polution when linking with -lpcap.  The namespace
  is now "pcapyy*" instead of "yy*", and it tests fine with world and
  some external applications that may or may not use "yy*".
2003-11-04 06:12:21 +00:00
Marcel Moolenaar
a9eccd0273 o Save a copy of the GPT entries for which there's a chunk with an
index referencing it. We need to know the original type and name
   so that we know what to put in the table when we reconstruct it.
o  Clear the table entries before we rebuild it to avoid that we
   end up with stale data.
o  Sequentially populate the table entries from the chunks. For the
   chunks that have an index (now referencing the saved copy) we
   use the saved type and name. This way we can handle unknown types
   better. In all cases we update the start and end LBAs.
2003-11-04 03:49:01 +00:00
Warner Losh
fcedf425bd o Add sysctl to allow ignoring checksum of eeprom.
o Fix minor type problems
o Fix minor problem with a couple debug printfs.
o Default to a sane media type when none is reported.
o Minor style changes

The PR complains this will fix the IBM 300GL cards.

Submitted by: Max Gotlib
PR: 11462
2003-11-04 02:59:57 +00:00
Warner Losh
0cbc7cc255 ppbus_if.c is necessary if you are loading submodules. 2003-11-04 02:55:03 +00:00
Marcel Moolenaar
16918a3363 o Don't tell that there's such a thing as a C suffix for specifying
a partition size on ia64. It's not true.
o  Ask for a mountpoint for EFI partitions as well and check that it
   isn't "/".
o  On ia64 we may need to add EFI partitions. Make sure we pass the
   right arguments to Create_Chunk_DWIM() in that case.
2003-11-04 02:04:36 +00:00
Sam Leffler
3465702f13 disable MPSAFE network drivers; we aren't ready yet` 2003-11-04 02:01:42 +00:00
Olivier Houchard
7922cdc855 I believe kbyanc@ really meant this in rev 1.58.
Use zpfind() to see if the process became a zombie if pfind() doesn't find it
and if the caller wants to know about process death, so that the caller knows
the process died even if it happened before the kevent was actually registered.

MFC after:	1 week
2003-11-04 01:41:47 +00:00
Warner Losh
fce33fc5eb Module for cs driver 2003-11-04 01:36:35 +00:00
Olivier Houchard
f44004690c Do not attempt to report proc event if NOTE_EXIT has already been received.
This fixes a race condition (specifically with signal events) that could
lead to the kn being re-inserted into the list after it has been destroyed,
which is not something we want to happen.

PR:		kern/58258
2003-11-04 01:14:58 +00:00
Peter Wemm
93c3f67fe7 Make this compile with PAE. 2003-11-04 01:07:04 +00:00