Commit Graph

11430 Commits

Author SHA1 Message Date
Enji Cooper
b7c2ba84c9 Create MANLINKS for lzgrep, etc when MK_LZMA_SUPPORT != no
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
2015-01-30 18:07:46 +00:00
Pedro F. Giffuni
76c76d54f8 sed: fix pasto from previous r277802.
MFC after:	3 days
2015-01-27 19:46:19 +00:00
Pedro F. Giffuni
fc04dce059 Fix resource leak and dereference after NULL.
process.c:
Protect access against NULL.

main.c:
Prevent outfile overwrite resource leak.

CID:	271181
CID:	1006930

Obtained from:	NetBSD
MFC after:	3 days
2015-01-27 18:58:24 +00:00
Dag-Erling Smørgrav
4ac1e0a9fc Allow tracing dlfunc() / dlsym() events.
MFC after:	1 week
2015-01-25 12:11:50 +00:00
Enji Cooper
3f802165ba Add MK_TALK knob for building the talk and talkd
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-01-25 04:37:44 +00:00
Enji Cooper
b29d6977f3 Add MK_ISCSI knob for building the iscsi initiator, iscsi daemon, kernel
modules, etc

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-01-25 04:20:11 +00:00
Enji Cooper
79a86dafb7 Add MK_EE knob to control installing edit, ee, etc
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-01-25 00:03:44 +00:00
Jilles Tjoelker
5faf2ae160 cp,mv,touch: Set timestamps with nanosecond precision.
This uses utimensat().
2015-01-24 13:50:13 +00:00
Jilles Tjoelker
2205e0d1bd Add futimens and utimensat system calls.
The core kernel part is patch file utimes.2008.4.diff from
pluknet@FreeBSD.org. I updated the code for API changes, added the manual
page and added compatibility code for old kernels. There is also audit and
Capsicum support.

A new UTIME_* constant might allow setting birthtimes in future.

Differential Revision:	https://reviews.freebsd.org/D1426
Submitted by:	pluknet (partially)
Reviewed by:	delphij, pluknet, rwatson
Relnotes:	yes
2015-01-23 21:07:08 +00:00
Will Andrews
d0fde85e65 Use clock_gettime to measure the time that we spent asleep during
"vmstat -i" instead of assuming it's what we asked for.

Submitted by:	asomers
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1066751 on 2014/06/04
2015-01-23 16:21:31 +00:00
Will Andrews
157b158ea9 Use CLOCK_UPTIME to get the uptime instead of CLOCK_MONOTONIC.
Submitted by:	asomers
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1066740 on 2014/06/04
2015-01-23 16:18:39 +00:00
Will Andrews
961a5dae5c Make "vmstat -i" respect the -c <count> and -i <interval> options together.
Submitted by:	asomers
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1066735 on 2014/06/04
2015-01-23 16:15:55 +00:00
Xin LI
a5e43ff69e Fix xz handling for files larger than 32K.
Submitted by:	Stefan Ehmann <shoesoft gmx net>
PR:		bin/186861
MFC after:	2 weeks
2015-01-21 01:11:37 +00:00
Will Andrews
7a37b5fc17 Add a ${CP} alias for copying files in the build.
Some users build FreeBSD as non-root in Perforce workspaces.  By default,
Perforce sets files read-only unless they're explicitly being edited.
As a result, the -f argument must be used to cp in order to override the
read-only flag when copying source files to object directories.  Bare use of
'cp' should be avoided in the future.

Update all current users of 'cp' in the src tree.

Reviewed by:	emaste
MFC after:	1 week
Sponsored by:	Spectra Logic
2015-01-16 21:39:08 +00:00
Justin Hibbits
b5d4909ec3 Make use of the new Altivec ptrace support, to save the Altivec registers in
gcore.

MFC after:	2 weeks
Relnotes:	yes
2015-01-14 07:02:21 +00:00
Pedro F. Giffuni
a161398ab8 Replace __inline GNUism with the standard inline.
MFC after:	1 week
2015-01-13 00:04:22 +00:00
Dimitry Andric
c369979c46 Add the llvm-symbolizer tool, which enables the sanitizers to report
more complete debugging information.  This tools is only enabled when
WITH_CLANG_EXTRAS is on.

