Commit graph

1463 commits

Author SHA1 Message Date
Dag-Erling Smørgrav a08d68de5b Eliminate the prefix parameter to linux_emul_find(), which was always
linux_emul_path anyway.  Linux_emul_find() has interesting bugs in its
prefix handling (which luckily are not currently exploitable); this
commit is preliminary to an attempt at cleaning it up.

Approved by:	marcel
2001-10-27 11:15:19 +00:00
Matthew Dillon 8d5c8e9f04 minor commenting based on syscall environment 2001-10-26 20:35:52 +00:00
Matt Jacob 831039f850 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.

Reviewed by:	silence on alpha
2001-10-26 16:13:47 +00:00
John Baldwin 8e2e767b1f 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.

Tested on:	x86 (SMP), alpha, sparc64
2001-10-26 08:12:54 +00:00
Jonathan Lemon 553b79aa63 cn_tab no longer exists, use cnadd() to add a console device. Note that
this may result in duplicate console output in some cases.
2001-10-24 18:30:05 +00:00
Jonathan Lemon b792b54c89 Remove call to cninit_finish(). 2001-10-24 17:42:01 +00:00
Mike Barcroft 3a72286480 Remove funky right justification.
Pointed out by:	bde
2001-10-23 00:42:15 +00:00
Dag-Erling Smørgrav 7c62990641 Move procfs_* from procfs_machdep.c into sys_process.c, and rename them to
proc_* in the process; procfs_machdep.c is no longer needed.

Run-tested on i386, build-tested on Alpha, untested on other platforms.
2001-10-21 23:57:24 +00:00
Dag-Erling Smørgrav 1f04261973 [partially forced commit due to pilot error in earlier commit attempt]
{set,fill}_{,fp,db}regs() fixup:

 - Add dummy {set,fill}_dbregs() on architectures that don't have them.

 - KSEfy the powerpc versions (struct proc -> struct thread).

 - Some architectures had the prototypes in md_var.h, some in reg.h, and
   some in both; for consistency, move them to reg.h on all platforms.

These functions aren't really MD (the implementation is MD, but the interface
is MI), so they should move to an MI header, but I haven't figured out which
one yet.

Run-tested on i386, build-tested on Alpha, untested on other platforms.
2001-10-21 22:16:48 +00:00
Dag-Erling Smørgrav ef394d81ad {set,fill}_{,fp,db}regs() fixup:
- Add dummy {set,fill}_dbregs() on architectures that don't have them.

 - KSEfy the powerpc versions (struct proc -> struct thread).

 - Some architectures had the prototypes in md_var.h, some in reg.h, and
   some in both; for consistency, move them to reg.h on all platforms.

These functions aren't really MD (the implementation is MD, but the interface
is MI), so they should move to an MI header, but I haven't figured out which
{set,fill}_{,fp,db}regs() fixup:

 - Add dummy {set,fill}_dbregs() on architectures that don't have them.

 - KSEfy the powerpc versions (struct proc -> struct thread).

 - Some architectures had the prototypes in md_var.h, some in reg.h, and
   some in both; for consistency, move them to reg.h on all platforms.

These functions aren't really MD (the implementation is MD, but the interface
is MI), so they should move to an MI header, but I haven't figured out which
one yet.

Run-tested on i386, build-tested on Alpha, untested on other platforms.
2001-10-21 22:14:00 +00:00
Andrew Gallatin e47b20bee2 - splhigh()/splx() -> critical_enter()/critical_exit()
- fix KV macro in t2_pci.c to include the sable_lynx_base variable
so that the T2 CSRs can be found on lynxes.   Current should be
bootable on lynxes now.
2001-10-20 21:05:14 +00:00
Matt Jacob 8c7c272c5a Remove wx. 2001-10-20 18:50:31 +00:00
Andrew Gallatin dd79258102 apparently EV5 2x00s have their t2 CSRs where I'd expect to find
them on a  2100A

