Commit Graph

203089 Commits

Author SHA1 Message Date
Konstantin Belousov
4a0589d1ba Typo. 2015-08-20 13:37:08 +00:00
Andrew Turner
ccee502763 Add the definitions of __infinity and __nan. 2015-08-20 13:11:52 +00:00
Andrew Turner
52afd687c3 Add the kernel support for minidumps on arm64.
Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3318
2015-08-20 12:49:56 +00:00
Andrew Turner
b0d415fc85 Remove pmap_kenter from pmap.h, the function doesn't exist. 2015-08-20 12:07:44 +00:00
Andrew Turner
9a0de24b5e Add pmap_get_tables to get the page tables for a given virtual address. This
will be used for minidump support.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2015-08-20 12:05:42 +00:00
Alexander V. Chernikov
5a2555160f * Split allocation and table linking for lle's.
Before that, the logic besides lle_create() was the following:
  return existing if found, create if not. This behaviour was error-prone
  since we had to deal with 'sudden' static<>dynamic lle changes.
  This commit fixes bunch of different issues like:
  - refcount leak when lle is converted to static.
    Simple check case:
    console 1:
    while true;
      do for i in `arp -an|awk '$4~/incomp/{print$2}'|tr -d '()'`;
        do arp -s $i 00:22:44:66:88:00 ; arp -d $i;
      done;
    done
   console 2:
    ping -f any-dead-host-in-L2
   console 3:
    # watch for memory consumption:
    vmstat -m | awk '$1~/lltable/{print$2}'
  - possible problems in arptimer() / nd6_timer() when dropping/reacquiring
   lock.
  New logic explicitly handles use-or-create cases in every lla_create
  user. Basically, most of the changes are purely mechanical. However,
  we explicitly avoid using existing lle's for interface/static LLE records.
* While here, call lle_event handlers on all real table lle change.
* Create lltable_free_entry() calling existing per-lltable
  lle_free_t callback for entry deletion
2015-08-20 12:05:17 +00:00
Andrew Turner
5c714b29ff Add the arm64 minidump header. This was missed from r286953. 2015-08-20 11:26:26 +00:00
Andrew Turner
db5ac78d34 Add support to libkvm for reading minidumps on arm64. The kernel side is
missing until it can be cleaned up.

Reviewed by:	jhb
Approved by:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3319
2015-08-20 11:07:51 +00:00
Alexander Motin
602015fd15 Restore part of r274628, reverted at r286776.
Submitted by:	avg
2015-08-20 07:41:33 +00:00
Adrian Chadd
d3fdd08cf3 Further conversions from ifp->if_softc -> ic_softc. 2015-08-20 05:13:54 +00:00
Adrian Chadd
3843c5e486 Remove some if_softc references from urtwn(4).
The only ones that are left are in if_start, if_stop and ioctl.

Tested:

* urtwn0: MAC/BB RTL8188CUS, RF 6052 1T1R, STA mode
2015-08-20 03:57:41 +00:00
Conrad Meyer
971c424c7e getrlimit.2: Document RSS, AS/VMEM limit behavior more clearly
Alphabetize the RLIMIT_ list while here.

Reviewed by:	jilles (previous version), wblock (previous version)
Approved by:	markj (mentor)
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D3433
2015-08-20 00:00:15 +00:00
Ian Lepore
7b4a83b1d0 Add a new exit-timeout option to watchdogd.
Watchdogd currently disables the watchdog when it exits, such as during
rc.shutdown processing.  That leaves the system vulnerable to getting hung
or deadlocked during the shutdown part of a reboot.  For embedded systems
it's especially important that the hardware watchdog always be active.  It
can also be useful for servers that are administered remotely.

The new -x <seconds> option tells watchdogd to program the watchdog with the
given timeout just before exiting.  The -x value can be longer or shorter
than the -t normal time value, to allow for various exceptional conditions
at shutdown such as allowing extra time for buffer flushing.

The exit value is also used internally in the "failsafe" handling (which
used to just disable the watchdog), on the theory that if you're using this
option, "safe" means having the watchdog always running, not disabled.

The default is still to disable the watchdog on exit if -x is not specified.

Differential Revision:	https://reviews.freebsd.org/D2556 (timed out)
2015-08-19 21:46:12 +00:00
Ed Maste
57eba68124 compiler-rt: update __multc3 to upstream style and variable names
I introduced a local copy of __multc3 in r281221, which has now been
committed upstream to compiler-rt in revision 245296. Update our version
to match the changes made there.

Sponsored by:	The FreeBSD Foundation
2015-08-19 21:23:17 +00:00
Alexander V. Chernikov
a4141c63c5 Check value return from lle_create() for NULL.
This bug sneaked unnoticed in r286722.

