Browse Source

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

* freebsd/current/master:
  Fix missing NET_EPOCH_ENTER() when compiled with TCP_OFFLOAD.
  modules: adding some missing opt_* dependencies
  config.mk: #define MAC as well
  Revert r357246
  Merge r357271 from the clang1000-import branch:
  Merge r357267 from the clang1000-import branch:
  Merge r357260 from the clang1000-import branch:
  mips: unbreak module builds after r357265
  kmod build: start generating opt_global.h, include it
  pkgbase: fix caroot packaging and add post-install script
  Plug parent iface refcount leak on <ifname>.X vlan creation.
  [PPC64] Fix NUMA on POWER8
  Add myself (alfredo) to committers-src.dot and calendar.freebsd
hardened/current/master
HardenedBSD Sync Service 4 months ago
parent
commit
dd8f626614
18 changed files with 131 additions and 39 deletions
  1. +2
    -2
      etc/mtree/BSD.usr.dist
  2. +31
    -0
      release/packages/caroot.ucl
  3. +3
    -0
      release/packages/generate-ucl.sh
  4. +0
    -2
      secure/caroot/Makefile
  5. +3
    -0
      secure/caroot/Makefile.inc
  6. +2
    -0
      share/misc/committers-src.dot
  7. +6
    -0
      sys/conf/config.mk
  8. +3
    -0
      sys/conf/kmod.mk
  9. +2
    -1
      sys/modules/if_lagg/Makefile
  10. +1
    -1
      sys/modules/if_vlan/Makefile
  11. +5
    -1
      sys/net/if_vlan.c
  12. +1
    -1
      sys/netinet/tcp_usrreq.c
  13. +13
    -10
      sys/powerpc/powernv/platform_powernv.c
  14. +52
    -17
      tests/sys/sys/qmath_test.c
  15. +1
    -0
      usr.bin/calendar/calendars/calendar.freebsd
  16. +2
    -1
      usr.bin/procstat/procstat_sigs.c
  17. +2
    -1
      usr.bin/tip/tip/tip.c
  18. +2
    -2
      usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c

+ 2
- 2
etc/mtree/BSD.usr.dist View File

@@ -195,9 +195,9 @@
..
..
certs
blacklisted
blacklisted tags=package=caroot
..
trusted
trusted tags=package=caroot
..
..
dict

+ 31
- 0
release/packages/caroot.ucl View File

@@ -0,0 +1,31 @@
#
# $FreeBSD$
#

name = "FreeBSD-%PKGNAME%"
origin = "base"
version = "%VERSION%"
comment = "%COMMENT%"
categories = [ base ]
maintainer = "re@FreeBSD.org"
www = "https://www.FreeBSD.org"
prefix = "/"
licenselogic = "single"
licenses = [ BSD2CLAUSE ]
desc = <<EOD
%DESC%
EOD
deps: {
FreeBSD-%PKGDEPS%: {
origin: "base",
version: "%VERSION%"
}
}
scripts: {
# XXX If pkg picks up a mechanism to detect in the post-install script
# files being added or removed, we should use it instead to gate the
# rehash.
post-install = <<EOD
[ -x /usr/sbin/certctl ] && /usr/sbin/certctl rehash
EOD
}

+ 3
- 0
release/packages/generate-ucl.sh View File

@@ -34,6 +34,9 @@ main() {
outname="$(echo ${outname} | tr '-' '_')"

case "${outname}" in
caroot)
pkgdeps="utilities"
;;
runtime)
outname="runtime"
uclfile="${uclfile}"

+ 0
- 2
secure/caroot/Makefile View File

@@ -1,7 +1,5 @@
# $FreeBSD$

PACKAGE= caroot

CLEANFILES+= certdata.txt

SUBDIR+= trusted

+ 3
- 0
secure/caroot/Makefile.inc View File

@@ -0,0 +1,3 @@
# $FreeBSD$

PACKAGE= caroot

+ 2
- 0
share/misc/committers-src.dot View File

