Commit Graph

14637 Commits

Author SHA1 Message Date
christos
bcb5ce2065 Fix emulation issue of SETVAL, and make the code look the same between the
two different versions.
2011-01-31 22:51:39 +00:00
christos
2d5180b4b9 add braces, per joerg. 2011-01-31 19:10:18 +00:00
drochner
953846fa39 use of .PARSEDIR just doesn't work with .OBJDIR, replace with .CURDIR 2011-01-31 17:54:20 +00:00
christos
984dfe5f9f bump down the recursion limit to 64. 2011-01-31 15:07:29 +00:00
christos
ae8a4fc798 not everyone has fenv.c, pointed by Havard Eidnes 2011-01-31 15:06:01 +00:00
christos
0f6e9a96aa Limit recursions to avoid DoS attacks from Maksymilian Arciemowicz 2011-01-31 04:20:50 +00:00
christos
17b8402a39 fenv support for sparc64 from Stathis Kamperis 2011-01-31 00:19:33 +00:00
matt
0536d96d78 Fix type sigtramp_t -> sigtramp_2 2011-01-29 22:58:47 +00:00
matt
2599cc89ba Don't use r0 to restore LR, use r7 instead. 2011-01-29 02:21:20 +00:00
pooka
dac4423feb Pass the value of getprogname() from the client to the server and
record it in p_comm.  This is nice for things like sockstat, since
they now display the client command name:

pain-rustique:43:~> rump.sockstat
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
root     xulrunner- 16     0 tcp    192.168.2.114.65507   204.152.190.12.80
root     xulrunner- 16     1 tcp    192.168.2.114.65501   204.152.190.12.80
root     xulrunner- 16     2 tcp    192.168.2.114.65500   204.152.190.12.80
root     xulrunner- 16     3 tcp    192.168.2.114.65499   204.152.190.12.80
root     xulrunner- 16     5 tcp    192.168.2.114.65498   204.152.190.12.80
root     xulrunner- 16     6 tcp    192.168.2.114.65497   204.152.190.12.80
root     socket     62     0 tcp6   *.http                *.*
root     socket     62     1 tcp    *.http                *.*
root     socket     63     0 tcp6   *.81                  *.*
root     socket     63     1 tcp    *.81                  *.*
2011-01-28 19:21:28 +00:00
christos
28ef40ccbd fix pasto 2011-01-28 03:41:52 +00:00
christos
b2ce31d086 don't turn on editing if stdout is not a tty. 2011-01-27 23:11:40 +00:00
pooka
fd79a76046 Use NEEDED for librumpclient instead of loading it manually. 2011-01-27 18:12:19 +00:00
pooka
e96a54f450 Set server reconnection timeout to infinite. There probably need
to be some toggle eventually, but for now I'm optimizing the default
for my firefox use ;)
2011-01-27 18:05:16 +00:00
pooka
41434db318 Allow to set a timeout for how long the client will attempt to
reconnect in case the connection to the server is lost.  Default
to exactly one reattempt.  This makes sense and additionally fixes
the dev/raidframe/smalldisk test which currently causes a server
panic when a certain raidctl command is run (without this fix the
test would timeout since the client kept attempting to reconnect).
2011-01-27 18:04:05 +00:00
njoly
5488d3a23f Add section 3 for getpwuid_r xref. 2011-01-26 22:00:45 +00:00
christos
4ffe9a1805 make the code more re-usable 2011-01-26 18:48:57 +00:00
christos
9a37731036 make SSP friendly 2011-01-26 18:48:32 +00:00
christos
74a83d351e Moving the ssp check inside the source code does not work properly because
the compiler loses information about the size of the object. So instead of
the hacky #define mess we did before, add a way to inject our function between
the user call and the system call.
2011-01-26 18:11:35 +00:00
pooka
e6450adeb5 plug fd leak in reconnect code 2011-01-26 14:42:41 +00:00
pooka
5f7e80a834 Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing.  eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman.  Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution.  The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.
2011-01-26 01:18:43 +00:00
christos
13fe5bd280 Fix SSP build.
XXX: This is gross.
2011-01-25 19:13:26 +00:00
christos
c5d359be42 make pthread__sp unsigned long. 2011-01-25 19:12:04 +00:00
pooka
8c818e7121 fix compilation on -current 2011-01-25 17:37:00 +00:00
pooka
8d51265b11 Use rump_sp consistently in chapter 7
nothing gets past the wizd, nothing.
2011-01-25 14:05:42 +00:00
pooka
46e9c4686a enable WARNS=4 2011-01-25 12:56:57 +00:00
pooka
493a9cc0b3 manual page for rumphijack 2011-01-25 12:56:25 +00:00
pooka
f4ef6bac83 the usual fun for WARNS=4
signed,
  unsigned
