Commit Graph

15946 Commits

Author SHA1 Message Date
msaitoh
78817e627e Remove unused lib/libl. Approved by christos. 2012-09-03 13:23:13 +00:00
pooka
bcc69e9323 one more patch for supporting linux-based networking clients 2012-09-03 12:07:42 +00:00
pooka
82e980c205 More fixes for Linux (or glibc, really). 2012-09-03 11:33:35 +00:00
drochner
0e9330ed96 Align the stack to a 16-byte boundary on LWP creation.
This is more than required by the ABI, but it makes programs using SSE
in a thread work without extra compiler flags or performance hit.
2012-08-31 20:57:24 +00:00
drochner
8588929dc5 Add "consttime_bcmp" and "explicit_bzero" functions for both kernel
abd userland, as proposed on tech-security, with explicit_bzero using
a volatile function pointer as suggested by Alan Barrett.
Both do what the name says. For userland, both are prefixed by "__"
to keep them out of the user namespace.
Change some memset/memcmp uses to the new functions where it makes
sense -- these are just some examples, more to come.
2012-08-30 12:16:48 +00:00
dholland
8c41afe697 Check for NULL *before* using ALIGN().
I don't remember what prompted this, but it's obviously a desirable fix
and I've been carrying it on a heavily-used machine for more than a year.
2012-08-29 18:50:35 +00:00
msaitoh
e093807b3b Remove unused variable. Approved by pooka. 2012-08-29 10:38:53 +00:00
martin
81d4664037 Do not fail kvm_dump_mkheader without setting an error message 2012-08-26 23:09:42 +00:00
pooka
c62329f7d3 Make librumphijack compile and work on Linux. Do not try to hijack
calls which are not supported on Linux and therefore cannot be
handled by the rump kernel side syscall emulation (not that they'd
be present in the calling binaries anyway).
2012-08-25 18:00:06 +00:00
matt
08072c6632 Fix fini processing. 2012-08-25 15:39:05 +00:00
matt
5147314742 Fix code around __register_frame_info (fixes core dumps) 2012-08-24 16:37:45 +00:00
dholland
7376117cc5 Some more notes for libc bump time that I had lying around. 2012-08-24 06:12:52 +00:00
joerg
067600c8cf Revert last, it breaks the tricks xsrc uses. 2012-08-23 21:21:14 +00:00
joerg
8e96262375 Remove SHLIBINSTALLDIR and SHLINKINSTALLLIBDIR. Add rpath entries, if
SHLIBDIR differs from /usr/lib.
2012-08-23 15:45:02 +00:00
dsl
e2ff5b6fd5 I'm fairly sure the libc rules require that arc4random_addrandom,
arc4random_buf, arc4random_stir and arc4random_uniform be weak.
2012-08-20 21:38:09 +00:00
dsl
75ea4d15ba arc4 is a random number sequence, there is no point using its own
output values to determine a number of output values to skip.
Skipping values on any possibly random event might be worth while, as
  might using the keying algorithm to stir in a possibly random value.
2012-08-20 20:32:09 +00:00
dsl
62af4c5505 Since 'rs' is statically initialised (not bss) its s[] might as well be
compile-time initialised as well.
arc4_init) is the same as arc4_stir().
Initialise rs.i to 0xff (not 0) so that the first key byte is processed
  with rs.i == 0 without the splurios rs.i-- in arc4_addrandom().
Remove the assignment rs.j = rs.i at the end of arc4_addrandom(), it isn't
  necessary and I can see no justificationm for it.
Replace RSIZE with __arraycount(as->s), however it is manifestly 256 (more
  correctly the number of values in rs.i and rs.j).
2012-08-20 20:27:46 +00:00
joerg
11b4a6201b Add tic dependency only for the USETOOLS case. 2012-08-20 15:44:02 +00:00
dsl
6f85c32318 cache rs.i and rs.j in arc4random_buf() since the compiler can't be
told that buf[] dosn't alias them.
Reduces the number of instructions inside the loop.
All the other functions are ok.
2012-08-18 15:55:07 +00:00
dsl
ad728d4784 Change the logic used for thread locking to make the code more readable.
The effect on the object code is to replace a function call with a
  branch that will predict correctly in the non-threaded case.
Minor optimise of some other paths.
2012-08-18 15:04:53 +00:00
dsl
d390b20f1e Use an inline function to check for initialisation, and an non-inlined
one to do the actual initialise.
Fixes lib/46751 by removing all the replicated tests in each function.
2012-08-18 14:42:46 +00:00
joerg
933525b99b Implement build_install in src/lib/Makefile, which traverses the
subdirectories and invokes dependall/install. Do this in groups
delimited by .WAIT to ensure that depending libraries can use the
installed versions and don't need to know the locations in the source
tree.

Use this new target in src/Makefile to replace most of the adhoc library
logic with two special cases, src/lib and src/compat. Adjust
sys/Makefile to include the module directory when building them. Add
some necessary .WAITs in src/lib/Makefile to reflect the dependencies
from src/Makefile and also add the rump libraries here.
2012-08-17 16:22:27 +00:00
wiz
9cdff3cdd6 Bump date for previous. 2012-08-16 11:28:48 +00:00
wiz
0e61416223 Whitespace fixes. Bump date for previous. 2012-08-16 11:28:38 +00:00
manu
d256e38414 Fix regression that has been introduced when the lookup/reclaim race
condition was addressed in libpuffs by counting lookups.

The fix assumes that cookies map to struct puffs_cookie, which has not
been documented as a requirement for filesystems using libpuffs. As an
example, we got burnt by this assumption in libp2k (kern/46734), and
we fixed bit by actually mapping libp2k cookies to struct puffs_node.

