Commit Graph

195747 Commits

Author SHA1 Message Date
Ian Lepore
c4c27bc97f Cleanup up ARM *frame structures...
- Eliminate unused irqframe
 - Eliminate unused saframe
 - Instead of splitting r4-sp storage between the stack and switchframe,
   just put all the registers in switchframe and eliminate the un_32 struct.

Submitted by:	Svatopluk Kraus <onwahe@gmail.com>,
		Michal Meloun <meloun@miracle.cz>
2014-12-24 18:54:31 +00:00
Ed Maste
04fef9c446 Build gperf before gcc
The ARM image builds build the in-tree gcc in order to build u-boot
and gperf is needed to build gcc, but is no longer installed on archs
that use clang.

Invoking the make targets as separate steps is done to work around
a build failure which is not yet fully understood.

Reviewed by:	gjb, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1317
2014-12-24 18:51:25 +00:00
Andrey V. Elsukov
93201211e9 Rename ip4_def_policy variable to def_policy. It is used by both IPv4 and
IPv6. Initialize it only once in def_policy_init(). Remove its
initialization from key_init() and make it static.

Remove several fields from struct secpolicy:
* lock - it isn't so useful having mutex in the structure, but the only
  thing we do with it is initialization and destroying.
* state - it has only two values - DEAD and ALIVE. Instead of take a lock
  and change the state to DEAD, then take lock again in GC function and
  delete policy from the chain - keep in the chain only ALIVE policies.
* scangen - it was used in GC function to protect from sending several
  SADB_SPDEXPIRE messages for one SPD entry. Now we don't keep DEAD entries
  in the chain and there is no need to have scangen variable.

Use TAILQ to implement SPD entries chain. Use rmlock to protect access
to SPD entries chain. Protect all SP lookup with RLOCK, and use WLOCK
when we are inserting (or removing) SP entry in the chain.

Instead of using pattern "LOCK(); refcnt++; UNLOCK();", use refcount(9)
API to implement refcounting in SPD. Merge code from key_delsp() and
_key_delsp() into _key_freesp(). And use KEY_FREESP() macro in all cases
when we want to release reference or just delete SP entry.

Obtained from:	Yandex LLC
Sponsored by:	Yandex LLC
2014-12-24 18:34:56 +00:00
Ian Lepore
baa4417f37 Eliminate unnecessary references to pte.h internals by using the standard
pmap_kenter_temporary() to map pages while dumping.

Submitted by:	Svatopluk Kraus <onwahe@gmail.com>,
		Michal Meloun <meloun@miracle.cz>
2014-12-24 17:12:51 +00:00
Andrew Turner
ed600fa777 Rename pic_ipi_get to pic_ipi_read for intrng. 2014-12-24 15:25:18 +00:00
Muhammad Moinur Rahman
819d692b5e Fix missing \n in committers-ports.dot while adding myself
Differential Revision:	https://reviews.freebsd.org/D1365
Submitted by:	danfe
Approved by:	bapt(mentor)
2014-12-24 13:25:22 +00:00
Andrew Turner
ef7eac4353 Switch i.MX to use the platform code to help with a single Freescale kernel.
Differential Revision:	https://reviews.freebsd.org/D1349
Reviewed by:	ian, rpaulo
2014-12-24 12:26:43 +00:00
Ed Schouten
799cf446be Clarify to explain that C99 conforming compilers don't need CMPLX*().
Discussed with: kargl@
2014-12-24 10:13:53 +00:00
Muhammad Moinur Rahman
c418933aee Update Mentor and Mentee Information (bofh)
Differential Revision:	https://reviews.freebsd.org/D1363
Reviewed by:	bapt
Approved by:	bapt
2014-12-24 09:25:16 +00:00
Scott Long
23059fc77f Fix tunable and sysctl handling of the fail_on_task_timeout knob.
Reviewed by:	emax
Obtained from:	Netflix, Inc.
MFC after:	3 days
2014-12-24 07:04:04 +00:00
Luiz Otavio O Souza
e350f76c66 Bring in the last round of updates before adding the interrupt support.
Fix the following issues:

- Removed revision from device softc, it isn't used anywhere else out of
  device attach routine;

- Move the duplicated code for verification of valid banks (and pins) to
  a single function;

- Use some macros to simplify the handling of some constants;

- Update some stale comments.
2014-12-24 04:24:08 +00:00
Warner Losh
aa6b24dc9a Add Intel vendor ID to the device table to make it more uniform so
that all the pnp info to match the device is in the fxp_ident_table.
2014-12-24 03:49:33 +00:00
Luiz Otavio O Souza
0bac52c1cc Improves the GPIO API description a little bit.
gpio_pin_max must return the maximum supported pin number and not the total
number of pins on the system.

PR:		157070
Submitted by:	brix
2014-12-24 03:24:50 +00:00
Ian Lepore
0236b3314f Revert a glitched mismerge that got caught up in the prior commit.
The PJ4B family is still armv7, not armv6.
2014-12-24 03:09:55 +00:00
Ian Lepore
6783238b2d Define the old-school arm arch constants we still use internally based on
the somewhat newer constants predefined by the compiler.  This will allow
userland apps to use various machine/foo.h headers without CPUTYPE defined.
2014-12-24 03:02:12 +00:00
Steven Hartland
84cc2bcd19 Allow info to display correctly in for varying tabstop settings
The SAMPLE message and notes where tab seperated for some parts and hence
displayed incorrectly unless tabstop was set to 8. Switch to spaces to it
displays correctly independent of the tabstop setting.

Sponsored by:	Multiplay
2014-12-24 01:50:44 +00:00
Ian Lepore
cbe686f709 Don't assume required FDT properties are present. 2014-12-24 01:19:11 +00:00
Ian Lepore
1dda8e90c9 Revert r276101, it didn't fix the problem and causes a compile error
(nested comment blocks).
2014-12-24 01:10:53 +00:00
Andrey V. Elsukov
06cd035ab6 Remove if_stf.h. It contains only one function declaration used by if_stf(4).
Also make in_stf_protosw structure static.
2014-12-23 20:54:59 +00:00
Luiz Otavio O Souza
3b9e64af65 Do not return the total number of available pins but the maximum pin number
we can cope.

Previously the returned value could prevent access to some of the pins.
2014-12-23 19:31:56 +00:00
Adrian Chadd
70bd9518f1 Bump the valid GPIO range for rfkill up from 8 to 16.
AR5416 and later NICs have more than 8 (Well, more than 6) GPIO pins.
So to support rfkill on these NICs we need to bump this up or the
rfkill GPIO pin may get reset to the wrong value.

Noticed by: Anthony Jenkins <scoobi_doo@yahoo.com>
2014-12-23 18:48:45 +00:00
Andrey V. Elsukov
132c449079 Remove in_gif.h and in6_gif.h files. They only contain function
declarations used by gif(4). Instead declare these functions in C files.
Also make some variables static.
2014-12-23 16:17:37 +00:00
Ed Maste
1a868688a4 Update comment: only one file in the FAT file system EFI boot image
Sponsored by:	The FreeBSD Foundation
2014-12-23 16:00:25 +00:00
Ed Maste
8f2fdc72ad Use explicit --output-target to set EFI file format
According to objcopy(1) --target is for use where the input and output
formats are the same ("no translation"). In practice it does detect the
input format in any case, but be explicit that we're specifying the
output format as we are translating from ELF to EFI PE format.

Sponsored by:	The FreeBSD Foundation
2014-12-23 15:58:45 +00:00
Ian Lepore
48eb0b8512 Convert a couple lingering NO_FORTH conditionals to test MK_FORTH. 2014-12-23 15:42:34 +00:00
Mark Johnston
2f6cde8eb4 We can stop iterating once we've found the DOF section.
Submitted by:	Fedor Indutny <fedor@indutny.com>
2014-12-23 15:42:33 +00:00
Mark Johnston
3f1cbdbeb1 Fix a memory leak that occured when looking up CTF info for a symbol. 2014-12-23 15:40:57 +00:00
Mark Johnston
cafe874475 Restore the trap type argument to the DTrace trap hook, removed in r268600.
It's redundant at the moment since it can be obtained from the trapframe
on the architectures where DTrace is supported, but this won't be the case
with ARM.
2014-12-23 15:38:19 +00:00
Alexander Motin
7a19455d22 Hide block device VPD pages for non-block devices.
MFC after:	2 weeks
2014-12-23 15:18:28 +00:00
Rick Macklem
62c23db947 Fix kernel builds with "options NFS_DEBUG" that
were broken by r276096. Also delete the two
kernel options NFS_GATHERDELAY, NFS_WDELAYHASHSIZ
which are no longer used.

