Commit Graph

1472 Commits

Author SHA1 Message Date
Poul-Henning Kamp
efd1585a7a Don't call cdevsw_add(). 2001-11-04 11:50:08 +00:00
Andrew Gallatin
cd4e23cead Introduce a boot environment variable (clock_compat_osf1) which can
be set to 1 to make FreeBSD and Tru64 coexist peacefully on a dual
boot system and not clobber each other's year in the TOY clock.
(Tru64 uses an offset 52 years higher than one would expect)

Obtained from: NetBSD
MFC After: 1 week
2001-11-03 17:22:50 +00:00
Poul-Henning Kamp
b8ea5f7f0f Remove unneeded and #if 0'ed code to register in cdevsw[] 2001-11-03 17:05:12 +00:00
Matthew Dillon
5d339e3d47 Implement i386/i386/pmap.c 1.292 for alpha, ia64 (avoid free
page exhaustion / kernel panic for certain madvise() scenarios)
2001-11-03 01:08:55 +00:00
Mike Barcroft
0ac2d551f2 o Add new header <sys/stdint.h>.
o Make <stdint.h> a symbolic link to <sys/stdint.h>.
o Move most of <sys/inttypes.h> into <sys/stdint.h>, as per C99.
o Remove <sys/inttypes.h>.
o Adjust includes in sys/types.h and boot/efi/include/ia64/efibind.h
  to reflect new location of integer types in <sys/stdint.h>.
o Remove previously symbolicly linked <inttypes.h>, instead create a
  new file.
o Add MD headers <machine/_inttypes.h> from NetBSD.
o Include <sys/stdint.h> in <inttypes.h>, as required by C99; and
  include <machine/_inttypes.h> in <inttypes.h>, to fill in the
  remaining requirements for <inttypes.h>.
o Add additional integer types in <machine/ansi.h> and
  <machine/limits.h> which are included via <sys/stdint.h>.

Partially obtain from:	NetBSD
Tested on:		alpha, i386
Discussed on:		freebsd-standards@bostonradio.org
Reviewed by:		bde, fenner, obrien, wollman
2001-11-02 18:05:43 +00:00
Mike Barcroft
23ab7d0fa2 Rather than just change the arguments to suser() change the function to
suser_xxx() as well.

Pointy hat to:	rwatson
2001-11-02 17:42:03 +00:00
Peter Wemm
97c97bb16b "Fix" a problem that got copied from alpha to ia64 and broke there.
When we truncate the msgbuf size because the last chunk is too small,
correctly terminate the phys_avail[] array - the VM system tests
the *end* for zero, not the start.  This leads the VM startup to
attempt to recreate a duplicate set of pages for all physical memory.

XXX the msgbuf handling is suspiciously different on i386 vs
alpha/ia64...
2001-11-02 00:41:00 +00:00
Robert Watson
309b8fb98a o Permit osf1-emulated programs to modify uid/gid under jail by
switching suser() to suser_xxx() and adding PRISON_ROOT flag.
2001-11-01 20:16:03 +00:00
Matt Jacob
f43f61207d Fix misspelling in comment. 2001-10-31 18:07:38 +00:00
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