Skip to content

Commit ad07fe7

Browse files
committed
Merge branch 'master' into drm-next-merge
Conflicts: sys/compat/linuxkpi/common/include/linux/fs.h sys/compat/linuxkpi/common/include/linux/ktime.h sys/compat/linuxkpi/common/include/linux/math64.h sys/compat/linuxkpi/common/include/linux/page.h sys/compat/linuxkpi/common/include/linux/pci.h sys/compat/linuxkpi/common/include/linux/sched.h sys/compat/linuxkpi/common/src/linux_compat.c sys/compat/linuxkpi/common/src/linux_pci.c sys/dev/agp/agp_i810.c sys/dev/drm sys/dev/drm/drmP.h
2 parents 71830e6 + 38fbf6b commit ad07fe7

File tree

940 files changed

+47290
-17584
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

940 files changed

+47290
-17584
lines changed

Makefile.inc1

+13-4
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,8 @@ LIBCOMPAT= SOFT
655655
# when the ABI breaks though that we want to force rebuilding WORLDTMP
656656
# to get updated host tools.
657657
.if ${MK_META_MODE} == "yes" && defined(NO_CLEAN) && \
658-
!defined(NO_META_IGNORE_HOST) && !defined(NO_META_IGNORE_HOST_HEADERS)
658+
!defined(NO_META_IGNORE_HOST) && !defined(NO_META_IGNORE_HOST_HEADERS) && \
659+
!make(showconfig)
659660
# r318736 - ino64 major ABI breakage
660661
META_MODE_BAD_ABI_VERS+= 1200031
661662

@@ -761,7 +762,15 @@ _worldtmp: .PHONY
761762
.endif
762763
.else
763764
rm -rf ${WORLDTMP}/legacy/usr/include
764-
.endif
765+
.if ${USING_SYSTEM_COMPILER} == "yes"
766+
.for cc in cc c++
767+
if [ -x ${WORLDTMP}/usr/bin/${cc} ]; then \
768+
inum=$$(stat -f %i ${WORLDTMP}/usr/bin/${cc}); \
769+
find ${WORLDTMP}/usr/bin -inum $${inum} -delete; \
770+
fi
771+
.endfor
772+
.endif # ${USING_SYSTEM_COMPILER} == "yes"
773+
.endif # !defined(NO_CLEAN)
765774

766775
# Our current approach to dependency tracking cannot cope with certain source
767776
# tree changes, particularly with respect to removing source files and
@@ -1641,8 +1650,8 @@ create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap
16411650
.for _kernel in ${BUILDKERNELS:[2..-1]}
16421651
.if exists(${KSTAGEDIR}/kernel.${_kernel}.meta)
16431652
.for flavor in "" -debug
1644-
create-kernel-packages: create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}
1645-
create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap .PHONY
1653+
create-kernel-packages: create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}-${_kernel}
1654+
create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}-${_kernel}: _pkgbootstrap .PHONY
16461655
@cd ${KSTAGEDIR}/kernel.${_kernel} ; \
16471656
awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
16481657
-v kernel=yes -v _kernconf=${_kernel} \

bin/Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ SUBDIR.${MK_TESTS}+= tests
4747

4848
.include <bsd.arch.inc.mk>
4949

50-
SUBDIR:= ${SUBDIR:O}
51-
5250
SUBDIR_PARALLEL=
5351

5452
.include <bsd.subdir.mk>

bin/ed/main.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,8 @@ next_addr(void)
350350
ibufp++;
351351
addr_cnt++;
352352
second_addr = (c == ';') ? current_addr : 1;
353-
addr = addr_last;
353+
if ((addr = next_addr()) < 0)
354+
addr = addr_last;
354355
break;
355356
}
356357
/* FALLTHROUGH */
@@ -809,7 +810,7 @@ exec_command(void)
809810
if ((addr = write_file(*fnp ? fnp : old_filename,
810811
(c == 'W') ? "a" : "w", first_addr, second_addr)) < 0)
811812
return ERR;
812-
else if (addr == addr_last)
813+
else if (addr == addr_last && *fnp != '!')
813814
modified = 0;
814815
else if (modified && !scripted && n == 'q')
815816
gflag = EMOD;

