Commit Graph

8155 Commits

Author SHA1 Message Date
Jonathan Lemon
fe16674a74 Return EINVAL if the passed intr is out of bounds.
PR: 30857
Submitted by: David Xu <davidx@viasoft.com.cn>
MFC: 1 week
2001-09-27 02:46:47 +00:00
Brooks Davis
efacde1bcc The number of ccd(4) devices is no longer set at compile time so stop
trying to do it in the examples and config files.
2001-09-26 22:41:02 +00:00
Brooks Davis
2862fc7a49 Call securelevel_gt with a credential. Also, s/p/td->td_proc/.
Submitted by:	LINT
2001-09-26 22:02:01 +00:00
Robert Watson
41c42188c8 o Modify access control checks in linux_iopl() to use securelevel_gt()
rather than direct variable checks.  (Yet another API to perform
  direct hardware I/O.)

Obtained from:	TrustedBSD Project
2001-09-26 20:22:38 +00:00
Robert Watson
ce3a32b6da o Modify pcvt ioctl() security checks to use securelevel_gt() instead
of direct securelevel variable checks.  (Yet another API to perform
  direct hardware I/O using KDENABIO.)

Obtained from:	TrustedBSD Project
2001-09-26 20:21:28 +00:00
Robert Watson
9997f52470 o Modify spigot_open() to use securelevel_gt() instead of direct
securelevel variable checks.

Obtained from:	TrustedBSD Project
2001-09-26 20:20:05 +00:00
Robert Watson
330e78897a o Modify i386_set_ioperm() to use securelevel_gt() instead of
direct securelevel variable checks.

Obtained from:	TrustedBSD Project
2001-09-26 20:08:15 +00:00
Robert Watson
1851c8fd41 o Modify device open access control for /dev/mem and friends to use
securelevel_gt() instead of direct securelevel variable checks.

Obtained from:	TrustedBSD Project
2001-09-26 20:08:02 +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
Chris D. Faulhaber
22374865a2 Update NFS_ROOT comments to reflect the NFSCLIENT option
instead of the depricated NFS option.

Reviewed by:	peter
2001-09-22 19:02:18 +00:00
Maxim Sobolev
78f45204d9 Introduce new syscons(4) kernel options:
- SC_CUT_SPACES2TABS - when copying text into the cut buffer convert leading
  spaces into the tabs;
- SC_CUT_SEPCHARS="XYZ" - treat supplied characters as possible words
  separators when the driver searches for words boundaries when doing cut
  operation.

Also unify cut code a bit to decrease amount of duplicated code. This fixes
line cut mode, so that it is no longer pads line with useless spaces.

Approved by:	ru
2001-09-21 20:41:24 +00:00
Peter Wemm
9789c757b9 Add some comments about KVA_PAGES and a test. 2001-09-21 06:34:01 +00:00
Peter Wemm
f83fbaf22d Introduce a new option, KVA_SPACE, which can be used to reconfigure
the size of the kernel virtual address space relatively painlessly.
Userland will adapt via the exported kernbase symbol.  Increasing
this causes the user part of address space to reduce.
2001-09-21 06:23:03 +00:00
Peter Wemm
e5a860ebb4 Reserve an extra 16 bytes in case we have to grow the trapframe into
a vm86trapframe for switching to vm86 [unlikely] while exiting.
I lost this when doing the pcb move that went in with the KSE commit.

Reviewed by: jake
2001-09-19 05:44:12 +00:00
Peter Wemm
2f01a0c097 Fix a mistake I made with the pcb movement relative to the stack in the
KSE patch.  We need to leave the 16 bytes here for enabling the trapframe
to be converted to a vm86trapframe if we're switching *to* a vm86 context.
2001-09-19 05:34:12 +00:00
Peter Wemm
eb25edbda3 Cleanup and split of nfs client and server code.
This builds on the top of several repo-copies.
2001-09-18 23:32:09 +00:00
Julian Elischer
f5b93d4aac Remove accidentally included debug stuff.
Noticed by:	jhb
2001-09-18 22:52:42 +00:00
John Baldwin
fdca1cb1ef Whitespace fixes. 2001-09-18 21:52:15 +00:00
John Baldwin
fd54558a83 - If we ever do the per-cpu KTR stuff, the index won't be volatile as it
will be private to each CPU.
- Re-style(9) the globaldata structures.  There really needs to be a MI
  struct pcpu that has a MD struct mdpcpu member at some point.