Reported by:	bz
2014-12-23 14:24:36 +00:00
Gleb Smirnoff
502e440349 m_clrprotoflags() is designed to cleanup M_PROTO flags when mbufs cross
protocol and facility boundaries.  However, now it cleans up only the
first mbuf, while intent clearly means all mbufs in a possible chain.

Differential Revision:	https://reviews.freebsd.org/D1352
Reviewed by:		rpaulo, gnn, adrian
Sponsored by:		Nginx, Inc.
2014-12-23 12:26:35 +00:00
Baptiste Daroussin
70d099afe0 Fix build with recent binutils
Recent binutils considered the .gnu.warning.symbol section as a fatal error when
run with --fatal-warnings which makes any users of "insecure" functions from
libc failing to build with recent binutils.

Introduce a new macro: LD_FATAL_WARNINGS=no to run ld(1) with
--no-fatal-warnings for the users of "insecure" functions

Differential Revision:	https://reviews.freebsd.org/D1320
2014-12-23 10:43:35 +00:00
Alexander Motin
1f69310e70 Fix potential division by zero after r275920.
Reported by:	Coverity Scan
CID:		1260387
MFC after:	3 days
2014-12-23 10:18:42 +00:00
Steven Hartland
51f529b50b Always sync the global ZFS config cache to reflect the new mosconfig
This fixes out of date zpool.cache for root pools, which can cause issues
such as confusion of zdb etc.

MFC after:	1 month
2014-12-23 09:31:24 +00:00
Warner Losh
3e834dd35d Always select the card before we do the 4.x specific stuff and
deselect it after setting the block size. This is a similar bug that
was fixed elsewhere, but not here. This makes sure that we leave the
card deselected at the end of the loop, and we don't send any commands
to the card without it selected.

Reviewed by: ian@
2014-12-23 05:50:53 +00:00
Rui Paulo
df90fb1f9f Temporarily disable the cpus directive until I figure out what's wrong. 2014-12-23 03:00:18 +00:00
Neel Natu
b053814333 Allow ktr(4) tracing of all guest exceptions via the tunable
"hw.vmm.trace_guest_exceptions".  To enable this feature set the tunable
to "1" before loading vmm.ko.

Tracing the guest exceptions can be useful when debugging guest triple faults.

Note that there is a performance impact when exception tracing is enabled
since every exception will now trigger a VM-exit.

Also, handle machine check exceptions that happen during guest execution
by vectoring to the host's machine check handler via "int $18".

Discussed with:	grehan
MFC after:	2 weeks
2014-12-23 02:14:49 +00:00
Rick Macklem
0b327b634a Add an UPDATING entry for r276096, which removed the kernel
sources for the old NFS client and server.
2014-12-23 01:32:18 +00:00
Rick Macklem
c15882f091 Remove the old NFS client and server from head,
which means that the NFSCLIENT and NFSSERVER
kernel options will no longer work. This commit
only removes the kernel components. Removal of
unused code in the user utilities will be done
later. This commit does not include an addition
to UPDATING, but that will be committed in a
few minutes.

Discussed on: freebsd-fs
2014-12-23 00:47:46 +00:00
Dag-Erling Smørgrav
6d514f104e Use "RCS tag" instead of "$FreeBSD$ tag", since svn will obediently
expand the latter.

