Commit Graph

203202 Commits

Author SHA1 Message Date
John Baldwin
f083f6894c Change the argument formatting function to use a stdio FILE object opened
with open_memstream() to build the string for each argument.  This allows
for more complicated argument building without resorting to intermediate
malloc's, etc.

Related, the strsig*() functions no longer return allocated strings but
use a static global buffer instead.
2015-08-19 00:49:50 +00:00
Jason Evans
c13244b92e Fix minor malloc regressions.
- Use _Bool rather than bool to resolve missing type errors in malloc_np.h.
- Fix malloc manual page #include documentation.
- Add *allocm manual pages to obsolete files.

Submitted by:	jbeich
2015-08-19 00:06:46 +00:00
Xin LI
8823d24b48 - ANSIfy
- Remove the redundant _PATH_RSH definition (paths.h at r96194);
 - Use pid_t for PIDs
 - Note that we are at the same level of OpenBSD's counterpart of
   revision 1.7 (r94757).

No functional changes.

MFC after:	2 weeks
2015-08-18 22:37:25 +00:00
Luiz Otavio O Souza
c0dca72a18 Fix the use of plural in two cases that I missed on r285784.
This should cause no functional change.
2015-08-18 21:37:14 +00:00
Luiz Otavio O Souza
3df058ffaf Add the GPIO driver for the ADI Engineering RCC-VE and RCC-DFF/DFFv2.
This driver allows read the software reset switch state and control the
status LEDs.

The GPIO pins have their direction (input/output) locked down to prevent
possible short circuits.

Note that most people get a reset button that is a hardware reset.  The
software reset button is available on boards from Netgate.

Sponsored by:	Rubicon Communications (Netgate)
2015-08-18 21:05:56 +00:00
Jason Evans
337776f858 Define CPU_SPINWAIT as cpu_spinwait().
Submitted by:	cem
2015-08-18 20:42:08 +00:00
Poul-Henning Kamp
83fb3d8cef Update sysbuild to new ports infrastructure. 2015-08-18 20:19:48 +00:00
Jilles Tjoelker
2e8a071293 wordexp(3): Update man page for no longer using the wordexp builtin. 2015-08-18 20:13:36 +00:00
Xin LI
79b0153316 Fix multiple integer overflows in expat.
Security:	CVE-2015-1283
Security:	FreeBSD-SA-15:20.expat
2015-08-18 19:30:04 +00:00
Xin LI
2c98c61dad Set curvnet context inside the RPC code in more places.
Reviewed by:	melifaro
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D3398
2015-08-18 18:12:46 +00:00
Pedro F. Giffuni
c8060fafd4 Correct All Saints' day.
Thanks to:	zec
X-MFC with:	r286891
2015-08-18 15:50:02 +00:00
Alan Somers
fac7bc2365 Serve /etc/eui64 via NIS.
The C library already knows how to lookup eui64 entries from NIS. For
example, fwcontrol(8) does it. But /var/yp/Makefile.dist doesn't build the
eui64 maps, and ypinit(8) doesn't push them to slaves. This change fixes
that.

Reviewed by:	brooks, wblock
MFC after:	2 weeks
Sponsored by:	SpectraLogic Corp
Differential Revision:	https://reviews.freebsd.org/D3404
2015-08-18 15:33:23 +00:00
Pedro F. Giffuni
b542033478 Calendar: add a few more dates to the Christian calendar
The many christian denominations have different dates for their
celebrations and controversies are likely to be always.

These are well established and happen to be holidays in many
Catholic countries.

MFC after:	1 month
2015-08-18 15:11:41 +00:00
Fabien Thomas
078246e50f Add ichwd TCO version 3 support (Bay Trail / Rangeley...)
Reviewed by: jhb
Obtained from: Cas-well
Sponsored by: Stormshield
2015-08-18 14:54:29 +00:00
Andriy Gapon
a4b6d5e128 5692 expose the number of hole blocks in a file
illumos/illumos-gate@2bcf0248e9

https://www.illumos.org/issues/5692
we would like to expose the number of hole (sparse) blocks in a file. this
can be useful to for example if you want to fill in the holes with some
data; knowing the number of holes in advances allows you to report progress
on hole filling. We could use SEEK_HOLE to do that but it would be O(n)
where n is the number of holes present in the file.

Author: Max Grossman <max.grossman@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Boris Protopopov <bprotopopov@hotmail.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
2015-08-18 14:10:04 +00:00
Tai-hwa Liang
0b81f3161f Using consistent coding style to deal with error inside the loop.
MFC after:	1 week
2015-08-18 13:16:23 +00:00
Tai-hwa Liang
076cf2dd66 Using the error return code documented in the comment.
Though there is no direct midi_uninit() caller amongst existing drivers
at this moment, a quick experiment indicates that EBUSY gives users more
precise error message once drivers start to honour this result.  For example,
emu_midi_detach() should check the result of mpu401_uninit() and block
module unloading if there is any MIDI I/O in progress.

