Commit Graph

4070 Commits

Author SHA1 Message Date
Poul-Henning Kamp
bbaba031a5 Fix the execle(3) synopsis to include the environment pointer.
Confused:	anordby
2003-06-17 08:57:37 +00:00
Martin Blapp
b77aeb1292 Kill prototype for __msgwrite too. It is not needed anymore. 2003-06-15 10:55:39 +00:00
Martin Blapp
ce9bc43cb3 Replace the old SCM_CREDS cred procedures. They can now be
replaced just fine with getpeereid() and the whole code
gets a lot simpler. We don't break the ABI, since all server
programms use __rpc_get_local_uid(), and we just change library
internals.

Reviewed by:	des
2003-06-15 10:32:01 +00:00
David E. O'Brien
5c784c8f4b Only use this with a non-GCC compiler. 2003-06-14 06:04:23 +00:00
Tom Rhodes
720f2e44a3 Document ENOSPC.
PR:		52612
Submitted by:	Marc Olzheim <marcolz@ilse.nl>
2003-06-13 22:41:12 +00:00
Peter Wemm
70de0c73a5 This is unusable on amd64. Remove it before it causes more confusion.
It is only possible to do this on an ABI that has a compulsory frame
pointer, which the amd64 ABI does not.  Thus, it is only possible to
implement this as a compiler builtin.
2003-06-13 21:56:30 +00:00
Tim J. Robbins
77156cb782 Mark the following interfaces as OBSOLETE_IN_6:
fgetrune(), fputrune(), fungetrune(), mbrune(), mbrrune(), mbmb(),
    setinvalidrune(), UTF2 encoding method.
