Commit Graph

216227 Commits

Author SHA1 Message Date
Ed Maste
1dd50172b0 Always pass -m to ld for converting binary files to kernel ELF objects
This is in preparation for linking with LLVM's lld, which does not have
a compiled-in default output emulation. lld requires that it is
specified via the -m option, or obtained from the object file(s) being
linked.

This will also allow all build targets to share a common linker binary.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D7837
2016-09-20 17:07:14 +00:00
Enji Cooper
43f24e2096 Port vnd_test to FreeBSD
Use mdmfs/mdconfig instead of vndconfig/newfs. vndconfig doesn't exist on FreeBSD.

TODO: need to parameterize out the md(4) device as it's currently hardcoded to "3"
(in both the FreeBSD and NetBSD cases).

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2016-09-20 16:40:15 +00:00
Enji Cooper
534501a247 Port to mknod_test and readdir_test to FreeBSD
The `mknod <file> p` command doesn't exist on FreeBSD, like on NetBSD. Use
mkfifo instead to create named pipes (FIFOs).

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2016-09-20 16:37:02 +00:00
Enji Cooper
548f948a56 Port sizes_test and statvfs_test to FreeBSD
Similar to r306030, use a simpler method for getting the value of
`hw.pagesize`, i.e. `sysctl -n hw.pagesize`. The awk filtering method doesn't
work on FreeBSD

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2016-09-20 16:31:57 +00:00
Enji Cooper
61e13648e7 Port contrib/netbsd-tests/fs/h_funcs.subr to FreeBSD
Use kldstat -m to determine whether or not a filesystem is loaded. This works
well with tmpfs, ufs, and zfs

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2016-09-20 16:28:57 +00:00
Enji Cooper
d3de062383 Port vnode_leak_test:main to FreeBSD
Use a simpler way of dumping kern.maxvnodes, i.e. `sysctl -n kern.maxvnodes`

The awk filtering method employed in NetBSD doesn't work on FreeBSD

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2016-09-20 16:27:34 +00:00
Enji Cooper
92d317a9b5 Use SRCTOP instead of the longhand version for defining the path to contrib/atf
MFC after:	3 days
Sponsored by:	Dell EMC Isilon
2016-09-20 16:24:22 +00:00
Warner Losh
8c3dc1fb05 Spell alphabetically correctly both in the commit message AND in the
actual man page. Sigh.

Submitted by: David A Bright and Pedro Giffuni
2016-09-20 15:14:33 +00:00
Ed Maste
23648b7d73 bspatch: Remove backwards-compatibility sys/capability.h support
bspatch previously included sys/capability.h or sys/capsicum.h based
on __FreeBSD_version, as FreeBSD is the upstream for bsdiff and we may
see this file incorporated into other third-party software.

The Capsicum header is now installed as sys/capsicum.h in stable/10 and
FreeBSD 10.3, so we can just use sys/capsicum.h and simplify the logic.

Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D7954
2016-09-20 15:13:15 +00:00
Ed Maste
6f70040b38 mrsas: update for sys/capability.h rename in r263232 2016-09-20 12:59:30 +00:00
Ed Maste
397ff3b872 auditdistd: update for sys/capability.h rename in r263232 2016-09-20 12:58:28 +00:00
Ed Maste
cec1957ae1 hwpmc: remove sys/capability.h backwards compatibility
The Capsicum header is installed as sys/capsicum.h in stable/10 as well.
2016-09-20 12:56:03 +00:00
Wojciech Macek
988d9b3505 Add driver for PCIe root complex on Annapurna Alpine platform.
The driver subclasses pci-host-generic and additionally
performs configuration of vendor-specific PCIe registers.

Obtained from:         Semihalf
Submitted by:          Michal Stanek <mst@semihalf.com>
Sponsored by:          Annapurna Labs
Reviewed by:           wma
Differential Revision: https://reviews.freebsd.org/D7571
2016-09-20 11:11:06 +00:00
Konstantin Belousov
65afaac0c3 Move pmap_p*e_index() inline functions from pmap.c to pmap.h.
They are already used in minidump code.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-09-20 09:38:07 +00:00
Wojciech Macek
eaa797943e Update Annapurna Alpine HAL
alpine-hal SerDes file was omitted in the previous commit.
Files added here.
All unnecessary (old) files were also removed.
Merge from vendor-sys, r306017
2016-09-20 09:19:22 +00:00
Edward Tomasz Napierala
0c4440c3aa Follow up r305988 by removing g_bio_run_task and related code.
The g_io_schedule_up() gets its "if" condition swapped to make
it more similar to g_io_schedule_down().

Suggested by:	mav@
Reviewed by:	mav@
MFC after:	1 month
2016-09-20 09:18:33 +00:00
Sepherosa Ziehau
fa8c981396 hyperv/storvsc: Fix SRB length setting.
This fixes disk discovery issue on WS2008R2 Hyper-V, which plagued
us since 10.2-release.