bin/rcp/rcp.1

+10-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
.\" @(#)rcp.1 8.1 (Berkeley) 5/31/93
3030
.\" $FreeBSD$
3131
.\"
32-
.Dd October 16, 2002
32+
.Dd July 3, 2017
3333
.Dt RCP 1
3434
.Os
3535
.Sh NAME
@@ -43,6 +43,15 @@
4343
.Op Fl 46pr
4444
.Ar
4545
.Ar directory
46+
.Sh DEPRECATION NOTICE
47+
.Nm
48+
is deprecated and will be removed from future versions of the
49+
.Fx
50+
base system.
51+
If
52+
.Nm
53+
is still required, it can be installed from ports or packages
54+
(net/bsdrcmds).
4655
.Sh DESCRIPTION
4756
The
4857
.Nm

contrib/ipfilter/man/ippool.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ippool \- user interface to the IPFilter pools
1818
-F [-dv] [-o <role>] [-t <type>]
1919
.br
2020
.B ippool
21-
-l [-dv] [-m <name>] [-t <type>]
21+
-l [-dv] [-m <name>] [-t <type>] [-o <role>] [-M <core>] [-N <namelist>]
2222
.br
2323
.B ippool
2424
-r [-dnv] [-m <name>] [-o <role>] [-t <type>] -i <ipaddr>[/<netmask>]

contrib/ipfilter/tools/ippool.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ usage(prog)
7979
fprintf(stderr, "\t-A [-dnv] [-m <name>] [-o <role>] [-S <seed>] [-t <type>]\n");
8080
fprintf(stderr, "\t-f <file> [-dnuv]\n");
8181
fprintf(stderr, "\t-F [-dv] [-o <role>] [-t <type>]\n");
82-
fprintf(stderr, "\t-l [-dv] [-m <name>] [-t <type>]\n");
82+
fprintf(stderr, "\t-l [-dv] [-m <name>] [-t <type>] [-o <role>] [-M <core>] [-N <namelist>]\n");
8383
fprintf(stderr, "\t-r [-dnv] [-m <name>] [-o <role>] [-t type] -i <ipaddr>[/netmask]\n");
8484
fprintf(stderr, "\t-R [-dnv] [-m <name>] [-o <role>] [-t <type>]\n");
8585
fprintf(stderr, "\t-s [-dtv] [-M <core>] [-N <namelist>]\n");

contrib/jemalloc/ChangeLog

+35
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,41 @@ brevity. Much more detail can be found in the git revision history:
44

55
https://github.com/jemalloc/jemalloc
66

7+
* 5.0.1 (July 1, 2017)
8+
9+
This bugfix release fixes several issues, most of which are obscure enough
10+
that typical applications are not impacted.
11+
12+
Bug fixes:
13+
- Update decay->nunpurged before purging, in order to avoid potential update
14+
races and subsequent incorrect purging volume. (@interwq)
15+
- Only abort on dlsym(3) error if the failure impacts an enabled feature (lazy
16+
locking and/or background threads). This mitigates an initialization
17+
failure bug for which we still do not have a clear reproduction test case.
18+
(@interwq)
19+
- Modify tsd management so that it neither crashes nor leaks if a thread's
20+
only allocation activity is to call free() after TLS destructors have been
21+
executed. This behavior was observed when operating with GNU libc, and is
22+
unlikely to be an issue with other libc implementations. (@interwq)
23+
- Mask signals during background thread creation. This prevents signals from
24+
being inadvertently delivered to background threads. (@jasone,
25+
@davidtgoldblatt, @interwq)
26+
- Avoid inactivity checks within background threads, in order to prevent
27+
recursive mutex acquisition. (@interwq)
28+
- Fix extent_grow_retained() to use the specified hooks when the
29+
arena.<i>.extent_hooks mallctl is used to override the default hooks.
30+
(@interwq)
31+
- Add missing reentrancy support for custom extent hooks which allocate.
32+
(@interwq)
33+
- Post-fork(2), re-initialize the list of tcaches associated with each arena
34+
to contain no tcaches except the forking thread's. (@interwq)
35+
- Add missing post-fork(2) mutex reinitialization for extent_grow_mtx. This
36+
fixes potential deadlocks after fork(2). (@interwq)
37+
- Enforce minimum autoconf version (currently 2.68), since 2.63 is known to
38+
generate corrupt configure scripts. (@jasone)
39+
- Ensure that the configured page size (--with-lg-page) is no larger than the
40+
configured huge page size (--with-lg-hugepage). (@jasone)
41+
742
* 5.0.0 (June 13, 2017)
843

