Commit Graph

13946 Commits

Author SHA1 Message Date
Justin Hibbits
59dc8c79c6 Allow truss to operate on ELFv2 processes.
Summary:
Currently, truss doesn't work on ELFv2 processes due to not recognizing the ABI.

Since there's no special handling needed here, just adding a PROCABI struct for
it is sufficient to get it working.

Submitted by:	git_bdragon.rtk0.net
Differential Revision: https://reviews.freebsd.org/D18352
2018-11-29 03:57:06 +00:00
Ed Maste
2431a6854d llvm-objdump.1: remove more unintentional options
Some options come from static constructors in LLVM libraries and are
automatically added to llvm's usage output.  They're not really supposed
to be llvm-objdump options.

Reported by:	Fangrui Song in LLVM review D54864
Sponsored by:	The FreeBSD Foundation
2018-11-27 13:52:51 +00:00
Ed Maste
6b31818dee llvm-objdump.1: fix igor / mandoc -Tlint warnings
Accidentally omitted from r340972.
2018-11-26 15:12:58 +00:00
Ed Maste
7a1772ed42 llvm-objdump.1: remove invalid options
Some options appear in llvm-objdump's usage information as a side effect
of its option parsing implementation and are not actually llvm-objdump
options.  Reported in LLVM review https://reviews.llvm.org/D54864.

Reported by:	Fangrui Song
Sponsored by:	The FreeBSD Foundation
2018-11-26 14:45:58 +00:00
Ed Maste
801cfbaa3f llvm-objdump: initial man page
Based on llvm-objdump's online documentation and usage information.
This serves as a starting point; additional detail and cleanup still
required.

Also being submitted upstream in LLVM review D54864.  I expect to use
this bespoke copy while we have LLVM 6.0 or 7.0 in FreeBSD; when we
update to LLVM 8.0 it should be upstream and we will switch to it.

PR:		233437
Reviewed by:	bcr (man formatting)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D18309
2018-11-26 14:34:30 +00:00
Thomas Munro
d1f84ec0a7 pom: Fix fencepost bugs.
Under some conditions pom would report "waning" and then "full", show
higher percentages than it should, and get confused by DST.  Fix.

Before:

  2018.01.30: The Moon is Waxing Gibbous (97% of Full)
  2018.01.31: The Moon is Waning Gibbous (100% of Full)
  2018.02.01: The Moon is Full
  2018.02.02: The Moon is Waning Gibbous (98% of Full)

After:

  2018.01.30: The Moon is Waxing Gibbous (96% of Full)
  2018.01.31: The Moon is Waxing Gibbous (99% of Full)
  2018.02.01: The Moon is Full
  2018.02.02: The Moon is Waning Gibbous (97% of Full)

PR:                    231705
Submitted by:          Andrew Gierth
Approved by:           allanjude (mentor)
MFC after:             2 weeks
Differential Revision: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=231705
2018-11-20 00:06:53 +00:00
Benedict Reuschling
fd91f85934 Add a fortune describing how to upload a machine's dmesg information to the
NYCBUG database.

We want to encourage our users to upload their dmesgs so that the project can
get a better insight into what kind of hardware is run on. This helps in making
data-driven decisions about i.e., platform and driver support.

Note that dmesgs may contain sensitive information like hardware serial numbers,
hence uploading them without review is discouraged.

Reviewed by:		brooks, imp, allanjude
Approved by:		allanjude
MFC after:		5 days
Differential Revision:	https://reviews.freebsd.org/D17705
2018-11-19 20:45:49 +00:00
Mariusz Zaborski
ce57fd97fe brandelf: capsicumize it 2018-11-18 12:23:03 +00:00
Mariusz Zaborski
d72ba183ff brandelf: fix style nits
No functional change intended.

