Commit Graph

14826 Commits

Author SHA1 Message Date
njoly
63adbe29fb Fix xref, arm32_sync_icache -> arm_sync_icache. 2011-03-27 12:48:41 +00:00
he
08a8bf5254 Fix this so that it builds for vax; where the compiler balks at the
mixture of a union and a double in an expression (imagine that!)
I see other similar uses, and how they pass through for other ports
is beyond me, but I have not touched them in this round.

OK'ed by christos@
2011-03-27 11:21:54 +00:00
christos
2587e6e437 add fpgetprec/fpsetprec 2011-03-26 19:51:41 +00:00
njoly
82815469fb Add quotes for multi-words width string. 2011-03-25 17:15:26 +00:00
pooka
9fdb8e5eff mention rumphijack 2011-03-25 16:13:05 +00:00
pooka
0446c4bc83 add paragraph about kernel clients 2011-03-25 16:07:43 +00:00
joerg
6c7179c5fb Remove support for the old BSDCTYPE format. 2011-03-25 00:45:24 +00:00
bouyer
d9210c2405 Add a new libquota library, which contains some blocks to build and/or
parse quota plists; as well as a getfsquota() function to retrieve quotas
for a single id from a single filesystem (whatever filesystem this is:
a local quota-enabled fs or NFS). This is build on functions getufsquota()
(for local filesystems with UFS-like quotas) and getnfsquota();
which are also available to userland programs.
move functions from quota2_subr.c to libquota or libprop as appropriate,
and ajust in-tree quota tools.
move some declarations from kernel headers to either sys/quota.h or
quota/quota.h as appropriate. ufs/ufs/quota.h still installed because
it's needed by other installed ufs headers.
ufs/ufs/quota1.h still installed as a quick&dirty way to get a code
using the old quotactl() to compile (just include ufs/ufs/quota1.h instead of
ufs/ufs/quota.h - old code won't compile without this change and this is
on purpose).
Discussed on tech-kern@ and tech-net@ (long thread, but not much about
libquota itself ...)
2011-03-24 17:05:39 +00:00
dholland
8ba9dddb47 Eliminate dead store. From Henning Petersen in PR 42776. Doesn't change
the output .o file.
2011-03-24 02:29:33 +00:00
martin
d2c615416b Avoid using %g7 2011-03-23 20:54:35 +00:00
pooka
f347b4496a make work on nb5 again 2011-03-22 22:27:33 +00:00
martin
0c3a269fd8 Remove the sparc-v7 compatibility wrapper functions (.div, .mul, ... .urem),
the compiler never generates (or did generate in the past) 64bit code to call
them, and they are still present in our 32bit compat library.
2011-03-22 12:24:53 +00:00
jruoho
a8287d0554 * As is customary, append the parameter names from
SYNOPSIS to the description of the functions.

* Use .Ss for non-standard subtitles.

* Fix two identical subtitles.

* Add missing .It's, fix few .Ft's.

* Use a little more markup.

* Improve offsets.
2011-03-22 07:28:41 +00:00
enami
df36fea7b7 Don't use #endif where #else is expected. 2011-03-21 23:37:42 +00:00
christos
2b13247b7f pacify lint. 2011-03-21 22:33:46 +00:00
christos
a9f77bad7a Add Emin for the vax. Need to check 2011-03-21 22:33:29 +00:00
christos
ab9f1e36c8 fix vax typo. 2011-03-21 19:46:41 +00:00
pooka
dc8b381a32 update copyright 2011-03-21 16:41:27 +00:00
christos
374ecd4b4c more de-linting. 2011-03-21 12:53:50 +00:00
christos
a23ced05b4 fix some lint on i386 2011-03-21 04:52:09 +00:00
jruoho
e1897fd6ba Fix xref; security(8) -> security(7). 2011-03-21 04:42:50 +00:00
christos
a46656e6ee Add ld formats for the unit-tests. 2011-03-20 23:16:07 +00:00
christos
61e56760bc Merge the new gdtoa: Note that the built-in tests fail the same way as with
the old gdtoa.
2011-03-20 23:15:35 +00:00
bouyer
6d537d7313 Fix use-after-free. Discovered by running tests with MALLOC_OPTIONS=J
(should this be the default for tests ?), pointed out by njoly@
2011-03-20 12:36:14 +00:00
christos
3e812ebec1 don't need these and they break the build 2011-03-19 21:26:02 +00:00
christos
185969dd49 from www.netlib.org 2011-03-19 16:26:36 +00:00
he
83a6b62058 It would be nice if lint knew that abort() will never return.
For now just insert a /* NOTREACHED */ comment to fix the build failure.
2011-03-18 14:56:01 +00:00
roy
f42fd8d0f1 Simplify some conversion by usig pre formatted strings and a function
to print a parameter.
2011-03-18 10:42:54 +00:00
martin
30b9b129ac Test the proper array index. Discovered by sparc64 automatic test runs. 2011-03-18 09:07:20 +00:00
joerg
5349df0309 Add missing MLINKS. From Stathis Kamperis. 2011-03-18 00:57:19 +00:00
skrll
a59f1998c0 Appease the hppa linker. 2011-03-17 22:13:58 +00:00
wiz
b8e9a97310 Fix SYNOPSIS. Error found by martin. 2011-03-17 14:06:29 +00:00
matt
353ac4a525 Since this is use pthread_int.h, it needs __LIBPTHREAD_SOURCE__ to be defined. 2011-03-17 01:01:15 +00:00
matt
def13dad30 Add __HAVE___LWP_GETTCB_FAST support (for mips and powerpc). 2011-03-17 00:43:48 +00:00
joerg
01eef02a1b If TLS support is present, use it for pthread__self(). The
initialisation order is correct in this case as _lwp_setprivate has been
called already by ld.elf_so for dynamic programs or _libc_init for
statically linked ones.
2011-03-16 12:39:44 +00:00
njoly
603f3daee7 Convert hashtab to Elf_Symindx type, and use it directly to get symbol
count. Remove now unused GETVECWORDn macro.

