Commit Graph

28264 Commits

Author SHA1 Message Date
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
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
mjacob
fa0b537235 roll out last change 2001-10-12 02:30:53 +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
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
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
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
cjc
aaf46285fe Documentation nitpick. IPFIREWALL_VERBOSE logging really has nothing
to do with "dropped packets." Any packets matching rules with the
'log' directive are logged regardless of the action, drop, pass,
divert, pipe, etc.

MFC after:	1 day
2001-10-11 11:21:18 +00:00
peter
6c75d7f59d Update comments regarding the transient nature of k_kproc and u_md
in struct user.
2001-10-11 08:15:16 +00:00
mr
188e03f8f9 Fix SysV Semaphore Handling.
Updated by peter following KSE and Giant pushdown.
I've running with this patch for two week with no ill side effects.

PR:		kern/12014: Fix SysV Semaphore handling
Submitted by:	Peter Jeremy <peter.jeremy@alcatel.com.au>
2001-10-11 08:15:14 +00:00
jlemon
532fbd6c3c Move device nodes into a /dev/net/ directory, to avoid conflict with
existing devices (e.g.: tunX).  This may need a little more thought.

Create a /dev/netX alias for devices.  net0 is reserved.

Allow wiring of net aliases in /boot/device.hints of the form:
	hint.net.1.dev="lo0"
	hint.net.12.ether="00:a0:c9:c9:9d:63"
2001-10-11 05:54:39 +00:00
imp
8c6454312c takashi shibagaki-san posted a similar patch to nomads. It seems that
more laptops work w/o the shutdown code than with it on reboot.  So
let's disable it for a while.
2001-10-11 05:41:27 +00:00
jlemon
db88fbbac0 Set if_type and if_addrlen before calling if_attach(), so the values are
available for the routine to use.
2001-10-11 05:37:59 +00:00
imp
d53f722ed3 Use the NetBSD init code for the TOPIC parts as a more complete basis
for initializing the parts.  Since I don't have any of these parts in
any of my working laptops, I'm committing this to allow people to test
it.  Will MFC when I receive reports of it working.
2001-10-11 05:37:32 +00:00
ps
db0d5cd641 Make MAXTSIZ, DFLDSIZ, MAXDSIZ, DFLSSIZ, MAXSSIZ, SGROWSIZ loader
tunable.

Reviewed by:	peter
MFC after:	2 weeks
2001-10-10 23:06:54 +00:00
jhb
63fe581848 Add a temporary hack that will go away with the ucred API update to bzero
the duplicated mutex before initializing it to avoid triggering the check
for init'ing an already initialized mutex.
2001-10-10 20:45:40 +00:00
jhb
a410ffa472 Malloc mutexes pre-zero'd as random garbage (including 0xdeadcode) my
trigget the check to make sure we don't initalize a mutex twice.
2001-10-10 20:43:50 +00:00
dfr
f41d25be64 Move setregs() out from under the PROC_LOCK so that it can use functions
list suword() which may trap.
2001-10-10 20:04:57 +00:00
archie
f60a3082c8 Fix bug that cheated hook names out of the last 2 bytes.
MFC after:      3 days
2001-10-10 19:58:11 +00:00
archie
11a08756a6 Let "raw" mean IPPROTO_RAW instead of IPPROTO_IP.
Noticed by:	jdp
MFC after:	3 days
2001-10-10 19:51:13 +00:00
orion
6923b3865d use pcm_getbuffersize() 2001-10-10 17:56:35 +00:00
bde
339786b751 Added used includes. <sys/_lock.h> is a prerequisite for <sys/_mutex.h>,
and <sys/queue.h> is a prerequisite for both <sys/_lock.h> and
<sys_mutex.h>.
2001-10-10 10:26:07 +00:00
dfr
adca9bb8ab Add a definition for the ia64's special PLT_RESERVE entry in the _DYNAMIC
section.
2001-10-10 09:00:27 +00:00
ache
34a23c20e2 Bump FreeBSD_version for strcasestr() 2001-10-10 02:38:37 +00:00
rwatson
f51eaee62f - Combine kern.ps_showallprocs and kern.ipc.showallsockets into
a single kern.security.seeotheruids_permitted, describes as:
  "Unprivileged processes may see subjects/objects with different real uid"
  NOTE: kern.ps_showallprocs exists in -STABLE, and therefore there is
  an API change.  kern.ipc.showallsockets does not.
