Commit Graph

65960 Commits

Author SHA1 Message Date
dillon
8a2a967bbc Finally fix the VM bug where a file whos EOF occurs in the middle of a page
would sometimes prevent a dirty page from being cleaned, even when synced,
resulting in the dirty page being re-flushed to disk every 30-60 seconds or
so, forever.  The problem is that when the filesystem flushes a page to
its backing file it typically does not clear dirty bits representing areas
of the page that are beyond the file EOF.  If the file is also mmap()'d and
a fault is taken, vm_fault (properly, is required to) set the vm_page_t->dirty
bits to VM_PAGE_BITS_ALL.  This combination could leave us with an uncleanable,
unfreeable page.

The solution is to have the vnode_pager detect the edge case and manually
clear the dirty bits representing areas beyond the file EOF.  The filesystem
does the rest and the page comes up clean after the write completes.

MFC after:	3 days
2001-10-12 18:17:34 +00:00
mjacob
7ed22e2aa0 Traverse the list of network interfaces rather than use if_index- if_index is
not guaranteed to be dense with respect to the actual list of interfaces.
2001-10-12 18:04:44 +00:00
mike
2abcf6c606 o Treat a buffer as a non-NUL terminated string, because the whois
server may not return a new line character on the final line.
o Remove the whois.networksolutions.com fallback code, which is no
  longer needed.
o Instead of determining a hostname by terminating it when we see
  whitespace, only allow hostname characters and terminate the string
  when it's not such a character.
o Add a small optimization in a for loop.

PR:		30968
Reviewed by:	-audit
MFC after:	4 days
2001-10-12 17:39:36 +00:00
bmah
56d6381b90 Start to move to an alphabetical (rather than semi-chronological)
ordering on release notes items, in an attempt to bring some order
to a huge mess.  This commit covers the top-level "Userland"
section.

No other content, markup, or whitespace changes.
2001-10-12 17:29:22 +00:00
jdp
b5831c2530 Correct the input/output/clobber specifications for the cpuid
instruction.  Stefan Keller <dres@earth.serd.org> noticed that CPU
identification was broken when compiled with -O2, and tracked it
down to the asm statement, which was storing values into memory
without specifying that memory was modified.  He submitted a patch
which added "memory" as a clobber, but I refined it further to
arrive at this version.

MFC after:	3 days
2001-10-12 16:49:28 +00:00
tmm
369a58f711 Add inthand_add() and inthand_remove() for use by the MD bus code and
some glue code.
2001-10-12 16:06:41 +00:00
tmm
05cbaa6ba0 Fix some warnings. 2001-10-12 16:00:30 +00:00
tmm
d2f70b2e81 Save the floating point context to the right pcb in cpu_fork(), and add
an empty stub for is_physical_memory().
2001-10-12 15:58:48 +00:00
tmm
f6584937ae Make the NTOHL, NTOHS, HTONL and HTONS macros (which are nops on
sparc64) empty to avoid compiler warnings.
2001-10-12 15:55:45 +00:00
tmm
8ab8d21a7b Implement DELAY() using the %tick register. 2001-10-12 15:51:19 +00:00
tmm
05eb54c2c7 Add pmap_kenter_flags(), which is used by MD bus code that will be
committed soon, add a stub form pmap_kenter_temporary(), and implement
pmap_extract() and pmap_kextract().
2001-10-12 15:49:51 +00:00
bde
b2d7aa6d5d Fixed corruption of the vendor $Id$ to $FreeBSD$. Put $FreeBSD$ in
__FBSDID() and ifdefed away all vendor id stuff.

This file should never have left the vendor branch; it is now identical
with the vendor's version except for id fiddling.
2001-10-12 15:05:00 +00:00
yar
bc2c059580 Don't let a user name in ftpd's proctitle
be mistaken for a status message.