Reported by:	many
MFC after:	3 days
Sponsored by:	Microsoft
2016-09-20 08:52:45 +00:00
Sepherosa Ziehau
5260781e82 hyperv/hn: Let the caller of hn_nvs_doinit() do the error logging.
So that NVS version probing failure does not look too scary.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7950
2016-09-20 05:45:18 +00:00
Sepherosa Ziehau
a572f6042a hyperv/hn: Fix ifnet hwassist setup.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7948
2016-09-20 05:26:40 +00:00
Edward Tomasz Napierala
81eaa5685e Fix -media to not mount ufs with "async"; it doesn't make sense when
there is softupdates.

Suggested by:	imp@
MFC after:	1 month
2016-09-20 04:54:00 +00:00
Edward Tomasz Napierala
921bf145a6 Stop appending "noatime" in the autofs -media map, and instead add it
to auto_master, since all filesystems seem to support it.  It's cleaner
this way, and easier to customize.

MFC after:	1 month
2016-09-20 04:52:01 +00:00
Warner Losh
19b7fe02c4 Document existing practice and be more clear about sys/foo.h files
being alphabetical with sys/param.h or sys/types.h being first. Expand
the example to hopefully make this (slightly) clearer.

Noticed by: cem@
2016-09-20 04:50:53 +00:00
Edward Tomasz Napierala
554159ec95 Make autofs(5) -media map also use "async" and "noatime" for ext2fs(5).
Suggested by:	pfg@
MFC after:	1 month
2016-09-20 04:33:58 +00:00
Mark Johnston
feba6b4163 libdwarf: Add definitions for Apple's DWARF extension attributes.
Reviewed by:	emaste
MFC after:	1 week
2016-09-20 00:22:35 +00:00
Imre Vadász
bff11ce594 [iwm] Improve reliability of iwm_release on disassociation a bit.
* We need to first call ivp->iv_newstate(), to enqueue the deauth/deassoc
  mgmt frame, then flush the tx queue, before actually calling
  iwm_release().

* cycling a wlan connection via wpa_cli frontend to wpa_supplicant, by
  issuing disconnect and reconnect commandos works quite well.
  (There is still an issue when disconnecting/reconnecting too quickly)

* Reassociating or roaming via wpa_supplicant is still broken.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D7943
2016-09-19 22:36:30 +00:00
Imre Vadász
e4dc86e060 [iwm] Remove dead fw_totlen from struct iwm_fw_sects; clean up struct iwm_nvm_data.
* No functional change, none of these values were ever read.

* The values removed from struct iwm_nvm_data are only used for old dvm
  devices in Linux iwlwifi, and irrelevant to iwm hence.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D7945
2016-09-19 22:26:37 +00:00
Imre Vadász
0ba35431ee [iwm] Use IWM_DEFAULT_SCAN_CHANNELS define as default for sc_capa_n_scan_channels.
Approved by:	adrian (mentor)
Obtained from:	Linux iwlwifi
Differential Revision:	https://reviews.freebsd.org/D7938
2016-09-19 22:23:46 +00:00
Imre Vadász
22359652af [iwm] Remove deprecated scan API definitions.
* This removes deprecated scan API definitions, which have been unused
  since the upgrade to version 16 firmware in change r303327.

* Part of this change matches the header-file changes in Linux git commit
  1f9403863c080478ad78247c89b018e95bdfb027.

* No functional change.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D7937
2016-09-19 22:20:46 +00:00
Imre Vadász
fbb27a30bf [iwm] Remove wrappers around iwm_dma_contig_free() calls.
No functional changes.

Inspired by:	OpenBSD
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D7933
2016-09-19 22:16:03 +00:00
Imre Vadász
0cd7fa558e [iwm] Fix iwm_poll_bit() error value check in iwm_attach().
The iwm(4) iwm_poll_bit() function returns 1 on success, and 0 on failure,
whereas the iwl_poll_bit() in Linux iwlwifi returns < 0 on failure.

So the (ret < 0) check ended up ignoring any error returned by
iwm_poll_bit().

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D7932
2016-09-19 22:13:08 +00:00
Imre Vadász
739e99ba69 [iwm] Fix off-by-one check in iwm_read_firmware().
This fixes a potential buffer overrun in the firmware parsing code.

Reported by:	Coverity
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D7931
2016-09-19 22:11:34 +00:00
Imre Vadász
ef81578c9f [iwm] Remove unused field from iwm_rx_data. Use uint32_t instead of enum type.
The wantresp field in struct iwm_rx_data has never been used for anything,
so we can just delete it.

Apparently struct iwm_sf_cfg_cmd was compiled correctly (using a 32bit
value to represent the enum), but it still seems like a very bad idea to use
an enum type in a __packed struct.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D7930
2016-09-19 22:08:47 +00:00
Imre Vadász
b47237ce60 [iwm] Use htole16 for policy field in struct iwm_time_event_cmd_v2.
The htole32 was working fine for little-endian machines, but would have
been broken on big-endian.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D7929
2016-09-19 22:06:00 +00:00
Conrad Meyer
d36899d10f Move sys/capsicum.h includes after types.h or param.h
This is not actually documented or even implied in style(9).  Make the change
to match convention.  Someone should document this convention in style(9).