MFC after:	2 weeks
2015-08-18 13:16:06 +00:00
Tai-hwa Liang
7cbd5add2f Fixing typo as well as improving readability of a few comments.
MFC after:	3 days
2015-08-18 12:50:46 +00:00
Christian Brueffer
520bb99704 RIP Stefan Farfeleder (stefanf), committer since 2004.
You will be missed!
2015-08-18 12:27:21 +00:00
Ed Maste
8d5bb77429 Correct comment typo noted by erik 2015-08-18 11:52:45 +00:00
Julien Charbon
a1e6f8ff27 callout_stop() should return 0 (fail) when the callout is currently
being serviced and indeed unstoppable.

A scenario to reproduce this case is:

- the callout is being serviced and at same time,
- callout_reset() is called on this callout that sets
  the CALLOUT_PENDING flag and at same time,
- callout_stop() is called on this callout and returns 1 (success)
  even if the callout is indeed currently running and unstoppable.

This issue was caught up while making r284245 (D2763) workaround, and
was discussed at BSDCan 2015.  Once applied the r284245 workaround
is not needed anymore and will be reverted.

Differential Revision:	https://reviews.freebsd.org/D3078
Reviewed by:		jhb
Sponsored by:		Verisign, Inc.
2015-08-18 10:15:09 +00:00
Ed Maste
5a060174cd Remove register dump from arm64 el0 unknown exception
An exception with an unknown reasion is the expected result of the
attempted execution of an instruction bit pattern that has no allocated
instruction.

Sponsored by:	The FreeBSD Foundation
2015-08-18 10:07:03 +00:00
Jason Evans
d8e39d2d4f Re-add LG_SIZEOF_PTR definition for __aarch64__.
This definition was erroneously removed during the 4.0.0 import.
2015-08-18 09:09:27 +00:00
Jason Evans
0ba74efb31 Bump __FreeBSD_version for the jemalloc 4.0.0 import. 2015-08-18 08:29:13 +00:00
Julien Charbon
31a7749d4b Make clear that TIME_WAIT timeout expiration is managed solely by
tcp_tw_2msl_scan().

Sponsored by:	Verisign, Inc.
2015-08-18 08:27:26 +00:00
Jason Evans
902d2afd2a Add missing sdallocx updates and remove *allocm manpage links.
Submitted by:	jbeich
2015-08-18 08:18:28 +00:00
Jason Evans
a4cee496bc Fix build failure due to missing CPU_SPINWAIT definition. 2015-08-18 08:10:46 +00:00
Jason Evans
8d13fecf5f Add jemalloc support for 8 KiB, 16 KiB, and 64 KiB pages. 2015-08-18 06:28:37 +00:00
Alexander V. Chernikov
0c4210f984 Fix panic when handling non-inet arp message introduced in r286825.
Submitted by:	delphij
2015-08-18 06:16:19 +00:00
Marcel Moolenaar
4a99d3f571 Add 24 more page table pages we allocate on boot-up. 16MB slop
is a little tight in and by itself, but severily insufficient
when one needs to map a large frame buffer as part of console
initialization. 64MB slop should be enough for a while. As an
example: a 15" MacBook Pro with retina display needs ~28MB of
KVA for the frame buffer.

PR:		193745
2015-08-18 01:53:41 +00:00
Marcel Moolenaar
ec6b1f6acc Support frame buffers that are larger than the default screen
size as defined by VT_FB_DEFAULT_WIDTH and VT_FB_DEFAULT_HEIGHT
(at this time 2048x1200). The default is really a max. We cap
the height and width to those defaults and position the screen
in the center of the frame buffer.

Ideally we use a bigger font to utility the entire real estate
that is the frame buffer, but that's seen as an improvement over
making it work first.

PR:		193745
2015-08-18 00:47:02 +00:00
Jason Evans
d0e79aa362 Update jemalloc to version 4.0.0. 2015-08-18 00:21:25 +00:00
Adrian Chadd
2cb71df183 Convert more ifp->if_softc -> ic->ic_softc.
These should be a big no-op.

Tested:

* make universe
2015-08-17 23:44:38 +00:00
Adrian Chadd
122d43f3fb Migrate ifp->if_softc -> ic->ic_softc.
Tested:

* Lenovo T400 (Intel 5300)
* make universe
2015-08-17 23:35:31 +00:00
Ed Maste
5e3cac3e57 On arm64 disable three tests that hang or panic
Each issue has a PR open to track. This workaround allows us to run the
tests to investigate the failures and avoid any new regressions.

PR:		202304, 202305, 202307
Reviewed by:	ngie
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3378
2015-08-17 23:19:36 +00:00
Luiz Otavio O Souza
f2fc809dcd Fix the copy of addresses passed from userland in table replace command.
The size2 is the maximum userland buffer size (used when the addresses are
copied back to userland).

Obtained from:	pfSense
MFC after:	3 days
Sponsored by:	Rubicon Communications (Netgate)
2015-08-17 23:03:54 +00:00
John Baldwin
e462b12755 Use an xlat table and xlookup() instead of a home-rolled version for the
sigprocmask operation type.
2015-08-17 19:08:48 +00:00
John Baldwin
fb7eabb0bf Tidy the linux_socketcall decoding:
- Don't exit if get_struct() fails, instead print the raw pointer value to
  match all other argument decoding cases.