It is unlikely, but there may be third party filesystems that use cookies
unmapped to struct puffs_node, and they were left broken for now.

- we introduce a puffs_init() flag PUFFS_FLAG_PNCOOKIE that let filesystems
inform libpuffs that they map cookies to struct puffs_node. Is that flag
is used, the lookup/reclaim race condition fix is enabled. We enable the
flag for libp2k.

- filesystems that use puffs_pn_new() obviouslty use struct puffs_node
and gain PUFFS_FLAG_PNCOOKIE automatically even if they did not specify
it in puffs_init(). This include all our PUFFS filesystem in-tree except
libp2k.

- for filesystems not willing to use struct puffs_node, we introduce a
reclaim2 vnop, which is reclaim with an additionnal lookup count argument.
This vnop let the filesystem implement the lookup/reclaim race fix on
its own.
2012-08-16 09:25:43 +00:00
matt
2f1e74f8c5 Add a pthread__smt_wake and add support for it on arm along with
pthread__smt_pause.  These are implemented using the ARM instructions
SEV (wake) and WFE (pause).  These are treated as NOPs on ARM CPUs that
don't support them.
2012-08-16 04:49:47 +00:00
rmind
49540518f9 - {npf_mk_rproc,npf_nat_save}: fix the fetching of {rproc-ptr,id_ptr}.
- npf_rproc_setlog: initialise variables to 0, as keys may not exist.

Bugs found by mlelstv@ while testing on Amiga.
2012-08-15 18:44:56 +00:00
drochner
b0ce37c2b0 return errno if pthread_create hits the system limit, not just -1
(this is not entirely correct because it can return ENOMEM which is
not mentioned in the spec, but there are other places in pthread_create
whete ENOMEM is returned -- it at all, this should be fixed everywhere)
2012-08-15 13:28:32 +00:00
matt
6456ecbae9 crt* files for ARM EABI. This is pretty different from OABI. crti.S only
has sysident, crtn.S is empty.  True dtor/ctor processing is done elsewhere
(in crt0.o for static or the rtld for dynamic images).  All that is done in
here is either a call to __cxa_finalize (dtor, only when SHARED) or
register_frame_info and _JV_RegisterClasses.
2012-08-13 02:49:04 +00:00
matt
6de169804e Add support for init_array/fini_array (conditionalized on HAVE_INITFINI_ARRAY).
[This is needed for ARM EABI.]
2012-08-13 02:15:35 +00:00
christos
38b98e7896 more markup, sort options 2012-08-12 13:31:41 +00:00
rmind
63f44833ba - Extend npftest: add ruleset inspection testing from the config generated
by npfctl debug functionality.  Auto-create npftest interfaces for this.
- NPF sessions: combine protocol and interface into a separate substructure,
  share between the entries and thus fix the handling of them.  Constify.
- npftest: add regression tests for NAT policies.
- npf_build_nat: simplify and fix bi-NAT regression.
- Bump yacc stack size for npfctl.
2012-08-12 03:35:13 +00:00
manu
519089c8d9 libpuffs and libp2k both use the cookie to different structure, which now
leads to struct p2k_node corruption now that libpuffs used pn_nlookup field
in struct puffs_node to avoid race conditions.

Attempt to fix that by adding a struct puffs_node at the beginning of struct
p2k_node. This seems to fix kern/46734
2012-08-12 02:51:18 +00:00
matt
94f921d6a9 Update copyright year. 2012-08-11 07:26:25 +00:00
matt
7f3cb3d165 Replace copyright since it now has new contents 2012-08-11 07:25:44 +00:00
matt
dd044a189e Fix typo. 2012-08-11 07:25:13 +00:00
matt
c135af1c81 USE_COMPILERCRTSTUFF=no support for arm
This passes all the lib/csu atf tests.
2012-08-11 01:33:36 +00:00
wiz
aceedc0215 Use more markup. New sentence, new line. Bump date for previous. 2012-08-10 21:00:45 +00:00
manu
2a9a80bb36 Add PUFFS_KFLAG_CACHE_DOTDOT so that vnodes hold a reference on their
parent, keeping them active, and allowing to lookup .. without sending
a request to the filesystem.

Enable the featuure for perfused, as this is how FUSE works.
2012-08-10 16:49:35 +00:00
martin
78879908ec Slightly simplify and make position independend.
Part of fixing PR port-sparc64/46724.
2012-08-10 16:37:31 +00:00
martin
cb3d712bd2 Make this position independend (for -pie executables) 2012-08-10 12:37:39 +00:00
joerg
e16a720f89 Don't depend on HAVE_GCC being always defined. 2012-08-10 12:20:10 +00:00
manu
244cd4a742 Fix race condition between (create|mknod|mkdir|symlino) and reclaim, just
like we did it between lookup and reclaim.
2012-08-10 08:42:10 +00:00
joerg
65d085af96 crypt-sha1.c flags apply to all compilers in the tree, drop conditional. 2012-08-10 04:30:47 +00:00
christos
b6be6961a7 merge 2012e 2012-08-09 12:38:25 +00:00
wiz
6c95282a11 Restore RCS Id lost in previous. 2012-08-08 20:16:50 +00:00
tnozaki
277ab1b54d fix PR lib/46781 statically compiled bash makes locale loading fail.
analyzed and  patch provided by enami@ nonaka@ obache@ soda@, thanks.
patch modified by me.
2012-08-08 18:37:26 +00:00
matt
e4c3811f58 Fix copyright. 2012-08-08 16:58:28 +00:00
matt
c79f17b998 Add a long double version of trunc. 2012-08-08 16:57:24 +00:00
christos
b559c1ff19 exclude rump libraries if MKRUMP = no 2012-08-08 14:01:16 +00:00