2011-01-25 12:53:45 +00:00
pooka
14186479f2 dramatic whitespace fix 2011-01-25 12:21:36 +00:00
pooka
9d0409a087 Rewrite to declare most dual-kernel calls with macros. This helps
with adding new calls and makes all existing fd-accepting hijacked
calls dual-kernel.  It would be better to autogenerate the code
from syscalls.master, but this is easier for now.
2011-01-25 12:18:33 +00:00
matt
787e823fd1 Move IDs into .ident
Use END(x)
Remove a.out support
Make CERROR hidden
2011-01-25 02:38:15 +00:00
njoly
7ef8fa728e Redo Vt macro fixes (from r1.35) which were lost. 2011-01-24 19:37:35 +00:00
pooka
19a57922d0 Add reconnect code to librumpclient. In case the connection to
the kernel server is lost, the client will now automatically attempt
to reconnect.

Among other things, this makes it possible to "reboot" and restart
the TCP/IP stack from under firefox without any perceivable less
of service.  If pages were loading at the time the TCP/IP server
was killed, there may be some broken links, but nothing a ctrl-r
cannot fix.
2011-01-24 17:47:51 +00:00
joerg
86b3b196ed Correctly define inta using a helper macro for the # 2011-01-23 14:08:53 +00:00
matt
6ab334853b Teach libkvm how kernel virtual memory is laided on 64-bit MIPS kernels. 2011-01-23 06:28:52 +00:00
matt
5ae5f9ae2e Instead of testing for all mips variants, just use MACHINE_CPU. 2011-01-23 06:27:32 +00:00
matt
b09982f7da Use uintptr_t instead of u_long.
When fetching argc use off the stack, use *(long *) instead of *(int *)
because on mips64 BE system, that int deference will only fetch 0.
2011-01-23 06:25:57 +00:00
christos
5b63bdc2ba remove stray printf. 2011-01-22 16:24:44 +00:00
pooka
112941441d happiness is a quiet lint 2011-01-22 14:22:10 +00:00
pooka
3b79c0eb90 shush lint 2011-01-22 14:18:55 +00:00
pooka
1d9f8678bd In case sys_reboot() was called by a remote client, put the response
in the socket before we shut down.  This way the response to the
syscall travels to the caller and they know things worked correctly
instead of having to just assume.
2011-01-22 13:41:22 +00:00
christos
f98fcbb075 add may alias attribute to the double union because gcc-4.5.x produces
incorrect code on ARMv7a. From Nikunj Badjatya and Amol Pise.
2011-01-21 23:36:49 +00:00
christos
e6d36a6ae6 prevent resource DoS from brace expansion (from Maksymilian Arciemowicz) 2011-01-21 23:30:31 +00:00
pooka
7d6e6b815c Forgot to commit this a few days ago: need to make sure we get the
right kqueue/kevent now that rumphijack hijacks them.
2011-01-21 10:43:33 +00:00
matt
0da37b7b85 Remove CPUFLAGS?= since it's no longer needed. 2011-01-20 18:41:39 +00:00
pooka
3cc5cc6884 include pid of rump server in hostname 2011-01-20 15:00:12 +00:00
christos
b493b4d721 provide a _sys_getcwd() entry like all the rest of the system calls to be
used by SSP.
2011-01-20 02:57:00 +00:00
bouyer
07247bb748 - Implement prop_{array,dictionary}_copyout(), based on
prop_{array,dictionary}_copyout_ioctl().
- Implement prop_{array,dictionary}_recv_syscall(), which
  takes as parameter the pref we got from kernel and internalize it,
  and unmaps the buffer prop_{array,dictionary}_copyout() mapped for us.
