Robert Watson [Sun, 10 Feb 2002 21:29:02 +0000 (21:29 +0000)]
Add a comment indicating that the vnode locking in this section of the
kernel linker code may be wrong: it fails to hold a lock across the
call to VOP_GETATTR(), and vn_rdwr() with IO_NODELOCKED.
Robert Watson [Sun, 10 Feb 2002 20:45:43 +0000 (20:45 +0000)]
Make sure to grab vnode lock on a vnode before calling VOP_GETATTR()
to perform an ownership test in revoke(). This is also required for
MAC hooks so that the vnode lock is held during a call to the MAC
framework. Release the lock before calling VOP_REVOKE().
Mark Murray [Sun, 10 Feb 2002 19:48:19 +0000 (19:48 +0000)]
Nice set of fixes to use SCRIPT instead of PROG, thus fixing up
a lot of nasty STRIP= problems. This has the added side effect
if neatening up some leaf makefiles very nicely.
Wilko Bulte [Sun, 10 Feb 2002 13:21:18 +0000 (13:21 +0000)]
Add some system code names. Explicitely list a few unsupported hardware
types that gave rise to emailed questions. Add quick note on Miata CPU
upgradeability.
KATO Takenori [Sun, 10 Feb 2002 11:23:14 +0000 (11:23 +0000)]
Cosmetic changes:
- Collected i486 identification codes in one place like
586 and 686.
- Merged two cases (0x470 and 0x490) for `Enhanced Am486DX4
Write-Back.'
- Replaced `unknown' into `Unknown'.
Robert Watson [Sun, 10 Feb 2002 06:13:14 +0000 (06:13 +0000)]
Teach getextattr to query the EA size and allocate appropriate sized
buffers before reading the memory. Arguably, the failure modes here
are poor, but we can now read >2k EAs. Also, update the copyrights
and licenses while I'm here.
Robert Watson [Sun, 10 Feb 2002 04:43:22 +0000 (04:43 +0000)]
Part I: Update extended attribute API and ABI:
o Modify the system call syntax for extattr_{get,set}_{fd,file}() so
as not to use the scatter gather API (which appeared not to be used
by any consumers, and be less portable), rather, accepts 'data'
and 'nbytes' in the style of other simple read/write interfaces.
This changes the API and ABI.
o Modify system call semantics so that extattr_get_{fd,file}() return
a size_t. When performing a read, the number of bytes read will
be returned, unless the data pointer is NULL, in which case the
number of bytes of data are returned. This changes the API only.
o Modify the VOP_GETEXTATTR() vnode operation to accept a *size_t
argument so as to return the size, if desirable. If set to NULL,
the size will not be returned.
o Update various filesystems (pseodofs, ufs) to DTRT.
These changes should make extended attributes more useful and more
portable. More commits to rebuild the system call files, as well
as update userland utilities to follow.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
Mark Peek [Sun, 10 Feb 2002 04:40:26 +0000 (04:40 +0000)]
- Add support for autodetection of *.euc?? and *.EUC locales.
- ja_JP.eucJP, ja_JP.EUC
- ko_KR.eucKR, ko_KR.EUC
- zn_CN.eucCN, zn_CN.EUC
- Add support for zh_TW.Big5
- Add ja_JP.Shift_JIS alias for ja_JP.SJIS
Warner Losh [Sun, 10 Feb 2002 03:34:44 +0000 (03:34 +0000)]
o Use bus_generic_setup_intr instead of bus_setup_intr.
o Call bus_generic_setup_intr and check its return value. Don't setup
func until we successfully get the interrupt from our parent.
o Add comments about some maybe questionable stuff so I can check later
to make sure that it really is that way.
Warner Losh [Sun, 10 Feb 2002 03:28:37 +0000 (03:28 +0000)]
o Use INTR_TYPE_AV (the highest possible) rather than INTR_TYPE_BIO
o Don't allow INTR_TYPE_FAST. Since we are sharing the interrupt between
CSC and the functions, they can't be FAST because fast interrupts can't
be shared.
o Add the same workaround for resume that we have in OLDCARD.
o Also, return the error from bus_generic_resume rather than ignoring it.
Robert Watson [Sun, 10 Feb 2002 01:34:04 +0000 (01:34 +0000)]
o No longer mount /proc by default on newly installed systems. Almost
all facilities that previously relied on /proc have been rewritten
to use ptrace(). procfs has presented a substantial security
hazard for years, with several user->root compromises in the last
few years. Procfs will continue to be available but will require
administrator intervention to use.
John Baldwin [Sat, 9 Feb 2002 21:16:54 +0000 (21:16 +0000)]
Fix MAKEDEV for RocketPort (rp(4)) cuaR* and ttyR* to work with the
updated driver. The newer driver in current outputs a version string
that contains a space, so we need to eat two words in between RocketPortX
and the number of ports on the board.
Daniel Eischen [Sat, 9 Feb 2002 19:58:41 +0000 (19:58 +0000)]
This has been sitting in my local tree long enough. Remove the use
of an alternate signal stack for handling signals. Let the kernel
send signals on the stack of the current thread and teach the threads
signal handler how to deliver signals to the current thread if it
needs to. Also, always store a threads context as a jmp_buf. Eventually
this will change to be a ucontext_t or mcontext_t.
Other small nits. Use struct pthread * instead of pthread_t in internal
library routines. The threads code wants struct pthread *, and pthread_t
doesn't necessarily have to be the same.
Daniel Eischen [Sat, 9 Feb 2002 19:48:55 +0000 (19:48 +0000)]
Silence a warning by initializing the return value. This wasn't
set in the case of a short write, and I think returning 0 for this
is what was intended.
John Baldwin [Fri, 8 Feb 2002 19:16:47 +0000 (19:16 +0000)]
Apparently during the KSE M2 commit bzero() on the i386 was changed so that
it's first parameter was volatile. Catch i486_bzero() and i586_bzero()'s
prototypes up to this to quiet warnings.
Ruslan Ermilov [Fri, 8 Feb 2002 13:42:58 +0000 (13:42 +0000)]
Now that cross-tools ld(1) has been fixed to look for dynamic
dependencies in the correct place, record the fact that -lssh
depends on -lcrypto and -lz.
Removed false dependencies on -lz (except ssh(1) and sshd(8)).
Removed false dependencies on -lcrypto and -lutil for scp(1).
Crist J. Clark [Fri, 8 Feb 2002 13:25:33 +0000 (13:25 +0000)]
peter points out that we probably should not mess with the sysctl(8)
values at all if they are not purposefully set. What if the
administrator messed with them in /etc/sysctl.conf? We don't want to
overwrite them.
If 'log_in_vain' is zero, do not force the issue. If it is non-zero,
set it.
Ruslan Ermilov [Fri, 8 Feb 2002 13:09:08 +0000 (13:09 +0000)]
FreeBSD 4.1 bootstrapping aid (setproctitle(3) is in -lutil).
This backs out (sort of) delta 1.18 to perl/miniperl/Makefile.
Update to the ld(1) comment by peter in this revision:
ld(1) built as part of the cross-tools stage of buildworld has
been fixed to look for dynamic dependencies in the right place,
${WORLDTMP}/usr/lib, effective binutils/ld/Makefile,v 1.20.
Peter Wemm [Fri, 8 Feb 2002 09:16:57 +0000 (09:16 +0000)]
Fix broken Giant locking protocol introduced in rev 1.114. You cannot
unlock Giant if it is not locked in the first place. This make the
nfstat(2) syscall (#278) a nice panic(2) implementation.
Peter Wemm [Fri, 8 Feb 2002 07:52:51 +0000 (07:52 +0000)]
GRR. Unbreak WARNS=2.
cc1: warnings being treated as errors
usr.bin/finger/lprint.c: In function `lprint':
usr.bin/finger/lprint.c:191: warning: precision is not type int (arg 2)
*** Error code 1
Warner Losh [Fri, 8 Feb 2002 07:31:02 +0000 (07:31 +0000)]
Remove bogus range restrictions that attempted to restrict the range
of I/O in 1.5. It looks like I got it right only for some of the
cases. Instead, allow ISA addresses as a special case. Most PCI
bridges decode this range. I need to investigate PCI bridges better
to know if this is always true or not, but for now assume that it is
since that seems to be the most common case.
# We need to allocate addresses better for the pccard stuff...
Robert Watson [Fri, 8 Feb 2002 05:58:41 +0000 (05:58 +0000)]
o Merge various recent fixes from the MAC branch relating to extattrctl():
- Fix null-pointer dereference introduced when snapshotting
was introduced. This occured because unlike the previous code,
vn_start_write() doesn't always return a non-NULL mp, as
filesystems may not support the VOP_GETWRITEMOUNT() call. For
now, rely on two pointers, so that vn_finished_write() works
properly.
- Fix locking problems on exit, introduced at some past time,
some when snapshots came in, where a vnode might not be
unlocked before being vrele'd in various error situations.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
Peter Wemm [Fri, 8 Feb 2002 03:55:37 +0000 (03:55 +0000)]
Fix world breakage (compiling libstdc++):
sys/time.h:137: integer constant out of range
sys/time.h:137: warning: decimal integer constant is so large that it is unsigned
sys/time.h:153: integer constant out of range
sys/time.h:153: warning: decimal integer constant is so large that it is unsigned
Peter Wemm [Thu, 7 Feb 2002 23:05:40 +0000 (23:05 +0000)]
Fix a whole bunch of long lines introduced by previous commit by using
td = FIRST_THREAD_IN_PROC(p) once, after we have identified the process
that we are operating on.
Kirk McKusick [Thu, 7 Feb 2002 22:13:56 +0000 (22:13 +0000)]
Occationally background fsck would cause a spurious ``freeing free
inode'' panic. This change corrects that problem by setting the
fs_active flag when the inode map changes to notify the snapshot
code that the cylinder group must be rescanned.
Remove the inline assembly optimized versins of bintime_*() functions,
they have no measurable effect and they don't belong in an MI header
even if they did.
Julian Elischer [Thu, 7 Feb 2002 20:58:47 +0000 (20:58 +0000)]
Pre-KSE/M3 commit.
this is a low-functionality change that changes the kernel to access the main
thread of a process via the linked list of threads rather than
assuming that it is embedded in the process. It IS still embeded there
but remove all teh code that assumes that in preparation for the next commit
which will actually move it out.
Julian Elischer [Thu, 7 Feb 2002 20:28:25 +0000 (20:28 +0000)]
pre-emptively fix a KSE/M3 problem.
Make a slight change so that libkvm reaches the main thread via the
linked list, rather than assuming it is in the proc structure. Both
conditions are true in -current but only the first will be true in
the KSE M3 world.