This is needed to make it work on alpha which use non-standard 64bit
values for the symbol hash table section, unlike all other archs.
2011-03-16 11:44:01 +00:00
mbalmer
7d564f115e Crosslink wcstombs(3) and mbstowcs(3). 2011-03-16 09:32:12 +00:00
erh
dba1735a6e Remove one last reference to commaize_number.3 2011-03-16 01:30:24 +00:00
christos
ab077958c3 goodbye short-live commaize_number(3), if you liked it:
#define commaize_number(s, l, n) snprintf(s, l, "%'llu", (unsigned long long)n)
2011-03-16 00:50:28 +00:00
pooka
754d118ee3 don't spam connection errors to stderr by default 2011-03-15 09:35:05 +00:00
wiz
f675b9e58c Shorten Nd by putting the comment there in a paragraph in the body.
Use more markup. Sort SEE ALSO. Fix typo. Capitalize NetBSD like
we all love it.
2011-03-15 08:33:35 +00:00
matt
c5d79d45e3 Properly support the MIPS TLS ABI. 2011-03-15 07:40:18 +00:00
erh
9a5590a540 PR#7540, add a commaize_number function, which inserts comma into a string
of digits to make it more readable.  This is soon to be used in /bin/ls.
2011-03-15 03:47:04 +00:00
pooka
0dc6decc72 document fdoff 2011-03-14 15:21:22 +00:00
pooka
e5eecf0660 fdoff is descriptive enough 2011-03-14 15:15:47 +00:00
pooka
c9038b2d6c Make fdoffset configurable. Also, enforce that host descriptors
are smaller than the offset.
2011-03-14 15:13:26 +00:00
njoly
a8fd935b9b Add krb5_{mk,rd}_priv(3) links. 2011-03-14 13:53:55 +00:00
christos
50f9c0a390 OOPS has been reverted. 2011-03-14 11:44:20 +00:00
wiz
b84d433045 Add serial comma, quote minus, fix NetBSD version in HISTORY. 2011-03-13 09:12:35 +00:00
wiz
afb4355ad9 Add serial comma, quote minus, add HISTORY for strnunvis and strnunvisx. 2011-03-13 09:11:54 +00:00
mrg
8254d24b84 cast "~0" to (size_t) when passing to a size_t taking function.
fixes lint build errors.
2011-03-13 07:40:44 +00:00
joerg
fecb31745a Avoid a dependency issue between pthread TLS by using simple atomic
initialisation, possibly running the initialisation loop more than once.
2011-03-12 21:55:09 +00:00
christos
2d8f83e77b Fix various vis/unvis issues:
- no need for all the weak symbols
- define a new _VIS_END flag for UNVIS_END so that there are no collisions
  between and vis and unvis flags.
- add bound versions of the vis and unvis functions that take the length of
  the destination buffer. Unlike the OpenBSD ones they return -1 or NULL if
  the buffer is not large enough, instead of silently truncating.