Thanks to Tyler Willingham <ze_willow@yahoo.com> for letting me
test this on his AS2000
2001-10-20 01:27:23 +00:00
David E. O'Brien 9f9bd82e15 Try two on the preprocessing logic.
Reviewed by:	ru
2001-10-19 20:01:01 +00:00
John Baldwin e37d2a8c82 Remove unneeded sys/mutex.h includes. 2001-10-19 19:23:32 +00:00
John Baldwin d6e19ad10e Move sys/mutex.h include after sys/lock.h to ensure we use the proper
versions of the mutex operations.
2001-10-19 19:22:04 +00:00
David E. O'Brien 4b16cf4f8a Blah, fix braino where ru had to remind me of proper preprocessor syntax.
Bad fingers, no cookie.
2001-10-19 19:17:11 +00:00
Marcel Moolenaar 5983000903 After removing the bogus differences, any real incompatibilities
have been merged into /sys/compat/linux/linux_ioctl.h. This file
is now unused.
2001-10-19 08:20:15 +00:00
David E. O'Brien e3ddd70789 My attempts at minimizing the number of #def's got me in trouble. 2001-10-18 16:07:21 +00:00
David E. O'Brien 4a3391b5a1 Add support for "__gnuc_va_list". Some overly "smart" libraries assume
the existence of the __gnuc_va_list type[*] because our compiler is GCC.

[*] __gnuc_va_list is defined in the GCC ginclude/stdarg.h replacement
headerwhich we don't use.
2001-10-18 00:27:39 +00:00
David E. O'Brien a3fc3de448 Sync comments with i386. 2001-10-18 00:00:31 +00:00
John Baldwin c006932186 Small cleanups to the handling of Giant in trap(). 2001-10-17 21:55:56 +00:00
Matt Jacob aaeac4f6c3 Make SCSI changer and SES devices standard in generic kernels.
Reviewed by:	ken@kdm.org
2001-10-16 22:22:58 +00:00
Marcel Moolenaar 4c1e3817c4 Implement linux_chown and linux_lchown. The fchown syscall maps
directly to the native syscall, because no filename handling
needs to be done.

Tested by: Martin Blapp <mb@imp.ch>
2001-10-16 06:15:36 +00:00
Dag-Erling Smørgrav 268aeb1ed3 In FreeBSD's ifreq, ifr_ifru.ifru_flags is an array of two chars, while Linux
defines it as a short.  Change that to an array of one short so that FreeBSD's
ifr_flags macro will work (it evaluates to ifr_ifru.ifru_flags[0]).
2001-10-15 20:06:34 +00:00
Bruce Evans cba41f69e5 Backed out the quick fixes for the transient breakage of <sys/mount.h>
in rev.1.106 of the latter (don't include <sys/socket.h> and/or
<net/radix.h> just to work around bugs in <sys/mount.h>).
2001-10-13 06:05:37 +00:00
Matt Jacob 6b89c0be2e roll out last change 2001-10-12 02:30:53 +00:00
Matt Jacob cbedf1aa6f Remove the hiding of some prototype declarations. 2001-10-11 21:48:02 +00:00
Matt Jacob abafa9b9aa remove unused variable declaration 2001-10-11 21:47:27 +00:00
David E. O'Brien 14a4ecde9e 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
Matt Jacob 458c32f2e8 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
Paul Saab cbc89bfbfe Make MAXTSIZ, DFLDSIZ, MAXDSIZ, DFLSSIZ, MAXSSIZ, SGROWSIZ loader
tunable.

Reviewed by:	peter
MFC after:	2 weeks
2001-10-10 23:06:54 +00:00
Dag-Erling Smørgrav 3da3249106 Dissociate ptrace from procfs.
Until now, the ptrace syscall was implemented as a wrapper that called
various functions in procfs depending on which ptrace operation was
requested.  Most of these functions were themselves wrappers around
procfs_{read,write}_{,db,fp}regs(), with only some extra error checks,
which weren't necessary in the ptrace case anyway.

