Commit Graph

14173 Commits

Author SHA1 Message Date
Enji Cooper
bdbf3440ce Revert r345706: the third time will be the charm
When a review is closed via Phabricator it updates the patch attached to the
review. I downloaded the raw patch from Phabricator, applied it, and repeated
my mistake from r345704 by accident mixing content from D19732 and D19738.

For my own personal sanity, I will try not to mix reviews like this in the
future.

MFC after:	1 month
MFC with:	r345706
Approved by:	emaste (mentor, implicit)
2019-03-29 18:43:46 +00:00
Enji Cooper
760b1a815b Standardize -std=c++* as CXXSTD`
CXXSTD was added as the C++ analogue to CSTD.

CXXSTD defaults to `-std=c++11` with supporting compilers; `-std=gnu++98`,
otherwise for older versions of g++.

This change standardizes the CXXSTD variable, originally added to
googletest.test.inc.mk as part of r345203.

As part of this effort, convert all `CXXFLAGS+= -std=*` calls to use `CXXSTD`.

Notes:

This value is not sanity checked in bsd.sys.mk, however, given the two
most used C++ compilers on FreeBSD (clang++ and g++) support both modes, it is
likely to work with both toolchains. This method will be refined in the future
to support more variants of C++, as not all versions of clang++ and g++ (for
instance) support C++14, C++17, etc.

Any manual appending of `-std=*` to `CXXFLAGS` should be replaced with CXXSTD.
Example:

Before this commit:
```
CXXFLAGS+=	-std=c++14
```

After this commit:
```
CXXSTD=	c++14
```

Reviewed by:	asomers
Approved by:	emaste (mentor)
MFC after:	1 month
MFC with:	r345203, r345704, r345705
Relnotes:	yes
Tested with:	make tinderbox
Differential Revision:	https://reviews.freebsd.org/D19732
2019-03-29 18:31:48 +00:00
Enji Cooper
752cabaa1c Revert r345704
I accidentally committed code from two reviews. I will reintroduce the code to
bsd.progs.mk as part of a separate commit from r345704.

Approved by:	emaste (mentor, implicit)
MFC after:	2 months
MFC with:	r345704
2019-03-29 18:16:33 +00:00
Enji Cooper
9a41926bfb CXXSTD is the C++ analogue to CSTD.
CXXSTD defaults to `-std=c++11` with supporting compilers; `-std=gnu++98`,
otherwise for older versions of g++.

This change standardizes the CXXSTD variable, originally added to
googletest.test.inc.mk as part of r345203.

As part of this effort, convert all `CXXFLAGS+= -std=*` calls to use `CXXSTD`.

Notes:

This value is not sanity checked in bsd.sys.mk, however, given the two
most used C++ compilers on FreeBSD (clang++ and g++) support both modes, it is
likely to work with both toolchains. This method will be refined in the future
to support more variants of C++, as not all versions of clang++ and g++ (for
instance) support C++14, C++17, etc.

Any manual appending of `-std=*` to `CXXFLAGS` should be replaced with CXXSTD.
Example:

Before this commit:
```
CXXFLAGS+=	-std=c++14
```

After this commit:
```
CXXSTD=	c++14
```

Reviewed by:	asomers
Approved by:	emaste (mentor)
MFC after:	1 month
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D19732
2019-03-29 18:13:44 +00:00
Kyle Evans
d37eb02eb9 dtc(1): Update to 1a79f5f26631
Highlights:
- Bugfix for order in which /delete-node/ and /delete-property/ are
  processed [0]
- /omit-if-no-ref/ support has been added (used only by U-Boot at this
  point, in theory)
- GPL dtc compat version bumped to 1.4.7
- Various small fixes and compatibility improvements

Reported by:	strejda [0]
MFC after:	1 week
2019-03-28 03:48:51 +00:00
Mitchell Horne
0d3cbca80b Update mentor and calendar files
Add an entry for myself (mhorne) to these files.

Approved by:	markj
2019-03-22 17:37:14 +00:00
Andriy Voskoboinyk
d614ded66a lockf(1): return EX_UNAVAILABLE if -n is used and the lock file does not
exist

Apply EX_UNAVAILABLE patch part from PR 170775 to match the documentation.

Checked with a command from PR 210770:
lockf -n /tmp/doesnotexist echo; echo $?

PR:		210770
MFC after:	1 week
2019-03-20 07:40:38 +00:00
Greg Lehey
1f0493ec0f Change date of Canberra Day, now on second Monday in March.
https://en.wikipedia.org/wiki/Canberra_Day
2019-03-17 22:26:50 +00:00
Konstantin Belousov
bab3f1d04a proccontrol(1): Add kpti control mode.
Requested by:	jhb
Reviewed by:	jhb, markj (previous version)
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D19514
2019-03-16 11:46:48 +00:00
Konstantin Belousov
504748bc88 Some fixes for proccontrol(1) man page.
- Fix markup.
- Mention that process can only allow tracing for itself.  This is already
  stated in procctl(2), but requiring knowledge of the syscall description
  is too much for the tool user.
- Clearly state that query mode only works for existing process.

Noted and reviewed by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2019-03-13 17:30:03 +00:00
Alan Somers
809a8352dd Drop "All rights reserved" from the files I own
Also, add SPDX tags where needed.

MFC after:	2 weeks
2019-03-11 22:23:56 +00:00
Marcel Moolenaar
370d612f5e Don't compress and uuencode the "hexdump -C" output files. Just
save them with the $FreeBSD$ tag prepended.  Changes to these
files are now a lot easier to comprehend, which makes diffs also
reviewable.
2019-03-09 02:03:07 +00:00
Bjoern A. Zeeb
b25d74e06c Improve ARP logging.
r344504 added an extra ARP_LOG() call in case of an if_output() failure.
It turns out IPv4 can be noisy. In order to not spam the console by default:
(a) add a counter for these events so people can keep better track of how
    often it happens, and
(b) add a sysctl to select the default ARP_LOG log level and set it to
    INFO avoiding the one (the new) DEBUG level by default.

Claim a spare (1st one after 10 years since the stats were added) in order
to not break netstat from FreeBSD 12->13 updates in the future.

Reviewed by:		karels
Differential Revision:	https://reviews.freebsd.org/D19490
2019-03-09 01:12:59 +00:00
Conrad Meyer
905fdc3ff1 seq(1): Require user-provided format strings to contain a conversion
This matches GNU seq, for example.

For users that are looking for similar functionality, 'jot -b foo N' will
print 'foo' N times.  See jot(1).

PR:		236347
Reported by:	<y AT maya.st>
Sponsored by:	Dell EMC Isilon
2019-03-07 18:24:16 +00:00
Mateusz Piotrowski
fdca34e4a5 Do not reference deskutils/cal from cal.1.
The ports version of cal is an abandonware so in order to minimize the
potential bit rot of our documentation let's not mention it at all.
Interested users are going to find suitable alternatives anyway on their
own.

Reported by:	bapt
Approved by:	bapt (src)
Approved by:	krion (mentor, implicit), mat (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D19492
2019-03-07 11:09:25 +00:00
Mateusz Piotrowski
a832f42afb Document that cal(1) cannot start a week with Monday.
Reviewed by:	bcr
Approved by:	bcr (doc)
Approved by:	krion (mentor, implicit), mat (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D19491
2019-03-07 10:19:40 +00:00
Alexander Motin
fcc8734127 Flush stdout after each iteration.
Without this, if output is redirected from the console, it is buffered for
too long, making tool quite unusable.

MFC after:	1 week
Sponsored by:	iXsystems, Inc.
2019-03-06 15:19:04 +00:00
Marcel Moolenaar
835adc6898 Round # partitions up to fill the last GPT table sector
Set the number of partitions entries in the GPT header to a
multiple of the number of entries that fit in a sector.

PR:		236238
Reviewed by:	imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D19465
2019-03-05 22:55:33 +00:00
Mark Johnston
6a85590370 Show wiring state of map entries in procstat -v.
Note that only entries wired by userspace are shown as such.  In
particular, entries transiently wired by sysctl_wire_old_buffer() are
not flagged as wired in procstat -v output.

Reviewed by:	kib (previous version)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D19461
2019-03-05 19:45:37 +00:00
Dimitry Andric
844fc3e907 Merge ^/head r344549 through r344775. 2019-03-04 19:14:32 +00:00
Kenneth D. Merry
0caf9bf62d Add IBM TS1160 density codes to libmt and the mt(1) man page.
These are taken directly from the density report from a TS1160
tape drive.  (Using mt getdensity)

A TS1160 drive stores 20TB raw (60TB with compression) on a JE tape.

lib/libmt/mtlib.c:
	Add 3592A6 encrypted/unencrypted density codes, and bpmm/bpi
	values.

usr.bin/mt/mt.1:
	Add 3592B5 encrypted/unencrypted density codes, bpmm/bpi
	values and number of tracks.  Bump the man page date.

MFC after:	3 days
Sponsored by:	Spectra Logic
2019-03-04 14:30:37 +00:00
Bjoern A. Zeeb
9784899d58 Fix compilation of world with WITHOUT_{INET,INET6}_SUPPORT or both set.
Buildworld failed when both WITHOUT_INET6_SUPPORT and INET equivalent were set.
Fix netstat and syslogd by applying appropriate #ifdef INET/INET6 to make world
compile again.

Reviewed by:		ngie, hrs, ume
Welcomed by:		Michael Dexter (D17040)
MFC after:		3 days
Differential Revision:	https://reviews.freebsd.org/D19418
2019-03-03 10:00:26 +00:00
Kyle Evans
ef30b5a809 patch(1): Exit successfully if we're fed a 0-length patch
This change is made in the name of GNU patch compatibility. If GNU patch is
fed a zero-length patch, it will exit successfully with no output. This is
used in at least one port to date (comms/wsjtx), and we break on this usage.

It seems unlikely that anyone relies on patch(1) calling their completely
empty patch garbage and failing, and GNU compatibility is a plus if it helps
with porting, so make the switch.

Reported by:	db
MFC after:	2 weeks
2019-03-01 01:20:21 +00:00
Thomas Munro
b5eab9d461 truss: Add support for fsync(2) and fdatasync(2).
The default handling showed the argument as hex.  Add explicit handling so
we can show it as decimal, since that's how we show file descriptors
everywhere else.

Approved by:	mjg (mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D19295
2019-02-28 09:13:41 +00:00
Konstantin Belousov
146537449b proccontrol(1) man page.
Reviewed by:	0mp
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D19308
2019-02-26 17:46:19 +00:00
Mark Johnston
2528b7e2cb Fix handling of rights on stdio streams, take two.
Split the rights-limiting code into two cases: if one of the input
files isn't a regular file, use caph_limit_stream(3) instead of
open-coding the same logic; if both input files are regular files,
and the initial attempts to map them succeed, we limit the rights on
those files to CAP_MMAP_R.

Add a regression test for PR 234885.

PR:		234885
Reviewed by:	delphij
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D19216
2019-02-25 19:47:27 +00:00
Dimitry Andric
a8fe8db49a Merge ^/head r344178 through r344512. 2019-02-25 11:59:29 +00:00
Ed Maste
33c1ce3b72 svn: support building with WITH_PIE
Subversion builds and links against its own .a archives using local
rules, so did not benefit from with the WITH_PIE library support added
in r344179.  Apply the same _pie suffix locally.

Reviewed by:	cem
Differential Revision:	https://reviews.freebsd.org/D19246
2019-02-21 15:08:25 +00:00
Dimitry Andric
281bdc30df Fix more AddressSanitizer violations in usr.bin/top
In line_update(), set lastcol correctly after moving to any non-zero
column, so the "overwrite old stuff" part does not attempt to address
negative offsets in the current line.

Rewrite setup_buffer() to always allocate at least 80 characters,
otherwise various calls to summary_format() will overwrite the end of
the buffers, if the screen width gets small enough.

MFC after:	1 week
2019-02-20 20:17:54 +00:00
Baptiste Daroussin
adedf5ee31 calendar: use iconv to respect the output encoding
calendar(1) can have input in various encoding, specifying
LANG=<locale_name> to enable calendar(1) to determine which one to use.

The problem is the content of the calendar itself is exposed as is making it
unreadable in many cases. For example french calendar which is encoded
ISO8859-1 is rendered badly in a fr_FR.UTF-8 environment.

Using iconv allows to solve this issue.
This will also allow to keep only 1 encoding in base for those files without
breaking user existing setup

Reported by:	many
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D19221
2019-02-20 06:40:52 +00:00
Konstantin Belousov
90ce241081 Minor cleanup for mkuzip(8) man page.
List all single-letter options in summary.
Order options alphabetically.

Sponsored by:	Mellanox Technologies
MFC after:	3 days
2019-02-19 20:26:03 +00:00
Ed Maste
c0347e182c kdump: expand comment on reasons for CAPFAIL_LOOKUP
Comment for CAPFAIL_LOOKUP refered only to paths containing ".." but
it is returned for other restricted VFS lookup cases, such as absolute
paths or openat(AT_FDCWD, ...).
2019-02-18 03:49:16 +00:00
Ed Maste
bcf99d2d99 Add WITH_PIE knob to build Position Independent Executables
Building binaries as PIE allows the executable itself to be loaded at a
random address when ASLR is enabled (not just its shared libraries).

With this change PIE objects have a .pieo extension and INTERNALLIB
libraries libXXX_pie.a.

MK_PIE is disabled for some kerberos5 tools, Clang, and Subversion, as
they explicitly reference .a libraries in their Makefiles.  These can
be addressed on an individual basis later.  MK_PIE is also disabled for
rtld-elf because it is already position-independent using bespoke
Makefile rules.

Currently only dynamically linked binaries will be built as PIE.

Discussed with:	dim
Reviewed by:	kib
MFC after:	1 month
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D18423
2019-02-15 22:22:38 +00:00
Dimitry Andric
c981cbbd13 Merge ^/head r343956 through r344177. 2019-02-15 21:50:45 +00:00
Konstantin Belousov
fa50a3552d Implement Address Space Layout Randomization (ASLR)
With this change, randomization can be enabled for all non-fixed
mappings.  It means that the base address for the mapping is selected
with a guaranteed amount of entropy (bits). If the mapping was
requested to be superpage aligned, the randomization honours the
superpage attributes.

Although the value of ASLR is diminshing over time as exploit authors
work out simple ASLR bypass techniques, it elimintates the trivial
exploitation of certain vulnerabilities, at least in theory.  This
implementation is relatively small and happens at the correct
architectural level.  Also, it is not expected to introduce
regressions in existing cases when turned off (default for now), or
cause any significant maintaince burden.

The randomization is done on a best-effort basis - that is, the
allocator falls back to a first fit strategy if fragmentation prevents
entropy injection.  It is trivial to implement a strong mode where
failure to guarantee the requested amount of entropy results in
mapping request failure, but I do not consider that to be usable.

I have not fine-tuned the amount of entropy injected right now. It is
only a quantitive change that will not change the implementation.  The
current amount is controlled by aslr_pages_rnd.

To not spoil coalescing optimizations, to reduce the page table
fragmentation inherent to ASLR, and to keep the transient superpage
promotion for the malloced memory, locality clustering is implemented
for anonymous private mappings, which are automatically grouped until
fragmentation kicks in.  The initial location for the anon group range
is, of course, randomized.  This is controlled by vm.cluster_anon,
enabled by default.

The default mode keeps the sbrk area unpopulated by other mappings,
but this can be turned off, which gives much more breathing bits on
architectures with small address space, such as i386.  This is tied
with the question of following an application's hint about the mmap(2)
base address. Testing shows that ignoring the hint does not affect the
function of common applications, but I would expect more demanding
code could break. By default sbrk is preserved and mmap hints are
satisfied, which can be changed by using the
kern.elf{32,64}.aslr.honor_sbrk sysctl.

ASLR is enabled on per-ABI basis, and currently it is only allowed on
FreeBSD native i386 and amd64 (including compat 32bit) ABIs.  Support
for additional architectures will be added after further testing.

Both per-process and per-image controls are implemented:
- procctl(2) adds PROC_ASLR_CTL/PROC_ASLR_STATUS;
- NT_FREEBSD_FCTL_ASLR_DISABLE feature control note bit makes it possible
  to force ASLR off for the given binary.  (A tool to edit the feature
  control note is in development.)
Global controls are:
- kern.elf{32,64}.aslr.enable - for non-fixed mappings done by mmap(2);
- kern.elf{32,64}.aslr.pie_enable - for PIE image activation mappings;
- kern.elf{32,64}.aslr.honor_sbrk - allow to use sbrk area for mmap(2);
- vm.cluster_anon - enables anon mapping clustering.

PR:	208580 (exp runs)
Exp-runs done by:	antoine
Reviewed by:	markj (previous version)
Discussed with:	emaste
Tested by:	pho
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D5603
2019-02-10 17:19:45 +00:00
Dimitry Andric
7362ea6db0 Fix the first couple of AddressSanitizer violations in usr.bin/top.
Avoid setting zero bytes beyond the length of the 'thisline' parameters
in i_process() and u_process(), and don't attempt to memset a negative
number of bytes.

MFC after:	1 week
2019-02-10 13:44:36 +00:00
Dimitry Andric
2f301637c8 Fix multiple warnings in usr.bin/top about variables shadowing global
declarations from base gcc, by renaming those variables.

MFC after:	1 week
2019-02-10 13:34:21 +00:00
Dimitry Andric
d0f687d30f Fix multiple warnings in usr.bin/top about discarded qualifiers from
both clang and gcc, by either constifying variables, or when that is not
possible, using __DECONST.

MFC after:	1 week
2019-02-10 13:31:08 +00:00
Dimitry Andric
9e43c218d5 Merge ^/head r343807 through r343955. 2019-02-10 12:49:34 +00:00
Johannes Lundberg
5515886768 Add myself to committers-src.dot and calendar.freebsd
Reviewed by:	imp (mentor)
Approved by:	imp (mentor)
Differential Revision:	https://reviews.freebsd.org/D19101
2019-02-09 16:53:39 +00:00
Kai Knoblich
78aa2590c1 Add myself to committers-ports.dot and calendar.freebsd
Reviewed by:	miwi (mentor)
Approved by:	miwi (mentor)
Differential Revision:	https://reviews.freebsd.org/D19119
2019-02-08 17:57:39 +00:00
Andriy Voskoboinyk
245a7edb05 newkey(8): fix 'tmpname' memory leak (always) and input file descriptor leak
when output file cannot be opened

PR:		201732
Reported by:	David Binderman <dcb314@hotmail.com>
MFC after:	1 week
2019-02-08 14:31:44 +00:00
Andriy Voskoboinyk
558fe07149 ipcs(1): drop obsolete error checking
This code is not reached since r77551.

PR:		201728
MFC after:	5 days
2019-02-07 14:29:45 +00:00
Ed Maste
0235d5e283 vtfontcvt: whitespace cleanup
PR:		205707
Submitted by:	Dmitry Wagin
2019-02-06 18:50:48 +00:00
Dimitry Andric
c2c227a536 Merge ^/head r343571 through r343711. 2019-02-03 11:41:43 +00:00
Bryan Drewery
ab3cf2b476 Shar files may be seen as binary by grep.
Suggest using -a to egrep to properly see executed commands.

This is a minor improvement to the manpage.  A better improvement
would be removal or gigantic warnings.

Sponsored by:	Dell EMC
MFC after:	1 week
2019-01-31 23:21:18 +00:00
Ed Maste
97d368d62b elfdump: use designated array initialization for note types
This ensures the note type name is in the correct slot.

PR:		228290
Submitted by:	kib
MFC with:	343610
Sponsored by:	The FreeBSD Foundation
2019-01-31 16:49:06 +00:00
Ed Maste
8ae9aa2772 elfdump: fix build after r343610
One patch hunk did not survive the trip from git to svn.

PR:		228290
MFC with:	r343610
2019-01-31 16:21:09 +00:00
Ed Maste
2bc7b0242f elfdump: include note type names
Based on a patch submitted by Dan McGregor.

PR:		228290
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2019-01-31 16:19:04 +00:00
Ed Maste
0f663f7258 elfdump: whitespace fixup in advance of other changes 2019-01-31 16:11:15 +00:00
Kyle Evans
6cbda6d943 install(1): Fix relative path calculation with partial common dest/src
For example, from the referenced PR [1]:

$ mkdir /tmp/lib/ /tmp/libexec
$ touch /tmp/lib/foo.so
$ install -lrs /tmp/lib/foo.so /tmp/libexec/

The common path identification bits terminate src at /tmp/lib/ and the
destination at /tmp/libe. The subsequent backtracking is then incorrect, as
it traverses the destination and backtraces exactly one level while eating
the 'libexec' because it was previously (falsely) identified as common with
'lib'.

The obvious fix would be to make sure we've actually terminated just after
directory separators and rewind a character if we haven't. In the above
example, we would end up rewinding to /tmp/ and subsequently doing the right
thing.

Test case added.

PR:		235330 [1]
MFC after:	1 week
2019-01-31 05:20:11 +00:00
Dimitry Andric
7e565c552a Merge ^/head r343320 through r343570. 2019-01-30 07:10:33 +00:00
Oleksandr Tymoshenko
c245efb99b calendar(1): Fix Aschermittwoch date for Austrian calendar
PR:		165516
Submitted by:	jhs@berklix.com
MFC after:	1 week
2019-01-29 19:54:37 +00:00
Benedict Reuschling
a9ea96eafd A few corrections and clarifications to r343406.
- Use "in" instead of "on" when referring to directory and UFS partition.
- Switch from hw.physmem to hw.realmem and add a description to
distinguish the two.
- Explain why the "df" command is having trouble displaying ZFS sizes
correctly. Add a bit more descriptive text to help why the output of
"zfs list -o space" should be used.
- Switch to vmstat instead of iostat display for systat(1) as it shows
more information on one screen. Describe what is displayed based on the
text of the man page. Change the list of the other values accordingly.
- Sort the flags to "zfs destroy" alphabetically.

Reviewed by:	rgrimes
Approved by:	rgrimes
MFC after:	8 days
Differential Revision:	https://reviews.freebsd.org/D18993
2019-01-28 19:54:58 +00:00
Oleksandr Tymoshenko
f2ef15fec4 Fix whiteout support in find(1)
find(1) ignores -type w passed to it. With this patch find(1) properly
identifies and prints whiteouts.

PR:		126384, 156703
Submitted by:	oleg@mamontov.net
MFC after:	1 week
2019-01-28 02:00:39 +00:00
Stefan Eßer
f5ce14028c Silence Clang Scan warnings regarding the use of strcp().
While these warnings are false positives, the use of strdup() instead of
malloc() and strcpy() simplifies and clarifies the code.

While checking the remaining uses of strcpy and strcat I noticed an
assignment of a strlen() to a variable "s", whose value needs to be
preserved for use in later output routines (where it is used to allocate
a buffer). I do not think that the value of "s" will come out lower than
its correct value and thus there is no risk of a buffer overflow, in the
general case, but a specially crafter argument might lead to an overflow.

The bogus assignment to "s" is removed since this value was only used a
single time in the following malloc() call, which has been removed.

MFC after:	2 weeks
2019-01-24 18:39:45 +00:00
Benedict Reuschling
56d417fd5d Add ZFS usage tips to freebsd-tips.
Add a bunch of examples on how to use ZFS features like:
- listing available space,
- setting and displaying a userquota,
- displaying pool I/O statistics and pool history,
- displaying the compression ratio for a dataset,
- various list options (sorting, removing headers),
- performing a dry-run of a snapshot delete,
- removing a range of snapshots,
- setting a custom property,
- preventing removal of a snapshot with ZFS holds,
- permission sets for zfs send/receive.

Additionally, clarify the existing examples a bit when
it comes to displaying space by mentioning UFS explicitly.
Other examples include displaying I/O in top(1), querying
sysctl(8) for active CPUs and available RAM. Mention systat(1)
and its options, too.
While here, reformat the example to upload a dmesg(8) a bit
to wrap properly.

Thanks to Allan Jude for his help with some of the ZFS examples.

Reviewed by:	dru,allanjude
Approved by:	allanjude (earlier version)
MFC after:	3 days
Relnotes:	yes (ZFS examples in freebsd-tips)
Differential Revision:	https://reviews.freebsd.org/D18541
2019-01-24 18:13:23 +00:00
Mark Johnston
27ed53c311 Remove extraneous setutxent() calls in write(1).
We already call setutxent() once during initialization.  Furthermore,
the subsequent calls occur after the process has entered capability
mode, so they fail, and attempts to fetch database entries fail as
a result.

PR:		235096
Submitted by:	fullermd@over-yonder.net
MFC after:	3 days
2019-01-23 20:02:17 +00:00
Oleksandr Tymoshenko
d65e72a818 Fix systat's :only command parser for the multiple arguments case
According to systat(1) :only option is supposed to accept multiple drives
but the parser for its arguments stops after first entry. Fix the parser
logic to accept multiple drives.

PR:		59220
Reported by:	Andy Farkas <andyf@speednet.com.au>
MFC after:	1 week
2019-01-23 02:46:35 +00:00
Dimitry Andric
88148a071b Merge ^/head r343202 through r343319. 2019-01-22 20:24:58 +00:00
Dimitry Andric
053d6b6842 Remove customizations in #includes of Options.inc, and adjust lld
Makefile to generate the file in the right place.
2019-01-22 18:04:40 +00:00
Dimitry Andric
6e3f21a20c Update lldb build glue to make MK_LLDB=yes work. 2019-01-22 18:03:45 +00:00
Dimitry Andric
06b606cfac Update lld build glue to make MK_LLD=yes work. 2019-01-21 20:23:18 +00:00
Dimitry Andric
efa7559714 Update llvm and clang build glue to make MK_CLANG_EXTRAS=yes and
MK_CLANG_FULL=yes work.
2019-01-21 19:39:35 +00:00
Glen Barber
6b27f978f5 Correct a typo: was -> way.
Submitted by:	Larry Hynes
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2019-01-21 15:27:58 +00:00
Mark Johnston
109b5c109c Fix cmp(1) tests for "special" mode.
Test failures don't seem to propagate up if atf_check is run in
a pipeline.  Thus, the tests continued to pass despite the bug reverted
in r343245.

MFC after:	1 week
2019-01-21 03:57:49 +00:00
Mark Johnston
33a28349a7 Revert r343117.
It breaks the special mode specified by passing "-" as one of the
input files.  Revert for now while we discuss a fix.

PR:		234885
Reported by:	delphij
MFC after:	now
2019-01-21 03:47:20 +00:00
Oleksandr Tymoshenko
e457729f18 Fix inconsistency in return values introduced by r343222
Consistently return 1 or the case of missing arguments in both functions

PR:		219689
MFC after:	1 week
X-MFC-With:	343222
2019-01-20 19:55:54 +00:00
Oleksandr Tymoshenko
13fe9f7f82 Fix crash in systat(4) when certain commands are called without arguments
Add check for missing arguments to dsmatchselect and dsselect

PR:		219689
Submitted by:	Marko Turk <mt@markoturk.info>
MFC after:	1 week
2019-01-20 19:47:33 +00:00
Dimitry Andric
676320a018 Update libllvmminimal and llvm-tblgen Makefiles, so llvm-tblgen and
clang-tblgen can build.
2019-01-20 18:53:32 +00:00
Justin Hibbits
61ef814f56 Fix top(1) long options handling
getopt_long(3) requires the long options be terminated by a NULL block.
Without the terminator, an invalid long option results in a segmentation
fault.

Reported by:	Brandon Bergren
MFC after:	1 week
2019-01-18 23:26:31 +00:00
Brooks Davis
e4478d7e46 Use a private definition of osockaddr rather then relying on type
namespace polution in sys/socket.h.

Also remove support for operation on 4.3BSD.

PR:		224529
Differential Revision:	https://reviews.freebsd.org/D14505
2019-01-18 21:30:06 +00:00
Oleksandr Tymoshenko
b63800ac8f Fix descriptor/memory leak in compress(1) code
This is mostly a style fix since the code in question is not called multiple
times and doesn't have cummulative effect.

PR:		204953
Submitted by:	David Binderman <dcb314@hotmail.com>
MFC after:	1 week
2019-01-18 00:26:25 +00:00
Mark Johnston
e6de40fa79 Fix handling of rights on stdio streams.
- Limit rights on stdio before opening input files.  Otherwise, open()
  may return one of the standard descriptors and we end up limiting
  rights such that we cannot read from one of the input files.
- Use caph_limit_stdio(), which suppresses EBADF, to ensure that
  we don't emit an error if one of the stdio streams is closed.
- Don't bother further limiting rights on stdin when stdin isn't going
  to be used.  Doing so correctly requires checking for a number of
  edge cases, and it doesn't provide any significant benefit.

PR:		234885
Reviewed by:	oshogbo
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D18860
2019-01-17 17:36:18 +00:00
Yoshihiro Takahashi
31afdd6f10 Fix indentation in ruptime command output for hosts in the "down" state.
PR:		234239
MFC after:	1 week
2019-01-12 12:57:32 +00:00
Yoshihiro Takahashi
1da80a2c75 Sync with OpenBSD.
bc.y: Rev 1.50
- write parse errors to stderr, prompted by Martijn Dekker
- we're only interactive if stdout en stderr are a tty as well as stdin

PR:		234430
Obtained from:	OpenBSD
MFC after:	1 week
2019-01-12 12:35:02 +00:00
Enji Cooper
7b97300547 Add Linux compatibility support for SC_NPROCESSORS_{CONF,ONLN} as _SC_NPROCESSORS_{CONF,ONLN}
The goal of this change is to make it easier to use getconf to query
the number of available processors.

Sadly it's unclear per POSIX, which form (with a preceding _ or
lacking it) is correct. I will bring this up on the Austin Group list so
this point is clarified for implementors that might rely on this getconf
variable in future POSIX spec versions.

This is something I noticed when trying to import GoogleTest to FreeBSD
as one of the CI scripts uses this variable on Linux.

MFC after:	2 weeks
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D18640
2019-01-11 22:28:18 +00:00
Kyle Evans
26e3f9681b Fix bsdgrep manpage clobbering grep(1) with default build options
The default build should install bsdgrep(1) and grep(1), with the latter
being gnugrep(1). WITH_BSD_GREP flips this situation such that we have
gnugrep(1) and grep(1), with the latter being bsdgrep(1).

Changes to start installing the zgrep script out of usr.bin/grep
inadvertently altered the default build such that grep(1) was being
installed, and it was bsdgrep(1). Correct the typo.

Reported by:	bcran
MFC after:	3 days
2019-01-09 02:47:07 +00:00
Xin LI
197884df8a Correct documentation year.
MFC after:	2 weeks
2019-01-07 08:29:27 +00:00
Xin LI
5c4b64e66b Port NetBSD improvements:
- Add -l support for xz files
 - Add lzip support to gzip based on the example lzip decoder.

Obtained from:	NetBSD
MFC after:	2 weeks
Relnotes:	yes
2019-01-07 08:27:11 +00:00
Jilles Tjoelker
da61c776f3 getconf(1): Minor mdoc fix
MFC after:	1 week
2019-01-06 21:43:14 +00:00
Xin LI
4f4b31568a Remove unneeded assert.h (there is no assertion in this file).
MFC after:	2 weeks
2019-01-06 20:42:09 +00:00
Xin LI
4dbd43cd05 Remove unneeded headers.
MFC after:	1 month
2019-01-06 20:39:23 +00:00
Allan Jude
07372194c3 The lam(1) man page is unclear about the uppercase versions of the flags
PR:		229571
Submitted by:	Tim Chase <freebsd@tim.thechases.com>
2019-01-04 02:48:43 +00:00
Conrad Meyer
a0483764f3 Update to Zstandard 1.3.8
This merge brings in a couple new files, which needed to be attached to the
build; a new dependency on <limits.h>, which must be stubbed; and a name
change in the Context parameter constants, from ZSTD_p_foo to ZSTD_c_foo.

Significantly, it fixes a kernel build error with GCC where floating-point
functions were included in the kernel build, by hiding them under the same
compile-time #ifdef that already covered their invocation.  That issue was
introduced to FreeBSD in the 1.3.7 update and tracked upstream here:

  https://github.com/facebook/zstd/issues/1386

The full 1.3.8 release notes can be found on Github:

  https://github.com/facebook/zstd/releases/tag/v1.3.8

Relnotes:	yes
2018-12-29 21:18:01 +00:00
Ed Maste
ac8e938122 ar: detect and error out on 32-bit symbol table overflow
BSD ar currently does not support the /SYM64/ 64-bit symbol table, and
previously truncated to 32-bits, silently producing corrupted archives
larger than 4GB.

This is another overflow case in addtion to r342575.

PR:		234454
Reported by:	Aijaz Baig, imp
MFC after:	2 weeks
MFC with:	r342575
Sponsored by:	The FreeBSD Foundation
2018-12-28 22:47:55 +00:00
Ed Maste
699f180198 ar: detect and error out on 32-bit symbol table overflow
BSD ar currently does not support the /SYM64/ 64-bit symbol table, and
previously truncated to 32-bits, silently producing corrupted archives
larger than 4GB.

Note that this is only a partial fix; additional checks will come.

PR:		234454
Reported by:	Aijaz Baig, imp
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-12-28 17:00:12 +00:00
Mateusz Piotrowski
8ece0ee096 iscsictl.8: Add missing flag parameters
- Add missing parameters to flags in the description of available options.
- Remove spaces between alternative parameters and "|".
- Align descriptions of options to the longest option.
- Use em dash instead of a hyphen.

Reviewed by:	bcr
Approved by:	doc (bcr)
Approved by:	krion (mentor, implicit), mat (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D18608
2018-12-27 14:44:01 +00:00
Simon J. Gerraty
dfd669ab38 Merge bmake-20181221 2018-12-23 01:05:52 +00:00
Shteryana Shopova
e1747016b9 Add myself to the calendar 2018-12-12 19:58:54 +00:00
Dimitry Andric
893405b45f Merge ^/head r341764 through r341812. 2018-12-11 06:47:04 +00:00
John Baldwin
c1745bf503 Validate the string size parameter passed to -s.
Use strtonum() to reject negative sizes instead of core dumping.

PR:		232206
Submitted by:	David Carlier <devnexen@gmail.com>
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D17537
2018-12-10 21:47:19 +00:00
Dimitry Andric
67350cb56a Merge ^/head r340918 through r341763. 2018-12-09 11:39:45 +00:00
John Baldwin
dab45de671 Rename riscv64-freebsd.c to riscv-freebsd.c.
This fixes truss when built as part of a riscv64sf world.  Additionally,
if FreeBSD ever supports RV32 RISC-V most of this file can be used as-is
just as a single file is used for all of the MIPS ABIs.

Sponsored by:	DARPA
2018-12-06 22:35:07 +00:00
Simon J. Gerraty
2eae894ca7 Update bmake to version 20180919
Cleanup of stats cache
and new :q modifier.
2018-12-06 20:56:19 +00:00
Li-Wen Hsu
037479ff5e Temporarily skip flakey test cases
PR:		233586, 233587, 233588
Approved by:	markj (mentor)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D18362
2018-12-06 09:22:35 +00:00
Konstantin Belousov
a66732de4f Print type designator 'D' for the KF_TYPE_DEV files.
No type-specific data is provided by the kernel.

Sponsored by:	Mellanox Technologies
MFC after:	1 week
2018-12-03 23:42:04 +00:00
Mark Johnston
e7a0ad24b0 Add missing display messages when toggling modes.
PR:		233667
Submitted by:	James Wright <james.wright@jigsawdesign.com>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D18331
2018-11-30 18:02:59 +00:00
Eugene Grosbein
fcd7ccb28c Move trim(1) from usr.bin to usr.sbin to become trim(8).
Requested by:	se
MFC after:	1 month
2018-11-29 16:08:16 +00:00
Eugene Grosbein
98af779d05 trim(1): unbreak build after r341232 for platforms using gcc and not clang
MFC after:	1 month
2018-11-29 14:49:33 +00:00
Eugene Grosbein
bf64d87e6c Add new small tool trim(1) to delete contents for blocks on flash
based storage devices that use wear-leveling algorithms.

Reviewed by:	hackers@
MFC after:	1 month
2018-11-29 14:21:26 +00:00
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
Dimitry Andric
3d5db45595 Merge ^/head r340427 through r340868. 2018-11-24 14:46:06 +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
Dimitry Andric
6149ed01a1 Merge ^/head r340368 through r340426. 2018-11-14 06:46:44 +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
Dimitry Andric
9b5cb2f639 Merge ^/head r340235 through r340367. 2018-11-12 16:41:41 +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
Dimitry Andric
c06e7b66a1 Merge ^/head r340126 through r340212. 2018-11-07 18:52:28 +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
Dimitry Andric
2a22df74e9 Merge ^/head r339813 through r340125. 2018-11-04 15:49:06 +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
Dimitry Andric
c6879c6c14 Merge ^/head r339015 through r339669. 2018-10-23 21:09:37 +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
Dimitry Andric
ce44d80853 Merge ^/head r338731 through r338987. 2018-09-27 20:00:07 +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