@@ -105,6 +105,7 @@ adrian [label="Adrian Chadd\nadrian@FreeBSD.org\n2000/07/03"]
ae [label="Andrey V. Elsukov\nae@FreeBSD.org\n2010/06/03"]
akiyama [label="Shunsuke Akiyama\nakiyama@FreeBSD.org\n2000/06/19"]
alc [label="Alan Cox\nalc@FreeBSD.org\n1999/02/23"]
alfredo [label="Alfredo Dal'Ava Junior\nalfredo@FreeBSD.org\n2020/01/27"]
allanjude [label="Allan Jude\nallanjude@FreeBSD.org\n2015/07/30"]
ambrisko [label="Doug Ambrisko\nambrisko@FreeBSD.org\n2001/12/19"]
anchie [label="Ana Kukec\nanchie@FreeBSD.org\n2010/04/14"]
@@ -613,6 +614,7 @@ jhb -> rpokala
jhb -> arichardson
jhb -> scottph

jhibbits -> alfredo
jhibbits -> bdragon
jhibbits -> leitao
jhibbits -> luporl

+ 6
- 0
sys/conf/config.mk View File

@@ -8,6 +8,12 @@
# the code here when they all produce identical results
# (or should)
.if !defined(KERNBUILDDIR)
opt_global.h:
touch ${.TARGET}
.if ${MACHINE} != "mips"
@echo "#define VIMAGE 1" >> ${.TARGET}
@echo "#define MAC 1" >> ${.TARGET}
.endif
opt_bpf.h:
echo "#define DEV_BPF 1" > ${.TARGET}
.if ${MK_INET_SUPPORT} != "no"

+ 3
- 0
sys/conf/kmod.mk View File

@@ -106,6 +106,9 @@ NOSTDINC= -nostdinc
CFLAGS:= ${CFLAGS:N-I*} ${NOSTDINC} ${INCLMAGIC} ${CFLAGS:M-I*}
.if defined(KERNBUILDDIR)
CFLAGS+= -DHAVE_KERNEL_OPTION_HEADERS -include ${KERNBUILDDIR}/opt_global.h
.else
SRCS+= opt_global.h
CFLAGS+= -include ${.OBJDIR}/opt_global.h
.endif

# Add -I paths for system headers. Individual module makefiles don't

+ 2
- 1
sys/modules/if_lagg/Makefile View File

@@ -2,6 +2,7 @@

.PATH: ${SRCTOP}/sys/net
KMOD= if_lagg
SRCS= if_lagg.c ieee8023ad_lacp.c opt_inet.h opt_inet6.h opt_ratelimit.h
SRCS= if_lagg.c ieee8023ad_lacp.c opt_inet.h opt_inet6.h opt_kern_tls.h
SRCS+= opt_ratelimit.h

.include <bsd.kmod.mk>

+ 1
- 1
sys/modules/if_vlan/Makefile View File

@@ -4,6 +4,6 @@

KMOD= if_vlan
SRCS= if_vlan.c
SRCS+= opt_inet.h opt_vlan.h opt_ratelimit.h
SRCS+= opt_inet.h opt_inet6.h opt_kern_tls.h opt_vlan.h opt_ratelimit.h

.include <bsd.kmod.mk>

+ 5
- 1
sys/net/if_vlan.c View File