- add a prop_{array,dictionary}_send_syscall() for symetry, which is
  an alias to prop_{array,dictionary}_externalize_to_pref()

Discussed on tech-kern@ and tech-userlevel@
2011-01-19 20:34:23 +00:00
pooka
11b5103ee7 Do the standard dance for sendto/recvfrom since nspluginwrapper
wants to use them.  XXX: need to fold the dance sequence into a
common routine.
2011-01-19 11:27:01 +00:00
matt
8ef507a844 Fix some bugs introduced when switching to new GOT/PLT format. 2011-01-19 02:47:01 +00:00
pooka
dda8526653 fix lp64 snafu (hopefully)
from pgoyette
2011-01-18 23:43:21 +00:00
pooka
d36a58c27d hook librumphijack to the build 2011-01-18 20:09:37 +00:00
pooka
35dfb75868 comment out DBG and NOGCCERROR, use proper LIBDPLIBS form 2011-01-18 19:53:23 +00:00
pooka
f6eee6f557 * attempt to match libc non-compat names (XXX: needs work)
* make shutdown() a dual-stack call
* flip the default to use host for PF_UNIX, since that's generally
  the desired case (because of X)
2011-01-18 19:41:02 +00:00
matt
2f86908fcf Use PRINTOBJDIR to get the object directory of libc and use that with -I. 2011-01-18 16:41:51 +00:00
pooka
2c78c39d6a pollts:
Since fds[] does not go to both kernels, set revents to 0 when
splitting the vector.  Now any stale revents passed by the caller
do not get counted as results for the kernel which did not "win"
the poll.

This fixes a situation where a firefox transfer would occasionally
stall.  Now firefox works full speed with a rump networking stack.
2011-01-18 16:00:04 +00:00
pooka
81ca4f22d1 use -D_REENTRANT (should currently have no effect, but better safe
than sorry if someone adds uses of stdio macros)
2011-01-18 15:00:22 +00:00
pooka
613ebae808 Don't count sparse elements in the poll vector for host fds. 2011-01-18 14:51:14 +00:00
pooka
ac1dfbf509 Fix conversion: there are 1000*1000 nanoseconds in a millisecond, not 1000. 2011-01-18 14:45:30 +00:00
pooka
07d03119a0 Fix dup2 mask so that dup2'ing a rump kernel fd to 1 does not cause
stderr to be treated as a rump kernel fd as well.  Makes e.g.
bozohttpd work better with stderr logging.