These have been marked as being deprecated in their manual pages since 5.0,
and their use causes a linker warning.
2003-06-13 07:13:54 +00:00
Jordan K. Hubbard
3dfdc427f1 Fixes to locale code to properly use indirect pointers in order to prevent
memory leaks (fixes bugs earlier purported to be fixed).
Submitted by:	Ed Moy <emoy@apple.com>
Obtained from:	Apple Computer, Inc.
MFC after:	2 weeks
2003-06-13 00:14:07 +00:00
David E. O'Brien
11f0fab4fa Use C99 compatible ASM statements.
(untested, but existing state breaks
http://triangle.rtp.freebsd.org/~des/tinderbox-CURRENT-amd64-amd64.brief)
2003-06-10 21:17:55 +00:00
Andrey A. Chernov
0c7fbc6c40 Remove transition period hack 2003-06-10 01:26:04 +00:00
John Baldwin
dff6f51034 Remove stale reference to the deprecated USER_LDT option. The associated
code is always compiled into the kernel now.

Submitted by:	Hubert Tournier <hubert@frbsd.org>
PR:		docs/53068
2003-06-09 11:46:22 +00:00
Philippe Charnier
ab165955de The .Fn function 2003-06-08 10:13:50 +00:00
Philippe Charnier
7712c6658b .Xr p1003_1b moved to .St -p1003.1b-93 2003-06-08 10:11:13 +00:00
Philippe Charnier
fe71ab1cf4 .Xr -> .Lb for librairy. There is no manual page corresponding to .Xr. 2003-06-08 10:07:14 +00:00
Philippe Charnier
0d511e328f Add or correct section number in .Xr. Use .Vt or .Fn
instead of .Xr when needed
2003-06-08 10:01:52 +00:00
Poul-Henning Kamp
c6dd496cd9 Recognize the magic NODEV value.
Format other unknown devices consistently in hex.
2003-06-05 21:55:57 +00:00
Robert Watson
44f5ca2f16 Document the new explicit listing API for extended attributes; note
that the old API (passing "" as the attribute name to the _get_
interface) is now deprecated (and was probably a bad idea).

Pointed out by:	Dominic Giampaolo <dbg@apple.com>
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-06-04 04:00:26 +00:00
Hiten Pandya
8e9a665fde Document that kldload(2) can also return EEXIST.
Approved by: des (mentor)
2003-06-03 12:29:34 +00:00
Peter Wemm
3191d840e0 Cosmetic; record offsets used within jmpbuf 2003-06-02 22:37:53 +00:00
Peter Wemm
b8f8813c6e Fix sigsetjmp(). It helps if we do not try to save the old signal mask
to a random memory location.  Perl works a lot better with this.
2003-06-02 21:59:13 +00:00
David E. O'Brien
e683295e39 Use C99 compatible ASM statements. 2003-06-02 02:32:22 +00:00
Marcel Moolenaar
75fa7db991 o Fix a cut-n-paste bug. We were clobbering rp with gp...
o  Make sure the arguments to ctx_wrapper() are loaded from the
   backing store by forcing an underflow. Do this by making all
   registers in the register frame local.
2003-06-02 00:16:39 +00:00
Juli Mallett
d7ea49283c Match style of source and headers.
Submitted by:	bde
2003-06-01 21:35:27 +00:00
Ruslan Ermilov
0e35e492fc Assorted mdoc(7) fixes. 2003-06-01 19:19:59 +00:00
Andrey A. Chernov
9d793e98ec Add GBK encoding
PR:             51504
Submitted by:   Statue <statue@freebsd.sinica.edu.tw>
2003-06-01 15:30:56 +00:00
Poul-Henning Kamp
b600adca79 Clarify the code a bit.
Submitted by:	Nadav Eiron <nadav@TheEirons.org>
2003-06-01 09:16:50 +00:00
Juli Mallett
283d23cbba Make prototype match code with regard to constness of args to the
function pointer passed in.
2003-06-01 06:43:39 +00:00
Jens Schweikhardt
f8f6970098 Fix grammar bogons.
MFC after:	3 days
2003-05-31 21:14:41 +00:00
Marcel Moolenaar
fae3c3b7eb Rough implement of makecontext() needed to support libthr.
o  Up to 8 arguments are allowed. This is the number of arguments
   passed in registers. Subsequent registers are passed on the stack.
   Trying to deal with this is not easy in C and likely forces us to
   use assembly code. Let's avoid that for now. There's no indication
   that more than 8 arguments is a strong requirement (Linux also has
   an 8 argument limit).
o  We expect that the stack base is 16-byte aligned and the stack
   size is a multiple of 16-byte. We bomb out if this is not the case.
   We probably want to be less strict by enforcing it ourselves. For
   now it's better to not hide gross alignment bogons by silently
   correcting it.
2003-05-31 19:42:51 +00:00
Thomas Moestl
6bc615b0a1 Fix a sizeof error in __bt_put: when writing they key and data sizes
to a buffer in the big key/data case, memmove() was used on pointers
to size_ts, but only sizeof(u_int32_t) bytes where copied. This broke
on big_endian architectures where sizeof(size_t) > sizeof(u_int32_t).

This bug broke portupgrade (by way of ruby_bdb1) on sparc64.

Approved by:	re (rwatson)
2003-05-30 11:05:08 +00:00
Alexander Kabaev
8c22e2f77b Add an stub for _rtld_thread_init. This is a part I missed in
my last commit.

Approved by:	re (scottl)
2003-05-30 00:58:37 +00:00
Martin Blapp
65d06145a2 Don't return -1 and abort if msg.msg_controllen is 0. For
some strange reason recvmsg() never sets errno to EAGAIN
on a non-blocking socket and just returns 0.

Reviewed by:	jhb
Approved by:	re
2003-05-29 22:06:06 +00:00
Martin Blapp
e5cd12556d Fix a problem introduced in the last commit. sa and cm
are not initialized at this place. Move the initializing
before the non-blocking check.

Submitted by:	Marius Strobl <marius@alchemy.franken.de>
Reviewed by:	jhb
Approved by:	re
2003-05-29 19:43:22 +00:00
Martin Blapp
aee2eba2d1 If AF_LOCAL is used, we need to use __msgread_withcred() instead of
just read() in non-blocking mode too. The reason is obvious. NetBSD
uses a complete different way to get the credentials so this patch
only applies to FreeBSD.

Reviewed by:	rwatson
Approved by:	re
2003-05-28 09:16:35 +00:00
Martin Blapp
22e4d31a81 Fix amd(8) clients, if a FreeBSD mountd(8) server is used.
Remove the special treatment of non-blocking mode in
the "look ahead function" xdrrec_eof(). It currently
assumes that the last read() in a row of several reads
does not have zero lenght. If this is the case, svc_vc_stat()
does return XPRT_MOREREQS, and the RPC-request aborts because
there is no data to read anymore.

To fix this, go back to the original version of the code
for non-blocking mode until NetBSD comes up with another
possible fix like this one in xdrrec_eof()

	if (rstrm->last_frag && rstrm->in_finger == rstrm->in_boundry) {
		return TRUE;
	}

Return always FALSE in set_input_fragment() for non-blocking
mode. Since this was not used in FreeBSD, I omitted it at the
first time. Now we use this function and we should always
return FALSE for it.

Reviewed by:	rwatson
Approved by:	re
2003-05-28 09:13:09 +00:00
Max Khon
f4203da86c Fix stripping last path component when only one path component left.
PR:		52686
MFC after:	1 day
2003-05-28 08:23:01 +00:00
Ruslan Ermilov
734ac3b543 mdoc(7) fixes.
Approved by:	re (blanket)
2003-05-24 19:53:08 +00:00
Peter Wemm
b3aa27a531 Repair PIC mode. It seems I was a bit too excited about the
implications of native PC relative addressing.
2003-05-24 17:35:23 +00:00
Ruslan Ermilov
3a5146d9e2 Assorted mdoc(7) fixes.
Approved by:	re (blanket)
2003-05-22 13:02:28 +00:00
Ruslan Ermilov
aba60fa66b Fixed troff(1) and mdoc(7) warnings.
Approved by:	re (blanket)
2003-05-18 21:05:22 +00:00
Martin Blapp
f8af072548 Fix a simple bug that prevents svc_tli_create to bind to the address
specified by caller.

NetBSD rev. 1.6

Reviewed by:	rwatson
Approved by:	rwatson (re)
Obtained from:	NetBSD
2003-05-18 15:07:25 +00:00
Marcel Moolenaar
f2c49dd248 Revamp of the syscall path, exception and context handling. The
prime objectives are:
o  Implement a syscall path based on the epc inststruction (see
   sys/ia64/ia64/syscall.s).
o  Revisit the places were we need to save and restore registers
   and define those contexts in terms of the register sets (see
   sys/ia64/include/_regset.h).

Secundairy objectives:
o  Remove the requirement to use contigmalloc for kernel stacks.
o  Better handling of the high FP registers for SMP systems.
o  Switch to the new cpu_switch() and cpu_throw() semantics.
o  Add a good unwinder to reconstruct contexts for the rare
   cases we need to (see sys/contrib/ia64/libuwx)

Many files are affected by this change. Functionally it boils
down to:
o  The EPC syscall doesn't preserve registers it does not need
   to preserve and places the arguments differently on the stack.
   This affects libc and truss.
o  The address of the kernel page directory (kptdir) had to
   be unstaticized for use by the nested TLB fault handler.
   The name has been changed to ia64_kptdir to avoid conflicts.
   The renaming affects libkvm.
o  The trapframe only contains the special registers and the
   scratch registers. For syscalls using the EPC syscall path
   no scratch registers are saved. This affects all places where
   the trapframe is accessed. Most notably the unaligned access
   handler, the signal delivery code and the debugger.
o  Context switching only partly saves the special registers
   and the preserved registers. This affects cpu_switch() and
   triggered the move to the new semantics, which additionally
   affects cpu_throw().
o  The high FP registers are either in the PCB or on some
   CPU. context switching for them is done lazily. This affects
   trap().
o  The mcontext has room for all registers, but not all of them
   have to be defined in all cases. This mostly affects signal
   delivery code now. The *context syscalls are as of yet still
   unimplemented.

Many details went into the removal of the requirement to use
contigmalloc for kernel stacks. The details are mostly CPU
specific and limited to exception_save() and exception_restore().
The few places where we create, destroy or switch stacks were
mostly simplified by not having to construct physical addresses
and additionally saving the virtual addresses for later use.

Besides more efficient context saving and restoring, which of
course yields a noticable speedup, this also fixes the dreaded
SMP bootup problem as a side-effect. The details of which are
still not fully understood.

This change includes all the necessary backward compatibility
code to have it handle older userland binaries that use the
break instruction for syscalls. Support for break-based syscalls
has been pessimized in favor of a clean implementation. Due to
the overall better performance of the kernel, this will still
be notived as an improvement if it's noticed at all.

Approved by: re@ (jhb)
2003-05-16 21:26:42 +00:00
Tim J. Robbins
6e7988b9c5 Catch up with the renaming of the "union" filesystem to "unionfs".
Fixes a problem where directory entries could show up twice: once
on the top layer of the union stack, and once on the bottom layer.

Approved by:	re (rwatson)
2003-05-16 02:15:07 +00:00
Doug Barton
336c22c598 * The copy of the stat struct in the man page has rotted, so remove it.
Those who really need this information can find it in the include file.

* Include a succinct description of the st_birthtime field.

Approved by:	re (bmah)
2003-05-13 08:10:05 +00:00
Peter Wemm
6b22ec82bf Update ldexp.c for amd64. 2003-05-10 00:47:52 +00:00
David Schultz
b7412bf571 Add a comment describing why it's important for the values in this
file to be correct, and how to generate them automatically.

Caused much pain and suffering for:	peter
2003-05-08 13:50:44 +00:00
Peter Wemm
0b1bb81ae6 SIG_SETMASK is 3, not 1. Sigh. 2003-05-08 07:41:24 +00:00
Peter Wemm
7ef6516c60 Fix an embarresing transcription error from i386 to amd64. Put the arguments
to sigprocmask(2) int the correct order. *blush*.
For sigsetjmp(), match up the pushq/popq in the non-savemask case.
2003-05-08 06:25:03 +00:00
Peter Wemm
dffecce67c Tidy up modf.S and make it actually work. It wasn't extracting
the value out of ST(0) before copying it to %xmm0.  Also remove bogus stack
frame and work in the red zone.
2003-05-08 03:19:37 +00:00
Peter Wemm
74b0b3cfcb Fix typo, even though this is unused. 2003-05-08 00:02:47 +00:00