@@ -963,10 +963,14 @@ vlan_clone_match_ethervid(const char *name, int *vidp)
static int
vlan_clone_match(struct if_clone *ifc, const char *name)
{
struct ifnet *ifp;
const char *cp;

if (vlan_clone_match_ethervid(name, NULL) != NULL)
ifp = vlan_clone_match_ethervid(name, NULL);
if (ifp != NULL) {
if_rele(ifp);
return (1);
}

if (strncmp(vlanname, name, strlen(vlanname)) != 0)
return (0);

+ 1
- 1
sys/netinet/tcp_usrreq.c View File

@@ -911,12 +911,12 @@ tcp_usr_rcvd(struct socket *so, int flags)
if (IS_FASTOPEN(tp->t_flags) &&
(tp->t_state == TCPS_SYN_RECEIVED))
goto out;
NET_EPOCH_ENTER(et);
#ifdef TCP_OFFLOAD
if (tp->t_flags & TF_TOE)
tcp_offload_rcvd(tp);
else
#endif
NET_EPOCH_ENTER(et);
tp->t_fb->tfb_tcp_output(tp);
NET_EPOCH_EXIT(et);
out:

+ 13
- 10
sys/powerpc/powernv/platform_powernv.c View File

@@ -517,17 +517,20 @@ powernv_node_numa_domain(platform_t platform, phandle_t node)
cell_t associativity[5];
int i, res;

res = OF_getproplen(node, "ibm,associativity");
res = OF_getencprop(node, "ibm,associativity",
associativity, sizeof(associativity));

/* If already at the root, use default domain. */
if (res == 0)
return (0);
else if (res < 0)
/* If this node doesn't have associativity, check its parent. */
return (powernv_node_numa_domain(platform, OF_parent(node)));

OF_getencprop(node, "ibm,associativity",
associativity, res);
/*
* If this node doesn't have associativity, or if there are not
* enough elements in it, check its parent.
*/
if (res < (int)(sizeof(cell_t) * (platform_associativity + 1))) {
node = OF_parent(node);
/* If already at the root, use default domain. */
if (node == 0)
return (0);
return (powernv_node_numa_domain(platform, node));
}

for (i = 0; i < numa_max_domain; i++) {
if (numa_domains[i] == associativity[platform_associativity])

+ 52
- 17
tests/sys/sys/qmath_test.c View File

@@ -47,7 +47,25 @@
#define QTEST_QITRUNC(q, iv) ((iv) >> Q_RPSHFT(q))
#define QTEST_FFACTOR 32.0

#define GENRAND(a) arc4random_buf((a), sizeof(*(a)))
#define bitsperrand 31
#define GENRAND(a, lb, ub) \
({ \
int _rembits; \
do { \
_rembits = Q_BITSPERBASEUP(ub) + Q_LTZ(lb); \
*(a) = (__typeof(*(a)))0; \
while (_rembits > 0) { \
*(a) |= (((uint64_t)random()) & \
((1ULL << (_rembits > bitsperrand ? \
bitsperrand : _rembits)) - 1)); \
*(a) <<= (_rembits - (_rembits > bitsperrand ? \
bitsperrand : _rembits)); \
_rembits -= bitsperrand; \
} \
*(a) += lb; \
} while (*(a) < (lb) || (uint64_t)*(a) > (ub)); \
*(a); \
})

/*
* Smoke tests for basic qmath operations, such as initialization
@@ -195,9 +213,11 @@ ATF_TC_BODY(qmulq_s64q, tc)
#endif
int error;

srandomdev();

for (int i = 0; i < 10;) {
GENRAND(&a_s64q);
GENRAND(&b_s64q);
GENRAND(&a_s64q, INT64_MIN, UINT64_MAX);
GENRAND(&b_s64q, INT64_MIN, UINT64_MAX);

/*
* XXX: We cheat a bit, to stand any chance of multiplying
@@ -258,9 +278,12 @@ ATF_TC_BODY(qdivq_s64q, tc)
if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
atf_tc_skip("https://bugs.freebsd.org/240219");


srandomdev();

for (int i = 0; i < 10; i++) {
GENRAND(&a_s64q);
GENRAND(&b_s64q);
GENRAND(&a_s64q, INT64_MIN, UINT64_MAX);
GENRAND(&b_s64q, INT64_MIN, UINT64_MAX);
/*
* XXXLAS: Until Qmath handles precision normalisation, only
* test with equal precision.
@@ -301,9 +324,11 @@ ATF_TC_BODY(qaddq_s64q, tc)
double a_dbl, b_dbl, r_dbl, maxe_dbl, delta_dbl;
int error;

srandomdev();

for (int i = 0; i < 10;) {
GENRAND(&a_s64q);
GENRAND(&b_s64q);
GENRAND(&a_s64q, INT64_MIN, UINT64_MAX);
GENRAND(&b_s64q, INT64_MIN, UINT64_MAX);
/*
* XXXLAS: Until Qmath handles precision normalisation, only
* test with equal precision.
@@ -347,9 +372,11 @@ ATF_TC_BODY(qsubq_s64q, tc)
double a_dbl, b_dbl, r_dbl, maxe_dbl, delta_dbl;
int error;

srandomdev();

for (int i = 0; i < 10; i++) {
GENRAND(&a_s64q);
GENRAND(&b_s64q);
GENRAND(&a_s64q, INT64_MIN, UINT64_MAX);
GENRAND(&b_s64q, INT64_MIN, UINT64_MAX);
/*
* XXXLAS: Until Qmath handles precision normalisation, only
* test with equal precision.
@@ -391,9 +418,11 @@ ATF_TC_BODY(qfraci_s64q, tc)
int64_t a_int, b_int;
int error;

srandomdev();

for (int i = 0; i < 10;) {
GENRAND(&a_s64q);
GENRAND(&b_s64q);
GENRAND(&a_s64q, INT64_MIN, UINT64_MAX);
GENRAND(&b_s64q, INT64_MIN, UINT64_MAX);
/*
* XXXLAS: Until Qmath handles precision normalisation, only
* test with equal precision.
@@ -436,9 +465,11 @@ ATF_TC_BODY(qmuli_s64q, tc)
int64_t a_int, b_int;
int error;

srandomdev();

for (int i = 0; i < 10;) {
GENRAND(&a_s64q);
GENRAND(&b_s64q);
GENRAND(&a_s64q, INT64_MIN, UINT64_MAX);
GENRAND(&b_s64q, INT64_MIN, UINT64_MAX);
/*
* XXXLAS: Until Qmath handles precision normalisation, only
* test with equal precision.
@@ -481,9 +512,11 @@ ATF_TC_BODY(qaddi_s64q, tc)
int64_t a_int, b_int;
int error;

srandomdev();

for (int i = 0; i < 10;) {
GENRAND(&a_s64q);
GENRAND(&b_s64q);
GENRAND(&a_s64q, INT64_MIN, UINT64_MAX);
GENRAND(&b_s64q, INT64_MIN, UINT64_MAX);
/*
* XXXLAS: Until Qmath handles precision normalisation, only
* test with equal precision.
@@ -530,9 +563,11 @@ ATF_TC_BODY(qsubi_s64q, tc)
int64_t a_int, b_int;
int error;

srandomdev();

for (int i = 0; i < 10; i++) {
GENRAND(&a_s64q);
GENRAND(&b_s64q);
GENRAND(&a_s64q, INT64_MIN, UINT64_MAX);
GENRAND(&b_s64q, INT64_MIN, UINT64_MAX);
/*
* XXXLAS: Until Qmath handles precision normalisation, only
* test with equal precision.

+ 1
- 0
usr.bin/calendar/calendars/calendar.freebsd View File

@@ -324,6 +324,7 @@
08/19 Chin-San Huang <chinsan@FreeBSD.org> born in Yi-Lan, Taiwan, Republic of China, 1979
08/19 Pav Lucistnik <pav@FreeBSD.org> born in Kutna Hora, Czech Republic, 1980
08/20 Michael Heffner <mikeh@FreeBSD.org> born in Cleona, Pennsylvania, United States, 1981
08/21 Alfredo Dal'Ava Junior <alfredo@FreeBSD.org> born in Pocos de Caldas, Minas Gerais, Brazil, 1981
08/21 Jason A. Harmening <jah@FreeBSD.org> born in Fort Wayne, Indiana, United States, 1981
08/22 Ilya Bakulin <kibab@FreeBSD.org> born in Tbilisi, USSR, 1986
08/24 Mark Linimon <linimon@FreeBSD.org> born in Houston, Texas, United States, 1955

+ 2
- 1
usr.bin/procstat/procstat_sigs.c View File

@@ -74,9 +74,10 @@ procstat_close_signame(int sig)
for (i = 0; name[i] != 0; i++)
name[i] = toupper(name[i]);
xo_close_container(name);
} else
} else {
snprintf(name, 12, "%d", sig);
xo_close_container(name);
}
}

static void

+ 2
- 1
usr.bin/tip/tip/tip.c View File

@@ -423,11 +423,12 @@ tipin(void)
if (boolean(value(HALFDUPLEX)))
printf("\r\n");
continue;
} else if (!cumode && gch == character(value(FORCE)))
} else if (!cumode && gch == character(value(FORCE))) {
gch = getchar();
if (gch == EOF)
return;
gch = gch & STRIP_PAR;
}
bol = any(gch, value(EOL));
if (boolean(value(RAISE)) && islower(gch))
gch = toupper(gch);

+ 2
- 2
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c View File

@@ -1232,9 +1232,9 @@ op_begemot_stp_port(struct snmp_context *ctx, struct snmp_value *val,

case LEAF_begemotBridgeStpPortEnable:
if (val->v.integer !=
begemotBridgeStpPortEnable_enabled ||
(int32_t)begemotBridgeStpPortEnable_enabled ||
val->v.integer !=
begemotBridgeStpPortEnable_disabled)
(int32_t)begemotBridgeStpPortEnable_disabled)
return (SNMP_ERR_WRONG_VALUE);

ctx->scratch->int1 = bp->enable;

Loading…
Cancel
Save