Submitted by:	Dan McGregor <danismostlikely@gmail.com>
2015-01-10 22:22:42 +00:00
Dimitry Andric
f91be99b1f Remove a few redundant DPADD/LDADD pairs in llvm utilities. 2015-01-10 22:11:49 +00:00
Dimitry Andric
559f16f0dd Regenerate the manpages for the additional llvm/clang tools. This
contains only very minor updates.
2015-01-10 21:44:31 +00:00
Jeremie Le Hen
98648ee85e Add a regression test for PR 192108.
I won't go through the hassle of MFCing it since I expect all changes to go
first through HEAD anyway.

PR:		192108
2015-01-10 10:16:22 +00:00
Ed Maste
8fb02d8847 mkimg: Add MBR EFI partition type
Sponsored by:	The FreeBSD Foundation
2015-01-09 19:34:48 +00:00
John Baldwin
e275993995 Document CPU_WHICH_DOMAIN and bump Dd for cpuset.1.
Missed in:	r276829
2015-01-08 18:53:11 +00:00
Pedro F. Giffuni
bfffbac603 Partial revert of r276832:
Do not bump the warns level as it still breaks the gcc build on sparc64

Reported by:	jenkins
2015-01-08 17:23:59 +00:00
Pedro F. Giffuni
707c9cc5d1 sed: Address warnings with clang and gcc48.
MFC after:	2 weeks
2015-01-08 16:33:15 +00:00
John Baldwin
c0ae66888b Create a cpuset mask for each NUMA domain that is available in the
kernel via the global cpuset_domain[] array. To export these to userland,
add a CPU_WHICH_DOMAIN level that can be used to fetch the mask for a
specific domain. Add a -d flag to cpuset(1) that can be used to fetch
the mask for a given domain.

Differential Revision:	https://reviews.freebsd.org/D1232
Submitted by:	jeff (kernel bits)
Reviewed by:	adrian, jeff
2015-01-08 15:53:13 +00:00
Dimitry Andric
47a80b9264 Add the AArch64 llvm backend to the build to allow for early testing and
to ease any rework of how clang is built to take arm64 in to account.

Submitted by:	andrew
Reviewed by:	andrew, emaste
Differential Revision: https://reviews.freebsd.org/D1446
2015-01-07 19:06:27 +00:00
Ed Maste
63bf16a1c4 ar: Avoid null pointer deref while reading corrupt archives
ELF Tool Chain ticket #467

Reported by:	Alexander Cherepanov <cherepan@mccme.ru>
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2015-01-07 01:51:02 +00:00
Baptiste Daroussin
ff7c6d42f3 Use the new process reaper functionality
When not using the --foreground option timeout(1) is supported to signal all
command children hierarchy, timeout(1) now acquire the reaper to ensure this
really happens and no children process can escaper from timeout(1) control
2015-01-06 23:40:39 +00:00
Dmitry Chagin
78ec874dd3 kdump: eliminate new clang warnings.
MFC after:	1 week
2015-01-06 18:53:09 +00:00
Joel Dahl
385385fb1c mdoc: use An macro. 2015-01-04 12:42:08 +00:00
Baptiste Daroussin
0489fbcd33 Only manpages with fatal errors should be rendered by groff(1) 2015-01-03 23:39:44 +00:00
Ed Maste
2432082836 Add Makefile for elftoolchain readelf(1)
Sponsored by:	The FreeBSD Foundation
2015-01-02 22:26:54 +00:00
Dimitry Andric
ccd2f3b61a Merge ^/head r274961 through r276472. 2014-12-31 16:50:46 +00:00
Pedro F. Giffuni
f718bedc4f Fixes to exit status.
Exit with EXIT_FAILURE for invalid arguments.
Fixes NetBSD-PR 43517.