Reported by:	adrian
2015-08-19 21:08:42 +00:00
Ian Lepore
a2db2e2fac Enable the watchdog driver on imx6, now that it works. 2015-08-19 21:04:50 +00:00
Ian Lepore
6da71028ad Make the imx watchdog actually work, by setting WDOG_CR_WDE (enable bit).
Also, follow the rules from watchdog(9) about what values to return in
various situations (especially, don't touch *error when asked to set a
non-zero timeout that isn't achievable on the hardware).
2015-08-19 20:50:31 +00:00
Ian Lepore
398c183874 Add compatible strings for all the hardware this driver works with.
Also, move the READ/WRITE bus space access macros from the header into the
source file, and rename them to RD2/WR2 to make it clear they're 16-bit
accessors.  (READ/WRITE just don't seem like good names to be in a public
header file.)
2015-08-19 20:31:35 +00:00
Jilles Tjoelker
89cead337a wordexp(): Improve some error codes.
Distinguish between WRDE_BADVAL and WRDE_SYNTAX based on when the error
occurred (parsing or execution), not based on whether WRDE_UNDEF was passed.

Also, return WRDE_NOSPACE for a few more unexpected results from sh.
2015-08-19 20:31:03 +00:00
John Baldwin
b38fbc2e54 ino_t is unsigned, so use uintmax_t instead of intmax_t when printing it.
Submitted by:	bde (sort of)
2015-08-19 20:10:58 +00:00
John Baldwin
a143677385 Always use %j with an intmax_t cast to print time_t values. time_t is
longer than long on 32-bit platforms with a 64-bit time_t.

Inspired by:	mail from bde
2015-08-19 20:09:14 +00:00
John Baldwin
4e3da534fc Various style and whitespace fixes. 2015-08-19 20:02:03 +00:00
John Baldwin
9346bf6f4a Use nitems(). 2015-08-19 19:59:42 +00:00
Jason Evans
30db11dd7f Use bool rather than _Bool for C++ compatibility.
Submitted by:	Nikolai Lifanov
2015-08-19 18:32:12 +00:00
Xin LI
48f9270689 Issue warning and refuse to proceed further if the configured
repository signature_type is unsupported by bootstrap pkg(7).

Previously, when signature_type specified an unsupported method,
the bootstrap pkg(7) would proceed like when signature_type is
"none".  MITM attackers may be able to use this vulnerability and
bypass validation and install their own versions of pkg(8).

At this time, only fingerprint and none are supported by the
bootstrap pkg(7).

FreeBSD's official pkg(8) repository uses the fingerprint method
and is therefore unaffected.

Errata candidate.

Discussed with:	bapt@
Submitted by:	Fabian Keil
Obtained from:	ElectroBSD
2015-08-19 18:24:39 +00:00
Glen Barber
5f5df47af8 Remove a broken link.
While here, prefer https where possible.

Sponsored by:	The FreeBSD Foundation
2015-08-19 17:51:03 +00:00
Navdeep Parhar
8faf57012b cxgbe(4): Save the flags for the last adapter-wide synchronized
operation that was initiated successfully.  (The caller and thread are
already recorded).

MFC after:	1 week
2015-08-19 15:40:03 +00:00
Baptiste Daroussin
d83272a486 Add a kern.features.cloudabi64 entry when the module is loaded to helps the
userland to be able to test is cloudabi64 is supported or not

Reviewed by:	ed
Differential Revision:	https://reviews.freebsd.org/D3430
2015-08-19 15:18:32 +00:00
Justin Hibbits
f3dd93ad49 Remove debug printf. 2015-08-19 13:23:07 +00:00
Zbigniew Bodek
a8d377b809 Increase MAXCPU in ARM64
Increase MAXCPU number to the maximum known value the existing
hardware can support.

Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3405
2015-08-19 11:59:41 +00:00
Konstantin Belousov
fe5ec54b50 fget_unlocked() depends on the freed struct file f_count field being
zero.  The file_zone if no-free, but r284861 added trashing of the
freed memory.  Most visible manifestation of the issue were 'memory
modified after free' panics for the file zone, triggered from
falloc_noinstall().

Add UMA_ZONE_ZINIT flag to turn off trashing.  Mjg noted that it makes
sense to not trash freed memory for any non-free zone, which will be
done later.

Reported and tested by:	pho
Discussed with:	mjg
Sponsored by:	The FreeBSD Foundation
2015-08-19 11:53:32 +00:00
Zbigniew Bodek
04ae5bbe55 Remove redundant mp_naps from ARM64 secondary CPU start-up code
The global variable has been only used for CPU startup ordering
which is not needed anyway.

Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3296
2015-08-19 11:45:45 +00:00
Zbigniew Bodek
c50231a494 Add SMP support to GICv3 and ITS drivers
Introduce supprot for SMP to GICv3 and ITS drivers.

Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3299
2015-08-19 10:36:36 +00:00
Michael Gmelin
12e413be27 Allow building a kernel with baked in ig4, isl and cyapa drivers.
Also addresses jhb's remarks on D2811 and D3068.

PR:		202059
Differential Revision:	https://reviews.freebsd.org/D3351
Reviewed by:	jhb
Approved by:	jhb
2015-08-19 09:49:29 +00:00
Justin Hibbits
13adf27426 Fix copy&paste. 2015-08-19 06:08:11 +00:00
Justin Hibbits
947c974b39 Save the registers at the correct offsets.
When merging the AIM and BookE trap.c files, the offsets for BookE's setfault
inadvertantly got munged.
2015-08-19 06:07:32 +00:00
Ian Lepore
0bab5ea492 Add required foo_if.h files to SRCS to fix build errors.
Pointed out by:	      gjb
Pointy hat to:	      ian
2015-08-19 02:37:30 +00:00
John Baldwin
c915ff0349 Expand the decoding of kevent structures.
- Print the ident value as decimal instead of hexadecimal for filter types
  that use "small" values such as file descriptors and PIDs.
- Decode NOTE_* flags in the fflags field of kevents for several system
  filter types.
2015-08-19 01:44:56 +00:00
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