2011-03-12 19:52:45 +00:00
matt
01061e574e Don't initialize %r2 for SDA2_BASE anymore. It's needed for TLS. 2011-03-12 07:56:36 +00:00
matt
69358e3723 Add PPC TLS support. Add -D_LIBC_SOURCE for tls.c and _lwp.c (powerpc)
so that __lwp_gettcb_fast and __lwp_settcb inlines are define.
2011-03-12 07:55:09 +00:00
matt
d972b61c0e Use __lwp_settcb if available. 2011-03-12 07:52:37 +00:00
matt
71fdb89287 Use __lwp_gettcb_fast if present. 2011-03-12 07:46:29 +00:00
christos
2dec048cbe avoid c99 2011-03-12 05:23:41 +00:00
christos
5dc359e2dd Prepare for strnvis functionality by providing a length to the encoding
functions.
2011-03-12 03:24:08 +00:00
christos
29ba757a34 revert OOPS change now that most of the reasons for tgoto to return NULL
have been eliminated.
2011-03-11 13:28:52 +00:00
pooka
563593515e Use rumphijack_dlsym() to figure out where __sysctl() is during
init.  Otherwise powerpc dlsym() DTWT and returns NULL.
(now i have no idea why dlsym() it works from rcinit(), but i'll
opt to not care)

Hah, only took 15min to debug that crap this time around.  I'm
quickly approaching zero-time with it.
2011-03-10 23:02:56 +00:00
roy
df504c6413 Do our best to process invalid terminfo strings instead of just
returning NULL.
2011-03-10 13:39:26 +00:00
roy
9d7b5f143f Fix two other off-by-one errors when processing %P and %g commands. 2011-03-10 10:46:33 +00:00
roy
40109496d4 Add support for translating the following termcap commands into terminfo:
%B %D %r %2 %3 %d %+ %> %.
Fixes PR bin/44692.
2011-03-10 10:17:19 +00:00
pooka
3406bd8660 Revert 1.81 and do it in a saner way with an ifdef. Later, when
the naming crisis is resolved, we can probably support rump kernel
quotas from nb5 also.
2011-03-10 09:47:32 +00:00
roy
74cdc55234 Fix an off-by-one error when processing embedded values. 2011-03-10 09:45:32 +00:00
wiz
97b3b86219 Add serial commas. 2011-03-10 08:53:04 +00:00
joerg
3b9c90a96e Define namespace remap macros before including sys/tls.h. 2011-03-09 23:50:40 +00:00
pooka
bbc64bd6b0 document vfs and sysctl knobs to RUMPHIJACK 2011-03-09 23:40:44 +00:00
pooka
61f25f646e Make getfh() a pathcall instead of a fhcall. while it does pertain
to file handles, it still gets passed a path and we can DTRT based
on that.
2011-03-09 23:26:19 +00:00
joerg
aad599979d Add TLS support infrastructure. For dynamic binaries, ld.elf_so exports
_rtld_tls_allocate and _rtld_tls_free. libpthread uses this functions to
setup the thread private area of all new threads. ld.elf_so is
responsible for setting up the private area for the initial thread.
Similar functions are called from _libc_init for static binaries, using
dl_iterate_phdr to access the ELF Program Header.

Add test cases to exercise the different TLS storage models. Test cases
are compiled and installed on all platforms, but are skipped on
platforms not marked for TLS support.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.

It is inspired by the TLS support in FreeBSD by Doug Rabson and the
clean ups of the DragonFly port of the original FreeBSD modifications.
2011-03-09 23:10:05 +00:00
pooka
9d51298cb8 Make this compile/work on NetBSD 5 once again. 2011-03-09 20:48:57 +00:00
bouyer
48c24921f2 Add quotactl(2) 2011-03-09 18:45:30 +00:00
bouyer
90848eb9f1 Fix last entries, make it work again. 2011-03-09 18:06:22 +00:00
tsutsui
7e1a38b9b3 Reorder insns to fix more load delay hazard botches on R3000.
Fixes floating point exceptions in _longjmp() during /etc/rc and
now NWS-3470D boots up to multi user with -current userland binaries.

Also fill BDslots in error path properly.
2011-03-09 16:10:29 +00:00
pooka
a7f297977b * use _exit() instead of exit() in retryconn=die: atexit() handlers
may hang if the server is dead
* consistent use of data
2011-03-09 15:09:21 +00:00
pooka
1af2e3a0a3 Add a bunch of process-wide hijack calls. Among other things, it's
now possible to use unmodified userspace binaries (rpcbind, mountd,
nfsd) to start a rump nfs service and mount file systems from it.

pain-rustique:42:~> mount
rumpfs on / type rumpfs (local)
10.1.1.1:/export on /mnt type nfs
2011-03-09 15:03:18 +00:00
pooka
a30ace437f g/c unused global 2011-03-09 09:17:12 +00:00
wiz
3bc5f349f0 Remove trailing whitespace. 2011-03-08 23:51:23 +00:00
pooka
7a2f6e5362 Enforce that the path=/rump specifier specifies and actual path
prefix and doesn't accept e.g. /rumpdev (only /rump/dev).
2011-03-08 21:36:01 +00:00
pooka
94372010ba clarify blanket operation a bit more 2011-03-08 21:09:18 +00:00
pooka
964221c99c maybe typo 2011-03-08 21:02:22 +00:00
pooka
f5d8571208 Add ``blanket''. It acts like path, except that the prefix does
_not_ get removed if the call goes to the rump namespace.