Reviewed by:	emaste, markj
Differential Revision:	https://reviews.freebsd.org/D17966
2018-11-18 12:03:12 +00:00
Mariusz Zaborski
509e73d483 s/caph_enter_capser/caph_enter_casper/g
Reported by:	npn
2018-11-12 18:43:51 +00:00
Mariusz Zaborski
8e4febf012 s/caph_enter_with_casper/caph_enter_casper/
Reported by:	npn
2018-11-12 18:34:55 +00:00
Mariusz Zaborski
c71292ea35 wc: We should sandbox wc only if Capers is available. 2018-11-12 18:01:36 +00:00
Mariusz Zaborski
3824f650f0 head: sandbox using capsicum
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D14409
2018-11-12 17:59:15 +00:00
Mariusz Zaborski
9e4c5144e6 wc: sandbox wc using capsicum
Reviewed by:	AllanJude, emaste
Differential Revision:	https://reviews.freebsd.org/D14409
2018-11-12 17:47:51 +00:00
Mariusz Zaborski
509111af21 head: fix style nits
No functional change intended.

Reviewed by:	emaste
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D14498
2018-11-12 16:44:26 +00:00
Michael Tuexen
970bdbf5d7 Fix printing of 64-bit counters on 32-bit ppc platforms.
Several statistic counters are uint64_t values and are printed by systat
using %lu. This results in displaying wrong numbers. Use PRIu64 instead.
While there, print variables of size_t using %zd.

MFC after:i		3 days
Differential Revision:	https://reviews.freebsd.org/D17838
2018-11-12 13:26:13 +00:00
Xin LI
0f47072b78 Make outfile constant.
MFC after:	2 weeks
2018-11-12 07:14:34 +00:00
Ed Maste
e8bd280446 Move llvm-profdata build into MK_LLVM_COV block
llvm-profdata is used with llvm-cov for code coverage (although llvm-cov
can also operate independently in a gcov-compatible mode).
Although llvm-profdata can be used independently of llvm-cov it makes
sense to group these under one option.

Also handle these in OptionalObsoleteFiles.inc while here.

Sponsored by:	The FreeBSD Foundation
2018-11-09 18:35:09 +00:00
Ed Maste
9f7331ad2c llvm-cov: also install as gcov (if GNU gcov is disabled)
llvm-cov provides a gcov-compatible interface when invoked as gcov.

