summaryrefslogtreecommitdiff
path: root/src/secmem.c
Commit message (Collapse)AuthorAgeFilesLines
* More clean up.NIIBE Yutaka2022-09-161-1/+1
| | | | | | | | | | * cipher/cipher-ccm.c (_gcry_cipher_ccm_tag): Add static qualifier. * mpi/ec-ed25519.c: Include ec-internal.h. * src/secmem.c (MB_WIPE_OUT): Remove extra semicolon. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* Fix function prototypes.NIIBE Yutaka2022-09-081-2/+2
| | | | | | | | | | * random/random-csprng.c (random_poll): It's no args. * src/secmem.c (_gcry_secmem_module_init): Likewise. (_gcry_secmem_term): Likewise. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* secmem: Remove RISC OS support.NIIBE Yutaka2022-06-011-6/+0
| | | | | | | | * src/secmem.c [__riscos__]: Remove. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* secmem: Clean up ERRNO handling.NIIBE Yutaka2022-06-011-10/+6
| | | | | | | | | * src/secmem.c (lock_pool_pages): Use ERR only for the return value from mlock. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* secmem: Remove getting cap_ipc_lock by capabilities support.NIIBE Yutaka2022-06-011-42/+1
| | | | | | | | | | | * src/secmem.c (lock_pool_pages): Remove escalation of the capability. -- With CAP_SETPCAP, it might make sense before Linux 2.6.24 when file capabilityes were not supported. But not any more. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* Use offsetof instead of null ptr calculation.NIIBE Yutaka2022-04-191-1/+1
| | | | | | | | * src/secmem.c (_gcry_secmem_realloc_internal): Use offsetof. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* secmem: Prepare for easier debugging.Werner Koch2018-12-121-5/+25
| | | | | | | | | | | * src/secmem.c (_gcry_secmem_dump_stats): Factor code out to ... (secmem_dump_stats_internal): new. -- This allows to insert call to the dump function during debug sessions inside of the allocators or call secmem_dump_stats_internal from gdb. Signed-off-by: Werner Koch <wk@gnupg.org>
* secmem: fix potential memory visibility issueJussi Kivilinna2018-11-051-6/+37
| | | | | | | | | | | | * configure.ac (gcry_cv_have_sync_synchronize): New check. * src/secmem.c (pooldesc_s): Make next pointer volatile. (memory_barrier): New. (_gcry_secmem_malloc_internal): Insert memory barrier between pool->next and mainpool.next assigments. (_gcry_private_is_secure): Update comments. -- Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
* Fix memory leak in secmem in out of core conditions.Werner Koch2018-10-241-1/+4
| | | | | | | | | * src/secmem.c (_gcry_secmem_malloc_internal): Release pool descriptor if the pool could not be allocated. -- GnuPG-bug-id: 4211 Signed-off-by: Werner Koch <wk@gnupg.org>
* api: Add GCRYCTL_AUTO_EXPAND_SECMEM.Werner Koch2017-11-241-3/+23
| | | | | | | | | | | | * src/gcrypt.h.in (GCRYCTL_AUTO_EXPAND_SECMEM): New enum. * src/global.c (_gcry_vcontrol): Implement that. * src/secmem.c (auto_expand): New var. (_gcry_secmem_set_auto_expand): New. (_gcry_secmem_malloc_internal): Act upon AUTO_EXPAND. -- GnuPG-bug-id: 3530 Signed-off-by: Werner Koch <wk@gnupg.org>
* Fix secmem test for machine with larger page.NIIBE Yutaka2017-11-091-1/+1
| | | | | | | | | | * tests/t-secmem.c (main): Detect page size and setup chunk size. * src/secmem.c (init_pool): Simplify the expression. -- GnuPG-bug-id: 3351 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* secmem: Fix SEGV and stat calculation.NIIBE Yutaka2017-06-021-5/+5
| | | | | | | | | | | * src/secmem (init_pool): Care about the header size. (_gcry_secmem_malloc_internal): Likewise. (_gcry_secmem_malloc_internal): Use mb->size for stats. -- GnuPG-bug-id: 3027 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* Spelling fixes in docs and comments.NIIBE Yutaka2017-04-281-1/+1
| | | | | | | | -- GnuPG-bug-id: 3120 Reported-by: ka7 (klemens) Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* Improve handling of mlock error codes.Werner Koch2016-12-091-10/+10
| | | | | | | | | | | | | | | | | | * acinclude.m4 (GNUPG_CHECK_MLOCK): Check also for EAGAIN which is a legitimate return code and does not indicate a broken mlock(). * src/secmem.c (lock_pool_pages): Test ERR instead of ERRNO which could have been overwritten by cap_from+text et al. -- On FreeBSD, if there are not enough free pages, mlock() can return EAGAIN, as documented in mlock(2). That doesn't mean that mlock is broken. I suspect this same issue also exists on the other BSD's. Suggested-by: Ruben Kerkhof <ruben@rubenkerkhof.com> This is (now) also true for Linux. Signed-off-by: Werner Koch <wk@gnupg.org>
* Implement overflow secmem pools for xmalloc style allocators.Werner Koch2016-12-071-60/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/secmem.c (pooldesc_s): Add fields next, cur_alloced, and cur_blocks. (cur_alloced, cur_blocks): Remove vars. (ptr_into_pool_p): Make it inline. (stats_update): Add arg pool and update the new pool specific counters. (_gcry_secmem_malloc_internal): Add arg xhint and allocate overflow pools as needed. (_gcry_secmem_malloc): Pass XHINTS along. (_gcry_secmem_realloc_internal): Ditto. (_gcry_secmem_realloc): Ditto. (_gcry_secmem_free_internal): Take multiple pools in account. Add return value to indicate whether the arg was freed. (_gcry_secmem_free): Add return value to indicate whether the arg was freed. (_gcry_private_is_secure): Take multiple pools in account. (_gcry_secmem_term): Release all pools. (_gcry_secmem_dump_stats): Print stats for all pools. * src/stdmem.c (_gcry_private_free): Replace _gcry_private_is_secure test with a direct call of _gcry_secmem_free to avoid double checking. -- This patch avoids process termination due to an out-of-secure-memory condition in the MPI subsystem. We consider it more important to have reliable MPI computations than process termination due the need for memory which is protected against being swapped out. Using encrypted swap is anyway a more reliable protection than those mlock'ed pages. Note also that mlock'ed pages won't help against hibernation. GnuPG-bug-id: 2857 Signed-off-by: Werner Koch <wk@gnupg.org>
* Give the secmem allocators a hint when a xmalloc calls them.Werner Koch2016-12-071-3/+7
| | | | | | | | | | | | | | | | | | | | | | * src/secmem.c (_gcry_secmem_malloc): New not yet used arg XHINT. (_gcry_secmem_realloc): Ditto. * src/stdmem.c (_gcry_private_malloc_secure): New arg XHINT to be passed to the secmem functions. (_gcry_private_realloc): Ditto. * src/g10lib.h (GCRY_ALLOC_FLAG_XHINT): New. * src/global.c (do_malloc): Pass this flag as XHINT to the private allocator. (_gcry_malloc_secure): Factor code out to ... (_gcry_malloc_secure_core): this. Add arg XHINT. (_gcry_realloc): Factor code out to ... (_gcry_realloc_core): here. Add arg XHINT. (_gcry_strdup): Factor code out to ... (_gcry_strdup_core): here. Add arg XHINT. (_gcry_xrealloc): Use the core function and pass true for XHINT. (_gcry_xmalloc_secure): Ditto. (_gcry_xstrdup): Ditto. Signed-off-by: Werner Koch <wk@gnupg.org>
* tests: New test t-secmem.Werner Koch2016-12-071-19/+21
| | | | | | | | | | | | | | * src/secmem.c (_gcry_secmem_dump_stats): Add arg EXTENDED and adjust caller. * src/gcrypt-testapi.h (PRIV_CTL_DUMP_SECMEM_STATS): New. * src/global.c (_gcry_vcontrol): Implement that. * tests/t-secmem.c: New. * tests/Makefile.am (tests_bin): Add that test. -- This test does not much right now. Signed-off-by: Werner Koch <wk@gnupg.org>
* Reorganize code in secmem.c.Werner Koch2016-12-061-86/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/secmem.c (pooldesc_t): New type to collect information about one pool. (pool_size): Remove. Now a member of pooldesc_t. (pool_okay): Ditto. (pool_is_mmapped): Ditto. (pool): Rename variable ... (mainpool): And change type to pooldesc_t. (ptr_into_pool_p): Add arg 'pool'. (mb_get_next): Ditto. (mb_get_prev): Ditto. (mb_merge): Ditto. (mb_get_new): Ditto. (init_pool): Ditto. (lock_pool): Rename to ... (look_pool_pages: this. (secmem_init): Rename to ... (_gcry_secmem_init_internal): this. Add local var POOL and init with address of MAINPOOL. (_gcry_secmem_malloc_internal): Add local var POOL and init with address of MAINPOOL. (_gcry_private_is_secure): Ditto. (_gcry_secmem_term): Ditto. (_gcry_secmem_dump_stats): Ditto. (_gcry_secmem_free_internal): Ditto. Remove check for NULL arg. (_gcry_secmem_free): Add check for NULL arg before taking the lock. (_gcry_secmem_realloc): Factor most code out to ... (_gcry_secmem_realloc_internal): this. -- This change prepares future work to allow the use of several pools. Signed-off-by: Werner Koch <wk@gnupg.org>
* Improve GCRYCTL_DISABLE_PRIV_DROP by also disabling cap_ calls.Werner Koch2015-09-071-13/+20
| | | | | | | * src/secmem.c (lock_pool, secmem_init): Do not call any cap_ functions if NO_PRIV_DROP is set. Signed-off-by: Werner Koch <wk@gnupg.org>
* w32: Avoid a few compiler warnings.Werner Koch2015-09-041-35/+39
| | | | | | | | | | | | * cipher/cipher-selftest.c (_gcry_selftest_helper_cbc) (_gcry_selftest_helper_cfb, _gcry_selftest_helper_ctr): Mark variable as unused. * random/rndw32.c (slow_gatherer): Avoid signed pointer mismatch warning. * src/secmem.c (init_pool): Avoid unused variable warning. * tests/random.c (writen, readn): Include on if needed. Signed-off-by: Werner Koch <wk@gnupg.org>
* Use well defined type instead of size_t in secmem.cWerner Koch2015-03-161-5/+4
| | | | | | | | | * src/secmem.c (ptr_into_pool_p): Replace size_t by uintptr_t. -- This is more or less cosmetic. Signed-off-by: Werner Koch <wk@gnupg.org>
* secmem: fix compiler warnings on ARMJussi Kivilinna2014-12-251-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/secmem.c (ADDR_TO_BLOCK, mb_get_next, mb_get_new): Cast pointer from 'char *' to 'memblock_t *' through 'void *'. (MB_WIPE_OUT): Remove unneeded cast to 'memblock_t *'. -- Patch fixes 'cast increases required alignment' warnings seen on GCC: secmem.c: In function 'mb_get_next': secmem.c:140:13: warning: cast increases required alignment of target type [-Wcast-align] mb_next = (memblock_t *) ((char *) mb + BLOCK_HEAD_SIZE + mb->size); ^ secmem.c: In function 'mb_get_new': secmem.c:208:17: warning: cast increases required alignment of target type [-Wcast-align] mb_split = (memblock_t *) (((char *) mb) + BLOCK_HEAD_SIZE + size); ^ secmem.c: In function '_gcry_secmem_free_internal': secmem.c:101:3: warning: cast increases required alignment of target type [-Wcast-align] (memblock_t *) ((char *) addr - BLOCK_HEAD_SIZE) ^ secmem.c:603:8: note: in expansion of macro 'ADDR_TO_BLOCK' mb = ADDR_TO_BLOCK (a); ^ In file included from secmem.c:40:0: secmem.c:609:16: warning: cast increases required alignment of target type [-Wcast-align] wipememory2 ((memblock_t *) ((char *) mb + BLOCK_HEAD_SIZE), (byte), size); ^ g10lib.h:309:54: note: in definition of macro 'wipememory2' volatile char *_vptr=(volatile char *)(_ptr); \ ^ secmem.c:611:3: note: in expansion of macro 'MB_WIPE_OUT' MB_WIPE_OUT (0xff); ^ secmem.c:609:16: warning: cast increases required alignment of target type [-Wcast-align] wipememory2 ((memblock_t *) ((char *) mb + BLOCK_HEAD_SIZE), (byte), size); ^ g10lib.h:309:54: note: in definition of macro 'wipememory2' volatile char *_vptr=(volatile char *)(_ptr); \ ^ secmem.c:612:3: note: in expansion of macro 'MB_WIPE_OUT' MB_WIPE_OUT (0xaa); ^ secmem.c:609:16: warning: cast increases required alignment of target type [-Wcast-align] wipememory2 ((memblock_t *) ((char *) mb + BLOCK_HEAD_SIZE), (byte), size); ^ g10lib.h:309:54: note: in definition of macro 'wipememory2' volatile char *_vptr=(volatile char *)(_ptr); \ ^ secmem.c:613:3: note: in expansion of macro 'MB_WIPE_OUT' MB_WIPE_OUT (0x55); ^ secmem.c:609:16: warning: cast increases required alignment of target type [-Wcast-align] wipememory2 ((memblock_t *) ((char *) mb + BLOCK_HEAD_SIZE), (byte), size); ^ g10lib.h:309:54: note: in definition of macro 'wipememory2' volatile char *_vptr=(volatile char *)(_ptr); \ ^ secmem.c:614:3: note: in expansion of macro 'MB_WIPE_OUT' MB_WIPE_OUT (0x00); ^ secmem.c: In function '_gcry_secmem_realloc': secmem.c:644:8: warning: cast increases required alignment of target type [-Wcast-align] mb = (memblock_t *) ((char *) p - ((size_t) &((memblock_t *) 0)->aligned.c)); ^ Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
* Replace ath based mutexes by gpgrt based locks.Werner Koch2014-01-161-10/+4
| | | | | | | | | | | | | | | | | | | | | * configure.ac (NEED_GPG_ERROR_VERSION): Require 1.13. (gl_LOCK): Remove. * src/ath.c, src/ath.h: Remove. Remove from all files. Replace all mutexes by gpgrt based statically initialized locks. * src/global.c (global_init): Remove ath_init. (_gcry_vcontrol): Make ath install a dummy function. (print_config): Remove threads info line. * doc/gcrypt.texi: Simplify the multi-thread related documentation. -- The current code does only work on ELF systems with weak symbol support. In particular no locks were used under Windows. With the new gpgrt_lock functions from the soon to be released libgpg-error 1.13 we have a better portable scheme which also allows for static initialized mutexes. Signed-off-by: Werner Koch <wk@gnupg.org>
* Fix last commit (9a37470c)Werner Koch2013-12-101-1/+0
| | | | | * src/secmem.c (lock_pool): Remove remaining line. Reported by Ian Goldberg.
* Fix one-off memory leak when build with Linux capability support.Werner Koch2013-12-091-6/+21
| | | | | | | * src/secmem.c (lock_pool, secmem_init): Use cap_free. Reported by Mike Crowe <mac@mcrowe.com>. Signed-off-by: Werner Koch <wk@gnupg.org>
* Add control commands to disable mlock and setuid dropping.Werner Koch2013-05-221-8/+21
| | | | | | | | | | | | | * src/gcrypt.h.in (GCRYCTL_DISABLE_LOCKED_SECMEM): New. (GCRYCTL_DISABLE_PRIV_DROP): New. * src/global.c (_gcry_vcontrol): Implement them. * src/secmem.h (GCRY_SECMEM_FLAG_NO_MLOCK): New. (GCRY_SECMEM_FLAG_NO_PRIV_DROP): New. * src/secmem.c (no_mlock, no_priv_drop): New. (_gcry_secmem_set_flags, _gcry_secmem_get_flags): Set and get them. (lock_pool): Handle no_mlock and no_priv_drop. Signed-off-by: Werner Koch <wk@gnupg.org>
* Fix pthread locking and remove defunctional support for static lock init.Marcus Brinkmann2012-01-031-0/+13
| | | | | | | | * src/ath.c: Include assert.h. (ath_mutex_destroy, ath_mutex_lock, ath_mutex_unlock): Dereference LOCK. * src/g10lib.h (_gcry_secmem_module_init): New declaration. * src/global.c (global_init): Call _gcry_secmem_module_init. * src/secmem.c (_gcry_secmem_module_init): New function.
* Make sure to return correct error codes for secmem failures.Werner Koch2011-04-191-1/+6
| | | | | | | | | | ERRNO was not always set and thus it could happen that a misleading error code was returned form a malloc functions. Fix was to set ERRNO. At one place we also switched to the newer gpg_err_code_from_syserror which makes sure to return a special error code in case ERRNO is not set at all.
* Nuked almost all trailing whitespace.post-nuke-of-trailing-wsWerner Koch2011-02-041-7/+7
| | | | Check and install the standard git pre-commit hook.
* Applied spelling fixes and more verbose test diagnositcs by Brad Hards.Werner Koch2010-04-121-2/+2
|
* Support WindowsCE.Werner Koch2010-01-211-7/+12
|
* Implemented an Enforced FIPS mode.Werner Koch2008-09-181-13/+36
| | | | | Documentation updates.
* Prepare a release candidatelibgcrypt-1.4.2rc2Werner Koch2008-09-011-2/+1
|
* Preparing 1.4.0.libgcrypt-1.4.0Werner Koch2007-12-101-1/+1
|
* Preparing a releaselibgcrypt-1.3.2Werner Koch2007-12-031-2/+1
|
* ./Werner Koch2007-04-161-3/+8
| | | | | | | | | | | | | | | * configure.ac: Check for sysconf. * acinclude.m4 (GNUPG_CHECK_MLOCK): Try to use sysconf to get the page size and use getpagesize only then if available. cipher/ * ecc.c (_gcry_ecc_generate): Renamed DUMMY to CURVE and use it. src/ * secmem.c (init_pool): Use sysconf() if available to determine page size.
* * gcrypt.h.in: Include stdlib.h for the sake fo the trheadingWerner Koch2007-02-121-22/+27
| | | | | | | | | | macros. Suggested by Andreas Metzler. * secmem.c (ptr_into_pool_p): New. (_gcry_private_is_secure): Implement in terms of new function. (BLOCK_VALID): Removed. Replaced all users by new function.
* Let secmem init return an error if the memeory could not be locked.Werner Koch2006-10-191-0/+4
|
* 2006-07-29 Marcus Brinkmann <marcus@g10code.de>Marcus Brinkmann2006-07-291-0/+1
| | | | | * secmem.c (init_pool): Close FD after establishing the mapping.
* src/ChangeLog:Moritz Schulte2006-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 2006-04-01 Moritz Schulte <moritz@g10code.com> * gcrypt.h (gcry_ac_eme_pkcs_v1_5): Removed members: key, handle; added member: key_size. * secmem.c (MB_FLAG_ACTIVE): write braces around MB_FLAG_ACTIVE definition. cipher/ChangeLog: 2006-04-01 Moritz Schulte <moritz@g10code.com> * ac.c (eme_pkcs_v1_5_encode): Use KEY_SIZE directly, no need to call gcry_ac_key_get_nbits. (eme_pkcs_v1_5_decode): Likewise. (ac_es_dencode_prepare_pkcs_v1_5): Fill options_em structure with key_size. (_gcry_ac_data_dump, gcry_ac_data_dump): New functions. (_gcry_ac_data_to_sexp, _gcry_ac_data_from_sexp): More or less rewritten; changed S-Expression format so that it matches the one used in pubkey.c.
* * sexp.c (sexp_sscan): Removed C++ style comments. Noted by YoannWerner Koch2004-10-121-1/+1
| | | | | | | | Vandoorselaere. * secmem.h (_gcry_secmem_set_flags,_gcry_secmem_get_flags): Removed __pure__. (GCRY_SECMEM_FLAG_NO_WARNING): Put macro value into parens.
* 2004-08-18 Moritz Schulte <moritz@g10code.com>Moritz Schulte2004-08-221-4/+1
| | | | | | * secmem.c (_gcry_secmem_init): Try to lock pool into core not only when running with root privileges.
* About to release 1.2Werner Koch2004-04-151-7/+6
|
* (_gcry_secmem_realloc): Fixed double unlock; bugWerner Koch2004-03-291-1/+0
| | | | | | manifested itself due to the more rigorous checking in the changed ath.h
* * secmem.c (_gcry_secmem_init): Do not print the "not locked intoWerner Koch2004-02-031-2/+3
| | | | | | | | | | | | | core warning" if the NO_WARNING flag has been set. * sexp.c (sexp_sscan): Allocate result in secure memory if BUFFER is in secure memory. Switch to secure memory for the a secure %b format item. Extra paranoid wipe on error. (gcry_sexp_release): Added paranoid wiping for securely allocated S-expressions. * tsexp.c (basic): New pass to check secure memory switching.
* * acinclude.m4 (AC_CHECK_PTH): Added.Werner Koch2003-10-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Use it here instead of the generic lib test. Bumbed LT vesion to C9/A2/R0. * dsa.c (verify): s/exp/ex/ due to shadowing of a builtin. * elgamal.c (verify): Ditto. * ac.c (gcry_ac_data_get_index): s/index/idx/ (gcry_ac_data_copy_internal): Remove the cast in _gcry_malloc. (gcry_ac_data_add): Must use gcry_realloc instead of realloc. * pubkey.c (sexp_elements_extract): s/index/idx/ as tribute to the forehackers. (gcry_pk_encrypt): Removed shadowed definition of I. Reordered arguments to malloc for clarity. (gcry_pk_sign, gcry_pk_genkey): Ditto. * primegen.c (prime_generate_internal): s/random/randomlevel/. * i386/mpih-rshift.S, i386/mpih-lshift.S: Use %dl and not %edx for testb; this avoids an assembler warning. * mpi-pow.c (gcry_mpi_powm): s/exp/expo/ to avoid shadowing warning. * autogen.sh: Allow to override the tool name. Do not run libtoolize. Update required version numbers. * libgcrypt.vers (_gcry_generate_elg_prime): Removed this symbol; gnutls does not need it anymore. * secmem.c (mb_get_new): s/pool/block/ due to global pool. * misc.c (gcry_set_log_handler): s/logf/f/ to avoid shadowing warning against a builtin. * ath-pth-compat.c: cast pth_connect to get rid of the const prototype. * basic.c (check_aes128_cbc_cts_cipher): Make it a prototype * ac.c (check_run): Comment unused variable.
* (lock_pool): Don't print the warning for certainWerner Koch2003-10-231-6/+25
| | | | | systems, handle ENOMEM.
* (_gcry_secmem_dump_stats): Fixed format sepcifier for aWerner Koch2003-10-211-2/+2
| | | | | size_t. Reported by Stephane Corthesy.
* 2003-09-28 Moritz Schulte <mo@g10code.com>Moritz Schulte2003-09-281-6/+13
| | | | | | * secmem.c (_gcry_secmem_realloc): Do not forget to release secmem lock. Thanks to low halo for triggering this bug.
* 2003-08-27 Moritz Schulte <mo@g10code.com>Moritz Schulte2003-08-271-1/+1
| | | | | | | | | | | * libgcrypt-config.in: Adjusted script for new thread handling. * Makefile.am: New version, based on GPGMEs Makefile.am. * ath.c, ath-compat.c, ath.h, ath-pth.c, ath-pth-compat.c, ath-pthread.c, ath-pthread-compat.c: New files, merged from GPGME. * ath.c, ath.h, ath-pthread.c, ath-pth.c: Removed files.