- Check kern.security.seeotheruids_permitted in cr_cansee().
- Replace visibility calls to socheckuid() with cr_cansee() (retain
  the change to socheckuid() in ipfw, where it is used for rule-matching).
- Remove prison_unpcb() and make use of cr_cansee() against the UNIX
  domain socket credential instead of comparing root vnodes for the
  UDS and the process.  This allows multiple jails to share the same
  chroot() and not see each others UNIX domain sockets.
- Remove unused socheckproc().

Now that cr_cansee() is used universally for socket visibility, a variety
of policies are more consistently enforced, including uid-based
restrictions and jail-based restrictions.  This also better-supports
the introduction of additional MAC models.

Reviewed by:	ps, billf
Obtained from:	TrustedBSD Project
2001-10-09 21:40:30 +00:00
iedowse
478926021c Remove the Xresume* labels from the i386 interrupt handlers; the
code in ipl.s and icu_ipl.s that used them was removed when the
interrupt thread system was committed. Debuggers also knew about
Xresume* because these labels hide the real names of the interrupt
handlers (Xintr*), and debuggers need to special-case interrupt
handlers to get the interrupt frame.

Both gdb and ddb will now use the Xintr* and Xfastintr* symbols to
detect interrupt frames. Fast interrupt frames were never identified
correctly before, so this fixes the problem of the running stack
frame getting lost in a ddb or gdb trace generated from a fast
interrupt - e.g. when debugging a simple infinite loop in the kernel
using a serial console, the frame containing the loop would never
appear in a gdb or ddb trace.

Reviewed by:	jhb, bde
2001-10-09 19:54:52 +00:00
dfr
ffdeb5e0d7 Clarify a comment.
Requested by: jhb
2001-10-09 19:50:29 +00:00
scottl
c2316fb3b7 Update to using the pcm_getbuffersize() method.
Fix an off-by-one error in the saving of the dsp memory.
Up the play channels to 2.

MFC after:	3 days
2001-10-09 19:46:09 +00:00
jhb
0ff4076a7e proces -> process in a comment. 2001-10-09 17:25:30 +00:00
rwatson
5157966d63 o Recent addition of (p1==p2) exception in p_candebug() permitted
processes to attach debugging to themselves even though the
  global kern_unprivileged_procdebug_permitted policy might disallow
  this.
o Move the kern_unprivileged_procdebug_permitted check above the
  (p1==p2) check.

Reviewed by:	des
2001-10-09 16:56:29 +00:00
jhb
daacd5aa55 Use crhold() instead of crdup() since we aren't modifying the cred but
just need to ensure it remains immutable.
2001-10-09 16:48:57 +00:00
jhb
192f49ea8b Use crhold() instead of crdup(). The md(4) driver doesn't modify the ucred
that it uses, so it merely needs to bump its refcount to make it immutable
rather than obtain its own copy.
2001-10-09 16:37:51 +00:00
robert
04f13118b9 Remove an unneeded variable declaration and statement.
Approved by:	jake
2001-10-09 16:06:28 +00:00
nyan
238cc5d611 Added Logitec LHA-301 pnp id. 2001-10-09 15:30:19 +00:00
dfr
14cba3ae53 Don't include isavar.h - we don't need it. 2001-10-09 10:24:37 +00:00
dfr
cbcbd1952c Add a minimalist kernel config which can run inside SKI. 2001-10-09 10:14:06 +00:00
obrien
beb72547e6 Bump for switch to XFree86 4.x. 2001-10-09 07:36:36 +00:00