Robert Watson [Sat, 27 Oct 2001 05:45:42 +0000 (05:45 +0000)]
o Improve style(9) compliance following KSE modifications. In particular,
strip the space from '( struct thread *...', wrap long lines.
o Remove an unneeded comment on the topic of no lock being required as
part of the NDINIT() in __acl_get_file(), as it's really not required
there.
Robert Watson [Sat, 27 Oct 2001 05:39:17 +0000 (05:39 +0000)]
o Althought this is not specified in POSIX.1e, the UFS ACL implementation
coerces the deletion of a default ACL on a directory when no default
ACL EA is present to success. Because the UFS EA implementation doesn't
disinguish the EA failure modes "that EA name has not been
administratively enabled" from "that EA name has no defined data",
there's a potential conflict in error return values. Normally, the
lack of administratively configured EA support is coerced to
EOPNOTSUPP to indicate that ACLs are not available; in this case,
it is possible to get a successful return, even if ACLs are not
available because EA support for them has not been enabled.
Expand the comment in ufs_setacl() to identify this case.
Robert Watson [Sat, 27 Oct 2001 05:19:14 +0000 (05:19 +0000)]
o Clarify a comment about the locking condition of the vnode upon exit
from ufs_extattr_enable_with_open().
o Print auto-start notifications if (bootverbose). This was previously
commented out since it didn't know how to check for bootverbose.
o Drop in comments throughout indicating where ENOENT should be replaced
with ENOATTR once that is available.
Robert Watson [Sat, 27 Oct 2001 05:05:39 +0000 (05:05 +0000)]
o The comment about ordering the destruction of the lock and the removal of
the flag indicating that the structure was initialized didn't need
an XXX, since it didn't need fixing.
Robert Watson [Sat, 27 Oct 2001 04:58:28 +0000 (04:58 +0000)]
Since namespace support was added to the UFS extended attribute
implementation to replace single-character namespace prefixes, '$' is no
longer an invalid attribute name, and the namespace is relevant to
validity determination.
o Remove '$' case from ufs_extattr_valid_attrname()
o Add attrnamespace argument to ufs_extattr_valid_attrname(), and
fill out appropriately.
Currently no decisions are made based on the namespace argument, but
may be in the future.
Peter Wemm [Sat, 27 Oct 2001 02:13:41 +0000 (02:13 +0000)]
Explicitly use int32_t for on-disk records for pw_change and pw_expire,
since that is what we use now and this insulates us from any time_t
tweaks here. We can define a record format that uses 64 bit times if/when
we need to.
Luigi Rizzo [Sat, 27 Oct 2001 00:59:17 +0000 (00:59 +0000)]
Enable round-robin arbitration between transmit and receive unit
in the 21143, instead of giving priority to the receive unit.
This gives a 10-15% performance improvement in the forwarding rate
under heavy load.
Support the "install.debug" and "reinstall.debug" targets for kernel modules.
Small tweaks to kldxref may be necessary to avoid the surprising (but harm-
less) behaviour of 'kldload foo' loading foo.ko.debug instead of foo.ko if
it is present in the kernel directory.
Approved by: a week of silence on -arch
MFC after: 2 weeks
Bill Fenner [Fri, 26 Oct 2001 23:10:08 +0000 (23:10 +0000)]
Force the length of the sockaddr to be correct for AF_INET and AF_INET6
in bind() and connect(). Linux doesn't care if the length of the
sockaddr matches its address family; FreeBSD does. This fixes the
known issues with the resolver in linux_base-7.
Peter Wemm [Fri, 26 Oct 2001 21:19:22 +0000 (21:19 +0000)]
Make libc_r check the kern.usrstack sysctl instead of using internal
kernel #defines to figure out where the stack is located. This stops
libc_r from exploding when the kernel is compiled with a different
KVM size. IMHO this is all kinda bogus, it would be better to just
check %esp and work from that.
Matthew Dillon [Fri, 26 Oct 2001 20:48:04 +0000 (20:48 +0000)]
Add mtx_lock_giant() and mtx_unlock_giant() wrappers for sysctl management
of Giant during the Giant unwinding phase, and start work on instrumenting
Giant for the file and proc mutexes.
These wrappers allow developers to turn on and off Giant around various
subsystems. DEVELOPERS SHOULD NEVER TURN OFF GIANT AROUND A SUBSYSTEM JUST
BECAUSE THE SYSCTL EXISTS! General developers should only considering
turning on Giant for a subsystem whos default is off (to help track down
bugs). Only developers working on particular subsystems who know what
they are doing should consider turning off Giant.
These wrappers will greatly improve our ability to unwind Giant and test
the kernel on a (mostly) subsystem by subsystem basis. They allow Giant
unwinding developers (GUDs) to emplace appropriate subsystem and structural
mutexes in the main tree and then request that the larger community test
the work by turning off Giant around the subsystem(s), without the larger
community having to mess around with patches. These wrappers also allow
GUDs to boot into a (more likely to be) working system in the midst of
their unwinding work and to test that work under more controlled
circumstances.
There is a master sysctl, kern.giant.all, which defaults to 0 (off). If
turned on it overrides *ALL* other kern.giant sysctls and forces Giant to
be turned on for all wrapped subsystems. If turned off then Giant around
individual subsystems are controlled by various other kern.giant.XXX sysctls.
Code which overlaps multiple subsystems must have all related subsystem Giant
sysctls turned off in order to run without Giant.
Bruce A. Mah [Fri, 26 Oct 2001 20:26:59 +0000 (20:26 +0000)]
If an article in the release documentation has a table of contents,
make it go down to 3 section levels (the default depth for FreeBSD
articles is 1 level, but few articles have tables-of-contents
enabled).
John Baldwin [Fri, 26 Oct 2001 18:46:48 +0000 (18:46 +0000)]
- Change the taskqueue locking to protect the necessary parts of a task
while it is on a queue with the queue lock and remove the per-task locks.
- Remove TASK_DESTROY now that it is no longer needed.
- Go back to inlining TASK_INIT now that it is short again.
Mitsuru IWASAKI [Fri, 26 Oct 2001 17:43:05 +0000 (17:43 +0000)]
Add APM compatibility feature to ACPI.
This emulates APM device node interface APIs (mainly ioctl) and
provides APM services for the applications. The goal is to support
most of APM applications without any changes.
Implemented ioctls in this commit are:
- APMIO_SUSPEND (mapped ACPI S3 as default but changable by sysctl)
- APMIO_STANDBY (mapped ACPI S1 as default but changable by sysctl)
- APMIO_GETINFO and APMIO_GETINFO_OLD
- APMIO_GETPWSTATUS
With above, many APM applications which get batteries, ac-line
info. and transition the system into suspend/standby mode (such as
wmapm, xbatt) should work with ACPI enabled kernel (if ACPI works well :-)
Ruslan Ermilov [Fri, 26 Oct 2001 17:22:12 +0000 (17:22 +0000)]
From ChangeLog:
: 2001-10-19 Ruslan Ermilov <ru@FreeBSD.org>
:
: * tmac/doc.tmac (doc-flag-recursion): Protect arguments against
: being handled as end-of-sentence characters,
This fixes ".Fl \&?". Previously, it produced an additional whitespace.
There were no precedents in FreeBSD manpages. That's why it was
Matt Jacob [Fri, 26 Oct 2001 16:13:47 +0000 (16:13 +0000)]
Detach the prom console when platform.cons_init is called. This seems
to avoid most of the double character kernel goop we've been having by having
both a prom console && a normal console.
Was not able to test with graphics head. Hope this doesn't break anything.
John Baldwin [Fri, 26 Oct 2001 08:12:54 +0000 (08:12 +0000)]
Add a per-thread ucred reference for syscalls and synchronous traps from
userland. The per thread ucred reference is immutable and thus needs no
locks to be read. However, until all the proc locking associated with
writes to p_ucred are completed, it is still not safe to use the per-thread
reference.
John Baldwin [Fri, 26 Oct 2001 06:32:21 +0000 (06:32 +0000)]
Add locking to taskqueues. There is one mutex per task, one mutex per
queue, and a mutex to protect the global list of taskqueues. The only
visible change is that a TASK_DESTROY() macro has been added to mirror
the TASK_INIT() macro to destroy a task before it is free'd.
John Baldwin [Fri, 26 Oct 2001 06:09:01 +0000 (06:09 +0000)]
Use msleep() to avoid lost wakeup's instead of doing an ineffective
splhigh() before the mtx_unlock and tsleep(). The splhigh() was probably
correct in the original code using simplelocks but is not correct in
5.0-current.
Matthew Dillon [Fri, 26 Oct 2001 00:08:05 +0000 (00:08 +0000)]
Implement kern.maxvnodes. adjusting kern.maxvnodes now actually has a
real effect.
Optimize vfs_msync(). Avoid having to continually drop and re-obtain
mutexes when scanning the vnode list. Improves looping case by 500%.
Optimize ffs_sync(). Avoid having to continually drop and re-obtain
mutexes when scanning the vnode list. This makes a couple of assumptions,
which I believe are ok, in regards to vnode stability when the mount list
mutex is held. Improves looping case by 500%.
(more optimization work is needed on top of these fixes)
Ian Dowse [Thu, 25 Oct 2001 22:55:59 +0000 (22:55 +0000)]
Default to not performing ufs_dirhash's extensive directory-block
sanity check after every directory modification. This check can be
re-enabled at any time by setting the sysctl "vfs.ufs.dirhash_docheck"
to 1.
This group of sanity tests was there to ensure that any UFS_DIRHASH
bugs could be caught by a panic before a potentially corrupted
directory block would be written to disk. It has served its main
purpose now, so disable it in the interest of performance.
Matthew Dillon [Thu, 25 Oct 2001 22:49:48 +0000 (22:49 +0000)]
In cluster_rbuild(), 'size' had better match buf->b_bcount and buf->b_bufsize
or the cluster will not be properly merged. Dup the code from
cluster_wbuild() and add some printf()s to see if bad cases are present.
Robert Watson [Thu, 25 Oct 2001 20:45:47 +0000 (20:45 +0000)]
o Modify format of /etc/fbtab to accept glob matching patterns for
target devices, not just individual devices and directories. This
permits activities such as:
ttyv0 0600 /dev/dsp*
Whereas previously that was not supported. This change is
backwards-compatible, except where device names included globbing
characters, which is not the case for any devices listed in MAKEDEV.
Submitted by: Maxime Henrion <mux@qualys.com>
MFC after: 3 weeks
Ian Dowse [Thu, 25 Oct 2001 19:07:56 +0000 (19:07 +0000)]
Now that nfsm_reply() does not usually set 'error' to 0, we need
to do it explicitly in nfsrv_noop so that the reply gets sent back
to the client. This fixes the generation of a selection of RPC
error replies (RPC_PROGMISMATCH, RPC_PROGUNAVAIL, RPC_PROCUNAVAIL
etc.) that are used by some clients to detect support for optional
protocols and features.
Reviewed by: peter
Reported by: Thomas Quinot <quinot@inf.enst.fr>
PR: kern/31479
John Baldwin [Thu, 25 Oct 2001 16:52:43 +0000 (16:52 +0000)]
Use %ecx instead of %ebx for the scratch register while updating %dr7 since
%ecx isn't a call safe register and thus we don't have to save and restore
it.
John Baldwin [Thu, 25 Oct 2001 16:50:16 +0000 (16:50 +0000)]
- Fix typo in comment from previous revision.
- Fix a bug in the LDT changes where the wrong argument was passed to
set_user_ldt() from cpu_switch(). The bug was passing a pointer to the
ldt, but set_user_ldt() takes a pointer to the process' mdproc structure.
Maxim Sobolev [Thu, 25 Oct 2001 15:51:50 +0000 (15:51 +0000)]
Don't put an extra space after password prompts, because it violates POLA,
makes FreeBSD inconsistent with previous releases and "other unices" as well
as with some internal password-asking services (e.g. ftp) within the same
release.
Bruce Evans [Thu, 25 Oct 2001 11:46:54 +0000 (11:46 +0000)]
Fixed bugs in rev.1.973. Actually enable PCI_ENABLE_IO_MODES. It
defeats the point of LINT to comment out positive options.
Fixed style bugs in rev.1.973:
- disordering of PCI options list.
- missing space after "options".
- line longer than 80 characters.
- bogus quoting of "BIOS".
Bruce Evans [Thu, 25 Oct 2001 11:20:15 +0000 (11:20 +0000)]
Fixed some English errors, mainly ones not fixed in the previous commit.
The previous commit message should have said this too (the only BSDism
fixed was punctuation for non-sentences). Neither these changes nor
the ones in the previous commit were exactly as submitted by me.
Doug Rabson [Thu, 25 Oct 2001 08:50:14 +0000 (08:50 +0000)]
Add the two sections used for PLT entries to the text and sdata sections
respectively. This makes IPLTLSB relocations work properly (these are
generated for weak symbols, particularly for _longjmp).
Ruslan Ermilov [Thu, 25 Oct 2001 07:28:55 +0000 (07:28 +0000)]
Fix cross-building further.
Introduce ${TARGET} defaulting to ${MACHINE} which should be set to
whatever your target ${MACHINE} is, and use that with world-related
stages. That is, to build pc98 on alpha, one now needs to set both
TARGET_ARCH=i386 and TARGET=pc98.
The scope of ${TARGET} is limited to Makefile.inc1 and cross-tools.
In particular, this change was tested to fix:
1. Cross building of "alpha" on i386. The breakage was introduced
by rev. 1.10 to sbin/i386/Makefile (missing <machine/cronyx.h>).
2. Descending into machine-specific subdirs for a different arch.
Previously, sbin/i386 and usr.sbin/boot0cfg were descended into
when cross-building "alpha" or pc98 on i386.
3. Fixes pc98 cross-building which was horribly broken, caused by
not setting MACHINE correctly (most ${MACHINE} == pc98 checking
Makefiles put -DPC98 to CFLAGS).
Jonathan Lemon [Thu, 25 Oct 2001 05:32:01 +0000 (05:32 +0000)]
Add support for loadable microcode which implements interrupt coalescing
and packet bundling. Make the microcode settings controllable via sysctl
and loader tunables.
Submitted by: Marko Zec <zec@tel.fer.hr>
(with some munging and dynamic sysctl support by me)
Also extend the workaround for Dynamic Standby mode to later '559 chips,
not just the ICH2 variants.