- Use an xlat table instead of a home-rolled switch for the operation name.
- Display the nested socketcall args structure as a structure instead of as
  two inline arguments.
2015-08-17 18:47:39 +00:00
Konstantin Belousov
7a39d38dbd XEN/amd64 may initiate i/o over the pages not mapped by the direct
map.  Handle busdma bouncing and ata PIO accesses by using global
frame used by the current CPU locally for the duration of
pmap_quick_enter/remove_page().  A spin mutex protects the concurent
frame use and prevents thread migration.

Noted by:	royger
Reviewed by:	alc, jah, royger (previous version)
Sponsored by:	The FreeBSD Foundation
2015-08-17 18:42:45 +00:00
Jason A. Harmening
9b0ffde9e8 Some cleanups to make the style of pmap_quick_enter_page() and pmap_quick_remove_page() in arm/pmap-v6-new.c more consistent with the rest of the file.
Submitted by:	Svatopluk Kraus <onwahe@gmail.com>
Approved by:	kib (mentor)
2015-08-17 18:28:40 +00:00
John Baldwin
c9c2e2dc06 Decode the optional SOCK_NONBLOCK and SOCK_CLOEXEC flags passed in a
socket type.
2015-08-17 17:57:01 +00:00
John Baldwin
b289a8d78a - Decode the arguments for several signal-related system calls: sigpending,
sigqueue, sigreturn, sigsuspend, sigtimedwait, sigwait, sigwaitinfo, and
  thr_kill.
- Print signal sets as a structure (with {}'s) and in particular use this to
  differentiate empty sets from a NULL pointer.
- Decode arguments for some other system calls: issetugid, pipe2, sysarch
  (operations are only decoded for amd64 and i386), and thr_self.
2015-08-17 17:52:28 +00:00
Luiz Otavio O Souza
e9aebbb018 gpioled(4) depends on gpiobus.
This fixes the loading of gpioled as a module.

Sponsored by:	Rubicon Communications (Netgate)
2015-08-17 17:09:57 +00:00
Luiz Otavio O Souza
1dd2aa86b9 Fix the build of gpiobus as a module.
Add the missing newbus interfaces and gpioc, which is part of basic gpiobus
framework.

Sponsored by:	Rubicon Communications (Netgate)
2015-08-17 17:01:26 +00:00
Luiz Otavio O Souza
978cdbedcd Fix a few bugs when gpiobus is detaching:
- Detach the gpiobus and the gpioc devices from the GPIO controller.

 - Fix the leak of gpiobus IRQ rman(9) region descriptor.

 - Fix the leak of child ivars and IRQ resource list.

While here return NULL (instead of 0) for a device_t that fails to allocate
the ivar memory.

Tested with gpiobus built as a module.

Sponsored by:	Rubicon Communications (Netgate)
2015-08-17 16:51:37 +00:00
Ed Schouten
edcf7fbf59 Don't forget to invoke pre_execve() and post_execve().
CloudABI's proc_exec() was implemented before r282708 introduced
pre_execve() and post_execve(). Sync up by adding these missing calls.
2015-08-17 13:07:12 +00:00
Ed Maste
084748985d Separate ELFTOOLCHAIN_BOOTSTRAP from BINUTILS_BOOTSTRAP
For most cases they are equivalent, but BINUTILS_BOOTSTRAP is a
BROKEN_OPTION on arm64 as the in-tree GNU binutils do not support it,
so we need a separate internal flag for ELF Tool Chain.

Reviewed by:	andrew, brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3381
2015-08-17 10:48:55 +00:00
Gleb Smirnoff
5041118435 Belatedly fix documentation on which interface to use as argument. 2015-08-17 09:18:54 +00:00
Mark Murray
646041a89a Add DEV_RANDOM pseudo-option and use it to "include out" random(4)
if desired.

Retire randomdev_none.c and introduce random_infra.c for resident
infrastructure. Completely stub out random(4) calls in the "without
DEV_RANDOM" case.

Add RANDOM_LOADABLE option to allow loadable Yarrow/Fortuna/LocallyWritten
algorithm.  Add a skeleton "other" algorithm framework for folks
to add their own processing code. NIST, anyone?

Retire the RANDOM_DUMMY option.

Build modules for Yarrow, Fortuna and "other".

Use atomics for the live entropy rate-tracking.

Convert ints to bools for the 'seeded' logic.

Move _write() function from the algorithm-specific areas to randomdev.c

Get rid of reseed() function - it is unused.

Tidy up the opt_*.h includes.

Update documentation for random(4) modules.

Fix test program (reviewers, please leave this).

Differential Revision:    https://reviews.freebsd.org/D3354
Reviewed by:              wblock,delphij,jmg,bjk
Approved by:              so (/dev/random blanket)
2015-08-17 07:36:12 +00:00
Peter Grehan
7a40703db9 Add simple (no-op) emulations for the CHECK_POWER_MODE,
READ_VERIFY and READ_VERIFY_EXT commands.

Reviewed by:	mav
2015-08-17 05:59:36 +00:00