Commit 7aac7c85 authored by HardenedBSD Sync Service's avatar HardenedBSD Sync Service
Browse files

Merge branch 'freebsd/current/main' into hardened/current/master

parents 2d0a0a32 3e3314a8
......@@ -40,7 +40,7 @@
# xargs -n1 | sort | uniq -d;
# done
 
# 20210921: remove couldabi
# 20210921: remove cloudabi
OLD_FILES+=usr/share/man/man4/cloudabi.4.gz
 
# 20210906: stop installing {llvm,clang,lldb}-tblgen
......
......@@ -1702,7 +1702,7 @@ _netmap_mem_private_new(size_t size, struct netmap_obj_params *p, int grp_id,
nm_blueprint.pools[i].name,
d->name);
if (checksz) {
uint64_t poolsz = p[i].num * p[i].size;
uint64_t poolsz = (uint64_t)p[i].num * p[i].size;
if (memtotal < poolsz) {
nm_prerr("%s: request too large", d->pools[i].name);
err = ENOMEM;
......
......@@ -737,8 +737,7 @@ netmap_monitor_parent_sync(struct netmap_kring *kring, u_int first_new, int new_
int free_slots, busy, sent = 0, m;
u_int lim = kring->nkr_num_slots - 1;
struct netmap_ring *ring = kring->ring, *mring = mkring->ring;
u_int max_len = NETMAP_BUF_SIZE(mkring->na);
u_int max_len;
mlim = mkring->nkr_num_slots - 1;
/* we need to lock the monitor receive ring, since it
......@@ -770,9 +769,10 @@ netmap_monitor_parent_sync(struct netmap_kring *kring, u_int first_new, int new_
struct netmap_slot *s = &ring->slot[beg];
struct netmap_slot *ms = &mring->slot[i];
u_int copy_len = s->len;
char *src = NMB(kring->na, s),
*dst = NMB(mkring->na, ms);
char *src = NMB_O(kring, s),
*dst = NMB_O(mkring, ms);
max_len = NETMAP_BUF_SIZE(mkring->na) - nm_get_offset(mkring, ms);
if (unlikely(copy_len > max_len)) {
nm_prlim(5, "%s->%s: truncating %d to %d", kring->name,
mkring->name, copy_len, max_len);
......@@ -966,7 +966,9 @@ netmap_get_monitor_na(struct nmreq_header *hdr, struct netmap_adapter **na,
pna->monitor_id++);
/* the monitor supports the host rings iff the parent does */
mna->up.na_flags |= (pna->na_flags & NAF_HOST_RINGS);
mna->up.na_flags |= (pna->na_flags & NAF_HOST_RINGS) & ~NAF_OFFSETS;
if (!zcopy)
mna->up.na_flags |= NAF_OFFSETS;
/* a do-nothing txsync: monitors cannot be used to inject packets */
mna->up.nm_txsync = netmap_monitor_txsync;
mna->up.nm_rxsync = netmap_monitor_rxsync;
......
......@@ -476,7 +476,7 @@ nfscl_lockunlock(struct nfsv4lock *lckp)
}
/*
* Called to derefernce a lock on a stateid (delegation or open owner).
* Called to dereference a lock on a stateid (delegation or open owner).
*/
void
nfscl_lockderef(struct nfsv4lock *lckp)
......
......@@ -1312,7 +1312,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags)
#endif
/*
* Allocate a dedicated cpuset for each jail.
* Unlike other initial settings, this may return an erorr.
* Unlike other initial settings, this may return an error.
*/
error = cpuset_create_root(ppr, &pr->pr_cpuset);
if (error)
......
......@@ -510,7 +510,7 @@ sctp_process_init_ack(struct mbuf *m, int iphlen, int offset,
/*
* Cancel the INIT timer, We do this first before queueing the
* cookie. We always cancel at the primary to assue that we are
* cookie. We always cancel at the primary to assume that we are
* canceling the timer started by the INIT which always goes to the
* primary.
*/
......
......@@ -150,7 +150,9 @@ decode_ip_n_hash(const struct ip *iph, uint8_t hash_split, uint8_t seed)
{
uint32_t rc = 0;
if (hash_split == 2) {
if (iph->ip_hl < 5 || iph->ip_hl * 4 > iph->ip_len) {
rc = 0;
} else if (hash_split == 2) {
rc = sym_hash_fn(ntohl(iph->ip_src.s_addr),
ntohl(iph->ip_dst.s_addr),
ntohs(0xFFFD) + seed,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment