Commit Graph

192102 Commits

Author SHA1 Message Date
Xin LI
4c75e22659 Add zdb into rescue environment.
On amd64, this would increase the binary size by 1.1MiB and
make it possible to examine zpool status offline, useful for
recovery and diagnostic purposes.

Submitted by:	sef
Obtained from:	FreeNAS
MFC after:	2 weeks
2014-08-20 00:14:41 +00:00
Bryan Drewery
4a185fa6c9 Avoid showing stale errors when nmount(2) fails.
Sometimes nmount(2) will fail without setting errmsg. The previous (ignored)
error would then be shown as the reason for the failed call if the next
nmount(2) also fails without [ENOENT,ENOTSUP].

An example is when there is a tmpfs mounted with -o size. vfs_filteropt() adds
'size' as an error in errmsg due to 'size' not being in tmpfs_updateopts. Then
tmpfs_mount returns [ENOTSUP] from nmount(2), which is then ignored. The next
call may race with an unmount causing an invalid [EINVAL] that then does log an
error, with the tmpfs errmsg.

The race itself is a separate issue to fix as it is expected to have an
[ENOENT] returned instead.

In this example the mount being shown is actually nullfs, not tmpfs that the
error is from.

  mountd[740]: can't delete exports for /poudriere/data/.m/exp-head-commit-test-devel/04/.npkg: Invalid argument mount option <size> is unknown

It should only show:

  mountd[740]: can't delete exports for /poudriere/data/.m/exp-head-commit-test-devel/04/.npkg: Invalid argument

MFC after:	2 weeks
2014-08-19 21:04:31 +00:00
Bryan Drewery
11cb1b138e Add recent DragonFly releases.
Submitted by:	Zach Crownover <zachary.crownover@gmail.com>
MFC after:	1 week
2014-08-19 20:35:09 +00:00
Enji Cooper
86e9f36ea6 Add LIBMD and LIBUTIL to DPADD to fix "make checkdpadd"
Approved by: jmmv (mentor)
MFC after: 5 days
Phabric: D633
PR: 192763
2014-08-19 18:47:47 +00:00
Enji Cooper
b7ca81625e Add missing libraries to DPADD; sort DPADD so DPADD and LDADD match up
This fixes "make checkdpadd"

Approved by: jmmv (mentor)
MFC after: 2 weeks
Phabric: D630
PR: 192765
2014-08-19 18:31:20 +00:00
Enji Cooper
d052a806a0 Fix typo (LIBLDNSADD -> LIBLDNS) to fix "make checkdpadd"
X-MFC with: r269648
Phabric: D634
Approved by: jmmv (mentor)
2014-08-19 18:27:43 +00:00
Alexander Motin
2ac1d5afc8 Fix lock recursion on LUN shutdown, introduced on r269497.
MFC after:	3 days
2014-08-19 17:04:18 +00:00
Bryan Drewery
f874ca3efd Bump __FreeBSD_version after r269489 so ports can use it. 2014-08-19 15:47:51 +00:00
Bryan Drewery
54d8c5d5af Regen after r270171 2014-08-19 15:46:40 +00:00
Hans Petter Selasky
74b0cb1a24 Add missing WITHOUT_CUSE file. 2014-08-19 15:40:26 +00:00
Bryan Drewery
6855730b5c Use bsd.lib.mk here as all other csu Makefiles do.
This effectively reverts r124752.

There's no reason this should be different. It resulted in needing NO_PIE in
the original opt-out NO_PIE commit as this was not using the proper framework.

Reported by:	peter
2014-08-19 15:30:56 +00:00
Bryan Drewery
f1d82c3e68 Regen after r270168 2014-08-19 15:09:24 +00:00
Bryan Drewery
5608fd23c2 Revert r267233 for now. PIE support needs to be reworked.
1. 50+% of NO_PIE use is fixed by adding -fPIC to INTERNALLIB and other
   build-only utility libraries.
2. Another 40% is fixed by generating _pic.a variants of various libraries.
3. Some of the NO_PIE use is a bit absurd as it is disabling PIE (and ASLR)
   where it never would work anyhow, such as csu or loader. This suggests
   there may be better ways of adding support to the tree. Many of these
   cases can be fixed such that -fPIE will work but there is really no
   reason to have it in those cases.
4. Some of the uses are working around hacks done to some Makefiles that are
   really building libraries but have been using bsd.prog.mk because the code
   is cleaner. Had they been using bsd.lib.mk then NO_PIE would not have
   been needed.

We likely do want to enable PIE by default (opt-out) for non-tree consumers
(such as ports). For in-tree though we probably want to only enable PIE
(opt-in) for common attack targets such as remote service daemons and setuid
utilities. This is also a great performance compromise since ASLR is expected
to reduce performance. As such it does not make sense to enable it in all
utilities such as ls(1) that have little benefit to having it enabled.

Reported by:	kib
2014-08-19 15:04:32 +00:00
Kevin Lo
7e1c22c476 Sort ASUS section and add USB device ID of ASUS USB-AC51. 2014-08-19 09:02:58 +00:00
Warner Losh
36be38b5f4 Add support for -X, which installs the native cross tools for qemu
operations. Doesn't install qemu nor setup the jail, yet.
2014-08-19 03:51:10 +00:00
Warner Losh
d8f5c1e164 New DTS files to suppport the SAM9260EK eval board. Derived, in part,
from the SAM9G20EK dts files (so that file is GPL'd).
2014-08-19 03:51:05 +00:00
Lawrence Stewart
8b0fe327e8 Destroy the "qdiffsample_zone" UMA zone on unload to avoid a use-after-unload
panic easily triggered by running "sysctl -a" after unload.

Reported and tested by:	Grenville Armitage <garmitage@swin.edu.au>
MFC after:	1 week
2014-08-19 02:19:53 +00:00
Marcel Moolenaar
4ec7371233 For vendors like Juniper, extensibility for sockets is important. A
good example is socket options that aren't necessarily generic.  To
this end, OSD is added to the socket structure and hooks are defined
for key operations on sockets.  These are:
o   soalloc() and sodealloc()
o   Get and set socket options
o   Socket related kevent filters.

One aspect about hhook that appears to be not fully baked is the return
semantics (the return value from the hook is ignored in hhook_run_hooks()
at the time of commit).  To support return values, the socket_hhook_data
structure contains a 'status' field to hold return values.

Submitted by:	Anuranjan Shukla <anshukla@juniper.net>
Obtained from:	Juniper Networks, Inc.
2014-08-18 23:45:40 +00:00
Stefan Eßer
62016143f1 Fix a few conversion problems (e.g. when a keymap is derived from ISO8859-1,
but shall provide an Euro sign - similar for Japanese Yen).

The Brazilian keymap "br.kbd" now has accents, by default - the no-accents
version has been renamed to "br.noacc.kbd".

MFC after:	3 days
2014-08-18 21:07:12 +00:00
Warner Losh
75872267e8 Create the native-xtools target. This target creates only the cross
building toolchain for the host computer. This toolchain produces
TARGET_ARCH and assumes the rest of the system contains libraries for
the target. It is intended to be used in a "qemu-user jail" where all
the binaries would otherwise be the target architecture's to build
ports. However, emulation of the compilers is too slow, so we build
native binaries for that. Rather than use the xdev produced binaries,
with all their weird links and paths, these binaries use the native
paths. They will not work unless installed into the qemu-user jail.

Differential Revision: https://phabric.freebsd.org/D518
Reviewed by: sbruno@
2014-08-18 21:04:44 +00:00
Warner Losh
ef9bab8ec8 Make note about reset vs RTOE actions... 2014-08-18 21:04:35 +00:00
Stefan Eßer
5ca70e591e Fix minor problems found while converting to NEWCONS format.
MFC after:	3 days
2014-08-18 20:58:17 +00:00
Stefan Eßer
e1ac101192 Minor fixes to convert-keymap.pl (conversion of 8bit characters in the form
'x' with high bit set) and to KBDFILES.map (fix encodings and comment out a
few redundant keymap files).

MFC after:	3 days
2014-08-18 20:55:11 +00:00
Alan Cox
ada1ae623e There exists a possible sequence of page table page allocation failures
starting with a superpage demotion by pmap_enter() that could result in
a PV list lock being held when pmap_enter() is just about to return
KERN_RESOURCE_SHORTAGE.  Consequently, the KASSERT that no PV list locks
are held needs to be replaced with a conditional unlock.

Discussed with:	kib
X-MFC with:	r269728
Sponsored by:	EMC / Isilon Storage Division
2014-08-18 20:28:08 +00:00
Scott Long
274919e965 Deal explicitly with possible failures of make_dev_alias_p() in GEOM.
Submitted by:   Mariusz Zaborski <oshogbo@FreeBSD.org>
MFC after:      3 days
2014-08-18 19:27:47 +00:00
Roman Divacky
d17fa074a7 Add the patch commited in r270147. 2014-08-18 18:07:28 +00:00
Roman Divacky
26e250745f Backport r197824, r213427 and r213960 from LLVM trunk:
r197824 | rdivacky | 2013-12-20 19:08:54 +0100 (Fri, 20 Dec 2013) | 2 lines

  Implement initial-exec TLS for PPC32.

  r213427 | hfinkel | 2014-07-19 01:29:49 +0200 (Sat, 19 Jul 2014) | 7 lines

  [PowerPC] 32-bit ELF PIC support

  This adds initial support for PPC32 ELF PIC (Position Independent Code; the
  -fPIC variety), thus rectifying a long-standing deficiency in the PowerPC
  backend.

  Patch by Justin Hibbits!

  r213960 | hfinkel | 2014-07-25 19:47:22 +0200 (Fri, 25 Jul 2014) | 3 lines

  [PowerPC] Support TLS on PPC32/ELF

  Patch by Justin Hibbits!

Reviewed by: jhibbits
Approved by: dim
2014-08-18 18:05:55 +00:00
Enji Cooper
a725bfc49c Add LIBCRYPTO and LIBSSL to DPADD
This fixes "make checkdpadd"

Phabric: D621
PR: 192761
Approved by: rpaulo (mentor)
MFC after: 2 weeks
2014-08-18 18:01:18 +00:00
Enji Cooper
50671e8b4f Replace DPADD with DPSRCS to fix "make checkdpadd"
Phabric: D625
Approved by: jmmv (mentor)
Reviewed by: dim
PR: 192734
MFC after: 2 weeks
2014-08-18 17:38:50 +00:00
Enji Cooper
4207570add Add LIBCRYPT to DPADD, remove LDFLAGS from LDADD, and sort the Makefile variables
This fixes "make checkdpadd"

Phabric: D620
Approved by: jmmv (mentor)
PR: 192729
MFC after: 5 days
2014-08-18 17:35:39 +00:00
Ed Maste
9b3057f932 Add Canadian Bilingual keyboard 2014-08-18 17:10:55 +00:00
Edward Tomasz Napierala
a1577802f0 Remove vestiges of previous autofs.
Discussed with:	alfred@
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-08-18 14:47:13 +00:00
Hans Petter Selasky
f09566d3bd Use the "bSubslotSize" and "bSubFrameSize" fields to obtain the actual
sample size. According to the USB audio frame format specification
from USB.org, the value in the "bBitResolution" field can be less than
the actual sample size, depending on the actual hardware, and should
not be used for this computation.

PR:		192755
MFC after:	1 week
2014-08-18 14:30:43 +00:00
Hans Petter Selasky
1dfd04f70c Add more USB class codes.
Obtained from:	libusb project at SourceForge
MFC after:	1 week
2014-08-18 14:23:07 +00:00
Gabor Kovesdan
2ac5b1c763 - Do not look for more matching lines if -L is specified
Submitted by:   eadler (based on)
MFC after:	2 weeks
2014-08-18 12:29:28 +00:00
Stefan Eßer
ca1351acba Import the tools used to convert the keymap files from SYSCONS (in locale
dependent encoding) to NEWCONS (Unicode).

The file "LANG.map" is used to convert INDEX.keymaps. It has 3 columns:
- the language ID as used in the source file
- the language ID to be used in the generated file (e.g. "iw" -> "he")
- the encoding of the menu texts for this language
The conversion result is written to STDOUT.

The file "KBDFILES.map" is used to batch convert keymap files. It's
columns are:
- the encoding used for the keymap sounce file
- the name of the source file
- the name of the generated file
The output files are created in the TEMP sub-directory of the vt keymap
directory, in order to preserve (possibly uncommitted) keymap files in
/usr/src/share/vt/keymaps.

The convert-keymap.pl script can be directly executed by passing the
source file name and the encoding on the command line. It writes to
STDOUT and generates hex Unicode codepoints by default. (This can be
changed to decimal in the script.)

While written for the one-time conversion of the SYSCONS keymaps into
the format required for NEWCONS, I think these tools may be useful for
easy conversion of possible further SYSCONS keymap files, that have not
been committed to the source tree.
2014-08-18 09:40:19 +00:00
Alexander V. Chernikov
7d6fa255bf Zero buffer before request. 2014-08-18 08:07:50 +00:00
Warner Losh
40ad132dfd /usr/libexec/ld.so.1 never was a thing on FreeBSD/arm. This was the
FreeBSD 3.x and 4.x run time linker. FreeBSD/arm's first release was
5.0. Retire this long-dead code.
2014-08-18 02:45:06 +00:00
Warner Losh
817dc00433 Expand the elf brandelf infrastructure to give access to the whole ELF
header (Elf_Ehdr) to determine if a particular interpretor wants to
accept it or not. Use this mechanism to filter EABI arm on OABI arm
kernels, and vice versa. This method could also be used to implement
OABI on EABI arm kernels, if desired, or to allow a single mips kernel
to run o32, n32 and n64 binaries.

Differential Revision: https://reviews.freebsd.org/D609
2014-08-18 02:44:56 +00:00
Ed Maste
63200084dc Rename ca keyboard to ca-fr
"ca" will shortly be used for the Canadian Multilingual keyboard.
2014-08-18 01:49:42 +00:00
Enji Cooper
ac8edda605 Add LIBUTIL to DPADD
This will fix "make checkdpadd"

MFC after: 5 days
PR: 192759
Approved by: rpaulo (mentor)
2014-08-18 01:21:41 +00:00
Enji Cooper
32529978a7 Add -ll to LDADD to fix "make checkdpadd"
Phabric: D622
MFC after: 2 weeks
Approved by: rpaulo (mentor)
2014-08-18 00:50:09 +00:00
Enji Cooper
46e6d5b7bf Fix typo in lib/atf/libatfc++/Makefile
LIBATFC should be LIBATF_C; this was missed in the initial import
(r241823)

PR: 192731
MFC after: 3 days
Phabric: D619
Approved by: rpaulo (mentor)
2014-08-17 23:30:45 +00:00
Alexander V. Chernikov
3e0aeae44a Add forgotten DPADD to ifconfig(8).
PR:		192760
Submitted by:	yaneurabeya at gmail.com
MFC after:	2 weeks
2014-08-17 20:06:47 +00:00
Stefan Eßer
7ba08f8145 Attempt at converting the SYSCONS keymaps to Unicode for use with NEWCONS.
I have spent many hours comparing source and destination formats, and hope
to have caught the most severe conversion errors.

Files were converted with a Perl script which I'll shortly commit to the
tools directory. This script is a much enhanced version of the one
provided by ray@ and is expected to support the full kbdmap(5) syntax.

The naming convention used is:

 <2-letter country code>.<variant>.kbd

Only if there are multiple layouts for different languages:

 <2-letter country code>-<2-letter language code>.<variant>.kbd

In nearly all cases, the keyboards are country specific, only. Currently
there is only one case where the language was added ("ch-fr.kbd" for
the Swiss-French keyboard layout).

I choose to write Unicode character codes as hex numbers. While this
increases the diff to the SYSCONS keymap files for the trivial cases
(conversion from ISO8859-1), it really helps to verify the more complex
cases against a Unicode table (which is indexed by hex numbers).

This commit does not cover all files that have been converted, since I
need to sort out which ones to use, if there were several with different
source encodings to choose from.

Review and test of the keymap files is highly desirable before 10.1 is
released. I'd also appreciate educated opinions regarding the optimum
variant (to be made available as the default for each language).

Since there are no NEWCONS keymaps in 10-STABLE, I plan to MFC after
the minimum allowed delay of 3 days, to allow at least a few weeks to
test and improve what will be in the next release.

MFC after:	3 days
2014-08-17 19:54:21 +00:00
Jilles Tjoelker
ef9e61785a sh: Avoid overflow in atoi() when parsing HISTSIZE.
Side effect: a non-numeric HISTSIZE now results in the default size (100)
instead of 0.
2014-08-17 19:36:56 +00:00
Neel Natu
06224a9492 Remove LOG_ODELAY because it does nothing.
Reviewed by:	jilles
CR:		https://reviews.freebsd.org/D611
2014-08-17 19:06:26 +00:00
Bjoern A. Zeeb
e6b802649c Remove keyboard entropy [1] from r270105.
Reported by:		ian [1]
(Pointy hat)^2 to:	imp
2014-08-17 18:27:02 +00:00
Warner Losh
71db9bfe7d Add missing license to at91_common.c. It was committed w/o a license.
Pointy hat to: imp@
2014-08-17 16:53:19 +00:00
Warner Losh
7945ebfd6c Define at91_master_clock in only one file to eliminate warnings about
it multiply defined commons.
2014-08-17 16:53:14 +00:00