MFC after:	3 days
2014-12-22 23:03:18 +00:00
Ian Lepore
af3cafd76c Add a new loader(8) variable, twiddle_divisor, allowing control over the
output frequency of the "twiddle" IO progress indicator.  The default
value is 1.  For larger values N, the next stage of the animation is only
output on every Nth call to the output routine.  A sufficiently large N
effectively disables the animation completely.
2014-12-22 22:07:22 +00:00
Colin Percival
7e654612dc Strip trailing / characters from paths in "not present" index entries, not
just "directory" entries.

Prior to this commit, if / was added as part of a security update (how? In
the most recent case, because lib32 was accidentally omitted and was then
re-added, and every installer distribution set gets its own paths) then
the code which was supposed to filter out updates to deleted parts of the
base system (if someone decides to delete / then we shouldn't re-create it
for them) would instead get confused and decided that while / should exist,
// should not exist and needs to be removed.

This fixes the bug which caused freebsd-update to want to delete / (which is
harmless, since `rm /` fails, but scary nonetheless).  A workaround is being
applied to the update bits in order to avoid triggering the bug on unpatched
systems.

PR:		196055, 196091, 196147
2014-12-22 21:52:37 +00:00
Dmitry Morozovsky
1b055b0eca Add VAMI (VMware Appliance Management Interface) port.
Reviewed by:	eadler
MFC after:	2 weeks
2014-12-22 21:26:49 +00:00
Ian Lepore
7668336c8e Add a divisor parameter to twiddle() so that callers can request that output
only happen on every Nth call.  Update the existing twiddle() calls done in
various IO loops to roughly reflect the relative IO sizes.  That is, tftp
and nfs call twiddle() on every 1K block, ufs on every filesystem block,
so the network calls now use a much larger divisor than disk IO calls.

Also add a new twiddle_divisor() function that allows an application to set
a global divisor that is applied on top of the per-call divisors.  Nothing
calls this yet, but loader(8) will be using it to further throttle the
cursor for slow serial consoles.
2014-12-22 20:42:36 +00:00
Warner Losh
8757069658 Don't require ${SYSDIR}/../COPYRIGHT to exist. Fall back to the
current date if we can't find it.

MFC After: 2 weeks
2014-12-22 19:10:21 +00:00
Warner Losh
f9f0d902c1 Make this compile when TERM_EMU is not defined. 2014-12-22 19:10:11 +00:00
Xin LI
2f834a0b41 Fix multiple ntp vulnerabilities.
Reviewed by:	roberto (earlier revision), philip
Security:	CVE-2014-9293, CVE-2014-9294
Security:	CVE-2014-9295, CVE-2014-9296
Security:	FreeBSD-SA-14:31.ntp

Differential Revision: https://reviews.freebsd.org/D1343
2014-12-22 18:54:55 +00:00
Steven Hartland
6831cf6aa6 Fix panic when resizing ZFS zvol's
Resizing a ZFS ZVOL with debug enabled would result in a panic due to
recursion on dp_config_rwlock.

The upstream change "3464 zfs synctask code needs restructuring" changed
zvol_set_volsize to avoid the recursion on dp_config_rwlock, but this was
missed when originally merged in by r248571 due to significant differences
in our codebases in this area.

These changes also relied on bring in changes from upstream:
3557 dumpvp_size is not updated correctly when a dump zvol's size is
changed, which where also not present.

In order to help prevent future issues in this area a direct comparison
and diff minimisation from current upstream version (b515258) of zvol.c.

Differential Revision:	https://reviews.freebsd.org/D1302
MFC after:	1 month
X-MFC-With:	r276063 & r276066
Sponsored by:	Multiplay
2014-12-22 18:39:38 +00:00
Steven Hartland
08c0f91ecc Refactor zvol locking to minimise diff with upstream
Use #define zfsdev_state_lock spa_namespace_lock instead of replacing all
zfsdev_state_lock with spa_namespace_lock to minimise changes from upstream.

Differential Revision:	D1302
MFC after:	1 month
X-MFC-With	r276063
Sponsored by:	Multiplay
2014-12-22 17:04:51 +00:00
John Baldwin
51f2504057 Explicitly treat timeouts when waiting for IBF or OBF to change state as an
error.  This fixes occasional hangs in the IPMI kcs thread when using
ipmitool locally.

MFC after:	1 week
2014-12-22 16:53:04 +00:00