PR:		misc/25217
MFC after:	7 days
2001-10-12 13:16:34 +00:00
yar
090772b098 Be consistent about indent at least within one block of code. 2001-10-12 13:06:40 +00:00
dfr
66ae82dae0 Pass the correct trapframe pointer to fork_exit - sp is trapframe-16. 2001-10-12 11:50:09 +00:00
dfr
46f68d627c If the faulting instruction is a cmpxchg, then isr.w and isr.r will both
be set. We need to check isr.w before isr.r so that we can correctly
handle a cmpxchg to a copy-on-write page.

This fixes the hang-after-fork problem for dynamically linked programs.
2001-10-12 11:49:11 +00:00
phk
da0ea4bc4f Set ulptusein = 0 so that the machine doesn't hang solid after a
printjob.

There is probably a better fix, but this at least makes USB printing
working again.
2001-10-12 11:05:58 +00:00
tg
0689cbd99f Minor cleanup, no functional changes:
- Add/change some comments,
- remove superfluous `if (1||x)' and re-indent,
- fix initialization of floppyinfo[] to get rid of warning.
2001-10-12 10:31:00 +00:00
yar
1ad20a3541 Fix a small style slip: Files in /dev are not
devices theirselves, but device nodes.
2001-10-12 10:09:36 +00:00
roam
64e1aedd27 Remove the panic when trying to register a sysctl with an oid too high.
This stops panics on unloading modules which define their own sysctl sets.

However, this also removes the protection against somebody actually
defining a static sysctl with an oid in the range of the dynamic ones,
which would break badly if there is already a dynamic sysctl with
the requested oid.

Apparently, the algorithm for removing sysctl sets needs a bit more work.
For the present, the panic I introduced only leads to Bad Things (tm).

Submitted by:	many users of -current :(
Pointy hat to:	roam (myself) for not testing rev. 1.112 enough.
2001-10-12 09:16:36 +00:00
jkh
a05a408d14 DTRT in the restart case 2001-10-12 07:36:34 +00:00
mjacob
fa0b537235 roll out last change 2001-10-12 02:30:53 +00:00
des
591edbb022 Write a real man page. 2001-10-12 02:06:34 +00:00
jhb
32df8d94cc - Catch up to the new ucred API.
- Add proc locking to the jail() syscall.  This mostly involved shuffling
  a few things around so that blockable things like malloc and copyin
  were performed before acquiring the lock and checking the existing
  ucred and then updating the ucred as one "atomic" change under the proc
  lock.
2001-10-11 23:39:43 +00:00
jhb
4806d88677 Change the kernel's ucred API as follows:
- crhold() returns a reference to the ucred whose refcount it bumps.
- crcopy() now simply copies the credentials from one credential to
  another and has no return value.
- a new crshared() primitive is added which returns true if a ucred's
  refcount is > 1 and false (0) otherwise.
2001-10-11 23:38:17 +00:00
jhb
9f68054d87 Whitespace fixes. 2001-10-11 22:49:27 +00:00
jhb
76f1acef67 Rework some code to be a bit simpler by inverting a few tests and using
else clauses instead of goto's.
2001-10-11 22:48:37 +00:00
mjacob
0c1765c061 Fix declaration disagreement. 2001-10-11 22:02:14 +00:00
bmah
8d9861c926 New release note: isp(4) Qlogic 2300 support. For some reason this didn't
get committed along with its accompanying hardware note entry.
2001-10-11 21:48:35 +00:00
mjacob
a6fcfa2afc Remove the hiding of some prototype declarations. 2001-10-11 21:48:02 +00:00
mjacob
61923fecdf remove unused variable declaration 2001-10-11 21:47:27 +00:00
obrien
8abab35780 We use proc_rwmem (with the correct number of args) rather than procfs_domem
in the new world order or procfs.

Submitted by:	des
2001-10-11 21:17:31 +00:00
jlemon
350a02848e Fix the ``WARNING: Driver mistake: repeat make_dev'', caused by using
the wrong index variable within a loop.  I have no idea how this managed
to work on my test box.

Spotted by: fenner
2001-10-11 18:39:05 +00:00
mjacob
f53afa40b9 Note that PROCFS is mandatory at this time- until we fix the
ptrace code to not call things directly from procfs we can't
very well have procfs be a module.
2001-10-11 18:36:41 +00:00
jhb
4889b400c9 Oops, these already included sys/lock.h, they just did so after
sys/mutex.h which is too late.
2001-10-11 18:25:57 +00:00
jhb
03b0c440cb Add missing includes of sys/ktr.h. 2001-10-11 17:53:43 +00:00
jhb
4c62ba7c58 Add missing includes of sys/lock.h. 2001-10-11 17:52:20 +00:00
mike
50430063cd Note that strncmp() will not compare characters after a NUL character.
Add a missing word.  Bump document date.

Inspired by:	IEEE Std 1003.1-200x (Draft 7)
MFC after:	3 days
2001-10-11 17:02:44 +00:00
mike
988a5d4019 Clarify that strnstr() will stop searching after in encounters a NUL
character.  Bump document date.  Add a missing comma.
2001-10-11 15:49:06 +00:00
bmah
a911e647c8 Move two misplaced release notes to the correct location. 2001-10-11 15:38:48 +00:00
bmah
ff9ff5eebf MFCs noted: amdpm(4), new newfs(8) cylinder group defaults. 2001-10-11 15:37:26 +00:00
ru
39c4ae6616 - Bump document date for eaccess(2) addition.
- Mention ``eaccess'' in the NAME section.
- Use intro(2) terminology.
- Markup fixes.

Reviewed by:	rwatson
2001-10-11 15:27:53 +00:00
ru
b0d7725e6d Fixed bugs from revision 1.27. Specifically:
- Restore the ability to look up network names in the networks(5)
  database by passing getnetbyaddr(3) shifted network numbers,
  but without duplicating the old bug that was fixed in 1.27 (we
  now only shift netnums with standard netmasks).  For example:

Before:

$ netstat -r
[...]
127.0.1/24         localhost          UGSc        0        0    lo0
127.0.2/24         localhost          UGSc        0        0    lo0

After:

$ netstat -r
[...]
subnet1/24         localhost          UGSc        0        0    lo0
subnet2/24         localhost          UGSc        0        0    lo0

- Only try to lookup with the forged netmask if the mask was not
  explicitly specified, like it was before 1.27.  For example:

Before:

$ netstat -r
net-44.ampr.org/25 localhost          UGSc        0        0    lo0
net-44.ampr.org/25 localhost          UGSc        0        0    lo0

After:

44.108.2/25        localhost          UGSc        0        0    lo0
44.108.2.128/25    localhost          UGSc        0        0    lo0

- Make sure to null-terminate the resulting string.

MFC after:	1 week
2001-10-11 14:30:42 +00:00
dfr
18cd2d2cea Fix typo in comment. 2001-10-11 13:47:20 +00:00
dfr
e18643f7d6 Implement MCOUNT hook for assembler. Probably doesn't work right. 2001-10-11 13:35:31 +00:00
dfr
0d5aa1a03b Implement mcount trampoline (untested). 2001-10-11 13:31:55 +00:00
dfr
f075c7df77 Change to track the new calling convention for execve. This version only
needs one line of assembler to initialise gp.
2001-10-11 12:33:05 +00:00
dfr
f16813dcd5 * Change the calling convention for execve so that it conforms to normal
C calling conventions. This allows crt1.c to be written nearly without
  any inline assembler.
* Initialise cpu_model[] so that the hw.model sysctl works properly.
2001-10-11 12:31:50 +00:00
dd
9b35147067 Add missing space. 2001-10-11 12:18:14 +00:00
yar
448605be4c Add missing section number to a cross-reference to login(1).
MFC after:	3 days
2001-10-11 11:29:37 +00:00