Commit Graph

221274 Commits

Author SHA1 Message Date
Alexander Motin
229203af68 Remove code for unsupported FreeBSD versions.
MFC after:	2 weeks
2017-03-12 14:17:57 +00:00
Konstantin Belousov
9a2dde8013 Avoid reusing p_ksi while it is on queue.
When sending SIGCHLD informing reaper that a zombie was reparented to
it, we might race with the situation where the previous parent still
not finished delivering SIGCHLD and having its p_ksi structure on the
signal queue.  While on queue, the ksi should not be used for another
send.

Fix this by copying p_ksi into newly allocated ksi, which is directly
put onto reaper sigqueue.  The later ensures that siginfo for reaper
SIGCHLD is always present, similar to guarantees for siginfo of child.

Reported by:	bdrewery
Discussed with:	jilles
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-03-12 13:58:51 +00:00
Konstantin Belousov
2b6d1a639b Follow-up to r313690.
Fix two missed places where vm_object offset to index calculation
should use unsigned shift, to allow handling of full range of unsigned
offsets used to create device mappings.

Reported and tested by:	royger (previous version)
Reviewed by:	alc (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-03-12 13:53:13 +00:00
Konstantin Belousov
9bcf2f2da0 Accept linkers representation for ELF segments with zero on-disk length.
For such segments, GNU bfd linker writes knowingly incorrect value
into the the file offset field of the program header entry, with the
motivation that file should not be mapped for creation of this segment
at all.

Relax checks for the ELF structure validity when on-disk segment
length is zero, and explicitely set mapping length to zero for such
segments to avoid validating rounding arithmetic.

PR:	217610
Reported by:	Robert Clausecker <fuz@fuz.su>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-03-12 13:51:13 +00:00
Konstantin Belousov
973d67c407 Style.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-03-12 13:49:42 +00:00
Konstantin Belousov
1e4296c919 Ktracing kevent(2) calls with unusual arguments might leads to an
overly large allocation requests.

When ktrace-ing io, sys_kevent() allocates memory to copy the
requested changes and reported events.  Allocations are sized by the
incoming syscall lengths arguments, which are user-controlled, and
might cause overflow in calculations or too large allocations.

Since io trace chunks are limited by ktr_geniosize, there is no sense
it even trying to satisfy unbounded allocations.  Export ktr_geniosize
and clamp the buffers sizes in advance.

PR:	217435
Reported by:	Tim Newsham <tim.newsham@nccgroup.trust>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-03-12 13:48:24 +00:00
Alexander Motin
2b665a98b5 Some more polishing.
MFC after:	13 days
2017-03-12 12:38:16 +00:00
Dag-Erling Smørgrav
64c422355d Add a __printflike() that would have caught the bug fixed in r314396. 2017-03-12 11:54:35 +00:00
Tijl Coosemans
971c1c4219 - Remove separate handling of /bin and /usr/bin in manpath. They are no
longer a special case.
- Prefer PREFIX/share/man over PREFIX/man.
- Add /usr/local/share/man to man_default_path.
- Update manpath man page.

Reviewed by:	bapt
2017-03-12 10:56:19 +00:00
Emmanuel Vadot
2a92bd2d38 Use 'options EXT_RESOURCES' instead of 'device ext_resources' for FDT enabled
MIPS kernel config.
2017-03-12 07:09:50 +00:00
Kristof Provost
2a57d24bd1 pf: Fix incorrect rw_sleep() in pf_unload()
When we unload we don't hold the pf_rules_lock, so we cannot call rw_sleep()
with it, because it would release a lock we do not hold. There's no need for the
lock either, so we can just tsleep().

While here also make the same change in pf_purge_thread(), because it explicitly
takes the lock before rw_sleep() and then immediately releases it afterwards.
2017-03-12 05:42:57 +00:00
Enji Cooper
acdb1504ff lib/libcam/cam.3: fix manpage warnings
- spelling: "mis-named" should be "misnamed".
- delete spaces interspersed in literal representation of
  `struct cam_device` as hard-tabs separate the types and fields.
- Add commas after `e.g.`.

Reported by:	igor
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-03-12 05:20:49 +00:00
Enji Cooper
88cbf2928f Use .Dv when referencing NULL
This is the correct markup macro, as opposed to .Va (variable names)

While here, annotate several bare references to `NULL` with .Dv.

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-03-12 05:07:33 +00:00
Kristof Provost
f618201314 pf: Do not lose the VNET lock when ending the purge thread
When the pf_purge_thread() exits it must make sure to release the
VNET_LIST_RLOCK it still holds.
kproc_exit() does not return.
2017-03-12 05:00:04 +00:00
Enji Cooper
8368415056 Remove /rescue/zdb if MK_ZFS == no
Missed in r202452.

MFC after:	3 days
Sponsored by:	Dell EMC Isilon
2017-03-12 04:28:45 +00:00
Enji Cooper
4ab40004f0 Conditionally compile [additional] programs into rescue(8) if requested
Trivial oversight missed in r314240 cleanup because I enable these knobs on
my test machines.

MK_INET6_SUPPORT - rtsol
MK_NETCAT - nc

MFC after:	3 days
Sponsored by:	Dell EMC Isilon
2017-03-12 04:24:29 +00:00
Marcelo Araujo
2ae0afa8ee Add the capability to refresh the gpart(8) label without need a reboot.
gpart(8) has functionality to change the label of an GPT partition.
This functionality works like it should, however, after a label change
the /dev/gpt/ entries remain unchanged. glabel(8) status output remains
unchanged. The change only takes effect after a reboot.

PR:		162690
Submitted by:	sub.mesa@gmail, Ben RUBSON <ben.rubson@gmail.com>, ae
Reviewed by:	allanjude, bapt, bcr
MFC after:	6 weeks.
Differential Revision:	https://reviews.freebsd.org/D9935
2017-03-12 04:15:56 +00:00
Enji Cooper
a1437e83d3 Remove /rescue/iscsictl and /rescue/iscsid if MK_ISCSI == no
MFC after:	3 days
Sponsored by:	Dell EMC Isilon
2017-03-12 04:14:21 +00:00
Enji Cooper
3947900cdc Restore some of the error message text accidentally removed in r315098
"unexpected symlink contents" is more pedantically correct than
"unexpected symlink".

MFC after:	1 week
X-MFC with:	r315098
Sponsored by:	Dell EMC Isilon
2017-03-12 04:08:36 +00:00
Baptiste Daroussin
d5b187aefb Fix building with recent gcc
Reported by:	lwhsu, ngie
2017-03-12 04:04:16 +00:00
Enji Cooper
ec0ada9dc4 Add 3 more testcases demonstrating how install -l sr works
The additional testcases use absolute paths for sources and targets,
as the other testcase which tested `-l sr` used flat relative paths in
the same directory.

Please note that these testcases do not test `-l a` -- that's already
addressed in the battery of tests.

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-03-12 03:58:54 +00:00
Baptiste Daroussin
d135c69a1a Fix bad latest entry
Reported by:	ngie
2017-03-12 03:53:41 +00:00
Pedro F. Giffuni
97721eb583 libc: small cleanup.
Initialize newsize in the code section so we avoids asigning the
value if we exit early.
2017-03-12 03:50:13 +00:00
Baptiste Daroussin
901a475b7a Implement a stub --horizon-lines=NUM for compatibility with GNU diff3
some options of GNU diff3 would call diff with --horizon-lines, rcs is depending
on that.

Reported by:	antoine
2017-03-12 03:49:05 +00:00
Marcelo Araujo
21a973f499 Use nitems() from sys/param.h.
Reviewed by:	ngie
Differential Revision:	https://reviews.freebsd.org/D9943
2017-03-12 03:43:28 +00:00
Baptiste Daroussin
57f942af81 Fix wrong date in diff(1)
Reported by:	rgrimes
2017-03-12 03:36:33 +00:00
Baptiste Daroussin
75bf90db94 Finish removal of WITHOUT_MANDOCDB 2017-03-12 03:35:01 +00:00
Baptiste Daroussin
5714b7010f Fix native-xtools after replacement of GNU diff 2017-03-12 03:33:20 +00:00
Enji Cooper
ef74be51be Clarify src vs dest path mismatch in :symbolic_link_{absolute,relative}_body
Unfortunately kyua does not omit the path mismatch on failure, so it must be coded
into the error message.

Cache the values, run the test(1) call, then print out the values in an atf_fail
call to emit the required diagnostics to debug why things are failing.

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-03-12 03:29:49 +00:00
Pedro F. Giffuni
3c72899a8e libc: small cleanups.
Remove unused initialization: "num" is properly defined before use.

Reviewed by:	ngie
MFC after:	3 days
2017-03-12 03:29:23 +00:00
Pedro F. Giffuni
ada469063f libc: small cleanups.
Unsign setlen: it is local and will never be negative. Having one more bit
for growth is beneficial and it avoids a cast when it's going to be used
for allocation.

Reviewed by:	ngie
MFC after:	3 days
2017-03-12 03:26:25 +00:00
Pedro F. Giffuni
56362c6f81 libc: small cleanups.
Rename nitems to numitems: it shares the anme with an existing macro in
sys/params.h. Also initialize the value later which avoids asigning the
value if we exit early.

Reviewed by:	ngie
MFC after:	3 days
2017-03-12 03:22:18 +00:00
Enji Cooper
e96ea26ddd Delete duplicate -I <SRCTOP>/lib/libipsec added in r171135
It's already handled earlier on in the Makefile, per the change made
in r80029.

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2017-03-12 02:21:16 +00:00
Emmanuel Vadot
aa6b345634 Remove i915drm and radeondrm from NOTES and conf.
This unbreak LINT kernel.

Reported by:	lwhsu
2017-03-12 00:52:16 +00:00
Rodney W. Grimes
3e164c6986 Revert r314833 until the problem with INSTALL_RSYMLINKS can be found
as it appears to break arm release builds.

PR:		217705
Reported by:	cyclaero@gmail.com
Approved by:	grehan (mentor) implict as reverting
2017-03-12 00:37:45 +00:00
Ian Lepore
bf8bdd6762 Extend the pl011 small-fifos fix to other SoCs that indicate rev 5
hardware but lack the larger fifos rev 5 hardware should have.

The linux world (where our FDT data comes from) solved this by adding
a new property to pl011 nodes, "arm,primecell-periphid".  When this
property is present, its values override the values in the hardware
periphid registers.  For pl011 rev 5 hardware with small fifos, they
override the id so that it appears to be rev 4 hardware.

The driver now uses the new property when present.  It also continues
to check the device compat string, to handle older fdt data that may
still be in use on existing systems (on RPi systems it is common to
update system software without updating fdt data which is part of the
boot firmware).

Reviewed by:	imp
2017-03-11 22:34:02 +00:00
Ian Lepore
1ba0d51a7b Document uiomove_frombuf(9). 2017-03-11 22:22:51 +00:00
Simon J. Gerraty
a3b2e0bc8b Do not consider using -C arg "as is" for .CURDIR unless it starts with /.
Reported by:    bdrewery
2017-03-11 20:28:31 +00:00
Alexander Motin
277681e109 Improve ctl(4) description, including frontends and backends.
MFC after:	2 weeks
2017-03-11 20:23:05 +00:00
John Baldwin
65f32429e4 Fix removal of /usr/share/info.
- The GNU as manual is named as.info.gz.
- Remove the generated /usr/share/info/dir file.
2017-03-11 19:59:31 +00:00
Alan Cox
e383e820d3 Simplify the control flow and tidy up a comment in map_insert.
In collaboration with:	kib
MFC after:	1 week
2017-03-11 18:57:13 +00:00
Alexander Motin
b1303ffeb2 Increase device openings to tagged maximum.
Some SIMs report much less untagged device openings then tagged ones.
Target mode devices are not handled by regular probing routines, and so
there is nothing to increase queue size for them to the SIM's maximum.
To fix that resize the queue explicitly on ctl periph registration.
This radically improves performance of mpt(4) in target mode.

Also fetch and report device queue statistics in `ctladm dumpstructs`,
since regular way of `camcontrol tags` is not usable in target mode.

MFC after:	2 weeks
2017-03-11 18:46:46 +00:00
Andriy Gapon
f0985602f2 aacraid: fix build with AACRAID_DEBUG=2
MFC after:	10 days
2017-03-11 18:40:39 +00:00
Alexander Motin
2ef6e7aea8 Allow XPT_GDEV_STATS for UNCONFIGURED devices.
Queue statistics has nothing to do with presence or absence of INQUIRY
data, etc.  Target mode devices are never configured, but have queues.

MFC after:	2 weeks
2017-03-11 18:23:05 +00:00
Andriy Gapon
57223e9994 uma: fix pages <-> items conversions at several places
Those places were not taking into account uk_ppera.
At present one allocation is always used by one slab, so uk_ppera must
be used to convert between pages and slabs.
uk_ipers is used to convert between slabs and items.

MFC after:	1 month (if ever)
2017-03-11 16:43:38 +00:00
Andriy Gapon
a55ebb7cd5 uma: eliminate uk_slabsize field
The field was not used beyond the initial keg setup stage anyway.

MFC after:	1 month (if ever)
2017-03-11 16:35:36 +00:00
Andriy Gapon
520758a51d zfs: provide a special vptocnp method for the .zfs vnode
vop_stdvptocnp() doesn't work properly if .zfs directory is hidden.

Reported by:	swills, des
Tested by:	des
MFC after:	1 week
MFC with:	r314048
2017-03-11 16:00:49 +00:00
Andriy Gapon
28ef18b8c1 trace thread running state when a thread is run for the first time
This applies to both KTR_SCHED and DTrace sched:::on-cpu tracing.

MFC after:	10 days
2017-03-11 15:57:36 +00:00
Andriy Gapon
6c9271a918 actually implement proc:::lwp-exit probe
MFC after:	4 days
2017-03-11 15:47:27 +00:00
Andriy Gapon
595a52b771 revert r314862, use of GCC_MS_EXTENSIONS in qlxgbe
Commit r278913 made explicit use of GCC_MS_EXTENSIONS  unnecessary.

Requested by:	glebius
2017-03-11 15:16:55 +00:00