rwatson [Sun, 28 Mar 2004 23:12:19 +0000 (23:12 +0000)]
Invert the logic of NET_LOCK_GIANT(), and remove the one reference to it.
Previously, Giant would be grabbed at entry to the IP local delivery code
when debug.mpsafenet was set to true, as that implied Giant wouldn't be
grabbed in the driver path. Now, we will use this primitive to
conditionally grab Giant in the event the entire network stack isn't
running MPSAFE (debug.mpsafenet == 0).
bms [Sun, 28 Mar 2004 21:43:27 +0000 (21:43 +0000)]
Use the BSD madvise() syscall implementation for Linux binary emulation,
instead of treating it as an unimplemented syscall. This appears to make
StarOffice 7.0 Linux binaries work according to submitter; also tested
with nvidia driver by submitter.
mlaier [Sun, 28 Mar 2004 20:04:12 +0000 (20:04 +0000)]
Commit two fixes from OpenBSD's stable branch:
- Fix binat for incoming connections when a netblock (not just a single
address) is used for source in the binat rule. closes PR 3535, reported by
Karl O.Pinc. ok henning@, cedric@
- Fix a problem related to empty anchor rulesets, which could cause a kernel
panic.
phk [Sun, 28 Mar 2004 19:39:08 +0000 (19:39 +0000)]
Tell fdisk(8) about our geometry.
Strictly speaking this is unnecessary, but it allows nanobsd to work
on systems from before the -x and -y arguments to mdconfig(8) worked
for vnode backing.
Submitted by: "Oivind H. Danielsen" <oivind.danielsen@kopek.net>
marcel [Sun, 28 Mar 2004 18:01:15 +0000 (18:01 +0000)]
Add a simple tool that prints out a register offset table to map
from the gdb(1) register number to offsets within struct reg and
struct fpreg. The tool is useful only on selected platforms. On
ia64 the registers are all over the place to simplify handling of
them in various situations, but which makes creating or maintaining
such an offset table error prone to do by hand.
Since remote kernel debugging operates on the same register numbers,
it would be a natural choice to use an identical offset table in the
kernel. However, since the kernel does not operate on struct reg nor
struct fpreg in the remote gdb(1) case, such would not make sense.
Whether we want to use this tool to create offsets for use in the
kernel or duplicate the knowledge of which register number maps to
what register is something that will become clear soon.
Note: in order to build cross debuggers, one cannot use target
headers and/or target definitions. That's why offsets need to be
hardcoded in the first place. Unpleasant, but necessary.
mtm [Sun, 28 Mar 2004 14:05:28 +0000 (14:05 +0000)]
Remove the garbage collector thread. All resources are freed
in-line. If the exiting thread cannot release a resource, then
the next thread to exit will release it.
kan [Sun, 28 Mar 2004 05:55:27 +0000 (05:55 +0000)]
Reset callout if in nfs_timeout and rpcclnt_timeout functions. Timer
are supposed to continue firing as long as there is work to do, not
stop after the first invocation.
This is damage control after a patch that has been committed prematurely.
bde [Sun, 28 Mar 2004 04:17:36 +0000 (04:17 +0000)]
Fixed s style bug in previous commit (tab lossage). Fixed some nearby
style bugs (more tab lossage, unclear description of TDF_USTATCLOCK,
and English usage errors).
gad [Sun, 28 Mar 2004 03:00:56 +0000 (03:00 +0000)]
If <x> is a process id that does not exist, then just print the header
(if any) and exit, thus matching the behavior on -stable and other OS's.
My earlier attempt to fix this (v1.65) only seemed to work because of a
lucky random value in nentries (which was not being initialized back
when I tested that earlier patch).
gad [Sat, 27 Mar 2004 22:14:42 +0000 (22:14 +0000)]
If a non-existent user is given as part of `-U userlist', treat it as
a fatal error instead of a minor warning. It is possible that a few
users are used to the previous behavior, but I'm claiming it was a bug.
gad [Sat, 27 Mar 2004 21:56:49 +0000 (21:56 +0000)]
Change the #if-ish logic which is used to add the `-f' option when `ps'
is compiled with LAZY_PS, so that there is only one PS_ARGS string to
modify when changing the option-list. Also get `-f' to show up in the
usage() statement when compiled with LAZY_PS.
pjd [Sat, 27 Mar 2004 21:05:46 +0000 (21:05 +0000)]
Reduce 'td' argument to 'cred' (struct ucred) argument in those functions:
- in_pcbbind(),
- in_pcbbind_setup(),
- in_pcbconnect(),
- in_pcbconnect_setup(),
- in6_pcbbind(),
- in6_pcbconnect(),
- in6_pcbsetport().
"It should simplify/clarify things a great deal." --rwatson
alc [Sat, 27 Mar 2004 19:50:23 +0000 (19:50 +0000)]
Revise the direct or optimized case to use uiomove_fromphys() by the reader
instead of ephemeral mappings using pmap_qenter() by the writer. The
writer is still, however, responsible for wiring the pages, just not
mapping them. Consequently, the allocation of KVA for the direct case is
unnecessary. Remove it and the sysctls limiting it, i.e.,
kern.ipc.maxpipekvawired and kern.ipc.amountpipekvawired. The number
of temporarily wired pages is still, however, limited by
kern.ipc.maxpipekva.
Note: On platforms lacking a direct virtual-to-physical mapping,
uiomove_fromphys() uses sf_bufs to cache ephemeral mappings. Thus,
the number of available sf_bufs can influence the performance of pipes
on platforms such i386. Surprisingly, I saw the greatest gain from this
change on such a machine: lmbench's pipe bandwidth result increased from
~1050MB/s to ~1850MB/s on my 2.4GHz, 400MHz FSB P4 Xeon.
gad [Sat, 27 Mar 2004 18:22:17 +0000 (18:22 +0000)]
Support more POSIX/SUSv3 options:
- Change `-p' to allow a list of process IDs, and `-t' to allow a list
of terminal names, instead of only a single value for each.
- Add the `-A' option of SUSv3, which is exactly the same as `-ax'.
- Add the `-G gidlist' (group id).
- Allow any of these "selector options" to be specified multiple times,
and have `ps' keep adding to a given list -- instead of replacing the
previously-specified values.
- Fix interactions between selector-options, so that: "If any are
specified, ... ps shall select the processes represented by the
inclusive OR of all the selection-criteria options." (from SUSv3)
- Add a `-X' option, which is the reverse of the `-x' option.
- various minor improvements in parsing and error handling.
This does not get us to match POSIX/SUSv3, but it gets us closer. The
`-g pgidlist', `-R ruserlist' and `-s sidlist' options mentioned in
freebsd-standards are still under debate, so they skipped for now.
It should be true that this introduces no user-visible incompatible
changes, except to support "new stuff" that was not supported before.
marcel [Sat, 27 Mar 2004 18:21:24 +0000 (18:21 +0000)]
Change the type of the various CPU masks to cpumask_t. Note that as
long as there are still explicit uses of int, whether in types or
in function names (such as atomic_set_int() in sched_ule.c), we can
not change cpumask_t to be anything other than u_int. See also the
commit log for sys/sys/types.h, revision 1.84.
marcel [Sat, 27 Mar 2004 17:44:25 +0000 (17:44 +0000)]
MFi386: correctly calculate the top-of-stack when a kthread is created
with a larger kernel stack. Remove inclusion of opt_kstack_pages.h now
that it's unused.
mtm [Sat, 27 Mar 2004 15:05:28 +0000 (15:05 +0000)]
o Since we're not using signals for thread synchronization anymore,
sigprocmask no longer needs to be wrapped.
o raise(3) is applied to the calling thread in a threaded program.
o In the sigaction wrapper reference the correct structure.
o Don't treat SIGTHR especially anymore (infact it won't exist in
a little while).
dougb [Sat, 27 Mar 2004 09:26:22 +0000 (09:26 +0000)]
A few small cleanups:
1. Add the shutdown keyword so that the script is run at shutdown time,
and the mixer* files are saved.
2. Twiddle whitespace.
3. Remove an unecessary function, and therefore collapse one variable.
pjd [Sat, 27 Mar 2004 08:39:28 +0000 (08:39 +0000)]
- Add a description for vfs.usermount sysctl.
- Add the vfs_equalopts() function for mount options comparsion.
Now it looks much more clear.
- Style fixed.
tjr [Sat, 27 Mar 2004 08:14:15 +0000 (08:14 +0000)]
Add UTF-8 versions of all the currently supported system locales. Most of
the hard work was done by Hye-Shik Chang in the misc/utf8locale port; I made
a few minor adjustments and merged the makefiles.
gad [Sat, 27 Mar 2004 06:49:57 +0000 (06:49 +0000)]
bde also tells me that he is confident that P_SYSTEM will not work
any better on 4.x than it does on 5.2. If that's true then there
is no point to the __FreeBSD_version check that I had added.
simokawa [Fri, 26 Mar 2004 23:17:10 +0000 (23:17 +0000)]
MFp4: FireWire
* all
- s/__FUNCTION__/__func__/.
Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
- Compatibility for RELENG_4 and DragonFly.
* firewire
- Timestamp just before queuing.
- Retry bus probe if it fails.
- Use device_printf() for debug message.
- Invalidiate CROM while update.
- Don't process minimum/invalid CROM.
* sbp
- Add ORB_SHORTAGE flag.
- Add sbp.tags tunable.
- Revive doorbell support. It's not enabled by default.
pjd [Fri, 26 Mar 2004 21:12:14 +0000 (21:12 +0000)]
We probably shouldn't allow users to mount file systems with MNT_SUIDDIR.
There should be not shell access when SUIDDIR is compiled in, but
better be sure.
gad [Fri, 26 Mar 2004 17:51:49 +0000 (17:51 +0000)]
Switch to checking P_KTHREAD instead of P_SYSTEM when deciding what
"system processes" to always ignore. Based on my testing with `-D',
I am pretty sure this is what we want for 5.x-current. If my thinking
is wrong, this also makes it easier to switch to a different check.
mtm [Fri, 26 Mar 2004 14:47:54 +0000 (14:47 +0000)]
o The mutex locking functions aren't normally cancellation points. But,
we still have to DTRT when an asynchronously cancellable thread is
cancelled while waiting for a mutex.
o While dequeueing a waiting mutex don't skip a thread if it has
a cancel pending. Only skip it if it is also async cancellable.
mtm [Fri, 26 Mar 2004 14:45:35 +0000 (14:45 +0000)]
o Initialize a local variable before referencing it. This was not
the cause of any bugs because it is *always* indirectly set
in the for...loop, but better to be explicit about it.
o Check the magic number of the passed in thread only after it has
been found in the active thread list. Otherwise, if the check is done
at the very beginning we may end up pointing to garbage if the
thread was once a valid thread, but has now been destroyed.
ru [Fri, 26 Mar 2004 08:54:27 +0000 (08:54 +0000)]
Avoid the manpage layering violation and low-level implementation
details of libkvm, and just tell what the getbootfile(3) function
will return, by using the text from netstat(1) and dmesg(8).
ru [Fri, 26 Mar 2004 08:29:38 +0000 (08:29 +0000)]
- Remove references to /dev/kmem -- ps(1) utilizes the
sysctl(3) interface in kvm(3).
- Document the correct default when no -N is specified.
- Remove stale reference to /var/db/kvm_kernel.db.
- Remove stale reference to /var/run/dev.db.
ru [Fri, 26 Mar 2004 08:05:39 +0000 (08:05 +0000)]
Document that kvm_open(3) also accepts "/dev/null" as a special
"corefile" argument, to access the running system via sysctl(3)
if possible, thus not requring special setgid privileges.
rwatson [Fri, 26 Mar 2004 03:26:15 +0000 (03:26 +0000)]
Correct the definition of the multilabel flag: it enables multilabel
MAC support on the file system, if supported, which causes MAC to treat
each object as having its own label, rather than using a single label
for all objects on the file system. This doesn't have to be used in
combination with the tunefs/newfs flags -- it's an alternative.
gad [Fri, 26 Mar 2004 00:36:27 +0000 (00:36 +0000)]
Add a cast to get this to compile with WARNS=5 on sparc64. This is
needed because off_t == __int64_t, while size_t == __uint64_t. This
also compiles with WARNS=5 on amd64, but I haven't tested the other
platforms yet.
gad [Thu, 25 Mar 2004 23:19:16 +0000 (23:19 +0000)]
Add `-M' and `-N' options to `pkill' and `pgrep', similar to
what are supported in `ps':
-M Extract values associated with the name list from the
specified core instead of the default /dev/kmem.
-N Extract the name list from the specified system instead
of the default /kernel.
Written by: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
Obtained from: the sysutils/pkill port
imp [Thu, 25 Mar 2004 21:58:55 +0000 (21:58 +0000)]
Add support for a new variant of the prism3 that has appaered in the
wild. This one is marketed by D-Link model DWL-650, but appears to be
a ISL3710P-10 under the hood.