Print version string to stdout instead of stderr;
it is user-requested and not an error.

Obtained from:	NetBSD
MFC after:	5 days
2014-12-31 16:30:33 +00:00
Dimitry Andric
3ed527f1b5 Merge ^/head r274961 through r276418. 2014-12-30 20:23:03 +00:00
Joel Dahl
f7e00d4bbd mdoc: remove EOL whitespace. 2014-12-29 13:50:59 +00:00
Dimitry Andric
8007ee2b0c Merge ^/head r274961 through r276301. 2014-12-27 14:58:52 +00:00
Joel Dahl
914f6e6290 mdoc: sort SEE ALSO. 2014-12-26 21:56:23 +00:00
Baptiste Daroussin
fd83961f72 mandoc -Tlocale is now the default, no need to enforce it anymore 2014-12-25 22:04:16 +00:00
Baptiste Daroussin
47ed86a875 Update mandoc to 1.13.2 2014-12-25 21:56:56 +00:00
Pedro F. Giffuni
547e0acbec patch: Bring in xstrdup and use it when appropriate.
The function savestr allows NULL return values during Plan A patching so in
case of out of memory conditions, Plan B can step in.  In many cases, NULL
value is not properly handled, so use xstrdup here (it's outside Plan A/B
patching, which means that even Plan B relies on successful operations).

Clean up some whitespaces while here

Obtained from:	OpenBSD
MFC after:	2 weeks
2014-12-25 21:51:28 +00:00
Xin LI
bf855dd342 Sync with NetBSD, mainly address NetBSD bug #43355:
Fix valid_format() to be more careful about allowing only valid
printf formats.

Obtained from:	NetBSD
MFC after:	2 weeks
2014-12-18 20:23:19 +00:00
Dimitry Andric
e65720e1ac Merge ^/head r275759 through r275911. 2014-12-18 18:44:22 +00:00
Gleb Kurtsou
9b33705411 Adjust printf format specifiers for dev_t and ino_t in user space.
ino_t and dev_t are about to become uint64_t.

Reviewed by:	kib, mckusick
2014-12-17 07:10:48 +00:00
Pedro F. Giffuni
a34b42e43c sed: Bounds check the file path used in the 'w' command.
Modified version of a diff from Sebastien Marie to prevent a crash found
with the afl fuzzer.

Obtained from:	OpenBSD (CVS Rev. 1.37)
MFC after:	1 week
2014-12-16 20:26:11 +00:00
Dimitry Andric
be281d7007 Merge ^/head r275715 through r275748. 2014-12-13 19:45:18 +00:00
Marcel Moolenaar
0f49f14626 The size of the first level reference count table is given in terms of the
number of clusters it occupies. It's not the number of entries in the table,
as it is for the L1 cluster table.

For small images, the two are the same. With the unit tests based on small
images, this change has therefore no effect on the unit test.  For larger
images (like the FreeBSD 10.1-RELEASE image), this gives a discrepancy that
actually shows up when running "qemu-img check".

Bump the version number of mkimg.

While here, fix a white-space bug.

MFC after: 1 week
2014-12-12 06:13:31 +00:00
Dimitry Andric
d7e0694a59 Merge ^/head r275478 through r275622. 2014-12-08 19:56:34 +00:00
Pedro F. Giffuni
d3fc0cb884 patch(1): avoid line number overflows
Introduce strtolinenum to properly check line numbers while parsing:
no signs, no spaces, just digits, 0 <= x <= LONG_MAX

Properly validate line ranges supplied in diff file to prevent overflows.
Also fixes an out of boundary memory access because the resulting values
are used as array indices.

PR:	195436
Obtained from:	OpenBSD (CVS pch.c rev 1.45, 1,46, common.h rev 1.28)
MFC after:	1 week
2014-12-08 15:10:48 +00:00
Pedro F. Giffuni
2b468ebac3 Small space changes
Mostly to keep in sync with OpenBSD and update the TAG.

Obtained from:	OpenBSD
MFC after:	5 days
2014-12-07 20:32:24 +00:00