Update to FreeBSD head 2018-12-20

Git mirror commit 19a6ceb89dbacf74697d493e48c388767126d418.

It includes an update of wpa_supplicant to version 2.7.

It includes an update of the OpenSSL baseline to version 1.1.1a.

Update #3472.
This commit is contained in:
Sebastian Huber
2018-12-20 11:12:40 +01:00
parent 8ae22c48b3
commit 2b2563da95
332 changed files with 27782 additions and 11275 deletions

View File

@@ -40,6 +40,8 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/mbuf.h>
#include <sys/uio.h>
#include <sys/limits.h>
#include <sys/lock.h>
#include <opencrypto/cryptodev.h>
@@ -241,3 +243,55 @@ crypto_mbuftoiov(struct mbuf *mbuf, struct iovec **iovptr, int *cnt,
*cnt = i;
return 0;
}
static inline void *
m_contiguous_subsegment(struct mbuf *m, size_t skip, size_t len)
{
int rel_off;
MPASS(skip <= INT_MAX);
m = m_getptr(m, (int)skip, &rel_off);
if (m == NULL)
return (NULL);
MPASS(rel_off >= 0);
skip = rel_off;
if (skip + len > m->m_len)
return (NULL);
return (mtod(m, char*) + skip);
}
static inline void *
cuio_contiguous_segment(struct uio *uio, size_t skip, size_t len)
{
int rel_off, idx;
MPASS(skip <= INT_MAX);
idx = cuio_getptr(uio, (int)skip, &rel_off);
if (idx < 0)
return (NULL);
MPASS(rel_off >= 0);
skip = rel_off;
if (skip + len > uio->uio_iov[idx].iov_len)
return (NULL);
return ((char *)uio->uio_iov[idx].iov_base + skip);
}
void *
crypto_contiguous_subsegment(int crp_flags, void *crpbuf,
size_t skip, size_t len)
{
if ((crp_flags & CRYPTO_F_IMBUF) != 0)
return (m_contiguous_subsegment(crpbuf, skip, len));
else if ((crp_flags & CRYPTO_F_IOV) != 0)
return (cuio_contiguous_segment(crpbuf, skip, len));
else {
MPASS((crp_flags & (CRYPTO_F_IMBUF | CRYPTO_F_IOV)) !=
(CRYPTO_F_IMBUF | CRYPTO_F_IOV));
return ((char*)crpbuf + skip);
}
}

View File

@@ -564,5 +564,7 @@ extern void crypto_copydata(int flags, caddr_t buf, int off, int size,
extern int crypto_apply(int flags, caddr_t buf, int off, int len,
int (*f)(void *, void *, u_int), void *arg);
extern void *crypto_contiguous_subsegment(int, void *, size_t, size_t);
#endif /* _KERNEL */
#endif /* _CRYPTO_CRYPTO_H_ */

View File

@@ -1093,6 +1093,9 @@ swcr_freesession(device_t dev, crypto_session_t cses)
case CRYPTO_SHA2_256:
case CRYPTO_SHA2_384:
case CRYPTO_SHA2_512:
case CRYPTO_AES_128_NIST_GMAC:
case CRYPTO_AES_192_NIST_GMAC:
case CRYPTO_AES_256_NIST_GMAC:
axf = swd->sw_axf;
if (swd->sw_ictx) {