Also, add aborty stubs for kqueue.
(implementing kqueue is even trickier than implementing select/poll
since we need to keep state for two kqueue fd's)
2011-01-18 11:04:10 +00:00
matt
57d93d8715 Cleanup the o32 compat build test. 2011-01-18 08:12:05 +00:00
matt
dfe29b1db4 Change to deal with callframe changes 2011-01-18 01:23:24 +00:00
matt
bd081d44b9 Make the MIPS N32/N64 ABIs properly support 128-bit long doubles. With this
change, we should be fully conformant with the N32 and N64 ABIs.
Add {fpclassify,infinity,isnan,ininf,signbit}l_ieee754.c back to lib/libc/gen.
Note that infinityl_ieee754.c will work with either 64-bit, 80-bit, or
128-bit long doubles.
2011-01-17 23:53:03 +00:00
matt
7d92b19968 Make __cerror hidden. 2011-01-17 23:34:44 +00:00
matt
e4100763e4 cleanup format of #ifdef 2011-01-17 23:32:31 +00:00
agc
f9dd05cc12 Hook libisns into the build, and modify the set lists accordingly.
Note the addition of iSNS protocol support in doc/CHANGES

With thanks to Wasabi Systems for contributing the code.
2011-01-17 20:39:03 +00:00
pooka
d8244e0b17 Use host_close() instead of close() where we know it to be the
right interface.
2011-01-17 16:30:09 +00:00
pooka
6054dbc060 Adapt to rump syscall changes. The correct rump compat syscall is
now automatically picked based on the ABI of the target the library
is compiled for.

(the host libc symbolname to override still needs a little attention
based on the system version)
2011-01-17 16:27:54 +00:00
matt
50078c4d66 Add long double functions for eq,ne,gt,le,ge,lt,neg ops. 2011-01-17 10:08:35 +00:00
matt
cbf89944a0 Add -D_REENTRANT 2011-01-17 09:43:56 +00:00
matt
51db1c5cf3 Kill _NOREGNAMES. Everything should be using %rX now. If it doesn't it
soon will.
2011-01-17 08:23:53 +00:00
wiz
83a6212df8 Typo fixes, use more markup. 2011-01-16 08:00:01 +00:00
matt
2dd1b647a7 For cerror, allow -I../libc to allow inclusion of any assym.h, if up. 2011-01-16 03:29:36 +00:00
christos
7350622ee8 off by one in fetching history data. From: Gerry Swislow 2011-01-16 03:05:51 +00:00
matt
36cd488617 align comments 2011-01-16 02:45:48 +00:00
matt
b79441d450 Switch to the PIC_GOTSETUP/PIC_TOCSETUP macros for PIC code. Now libc
will be built to use secureplt by default.
2011-01-16 02:43:10 +00:00
agc
dc2ecebec9 Initial import of libisns, contributed to the NetBSD Foundation by
Wasabi Systems, Inc.

libisns(3) is an implementation of the iSNS protocol as defined in
IETF RFC 4171, exporting an API that simplifies Internet Storage Name
Service (iSNS) client implementations.
2011-01-16 01:22:50 +00:00
christos
b163cf8017 Fix reversed oveflow check. 2011-01-15 15:42:10 +00:00
martin
cca650856d Backout previous, it breaks the build big time and causes e.g. date(1)
and top(1) to dump core.
2011-01-15 12:31:56 +00:00
plunky
f14c3542ea add sdp_put_[u]int64() .Fn prototypes to list 2011-01-15 11:51:25 +00:00
matt
cf88c3890b Use END(foo) everywhere.
Make __cerror hidden.
Use non-PLT calls to __cerror.
Use assym.h when appropriate.
Use addi to adjust stack instead of loading it.
Add __RCSIDs
Force -D_NOREGNAMES for all .S files.
[this is all in preperation for secure plt support]
2011-01-15 07:31:11 +00:00
christos
dd5b7b1566 don't depend on integer oveflow wrapping to detect it. From Paul Eggert in
the tz mailing list.
2011-01-14 23:35:07 +00:00
pooka
9fba158b8b Add RUMPSP_RAISE: the kernel sends a signal to the client. 2011-01-14 13:12:14 +00:00
jruoho
b19fbfbfda Xref strsuftoll(3) and orders(7). 2011-01-14 10:08:57 +00:00
matt
958d64ed82 Generate symbol constants for UC_GREGS_* and CALLFRAME*. 2011-01-14 06:15:27 +00:00
matt
2c2c9e807e Change __cerror to be marked hidden and change callers to avoid the PLT. 2011-01-14 06:12:16 +00:00
matt
314296c406 Let libposix and librt have their own version of __cerror (__posix_cerror and
__rt_cerror).  This enables each library (including libc) the oppurtunity to
make its __cerror hidden and avoid being called via the PLT.  No user visible
differences to no need to bump the minor number.
2011-01-14 05:19:59 +00:00
joerg
d3a052c472 Allow use of traditional CPP to be set on a per platform base in sys.mk.
Honour this for dependency processing in bsd.dep.mk.  Switch i386 and
amd64 assembly to use ISO C90 preprocessor concat and drop the
-traditional-cpp on this platform.
2011-01-12 23:12:10 +00:00
joerg
0e4ac962b5 Remove NOMANDOC, the documents are at least parsed somewhat sensible. 2011-01-12 23:03:55 +00:00
pooka
3626eb4b01 call procexit when a connection closes 2011-01-12 12:52:16 +00:00
yamt
79d46db770 typo in a comment 2011-01-10 23:20:45 +00:00
pooka
5064fa59e6 A bunch of improvements:
* don't hold spc mutex while sending data
* use send() for the banner to avoid SIGPIPE in case a client
  connects and immediately goes away
* fix error path locking
* use kevent() instead of pollts() in the client.  Apparently that
  is the only sensible way for a library to support both multithreading
  and signal-reentrancy in a race-free manner.
  (can I catch all signals with one kevent instead of installing
  NSIG different ones??)
* mark client comm descriptor non-blocking so that clients have
  better signal-interruptibility (we now sleep in signal-accepting
  kevent() instead of signal-masked recvfrom())
2011-01-10 19:49:43 +00:00
christos
880fe46bea remove clauses 3/4 2011-01-10 16:42:36 +00:00
pooka
52fffe2163 g/c code which is unused in the server 2011-01-10 11:57:53 +00:00
wiz
e348791317 Sort errors, fix xref, don't xref itself. 2011-01-10 06:26:30 +00:00
christos
c5aa3a8776 add sigqueue 2011-01-10 04:41:27 +00:00
pooka
81131c3a38 Networked X11 clients have the annoying property that they need to
contact the X server.  Since most of the useful cases these days
are local, add a toggle which forwards PF_LOCAL sockets to the host
and all other protocol families to the rump kernel.

This makes an unmodified firefox work with a rump TCP/IP stack.
I'm sure someone will find applications for being able to run
multiple web browser profiles on one OS with each browser having
a different IP address in the same subnet ...
2011-01-09 19:56:33 +00:00
pooka
2ec0087d6f Don't depend on malloc(0) returning non-NULL. 2011-01-09 14:15:06 +00:00
pooka
55d21df89f Separate rw_data and rw_done. Otherwise we don't get wakeups for
requests which have a 0-length response (such as copyin 0/0).

This change makes links(1) work against a rump kernel which contains
rumpnet_local.  The presence of unix domain sockets caused links
to select() with 0 fds and a timeout, and because copyin never woke
up in the kernel the application blocked indefinitely.
2011-01-09 14:10:03 +00:00
pooka
bfa098ff96 dprintf to stderr. stop doing it if stderr_fileno gets dup2()'d 2011-01-09 10:28:46 +00:00
jakllsch
cfb57741fb Imlementations of fmax, fmaxf, fmin and fminf libm functions for VAX. 2011-01-09 02:32:13 +00:00
pooka
8ee1967622 Support dual kernel select() by emulating it with pollts(). It
would have been much easier if up to and including 5.0 we wouldn't
silently cap the nfds argument to poll(!!!).

Makes things like socket(1) work out-of-the-box, and pretty much
every other decidedly prehistoric select() user.
(netcat is a slight exception since it sets FD_SETSIZE, a.k.a.
interface-of-the-year, to 16)
2011-01-08 21:30:24 +00:00
pooka
270275f700 support pollts and rewrite poll in terms of pollts 2011-01-08 18:11:46 +00:00
pooka
1cc3ec9f1f Support fork() and dup2().
This is sufficient to make an unmodified httpd(8) be able to serve
pages via a rump networking stack.
2011-01-08 14:19:27 +00:00
pooka
e9d1107acf Begin work on a syscall hijacking library which can be LD_PRELOADed
to convince non-rumped applications to communicate with a rump
kernel instead of the host kernel.  The precision of what goes
where is not exactly surgical, but for example when wanting to
debug a web server's TCP/IP stack interaction, it might be enough.
When all you have is a hand grenade, all problems look like a ....
hmm?

There's still plenty to figure out.  For example, I'm not sure what
the user interface will be like.  Now it just attempts to hijack
network communication.  It also needs to sync with symbol renaming
in libc, and maybe autogenerate the non-schizophrenic wrappers
where the communication is heading to exactly one destination, lest
I'll be a mummmy by the time I finish writing them all.  As a fun
example of a non-non-schizophrenic one, consider poll().

Work in progress, but I managed to get two non-rumped netcats
talking to each other or fetching the index from a non-rumped
thttpd.  telnet works in one direction (i can read the data from
netcat, but anything i send back is not printed).  bozohttpd uses
dup2() which i haven't bothered to address yet, etcetc.

(not hooking this up the build for now)
2011-01-07 19:52:43 +00:00
pooka
91aad9bd60 Make rumpclient impervious to LD_PRELOAD syscall hijacking by using
dlsym(RTLD_NEXT) to lookup a host_syscall() function pointer which
is used instead of syscall() to communicate with the kernel server.

WARNING: popular opinion classifies this as "ugly code".  if you
have a weak heart/mind/soul/sole meuniere, read max. 1 line of the
diff per day, preferably with food.
2011-01-07 19:37:51 +00:00
pooka
357983cc1c Make P2K_WIZARDUID require a valid integer instead of defaulting to root. 2011-01-07 16:02:32 +00:00
pooka
0d0a5842f8 Document how to get debug info for the mount. 2011-01-07 15:50:40 +00:00
pooka
27daa694a2 In case of a P2K_DEBUG mount, dump mount point contents when the
process receives SIGINFO.  Additionally, dump vnode status if the
process gets SIGUSR1 (can be quite quite verbose, therefore not
displayed with SIGINFO).
2011-01-07 15:47:14 +00:00
pooka
d32ef440df in case unmount fails (it never should), do a full mountpoint dump 2011-01-07 15:30:09 +00:00
pooka
cc30c34a93 Remove the componentname-saving code since it was addressing
SAVENAME/HASBUF/SAVESTART and they don't exist anymore (and the
removed code didn't compile on nb5).
2011-01-07 11:15:30 +00:00
pooka
4063bc515b Fix file handles. Problem reported & fix tested by kefren. 2011-01-07 10:18:06 +00:00
njoly
416b82e2e3 Fix macro (DV -> Dv). 2011-01-06 15:22:20 +00:00
blymn
0a965fa7ed Back out change for assume_default_colors as it was not correct. 2011-01-06 11:29:40 +00:00
pooka
c45d9404c0 Make rumpclient syscalls safe to call from signal handlers. 2011-01-06 06:57:14 +00:00
christos
221dcf2e47 Since localsub and gmtsub are called recursively to search for the local
time, setting EOVERFLOW at the inmost level will unfortunately persist,
even if later calls to those functions succeed. Move the EOVERFLOW setting
to the top level calls.
2011-01-06 02:41:34 +00:00
pooka
f4b63a89c1 Release sender lock before zeroing out "wanted" status during
violent disconnect.  Fixes some race conditions (maybe the one
occasionally showing up on tests/rump/rumpkern/t_stress).

thanks to schmonz for some discussion
2011-01-05 22:57:01 +00:00
pooka
fd993ea3d0 Support fork() for rumpclient users. 2011-01-05 17:14:50 +00:00
pooka
de27b28026 Fix fd leak also in non-NetBSD code path. 2011-01-05 09:43:00 +00:00
wiz
aff1729a2c Fix fdleak in error case. Found by cppcheck. 2011-01-05 00:09:43 +00:00
wiz
e97508602c Fix fdleak in #ifdef DEBUG. Found by cppcheck. 2011-01-05 00:03:52 +00:00
martin
27868e15e9 Special-case the (unlikely in practice) call with len = 2 - previously
the code would not have swapped anything. Problem pointed out by
sparc64 automatic test run.
2011-01-04 17:14:07 +00:00
pooka
d67d4f135c document rump_pub_lwproc_rfork() 2011-01-02 13:03:29 +00:00
pooka
3daddc031c rump_lwproc_newproc -> rump_lwproc_rfork 2011-01-02 13:01:45 +00:00
dholland
b845056678 Add an INRELOOKUP namei flag. Sigh. (We don't need more namei flags.)
However, because of a protocol deficiency puffs relies on being able
to keep track of VOP_LOOKUP calls by inspecting their contents, and
this at least allows it to use something vaguely principled instead of
making wild guesses based on whether SAVESTART is set.

Update libp2k to use INRELOOKUP instead of SAVESTART.
2011-01-02 05:04:58 +00:00
pooka
2aa9fbc0b2 Allow rump kernel to call dlsym(RTLD_DEFAULT). 2010-12-30 15:47:30 +00:00
christos
61a5737280 off by one 2010-12-28 16:19:25 +00:00
jnemeth
fd52cff654 vsnprintf_ss does NOT handle floating point formats 2010-12-26 12:39:54 +00:00
blymn
bcc3426f98 Little bit more debug information. 2010-12-25 10:08:20 +00:00
blymn
58f5b3b32b Ignore request to change the values of colour pair 0
Explicitly set foreground and/or background colours when -1 is passed
to assume_default_colors()
2010-12-25 10:05:08 +00:00
blymn
0ddf818977 Allow attributes to be applied to the default line drawing characters
by just passing attributes as arguments to the wborder call.
2010-12-25 09:59:52 +00:00
christos
6ef213c85c restore lost overlow check fix. 2010-12-24 15:47:39 +00:00
skrll
f1d73a2c94 Add support for DF_1_BIND_NOW, DF_1_NODELETE and DF_1_NOOPEN marked
objects, and the RTLD_NODELETE and RTLD_NOLOAD flags to dlopen(3).

Mark libpthread as DF_1_NOOPEN and use it to test the functionality.

Somewhat taken from FreeBSD.

Fixes PR 42029.

OK from christos and joerg.
2010-12-24 12:41:42 +00:00
christos
5448347830 make this thread-safe. We could use localtime_tz and make it even better,
but not now.
2010-12-24 03:37:37 +00:00
christos
736ce759b3 use pthread__stacksize since size has not been initialized yet. 2010-12-22 22:41:45 +00:00
christos
5cea6e6df8 only mprotect base if we moved it. 2010-12-22 22:19:46 +00:00
wiz
207ab8d006 Add punctuation. 2010-12-22 17:06:03 +00:00
christos
92a95e7ba4 document vsnprintf_ss 2010-12-22 16:59:10 +00:00
wiz
c03e55e8e9 Remove trailing whitespace. 2010-12-22 09:12:28 +00:00
christos
a504543f04 fix incorrect overflow check from Nicholas Joly 2010-12-21 18:13:02 +00:00
christos
537ea48995 - document limitations
- add extra number name parsing
2010-12-21 00:15:10 +00:00
christos
2e63e08217 - fix off by one in comparison with 69 (it should be 70)
- add aliases for 1 (one), 2 (two), etc.
- allow parsing of HH:MM:SS.sss as the man page mentions, and ignore sss
2010-12-21 00:14:10 +00:00
wiz
817bb39979 Remove trailing whitespace; sort errors; spell "variadic" like
Wikipedia or GNU libc.
2010-12-19 22:19:27 +00:00
christos
4d653f4318 Make the ioctl prototype reflect reality and explain why. Also mention that
the generic file descriptor manipulation ioctls are superceded by the
equivalent fcntl one.
2010-12-19 16:54:10 +00:00
jruoho
5c9efd7bb1 Xref __builtin_return_address(3). 2010-12-19 09:33:52 +00:00
jruoho
a20c806d96 Small modifications to wording, tidy up SEE ALSO. 2010-12-19 08:28:40 +00:00
jruoho
6f013d76df Fix SYNOPSIS, add CAVEATS. 2010-12-19 08:21:36 +00:00
christos
66f16a1fa6 I've had this patch in my tree for a while and since it only improves
the situation, I decided to commit it. There is an inherent problem
with ASLR and the way the pthread library is using the thread stack.

Our pthread library chooses that stack for each thread strategically
so that it can locate the location of the pthread struct for each
thread by masking the stack pointer and looking just below the red
zone it creates. Unfortunately with ASLR you get many random values
for the initial stack, and there are situations where the masked
stack base ends up below the base of the stack. (this happens on
x86 when the stack base happens to be 0x???02000 for example and
your mask is stackmask is 0xffe00000). To fix this, we detect the
pathological cases (this happens only in the main thread), allocate
more stack, and mprotect it appropriately. Then we stash the main
base and the main struct, so that when we look for the pthread
struct in pthread__id, we can special case the main thread.

Another way to work around the problem is unlimiting stacksize,
but the proper way is to use TLS to find the thread structure and
not to play games with the thread stacks.
2010-12-18 15:54:27 +00:00
njoly
53ac8d2f21 Fix typo in cross-refernce. 2010-12-17 23:57:07 +00:00
christos
3a693ad8ca PR/44248: Antti Kantee: Fix multi-threaded localtime hang. 2010-12-17 23:11:57 +00:00