Reported by:	jhb
Sponsored by:	EMC Dell Isilon
2016-09-19 20:43:03 +00:00
Ed Maste
ac7715e39e revert unintended change from r305994 2016-09-19 18:45:57 +00:00
Ed Maste
df4336ddfa Catch up to sys/capability.h rename to sys/capsicum.h in r263232
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-09-19 18:44:43 +00:00
Pedro F. Giffuni
8967299b33 mount(1): Simplify by using asprintf(3)
Instead of strlen() + malloc() + snprintf, just use asprintf().
No functional change.

Obtained from:	OpenBSD (CVS Rev. 1.67)
2016-09-19 18:42:58 +00:00
Andriy Voskoboinyk
07fa0846ca dev/usb: add USB IDs for Realtek 802.11ac wireless adapters.
They are will be used by the updated rtwn(4) / urtwn(4) driver.

Suggested by:	adrian
2016-09-19 18:36:26 +00:00
Pedro F. Giffuni
0c9426b684 hexdump(1): Simplify by using asprintf(3)
Instead of strlen() + calloc() + snprintf, just use asprintf().
No functional change.

Obtained from:	OpenBSD (CVS Rev. 1.22)
2016-09-19 18:35:22 +00:00
Ed Maste
568415f29d tcpdump: remove sys/capability.h #include
sys/capability.h is just a backwards compatibility wrapper around
sys/capsicum.h, which is already #included.
2016-09-19 17:51:56 +00:00
Edward Tomasz Napierala
bbdd6614bd Remove unused bio_taskqueue().
MFC after:	1 month
2016-09-19 17:46:15 +00:00
Ed Schouten
cbf42683f8 Sync in latest vDSOs from upstream.
- Use conditional instruction to simplify the ARMv6 vDSO. This means
  that we no longer perform any branching. In the failure case, we
  simply slide over the assignments of the return values.

  The vDSO could be improved even further by using stmia to do
  assignments in parallel. Unfortunately, the script used to generate
  these is not smart enough for that (yet).

  Spotted by: andrew@.

- Make the style of the i686 vDSO more similar to the others by using
  decimal literals.
2016-09-19 17:31:05 +00:00
Navdeep Parhar
0459a175eb cxgbe(4): Fixes to wrq stats.
- Increment tx_wrs_copied in the correct place.
- Add tx_wrs_sspace to the sysctl MIB.

Sponsored by:	Chelsio Communications
2016-09-19 17:16:51 +00:00
Conrad Meyer
10cc720c25 indent(1): Capsicumify
This is a nice and trivial program for sandboxing.  One input file, one
output file.

Reviewed by:	pfg
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D7920
2016-09-19 16:16:14 +00:00
Conrad Meyer
875cba632b tr(1): Capsicumify
This is a straightforward single input, single output program for
capsicum.

Reviewed by:	bapt
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D7928
2016-09-19 16:14:38 +00:00
Conrad Meyer
e75a7302d3 cmp(1): Capsicumify
Reviewed by:	allanjude, bapt, oshogbo
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D7912
2016-09-19 16:13:00 +00:00
Ed Maste
bd24e9a105 uefisign: Remove backwards-compatibility sys/capability.h support
uefisign previously included sys/capability.h or sys/capsicum.h based
on __FreeBSD_version in order to facilitate development on the stable
branch. The Capsicum header is now installed as sys/capsicum.h in
stable/10 and FreeBSD 10.3, so there's no need for the backwards
compatibility support.

Reviewed by:	trasz
Sponsored by:	The FreeBSD Foundation
2016-09-19 16:07:32 +00:00
Konstantin Belousov
36596c2a29 Detect x2APIC mode on boot and obey it.
If BIOS performed hand-off to OS with BSP LAPIC in the x2APIC mode,
system usually consumes such configuration without a notice, since
x2APIC is turned on by OS if possible (nop).  But if BIOS
simultaneously requested OS to not use x2APIC, code assumption that
that xAPIC is active breaks.

In my opinion, we cannot safely turn off x2APIC if control is passed
in this mode.  Make madt.c ignore user or BIOS requests to turn x2APIC
off, and do not check the x2APIC black list.  Just trust the config
and try to continue, giving a warning in dmesg.

Reported and tested by:	Slawa Olhovchenkov <slw@zxy.spb.ru> (previous version)
Diagnosed by and discussed with:	avg
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2016-09-19 15:58:45 +00:00
Konstantin Belousov
bf9c87c813 Be more strict when selecting between snapshot/regular mount.
Reclaimed vnode type is VBAD, so succesful comparision like
devvp->v_type != VREG does not imply that the devvp references
snapshot, it might be due to a reclaimed vnode.  Explicitely check the
vnode type.

In the the most important case of ffs_blkfree(), the devfs vnode is
locked and its type is stable.  In other cases, if the vnode is
reclaimed right after the check, hopefully the buffer methods return
right error codes.

Reviewed by:	mckusick
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2016-09-19 15:58:33 +00:00
Andrew Turner
5a3a700931 Attach the cortex strings library to the build. Only a subset of functions
have been added as some don't seem to be improvements over the libc C
implementation.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-09-19 15:08:03 +00:00