Reviewed by:	dim, markj
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17923
2018-11-09 17:43:19 +00:00
Mateusz Piotrowski
a641e44515 Cross-reference nohup(1) and daemon(8).
Reviewed by:	bcr
Approved by:	krion (mentor, implicit), mat (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D17920
2018-11-09 13:47:06 +00:00
Mariusz Zaborski
a25896ca12 bspatch: simplify capsicumization
Assume that user wants to run with capsicum support if he builds the software
with HAVE_CAPSICUM. Treat running application without capsicum in the kernel as
an error.

MFC after:	3 weeks
2018-11-07 21:01:14 +00:00
Brooks Davis
c35530f464 elfdump: Add -E to test if a file is an ELF binary.
This is intended to replace potentially unreliable checks like:

	file -b $1 | grep -q '^ELF ..-bit .SB executable'

Reviewed by:	emaste
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D15971
2018-11-05 22:53:50 +00:00
Mariusz Zaborski
377421df96 capsicum: use a new capsicum helpers in tools
Use caph_{rights,ioctls,fcntls}_limit to simplify the code.
2018-11-04 19:24:49 +00:00
Yuri Pankov
9508f8c05c Teach man(1) about C.UTF-8.
While here, use LANG as the proper source to select man pages language/encoding,
falling back to LC_CTYPE.

Reviewed by:	bapt
Approved by:	kib (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D17835
2018-11-04 16:58:55 +00:00
Yuri Pankov
d9e8d39f8d usr.bin/sed/tests: fix one of the regression test cases by adding its
results file to the build.

Reviewed by:	kevans
Approved by:	kib (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D17776
2018-10-31 15:04:41 +00:00
John Baldwin
6d7f919489 Teach procstat -x about the AT_EHDRFLAGS ELF auxiliary vector.
Submitted by:	Shawn Webb <lattera@gmail.com>
Reviewed by:	brooks
Obtained from:	HardenedBSD (bb71e9889d1362df01c2e5162e84cd7a4fc029c8)
MFC after:	2 months
Differential Revision:	https://reviews.freebsd.org/D17067
2018-10-29 23:48:20 +00:00
Thomas Munro
5b05dc5a8b truss: Fix display of shm_open(SHM_ANON, ...).
Currently truss(1) shows shm_open(SHM_ANON, ...) as shm_open("(null)", ...).
Detect the special value and display it by name.

Reviewed by:    jhb, allanjude, tuexen
Approved by:    mjg (mentor)
MFC with:       r339224
Differential Revision:  https://reviews.freebsd.org/D17461
2018-10-28 10:59:49 +00:00
Yuri Pankov
2d1cfed1b1 localedef: define characters in "space" class also as "print", except
for the known conflicts ("control" characters can't be "print"able).
POSIX doesn't explicitly forbid this, and actually includes <space>
character in "print".

PR:		225692
Reviewed by:	bapt, cem (previous version), pfg (previous version)
Approved by:	kib (mentor)
Differential Revision:	https://reviews.freebsd.org/D17467
2018-10-27 23:31:42 +00:00
Mark Johnston
5d704fafcb Add an IMPLEMENTATION NOTES section to ldd.1.
PR:		231926
Reviewed by:	emaste
MFC after:	1 month
2018-10-23 13:49:53 +00:00
Ed Maste
ccd8660b86 ar: report errno on warning/error
Previously ar would report an error like "ar: fatal: Write error"
without including additional errno information.  Change warnings and
errors to include archive_errno() so that the user may have some idea
of the reason for the failure.

Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17650
2018-10-23 13:07:03 +00:00
John Baldwin
4403657034 Add a "live" mode to ktrdump.
Support a "live" mode in ktrdump enabled via the -l flag.  In this
mode, ktrdump polls the kernel's trace buffer periodically (currently
hardcoded as a 50 millisecond interval) and dumps any newly added
entries.  Fancier logic for the timeout (e.g. a command line option or
some kind of backoff based on the time since the last entry) can be
added later as the need arises.

While here, fix some bugs from when this was Capsicum-ized:
- Use caph_limit_stream() for the output stream so that isatty() works
  and the output can be line-buffered (especially useful for live
  mode).
- Use caph_limit_stderr() to permit error messages to be displayed if
  an error occurs after cap_enter().

Reviewed by:	kib, 0mp (manpage)
MFC after:	2 months
Differential Revision:	https://reviews.freebsd.org/D17315
2018-10-22 21:25:28 +00:00
Yuri Pankov
4644f9bef6 Add -b/-l options to localedef(1) to specify output endianness and use
it appropriately when building share/ctypedef and share/colldef.

This makes the resulting locale data in EL->EB (amd64->powerpc64) cross
build and in the native EB build match.  Revert the changes done to libc
in r308170 as they are no longer needed.

PR:		231965
Reviewed by:	bapt, emaste, sbruno, 0mp
Approved by:	kib (mentor)
Differential Revision:	https://reviews.freebsd.org/D17603
2018-10-20 20:51:05 +00:00
Alexandre C. Guimarães
ece228caf7 Add myself to calendar, and update mentors-mentee relationships.
Reviewed by:	mat (mentor)
Approved by:	tcberner (mentor)
Differential Revision:	https://reviews.freebsd.org/D17396
2018-10-20 17:45:42 +00:00
Benedict Reuschling
6aca7aa44b A single comma was missing to separate the "see also" items in
last.1 and lastlogin.8. Add it back.

PR:		231187
Submitted by:	david.marec@davenulle.org
2018-10-20 17:22:04 +00:00
Yuri Pankov
ceb68e4a7c Add myself to committers-src.dot and calendar.freebsd.
Approved by:	re (gjb), kib (mentor)
2018-10-10 00:20:40 +00:00
Glen Barber
7c32835287 MFH r338661 through r339253.
Sponsored by:	The FreeBSD Foundation
2018-10-09 14:27:55 +00:00
Glen Barber
fc3f42d80f MFH r339206-r339212, r339215-r339239
Sponsored by:	The FreeBSD Foundation
2018-10-08 18:06:40 +00:00
Allan Jude
24eeedb5e9 Teach truss how to display shm_open(2), shm_unlink(2)
Submitted by:	Thomas Munro <munro@ip9.org>
Reviewed by:	tuexen, kib
Approved by:	re (rgrimes)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D17457
2018-10-07 19:50:44 +00:00
Glen Barber
01d4e2149e MFH r338661 through r339200.
Sponsored by:	The FreeBSD Foundation
2018-10-05 17:53:47 +00:00
Mateusz Piotrowski
fab44dc358 top(1): Rework DESCRIPTION OF MEMORY section.
Due to markup issues, the DESCRIPTION OF MEMORY section is rather
unreadable; rework it a bit, using subsections for different lines of the
top output, and move it closer to description.

While here, pet manlint ordering other sections as expected.

Submitted by:	Yuri Pankov <yuripv@yuripv.net>
Reviewed by:	eadler
Approved by:	re (gjb), krion (mentor)
Differential Revision:	https://reviews.freebsd.org/D17369
2018-10-02 08:13:54 +00:00
Edward Tomasz Napierala
7c65532627 Remove references to the "new" NFS clients and servers. The "old"
NFS stack is long gone.

Approved by:	re (gjb)
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-10-01 18:26:41 +00:00
Brooks Davis
a78849183c Don't override LDFLAGS set in bsd.cpu.mk.
This is a direct commit to a generated file.  Simon plans to fix this
upstream before the next import.

PR:		231557
Approved by:	re (gjb)
Obtained from:	CheriBSD
Sponsored by:	DARPA, AFRL
2018-09-25 15:25:42 +00:00
Baptiste Daroussin
61d06d6bd1 Import mandoc 1.14.4
Approved by:	re (kib)
MFC after:	1 week
2018-09-20 10:58:52 +00:00
Brad Davis
bca3325319 Move remote & phones to usr.bin/tip/tip/
Approved by:	re (blanket, pkgbase), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D17219
2018-09-19 14:56:53 +00:00
Jung-uk Kim
3ce33da625 Make factor(6) buildable. 2018-09-19 07:09:09 +00:00
Jung-uk Kim
ee4526c085 Make dc(1) buildable. 2018-09-19 07:08:27 +00:00
Brad Davis
1b491096a4 Move install of locate.rc to usr.bin/locate/locate/
This leverages CONFS to handle the install and purges an old comment.

Approved by:	re (blanket, pkgbase), bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D17215
2018-09-18 20:50:07 +00:00
Brad Davis
22917b7e0e Move mail.rc install to usr.bin/mail.
This leverages CONFS to do the install

Approved by:	re (blanket, pkgbase), bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D17216
2018-09-18 20:47:06 +00:00
Ed Maste
1ae9615a9a lld: add -z interpose support
-z interpose sets the DF_1_INTERPOSE flag, marking the object as an
interposer.

Committed upstream as LLVM r342239.

PR:		230604
Reported by:	jbeich
Reviewed by:	markj
Approved by:	re (kib)
MFC after:	1 week
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17172
2018-09-14 15:15:16 +00:00
Martin Matuska
a7bc28227e MFV r338519:
Update libarchive to 3.3.3

As all important changes have already been merged from libarchive git
this is just version number bump, documentation update and some
polishing for cpio tests. Other source code changes are not relevant to
FreeBSD.

Approved by:	re (gjb)
MFC after:	1 week
2018-09-11 20:51:34 +00:00