2001-09-18 21:46:26 +00:00
John Baldwin
9ed316e3a7 If we have a p variable pointing to td->td_proc already, use it instead of
needlessly repeating the indirection in several places.  Half of the places
used td->td_proc, and half used p.  They are now consistent with each other
and all use p.
2001-09-18 21:20:58 +00:00
John Baldwin
659209e636 Whitespace fixes. 2001-09-18 21:05:04 +00:00
John Baldwin
2509e6c20b Add a lock assertion to linux_sendsig() to match other sendsig functions. 2001-09-17 17:22:31 +00:00
Doug Rabson
3a0b4f259c Fill out some gaps in ia64 DDB support. This involves generalising DDB's
breakpoint handling slightly to cope with the fact that ia64 instructions
are not located on byte boundaries.
2001-09-15 11:06:07 +00:00
Michael Reifenberger
b8febfd1f2 Add a wrapper for linux_getsid -> getsid Syscall. 2001-09-15 09:57:30 +00:00
Michael Reifenberger
a6e5348e22 Implement LINUX_[SEM|IPC]_[STAT|INFO]
to make /compat/linux/usr/bin/ipcs -s happy.

PR:		kern/29698 (part)
Reviewed by:	audit
2001-09-15 09:50:38 +00:00
Jeroen Ruigrok van der Werven
e469dc2c99 Place CPU_UPGRADE_HW_CACHE in the right section. 2001-09-14 12:32:04 +00:00
Warner Losh
8b8a72ee71 s/thread'/thread's/ 2001-09-14 04:40:44 +00:00
Julian Elischer
b40ce4165d KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha
2001-09-12 08:38:13 +00:00
Gary Jennejohn
cc3ee09cd3 Increase AUTHNAME to 42 bytes for users of T-Online, which requires 41
bytes.

MFC after:	2 weeks
2001-09-12 08:27:54 +00:00
Kris Kennaway
bf61e26696 Fix some signed/unsigned integer confusion, and add bounds checking of
arguments to some functions.

Obtained from:	NetBSD
Reviewed by:	peter
MFC after:	2 weeks
2001-09-10 11:28:07 +00:00
Marcel Moolenaar
e061a6ca19 Fix LINT breakage caused by previous commit. The linux_rt_sendsig
and linux_sendsig functions guarded their debugging output with
ldebug(sigreturn). This has been mistaken for a cut-n-paste bug,
and was replaced by ldebug(rt_sendsig) and ldebug(sendsig) resp.
Since the sendsig functions are not syscalls, this brokei any
build that defines DEBUG.

The fix maps both functions to the unused syscall 0 so that they
can be enabled/disabled independently from sigreturn, but not
independently from each other.
2001-09-10 07:00:17 +00:00
Peter Wemm
eb30c1c0b9 Rip some well duplicated code out of cpu_wait() and cpu_exit() and move
it to the MI area.  KSE touched cpu_wait() which had the same change
replicated five ways for each platform.  Now it can just do it once.
The only MD parts seemed to be dealing with fpu state cleanup and things
like vm86 cleanup on x86.  The rest was identical.

XXX: ia64 and powerpc did not have cpu_throw(), so I've put a functional
stub in place.

Reviewed by:	jake, tmm, dillon
2001-09-10 04:28:58 +00:00
Peter Wemm
e11e07928b gcc-3 has objections about the bluetrap6 and bluetrap13 inline asm
functions.  Apparently multi-line string asm arguments are deprecated.
2001-09-10 04:22:20 +00:00
Peter Wemm
660c5377fd Missing part of dillon's coredump commit. cpu_coredump() was still
passing IO_NODELOCKED to vn_rdwr(), this would cause operations on the
unlocked core vnode and softupdates nastiness if an a.out binary cored.
2001-09-08 22:18:58 +00:00
Marcel Moolenaar
5002a60f9b Round of cleanups and enhancements. These include (in random order):
o  Introduce private types for use in linux syscalls for two reasons:
   1. establish type independence for ease in porting and,
   2. provide a visual queue as to which syscalls have proper
      prototypes to further cleanup the i386/alpha split.
   Linuxulator types are prefixed by 'l_'. void and char have not
   been "virtualized".

o  Provide dummy functions for all syscalls and remove dummy functions
   or implementations of truely obsolete syscalls.

o  Sanitize the shm*, sem* and msg* syscalls.

o  Make a first attempt to implement the linux_sysctl syscall. At this
   time it only returns one MIB (KERN_VERSION), but most importantly,
   it tells us when we need to add additional sysctls :-)

o  Bump the kenel version up to 2.4.2 (this is not the same as the
   KERN_VERSION MIB, BTW).

o  Implement new syscalls, of which most are specific to i386. Our
   syscall table is now up to date with Linux 2.4.2. Some highlights:
   -  Implement the 32-bit uid_t and gid_t bases syscalls.
   -  Implement a couple of 64-bit file size/offset bases syscalls.

o  Fix or improve numerous syscalls and prototypes.

o  Reduce style(9) violations while I'm here. Especially indentation
   inconsistencies within the same file are addressed. Re-indenting
   did not obfuscate actual changes to the extend that it could not
   be combined.

NOTE: I spend some time testing these changes and found that if there
      were regressions, they were not caused by these changes AFAICT.
      It was observed that installing a RH 7.1 runtime environment
      did make matters worse. Hangs and/or reboots have been observed
      with and without these changes, so when it failed to make life
      better in cases it doesn't look like it made it worse.
