Merge pull request #5243 from douzzer/20220614-multi-test-fixups

20220614-multi-test-fixups
This commit is contained in:
David Garske
2022-06-14 16:11:44 -07:00
committed by GitHub
5 changed files with 10 additions and 10 deletions

View File

@ -59,10 +59,6 @@
(int)_xatoi_res; \
})
#define WOLFSSL_KTHREADS
typedef struct mutex wolfSSL_Mutex;
#ifdef BUILDING_WOLFSSL
#if defined(CONFIG_MIPS) && defined(HAVE_LINUXKM_PIE_SUPPORT)
@ -578,6 +574,13 @@
#endif /* BUILDING_WOLFSSL */
/* if BUILDING_WOLFSSL, mutex.h will have already been included recursively
* above, with the bevy of warnings suppressed, and the below include will
* be a redundant no-op.
*/
#include <linux/mutex.h>
typedef struct mutex wolfSSL_Mutex;
#define XMALLOC(s, h, t) ({(void)(h); (void)(t); kmalloc(s, GFP_KERNEL);})
#define XFREE(p, h, t) ({void* _xp; (void)(h); _xp = (p); if(_xp) kfree(_xp);})
#define XREALLOC(p, n, h, t) ({(void)(h); (void)(t); krealloc((p), (n), GFP_KERNEL);})

View File

@ -17833,7 +17833,7 @@ int ProcessReplyEx(WOLFSSL* ssl, int allowSocketErr)
/* For TLS v1.1 the block size and explcit IV are added to idx,
* so it needs to be included in this limit check */
if (!IsAtLeastTLSv1_3(ssl->version)
&& ssl->curSize - ssl->keys.padSz -
&& ssl->curSize - ssl->keys.padSz -
(ssl->buffers.inputBuffer.idx - startIdx)
> MAX_PLAINTEXT_SZ
#ifdef WOLFSSL_ASYNC_CRYPT

View File

@ -1332,7 +1332,7 @@ int wolfSSL_CryptHwMutexUnLock(void)
return BAD_MUTEX_E;
}
#elif defined(WOLFSSL_KTHREADS)
#elif defined(WOLFSSL_LINUXKM)
/* Linux kernel mutex routines are voids, alas. */

View File

@ -199,8 +199,7 @@
#else
#ifndef SINGLE_THREADED
#if defined(WOLFSSL_LINUXKM)
#define WOLFSSL_KTHREADS
#include <linux/kthread.h>
/* setup is in linuxkm/linuxkm_wc_port.h */
#elif defined(WOLFSSL_USER_MUTEX)
/* do nothing */
#else

View File

@ -219,8 +219,6 @@
typedef CRITICAL_SECTION wolfSSL_Mutex;
#elif defined(WOLFSSL_PTHREADS)
typedef pthread_mutex_t wolfSSL_Mutex;
#elif defined(WOLFSSL_KTHREADS)
typedef struct mutex wolfSSL_Mutex;
#elif defined(THREADX)
typedef TX_MUTEX wolfSSL_Mutex;
#elif defined(WOLFSSL_DEOS)