So, now it's possible to use e.g. tcpdump (and most other utilities
which hardcore a /dev pathname) on a rump kernel:

golem> setenv RUMPHIJACK blanket=/dev/bpf
golem> tcpdump -n -i virt0
tcpdump: WARNING: SIOCGIFADDR: virt0: Device not configured
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on virt0, link-type EN10MB (Ethernet), capture size 96 bytes
21:55:38.925596 IP 192.168.2.101 > 204.152.190.12: ICMP echo request, id 47811, seq 0, length 64
21:55:39.095596 IP 204.152.190.12 > 192.168.2.101: ICMP echo reply, id 47811, seq 0, length 64

(if you additionally set socket=all in RUMPHIJACK, tcpdump doesn't
whine about the "not configured" interface)
2011-03-08 20:59:01 +00:00
pooka
57a486416f need -I${.OBJDIR} now 2011-03-08 19:11:27 +00:00
pooka
c057875f13 create srcsys symlink 2011-03-08 18:30:24 +00:00
pooka
d06a7e799a and for my next trick, i'm going to spell ARGSUSED correctly 2011-03-08 18:28:01 +00:00
pooka
e48cccc4df lint love 2011-03-08 18:25:16 +00:00
pooka
7905447e1d Since we ~never have a frame waiting on the initial call to waitresp,
call kevent before readframe.  Doesn't really affect performance,
but makes ktraces shorter ;)
2011-03-08 15:55:12 +00:00
pooka
00e34b229c Use sendmsg() instead multiple calls to sendto(). It behaves
slightly better in the multithreaded exec case in terms of partial
frames sent.  Plus, it's theoretically a little cheaper.

There's still a gray area with partial transfer from sendmsg(),
but I'm not sure I care enough about some academic scenario to
start fixing it (it basically needs an OOB exec signaller).
2011-03-08 15:34:37 +00:00
pooka
91240244df Nuke all threads belonging to a process calling exec before allowing
the exec handshake to return.

In addition to being The Right Thing To Do, fixes some nasty
conditions for CLOEXEC fd's (or at least does so in theory, I
couldn't create any problems although I tried).
2011-03-08 12:39:28 +00:00
pooka
20446f99b9 return correct value when reading a short frame 2011-03-08 10:02:01 +00:00
mlelstv
c619be51ca Don't try to clean/build or install a library here, there are only
subdirectories.

Also, bsd.lib.mk requires a defined LIB, otherwise it will generate
unwanted commands during clean. It even failed on netbsd-4 where
'rm -f' needs at least one parameter which is missing due to recent
corrections in make/vars.c.
2011-03-08 09:49:42 +00:00
pooka
fc3b823359 use nwork-adjusted amount of idle workers to decide is they are truly idle. 2011-03-07 21:57:15 +00:00
joerg
5c3ccd6eba Pass down ELF Auxillary Vectors for static NetBSD binaries too.
Rename __libc_init to _libc_init and call it explicitly from CSU code.
This enforces the constructor run order for newly linked programs.
Keep it as constructor with run-once semantic for binary compatibility.
Implement dl_iterate_phdr for statically linked programs.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
2011-03-07 05:09:09 +00:00
christos
959ab2631c Restore historical behavior of tgoto() to return "OOPS" on failure. This is
best for now because there are too many programs that don't check the return
value of it. Of course cursor motion commands from $TERMCAP have 0 chance
of working now, since their % escapes are not translated to terminfo. In
the window case %+ expects one param from the stack in the termcap case
and two in the terminfo so we barf. We need proper captoinfo handling for
the % escapes, like the one in ncurses. Hi Roy :-)
2011-03-07 00:27:51 +00:00
wiz
9ef313636b Various fixes:
Remove trailing whitespace.
Sort sections.
Sort errors.
Fix typos.
Use more markup.
Probably something else I forgot.
2011-03-06 17:19:25 +00:00
bouyer
063f96f3c2 merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
2011-03-06 17:08:10 +00:00
christos
ce009e37f0 Check bits on each loop to prevent integer oveflow.
Reported by Maksymilian Arciemowicz
2011-03-06 16:00:20 +00:00
martin
49f1dcc8e5 While we use hardware (for float and double), but cooperate with softfloat
(to do long double), we need to not only handle the hardware exception
mask and cummulated flags, but also update/query the softfloat variables.
Since this may go away sometime (to make us psABI compliant), ifdef it
properly.
2011-03-06 10:32:47 +00:00
martin
598174eb2b Apply local namespace protection equivalent to the weak alias done
in softfloat-for-gcc.h, which we can't include here, to move
"float_exception_mask" into implementation namespace.
2011-03-06 10:27:37 +00:00