2001-09-08 19:07:04 +00:00
Marcel Moolenaar
f981a79ed9 o Introduce private types for use in linux syscalls for two reasons:
1. establish type independence for ease in porting and,
   2. provide a visual queue as to which syscalls have proper
      prototypes to further cleanup the i386/alpha split.
   Linuxulator types are prefixed by 'l_'. void and char have not
   been "virtualized".

o  Remove dummy functions for syscalls that are now truely
   unimplemented.

o  Rename syscalls so they match the names used in the Linux kernel.
   Also, provide more accurate prototypes. This generally improves
   cross-referencing and reduces head-scratching.

o  Provide seperate implementations for the 16-bit uid_t and gid_t
   based syscalls as Linux used to have. The new 32-bit uid_t and
   gid_t based syscalls now map to their FreeBSD equivalents.

o  Fix the linux_ipc syscall so that it doesn't force the shm*, sem*
   and msg* syscalls to have the same syscall. The prototypes for
   these syscalls now match the those used on Alpha. While here,
   add the same kludge for MSGRCV as is present in the Linux kernel.

o  Implement the following syscalls:
     linux_stat64, linux_lstat64 and linux_fstat64
     linux_sysctl

o  Added syscalls numbered 198 - 221. This include:
     - the 32-bit uid_t and gid_t bases syscalls
     - 64-bit file offset/size based syscalls
2001-09-08 18:48:40 +00:00
Mike Smith
42df599f7b Now that this code is MD, we don't need the i386 ifdefs. 2001-09-07 03:00:30 +00:00
John Baldwin
df53e91c18 Call sendsig() with the proc lock held and return with it held. 2001-09-06 22:20:41 +00:00
Brooks Davis
0fa2bf5423 Don't specify the number of vlan interfaces any more, they are created
at runtime.
2001-09-05 21:19:56 +00:00
Jonathan Lemon
cfe6cb9694 Remove superfluous statement. 2001-09-05 17:05:19 +00:00
Kazutaka YOKOTA
c395939120 Rework the ISA PnP driver pnp and the PnP resource parser to fix
the following bugs.

- When constructing a resource configuration, respect the order
  in which resource descriptors are read, in order to establish
  the correct mapping between the descriptors and configuration
  registers.
  "Plug and Play ISA Specification, Version 1.0a", Sec 4.6.1, May 5,
  1994.  "Clarifications to the Plug and Play ISA Specification,
  Version 1.0a", Sec 6.2.1, Dec. 10, 1994.

- Do not ignore null (empty) descriptors; they are valid descriptors
  acting as filler.
  "Clarifications to the Plug and Play ISA Specification, Version 1.0a",
  Sec 6.2.1.

- Correctly set up logical device configuration registers for null
  resources.
  "Clarifications to the Plug and Play ISA Specification, Version 1.0a"

- Handle null resources properly in the resource allocator for the
  ISA bus.
2001-09-05 03:54:33 +00:00
David E. O'Brien
1792335469 style(9) the structure definitions. 2001-09-05 01:36:46 +00:00
Mitsuru IWASAKI
db2077f8e1 Reenable RTC interrupts after wakeup. Some laptops have a problem
with system statistics monitoring tools (such as systat, vmstat...)
because of stopping RTC interrupts generation.
Restore all the timers (RTC and i8254) atomically.

Reviewed by:	bde
MFC after:	1 week
2001-09-04 16:02:06 +00:00
Mitsuru IWASAKI
fbd49a7cfb Add `-I.' option to CFLAGS so that we can compile asm code together
with `-nostdinc' option.
2001-09-04 15:46:32 +00:00
Peter Wemm
25ea330aec Mostly cosmetic. Move various variables from .s files to .c files so that
gdb generates debug info for them.
2001-09-04 11:05:33 +00:00
Peter Wemm
cfbf880deb Zap #if 0'ed map init code that got moved to the MI area.
Convert the powerpc tree to use the common code.
2001-09-04 08:42:35 +00:00
Peter Wemm
b53f9c45f9 Nuke #if 0'ed "setredzone()" stub. We never used it, and probably
never will.  I've implemented an optional redzone as part of the KSE
upage breakup.
2001-09-04 08:36:46 +00:00
Kazutaka YOKOTA
bdaeb9cc90 Fix the argument specifier for the PnP BIOS function 2
(PNP_SET_DEVNODE). The second argument is not a segment:offset
pointer, but a 16 bit short.

MFC after:	4 weeks
2001-09-03 03:43:39 +00:00
Takeshi Shibagaki
5f5e1ff3b1 Always turned on 8bit access card support for the fe driver
both i386/pc98, so options FE_8BIT_SUPPORT was deleted.

Reviewed by: nyan
2001-09-02 13:05:00 +00:00