944
Unlike all previous jemalloc releases, this release does not use naturally

contrib/jemalloc/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.0.0-4-g84f6c2cae0fb1399377ef6aea9368444c4987cc6
1+
5.0.1-0-g896ed3a8b3f41998d4fb4d625d30ac63ef2d51fb

contrib/jemalloc/doc/jemalloc.3

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: JEMALLOC
33
.\" Author: Jason Evans
44
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5-
.\" Date: 06/29/2017
5+
.\" Date: 07/01/2017
66
.\" Manual: User Manual
7-
.\" Source: jemalloc 5.0.0-4-g84f6c2cae0fb1399377ef6aea9368444c4987cc6
7+
.\" Source: jemalloc 5.0.1-0-g896ed3a8b3f41998d4fb4d625d30ac63ef2d51fb
88
.\" Language: English
99
.\"
10-
.TH "JEMALLOC" "3" "06/29/2017" "jemalloc 5.0.0-4-g84f6c2cae0fb" "User Manual"
10+
.TH "JEMALLOC" "3" "07/01/2017" "jemalloc 5.0.1-0-g896ed3a8b3f4" "User Manual"
1111
.\" -----------------------------------------------------------------
1212
.\" * Define some portability stuff
1313
.\" -----------------------------------------------------------------
@@ -31,7 +31,7 @@
3131
jemalloc \- general purpose memory allocation functions
3232
.SH "LIBRARY"
3333
.PP
34-
This manual describes jemalloc 5\&.0\&.0\-4\-g84f6c2cae0fb1399377ef6aea9368444c4987cc6\&. More information can be found at the
34+
This manual describes jemalloc 5\&.0\&.1\-0\-g896ed3a8b3f41998d4fb4d625d30ac63ef2d51fb\&. More information can be found at the
3535
\m[blue]\fBjemalloc website\fR\m[]\&\s-2\u[1]\d\s+2\&.
3636
.PP
3737
The following configuration options are enabled in libc\*(Aqs built\-in jemalloc:

contrib/jemalloc/include/jemalloc/internal/arena_externs.h

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ void arena_prefork3(tsdn_t *tsdn, arena_t *arena);
9090
void arena_prefork4(tsdn_t *tsdn, arena_t *arena);
9191
void arena_prefork5(tsdn_t *tsdn, arena_t *arena);
9292
void arena_prefork6(tsdn_t *tsdn, arena_t *arena);
93+
void arena_prefork7(tsdn_t *tsdn, arena_t *arena);
9394
void arena_postfork_parent(tsdn_t *tsdn, arena_t *arena);
9495
void arena_postfork_child(tsdn_t *tsdn, arena_t *arena);
9596

contrib/jemalloc/include/jemalloc/internal/background_thread_inlines.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ background_thread_indefinite_sleep(background_thread_info_t *info) {
4141
}
4242

4343
JEMALLOC_ALWAYS_INLINE void
44-
arena_background_thread_inactivity_check(tsdn_t *tsdn, arena_t *arena) {
45-
if (!background_thread_enabled()) {
44+
arena_background_thread_inactivity_check(tsdn_t *tsdn, arena_t *arena,
45+
bool is_background_thread) {
46+
if (!background_thread_enabled() || is_background_thread) {
4647
return;
4748
}
4849
background_thread_info_t *info =

contrib/jemalloc/include/jemalloc/internal/base_externs.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
base_t *b0get(void);
55
base_t *base_new(tsdn_t *tsdn, unsigned ind, extent_hooks_t *extent_hooks);
6-
void base_delete(base_t *base);
6+
void base_delete(tsdn_t *tsdn, base_t *base);
77
extent_hooks_t *base_extent_hooks_get(base_t *base);
88
extent_hooks_t *base_extent_hooks_set(base_t *base,
99
extent_hooks_t *extent_hooks);

contrib/jemalloc/include/jemalloc/internal/ctl.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ typedef struct ctl_arenas_s {
9191

9292
int ctl_byname(tsd_t *tsd, const char *name, void *oldp, size_t *oldlenp,
9393
void *newp, size_t newlen);
94-
int ctl_nametomib(tsdn_t *tsdn, const char *name, size_t *mibp,
95-
size_t *miblenp);
94+
int ctl_nametomib(tsd_t *tsd, const char *name, size_t *mibp, size_t *miblenp);
9695

9796
int ctl_bymib(tsd_t *tsd, const size_t *mib, size_t miblen, void *oldp,
9897
size_t *oldlenp, void *newp, size_t newlen);

contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
# include <sys/uio.h>
2626
# endif
2727
# include <pthread.h>
28+
# include <signal.h>
2829
# ifdef JEMALLOC_OS_UNFAIR_LOCK
2930
# include <os/lock.h>
3031
# endif

contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h

+3
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@
9999
/* Defined if pthread_atfork(3) is available. */
100100
#define JEMALLOC_HAVE_PTHREAD_ATFORK
101101

102+
/* Defined if pthread_setname_np(3) is available. */
103+
/* #undef JEMALLOC_HAVE_PTHREAD_SETNAME_NP */
104+
102105
/*
103106
* Defined if clock_gettime(CLOCK_MONOTONIC_COARSE, ...) is available.
104107
*/

contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_a.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,10 @@ tcache_get(tsd_t *tsd) {
146146
}
147147

148148
static inline void
149-
pre_reentrancy(tsd_t *tsd) {
149+
pre_reentrancy(tsd_t *tsd, arena_t *arena) {
150+
/* arena is the current context. Reentry from a0 is not allowed. */
151+
assert(arena != arena_get(tsd_tsdn(tsd), 0, false));
152+
150153
bool fast = tsd_fast(tsd);
151154
++*tsd_reentrancy_levelp_get(tsd);
152155
if (fast) {

contrib/jemalloc/include/jemalloc/internal/private_namespace.h

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
#define arena_prefork4 JEMALLOC_N(arena_prefork4)
7070
#define arena_prefork5 JEMALLOC_N(arena_prefork5)
7171
#define arena_prefork6 JEMALLOC_N(arena_prefork6)
72+
#define arena_prefork7 JEMALLOC_N(arena_prefork7)
7273
#define arena_prof_promote JEMALLOC_N(arena_prof_promote)
7374
#define arena_ralloc JEMALLOC_N(arena_ralloc)
7475
#define arena_ralloc_no_move JEMALLOC_N(arena_ralloc_no_move)

contrib/jemalloc/include/jemalloc/internal/tcache_externs.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void tcache_arena_associate(tsdn_t *tsdn, tcache_t *tcache, arena_t *arena);
4848
void tcache_prefork(tsdn_t *tsdn);
4949
void tcache_postfork_parent(tsdn_t *tsdn);
5050
void tcache_postfork_child(tsdn_t *tsdn);
51-
void tcache_flush(void);
51+
void tcache_flush(tsd_t *tsd);
5252
bool tsd_tcache_data_init(tsd_t *tsd);
5353
bool tsd_tcache_enabled_data_init(tsd_t *tsd);
5454

contrib/jemalloc/include/jemalloc/internal/tsd.h

+22-8
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,10 @@ enum {
9999
tsd_state_nominal_slow = 1, /* Initialized but on slow path. */
100100
/* the above 2 nominal states should be lower values. */
101101
tsd_state_nominal_max = 1, /* used for comparison only. */
102-
tsd_state_purgatory = 2,
103-
tsd_state_reincarnated = 3,
104-
tsd_state_uninitialized = 4
102+
tsd_state_minimal_initialized = 2,
103+
tsd_state_purgatory = 3,
104+
tsd_state_reincarnated = 4,
105+
tsd_state_uninitialized = 5
105106
};
106107

107108
/* Manually limit tsd_state_t to a single byte. */
@@ -190,7 +191,8 @@ JEMALLOC_ALWAYS_INLINE t * \
190191
tsd_##n##p_get(tsd_t *tsd) { \
191192
assert(tsd->state == tsd_state_nominal || \
192193
tsd->state == tsd_state_nominal_slow || \
193-
tsd->state == tsd_state_reincarnated); \
194+
tsd->state == tsd_state_reincarnated || \
195+
tsd->state == tsd_state_minimal_initialized); \
194196
return tsd_##n##p_get_unsafe(tsd); \
195197
}
196198
MALLOC_TSD
@@ -225,7 +227,8 @@ MALLOC_TSD
225227
#define O(n, t, nt) \
226228
JEMALLOC_ALWAYS_INLINE void \
227229
tsd_##n##_set(tsd_t *tsd, t val) { \
228-
assert(tsd->state != tsd_state_reincarnated); \
230+
assert(tsd->state != tsd_state_reincarnated && \
231+
tsd->state != tsd_state_minimal_initialized); \
229232
*tsd_##n##p_get(tsd) = val; \
230233
}
231234
MALLOC_TSD
@@ -248,7 +251,7 @@ tsd_fast(tsd_t *tsd) {
248251
}
249252

250253
JEMALLOC_ALWAYS_INLINE tsd_t *
251-
tsd_fetch_impl(bool init, bool internal) {
254+
tsd_fetch_impl(bool init, bool minimal) {
252255
tsd_t *tsd = tsd_get(init);
253256

254257
if (!init && tsd_get_allocates() && tsd == NULL) {
@@ -257,19 +260,30 @@ tsd_fetch_impl(bool init, bool internal) {
257260
assert(tsd != NULL);
258261

259262
if (unlikely(tsd->state != tsd_state_nominal)) {
260-
return tsd_fetch_slow(tsd, internal);
263+
return tsd_fetch_slow(tsd, minimal);
261264
}
262265
assert(tsd_fast(tsd));
263266
tsd_assert_fast(tsd);
264267

265268
return tsd;
266269
}
267270

271+
/* Get a minimal TSD that requires no cleanup. See comments in free(). */
268272
JEMALLOC_ALWAYS_INLINE tsd_t *
269-
tsd_internal_fetch(void) {
273+
tsd_fetch_min(void) {
270274
return tsd_fetch_impl(true, true);
271275
}
272276

277+
/* For internal background threads use only. */
278+
JEMALLOC_ALWAYS_INLINE tsd_t *
279+
tsd_internal_fetch(void) {
280+
tsd_t *tsd = tsd_fetch_min();
281+
/* Use reincarnated state to prevent full initialization. */
282+
tsd->state = tsd_state_reincarnated;
283+
284+
return tsd;
285+
}
286+
273287
JEMALLOC_ALWAYS_INLINE tsd_t *
274288
tsd_fetch(void) {
275289
return tsd_fetch_impl(true, false);

contrib/jemalloc/include/jemalloc/jemalloc.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ extern "C" {
8787
#include <limits.h>
8888
#include <strings.h>
8989

90-
#define JEMALLOC_VERSION "5.0.0-4-g84f6c2cae0fb1399377ef6aea9368444c4987cc6"
90+
#define JEMALLOC_VERSION "5.0.1-0-g896ed3a8b3f41998d4fb4d625d30ac63ef2d51fb"
9191
#define JEMALLOC_VERSION_MAJOR 5
9292
#define JEMALLOC_VERSION_MINOR 0
93-
#define JEMALLOC_VERSION_BUGFIX 0
94-
#define JEMALLOC_VERSION_NREV 4
95-
#define JEMALLOC_VERSION_GID "84f6c2cae0fb1399377ef6aea9368444c4987cc6"
93+
#define JEMALLOC_VERSION_BUGFIX 1
94+
#define JEMALLOC_VERSION_NREV 0
95+
#define JEMALLOC_VERSION_GID "896ed3a8b3f41998d4fb4d625d30ac63ef2d51fb"
9696

9797
#define MALLOCX_LG_ALIGN(la) ((int)(la))
9898
#if LG_SIZEOF_PTR == 2

0 commit comments

Comments
 (0)