Commit Graph

8453 Commits

Author SHA1 Message Date
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
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
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
joerg
3b9c90a96e Define namespace remap macros before including sys/tls.h. 2011-03-09 23:50:40 +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
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
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
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
martin
a5ad420211 Use sigqueueinfo() instead of raise() to generate exceptions. Provide
minimalistic siginfo data.
2011-03-04 11:48:58 +00:00
wiz
9e76b48586 Merge EINVAL descriptions; sort errors alphabetically; bump date. 2011-02-28 07:17:02 +00:00
dholland
4669b00fb3 Improve discussion of alignment and rounding per PR 33527. 2011-02-28 04:03:00 +00:00
christos
ebc56329ec Add <stdint.h> for uint8_t from Jess Thrysoee 2011-02-27 01:53:22 +00:00
njoly
51cca89d16 Switch from floating point to fixed point integer for run sizes maths.
From FreeBSD (part of revision 1.154).
2011-02-26 23:27:49 +00:00
pooka
74ed8d21f3 fix my whitespace copypaste 2011-02-25 11:55:28 +00:00
pooka
ba7613308e Fix LE softfloat (mostly theoretical) and comment.
from Alessandro Forin
2011-02-25 11:53:07 +00:00
joerg
1631a78097 Allow storing and receiving the LWP private pointer via ucontext_t
on all platforms except VAX and IA64. Add fast access via register for
AMD64, i386 and SH3 ports. Use this fast access in libpthread to replace
the stack based pthread_self(). Implement skeleton support for Alpha,
HPPA, PowerPC, SPARC and SPARC64, but leave it disabled.

Ports that support this feature provide __HAVE____LWP_GETPRIVATE_FAST in
machine/types.h and a corresponding __lwp_getprivate_fast in
machine/mcontext.h.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
2011-02-24 04:28:41 +00:00
joerg
9674b81ed9 Introduce __weakref_visible to handle the different required visibility
for weak references. GCC 4.2+ and Clang require static, older GCC wants
extern. Change __weak_reference to include sym. This requires changes
the existing users to not reuse the name of the symbol, but avoids
further differences between GCC 4.1 and GCC 4.2+/clang.
2011-02-22 05:45:05 +00:00
christos
10e6f9749d remove duplicate weak aliases 2011-02-21 22:07:44 +00:00
pooka
aa7f369f19 v-node -> vnode
(for consistency)
2011-02-21 07:11:11 +00:00
joerg
4bf46019d9 Redo the SSP wrappers to be transparent on the resulting object files.
This works by having the inline wrapper calling a second function which
uses renaming to output the correct function name.
2011-02-21 00:40:07 +00:00
joerg
e189b01ad3 Support the different weakref semantic in GCC 4.2 and clang. 2011-02-18 23:41:57 +00:00
tron
f1f20d6adf Fix build with SSP enabled. 2011-02-16 20:20:25 +00:00
christos
c464e0ebc5 Fix non-fortify build. 2011-02-15 16:29:09 +00:00
christos
26104203c2 Don't forget to set errno. Pointed out by yamt. 2011-02-13 23:58:40 +00:00
pooka
79b560da8c Don't do highestFD check with USE_POLL. It provides no benefit
but causes a dependency between RLIMIT_NOFILE and rumphijack FDOFF.

christos ok
2011-02-09 09:46:59 +00:00
joerg
2c39cf5f91 Don't define weak aliases in the SMALL case. They conflict with the real
function name since SMALL doesn't use the normal rename logic.
2011-02-07 21:39:47 +00:00
wiz
6ef76bc469 Remove trailing whitespace. 2011-02-05 00:24:08 +00:00
christos
6f31775ce6 bump for arc4random_{buf,uniform} 2011-02-04 22:07:41 +00:00
christos
a52c04784a add arc4random_{buf,uniform}, from OpenBSD. 2011-02-04 22:07:07 +00:00
christos
41ed061fdf PR/44514: Andrey Simonenko: Buffer underflow in RPC library for non-blocking
TCP sockets
2011-02-04 17:38:15 +00:00
christos
4a4722163b knf - no functional changes 2011-02-04 17:36:54 +00:00
matt
90a7a07b86 Use RT_ROUNDUP instead of a private copy since that's what the kernel uses.
(t_getaddrinfo passes for both i386 (compat_netbsd32) and amd64 with this
change).
2011-02-04 02:01:12 +00:00
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
christos
984dfe5f9f bump down the recursion limit to 64. 2011-01-31 15:07:29 +00:00
christos
0f6e9a96aa Limit recursions to avoid DoS attacks from Maksymilian Arciemowicz 2011-01-31 04:20:50 +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
njoly
5488d3a23f Add section 3 for getpwuid_r xref. 2011-01-26 22:00:45 +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