This commit moves procfs_rwmem() from procfs_mem.c into sys_process.c
(renaming it to proc_rwmem() in the process), and implements ptrace()
directly in terms of procfs_{read,write}_{,db,fp}regs() instead of
having it fake up a struct uio and then call procfs_do{,db,fp}regs().

It also moves the prototypes for procfs_{read,write}_{,db,fp}regs()
and proc_rwmem() from proc.h to ptrace.h, and marks all procfs files
except procfs_machdep.c as "optional procfs" instead of "standard".
2001-10-07 20:08:42 +00:00
Marcel Moolenaar 946c6b9978 Regen. 2001-10-07 00:21:18 +00:00
Marcel Moolenaar dd73368406 Fix the NODEF entry for setpgid() so that it matches the NODEF
entries in sys/kern/syscalls.master.
2001-10-07 00:20:08 +00:00
Matt Jacob 22883e3c68 Fix problem where a user buffer outside of the area being tested
will be corrupted.

PR:		29194
Obtained from:	Tor.Egge@fast.no
MFC after:	2 weeks
2001-10-02 18:34:20 +00:00
John Baldwin 7105201b3d Sigh, statclock_process() takes a KSE instead of a thread for its first
argument.
2001-10-01 22:26:47 +00:00
Wilko Bulte 031f57cf9c Add AlphaPC64 to comments. Correct names (ds10 -> DS10 etc) 2001-09-30 12:09:50 +00:00
Marcel Moolenaar 08107ee9e6 o Remove the linux_setpgid() stub.
o  Stop using linux_getpgid(); use getpgid() instead.

PR: kern/21402
2001-09-28 01:39:19 +00:00
Marcel Moolenaar e4383d97be Stop using linux_getpgid(). The implementation at this time is
broken and fixing it only creates a duplicate of what is already
in the FreeBSD kernel. Therefore, map the syscall directly to
getpgid().

PR: kern/21402
Submitted by: Christian Weisgerber <naddy@mips.inka.de>

While here, redefine the second entry for setpgid() so that we
don't need a stub. This is achieved by giving the second instance
the type NODEF.
2001-09-28 01:36:45 +00:00
Robert Watson 3026f29e34 o securelevel_gt() patches came from pre-KSE alpha -- this revision
fixes the compile and uses td->td_proc instead of p.

Obtained from:	TrustedBSD Project
2001-09-26 20:27:23 +00:00
Brooks Davis 2f65332817 The faith(4) device is no longer a count device so don't specify a count. 2001-09-25 18:56:40 +00:00
David E. O'Brien 090905a55c + Fix misplacement of `txp'
+ Document our -CURRENT debugging bits
2001-09-24 03:23:48 +00:00
Peter Wemm 8446f377f1 Overzealous search/replace: PROC_LOCK_ASSERT(p, not PROC_LOCK_ASSERT(td,
Pointy-hat to:  peter
2001-09-23 06:16:01 +00:00
John Baldwin b85188b1c8 Fix statclock() on non-boot processors: curproc -> curthread. 2001-09-21 23:10:11 +00:00
Peter Wemm 02e0a4faed Export kernbase like on the i386. I dont think the alpha kernel is
movable like on the x86, but this gets things in sync and reduces
the need for special cases in things like ps and libkvm etc.
2001-09-20 09:09:03 +00:00
Peter Wemm 9353fd809d Finish KSE-ification updates. 2001-09-20 05:15:04 +00:00
Peter Wemm 66678c9cad Regenerate. This seems to have been missed in the last commit. 2001-09-20 05:01:08 +00:00
Peter Wemm 1b7624d47b Pass 1: update for KSE and NFS changes. Somehow this got missed.
osf1_mount.c isn't complete yet.
2001-09-20 04:56:42 +00:00
Peter Wemm a83ddba96f Make this compile again. I would have sworn that I did this already in
the KSE tree and thought it had been merged.
2001-09-20 04:55:06 +00:00