]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoDIRDEPS_BUILD: Update dependencies.
bdrewery [Mon, 7 Dec 2015 23:53:01 +0000 (23:53 +0000)]
DIRDEPS_BUILD: Update dependencies.

Sponsored by: EMC / Isilon Storage Division

8 years agoActually add the proc_rwmem(9) man page, missed in r291961.
markj [Mon, 7 Dec 2015 22:08:12 +0000 (22:08 +0000)]
Actually add the proc_rwmem(9) man page, missed in r291961.

8 years agoFix a couple misspellings of "environment."
markj [Mon, 7 Dec 2015 22:00:13 +0000 (22:00 +0000)]
Fix a couple misspellings of "environment."

MFC after: 3 days

8 years agoAdd a trailing newline to the expected output for tst.walltimestamp.ksh.
markj [Mon, 7 Dec 2015 21:59:10 +0000 (21:59 +0000)]
Add a trailing newline to the expected output for tst.walltimestamp.ksh.

MFC after: 1 week

8 years agoFix a discrepancy in r291738.
markj [Mon, 7 Dec 2015 21:57:36 +0000 (21:57 +0000)]
Fix a discrepancy in r291738.

The script that generates these makefiles was changed to modify LIBADD
rather than LDADD/DPADD, but the makefile itself was also changed in a
slightly different way.

8 years agoUpdate DTrace test suite makefiles after r291963.
markj [Mon, 7 Dec 2015 21:51:50 +0000 (21:51 +0000)]
Update DTrace test suite makefiles after r291963.

8 years agoMFV r289003:
markj [Mon, 7 Dec 2015 21:49:32 +0000 (21:49 +0000)]
MFV r289003:
6271 dtrace caused excessive fork time

Author: Bryan Cantrill <bryan@joyent.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Gordon Ross <gwr@nexenta.com>

illumos/illumos-gate@7bd3c1d12d0c764e1517c3aca62c634409356764

8 years agoModify DTRACEHIOC_ADDDOF to copy the DOF section from the target process.
markj [Mon, 7 Dec 2015 21:44:05 +0000 (21:44 +0000)]
Modify DTRACEHIOC_ADDDOF to copy the DOF section from the target process.

r281257 added support for lazyload mode by allowing dtrace(1) to register
a DOF section on behalf of a traced process. This was implemented by
having libdtrace copy the DOF section into a heap-allocated buffer and
passing its address to the ioctl handler. However, DTrace uses the DOF
section address as a lookup key in certain cases, so the ioctl handler
should be given the target process' DOF section address instead. This
change modifies the ADDDOF handler to copy the DOF section in from the
target process, rather than from dtrace(1).

8 years agoAdd helper functions proc_readmem() and proc_writemem().
markj [Mon, 7 Dec 2015 21:33:15 +0000 (21:33 +0000)]
Add helper functions proc_readmem() and proc_writemem().

These helper functions can be used to read in or write a buffer from or to
an arbitrary process' address space. Without them, this can only be done
using proc_rwmem(), which requires the caller to fill out a uio. This is
onerous and results in code duplication; the new functions provide a simpler
interface which is sufficient for most existing callers of proc_rwmem().

This change also adds a manual page for proc_rwmem() and the new functions.

Reviewed by: jhb, kib
Differential Revision: https://reviews.freebsd.org/D4245

8 years agoThe ccb_xflags enumeration was removed from FreeBSD/head in
ken [Mon, 7 Dec 2015 21:04:27 +0000 (21:04 +0000)]
The ccb_xflags enumeration was removed from FreeBSD/head in
r259397 (it contained the CAM_EXTLUN_VALID bit) and I added the
same type name with a different set of values back in r291716.

The old ccb_xflags enumeration still exists in FreeBSD stable/10.
Shift all of the new values by one bit to avoid compatibility
issues when merged to stable/10.

MFC after: 3 days
Sponsored by: Spectra Logic

8 years agoFix ls -l alignement with new locales
bapt [Mon, 7 Dec 2015 20:48:28 +0000 (20:48 +0000)]
Fix ls -l alignement with new locales

Latest update of locales introduced abbreviated month that follows the regionale
rules meaning that they can be of variable length instead of being arbitrary
truncated to top 3 characters.

To fix alignement, ls now computes the visible length of the abbreviated month,
pads the shorter month with spaces in order to make sure everything is properly
aligned

Reviewed by: ache, ed, jilles
Differential Revision: https://reviews.freebsd.org/D4239

8 years agoelfcopy: exclude extension when converting from binary
emaste [Mon, 7 Dec 2015 20:21:12 +0000 (20:21 +0000)]
elfcopy: exclude extension when converting from binary

When converting from binary to ELF, elfcopy creates symbols
_binary_<filename>_start_, _binary_<filename>_end, and
_binary_<filename>_size. For compatibility with GNU objcopy (and to
produce sensible symbol names) the extension must be stripped off.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4238

8 years agoFix a comment typo in the code example.
brueffer [Mon, 7 Dec 2015 19:21:08 +0000 (19:21 +0000)]
Fix a comment typo in the code example.

PR: 203497
Submitted by: chadf@triularity.org
MFC after: 1 week

8 years agoBuild and install userland .debug files by default
emaste [Mon, 7 Dec 2015 19:15:52 +0000 (19:15 +0000)]
Build and install userland .debug files by default

Debug data files are now built by default with 'make buildworld' and
installed with 'make installworld'. This facilitates debugging but
requires more disk space both during the build and for the installed
world. Debug files may be disabled by setting WITHOUT_DEBUG_FILES=yes
in src.conf(5).

Reviewed by: bdrewery, eadler, vangyzen
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4018

8 years agoAdd an MLINK for m_collapse.
brueffer [Mon, 7 Dec 2015 19:08:33 +0000 (19:08 +0000)]
Add an MLINK for m_collapse.

PR: 204205
Submitted by: avos
MFC after: 1 week

8 years agoWhen setting up VLANs on a Raspberry Pi ethernet port, the MTU drops
hselasky [Mon, 7 Dec 2015 18:55:33 +0000 (18:55 +0000)]
When setting up VLANs on a Raspberry Pi ethernet port, the MTU drops
from 1500 to 1496 bytes. The MTU should remain at 1500, extending the
frame size as per IEEE 802.3. Adding IFCAP_VLAN_MTU to the
if_capabilities field in the smsc driver solves the problem.  The
datasheet for the LAN9512 chip, section 3.2.3 states that the chip
supports the extended frame.

Submitted by: rpp@ci.com.au
MFC after: 1 week
PR: 205050

8 years agoFix spelling of internal hack.
bdrewery [Mon, 7 Dec 2015 18:45:55 +0000 (18:45 +0000)]
Fix spelling of internal hack.

Reported by: ngie

8 years agoReplace magic value ELF note type with NT_FREEBSD_ABI_TAG
emaste [Mon, 7 Dec 2015 18:43:27 +0000 (18:43 +0000)]
Replace magic value ELF note type with NT_FREEBSD_ABI_TAG

As of r291909 elf_common.h provides a definition.

Suggested by: kib
Sponsored by: The FreeBSD Foundation

8 years agoFix a typo in the CPUTYPE list.
brueffer [Mon, 7 Dec 2015 18:39:38 +0000 (18:39 +0000)]
Fix a typo in the CPUTYPE list.

PR: 205099
Submitted by: xxjack12xx@gmail.com
MFC after: 1 week

8 years agoMerge common parts of i386 and amd64 md_var.h and smp.h into
kib [Mon, 7 Dec 2015 17:41:20 +0000 (17:41 +0000)]
Merge common parts of i386 and amd64 md_var.h and smp.h into
new headers x86/include x86_var.h and x86_smp.h.

Reviewed by: emaste, jhb
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D4358

8 years agoUse ANSI C definition.
kib [Mon, 7 Dec 2015 17:24:55 +0000 (17:24 +0000)]
Use ANSI C definition.

MFC after: 1 week

8 years agoSet %esp correctly in the extended TSS.
jhb [Mon, 7 Dec 2015 16:27:11 +0000 (16:27 +0000)]
Set %esp correctly in the extended TSS.

The pcb is saved at the top of the kernel stack on x86 platforms.
The initial kenrel stack pointer is set in the TSS so that the trapframe
from user -> kernel transitions begins directly below the pcb and grows
down.

The XSAVE changes moved the FPU save area out of the pcb and into a
variable-sized area after the pcb.  This required updating the expressions
to calculate the initial stack pointer from 'stacktop - sizeof(pcb)' to
'stacktop - sizeof(pcb) + FPU save area size'.

The i386_set_ioperm() system call allows user applications to access
individual I/O ports via the I/O port permission bitmap in the TSS.
On FreeBSD this requires allocating a custom per-process TSS instead of
using the shared per-CPU TSS.

The expression to initialize the initial kernel stack pointer in the
per-process TSS created for i386_set_ioperm() was not properly updated
after the XSAVE changes.  Processes that used i386_set_ioperm() would
trash the trapframe during subsequent context switches resulting in
panics from memory corruption.

This changes fixes the kernel stack pointer calculation for the per-process
TSS.

Reviewed by: kib, n_hibma
Reported by: n_hibma
MFC after: 1 week

8 years agoGarbage collect removed directories.
bdrewery [Mon, 7 Dec 2015 16:08:26 +0000 (16:08 +0000)]
Garbage collect removed directories.

Sponsored by: EMC / Isilon Storage Division

8 years agoFAST_DEPEND: Only pass -MF if we care about the object being compiled.
bdrewery [Mon, 7 Dec 2015 16:08:22 +0000 (16:08 +0000)]
FAST_DEPEND: Only pass -MF if we care about the object being compiled.

This will save time generating dependency files that we didn't expect
due to cases where SRCS!=OBJS or for building custom targetted objects
in Makefiles that do not end up in the DEPENDOBJS list.

This uses a bmake trick to modify CFLAGS based on ${.TARGET}.  A
.PARSEDIR check is done for the sake of MFC safety.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoFAST_DEPEND: Move handling code below yacc/lex/dtrace code that modified SRCS.
bdrewery [Mon, 7 Dec 2015 16:08:19 +0000 (16:08 +0000)]
FAST_DEPEND: Move handling code below yacc/lex/dtrace code that modified SRCS.

This fixes some of those newly added SRCS not having their depend files
included.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoFAST_DEPEND: Only try to use dependencies from C/C++ SRCS as mkdep did.
bdrewery [Mon, 7 Dec 2015 16:08:16 +0000 (16:08 +0000)]
FAST_DEPEND: Only try to use dependencies from C/C++ SRCS as mkdep did.

Rather than try to guess at all of the OBJS variables just use SRCS
using the same patterns that mkdep does.  This also fixes a mistake
where dependencies were being generated with FAST_DEPEND when they were
not for mkdep.  This happens when OBJS!=SRCS as is the case in
gnu/lib/csu where SRCS has 1 file and OBJS has several other files that
does not even contain the 1 SRCS file.  Generally in these cases the
OBJS have custom dependencies defined in their Makefile.  If we generate
dependencies for those and then load a .depend file, then .IMPSRC may
contain duplicate sources and lead to errors such as:
  cc: error: cannot specify -o when generating multiple output files

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd missing CLEANFILES.
bdrewery [Mon, 7 Dec 2015 16:08:13 +0000 (16:08 +0000)]
Add missing CLEANFILES.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoReplace unneeded manual dependency on header by adding it to SRCS.
bdrewery [Mon, 7 Dec 2015 16:08:09 +0000 (16:08 +0000)]
Replace unneeded manual dependency on header by adding it to SRCS.

bsd.lib.mk and bsd.prog.mk already depend all objs on headers in SRCS if
there is not yet a depend file.  The headers in SRCS are never built or
installed.  After 'make depend' the header was already added as a proper
dependency on the objects where needed.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoUpdate the mlx5 shared driver code to the latest version, which
hselasky [Mon, 7 Dec 2015 13:16:48 +0000 (13:16 +0000)]
Update the mlx5 shared driver code to the latest version, which
include the following list of changes:

- Added eswitch ACL table management
  Introduce API for managing ACL table.
  This API include the following features:
  1) vlan filter - for VST/VGT+ support.
  2) spoofcheck.
  3) robust functionality to allow/drop general untagged/tagged traffic.
  4) support for both ingress and egress ACL types.

- Added loopback filter to the vacl table.

- Added multicast list set in the vPort context

- Added promiscuous mode set in the vPort context

- Set the vlan list in vPort context
  1) Check caps if VLAN list is not longer than FW supports
  2) Set MODIFY_NIC_VPORT_CONTEXT command

- Changed MLX5_EEPROM_MAX_BYTES from 48 to 32 so that a single EEPROM
  reading cannot cross the 128-byte boundary. Previously reading the
  MCIA register was done in batches of 48 bytes. The third reading
  would then by-pass the 127th byte, which means that part of the low
  page and part of the high page would be read at the same time, which
  created a bug:
    1st: 0-47 bytes
    2nd: 48-95 bytes
    3rd: 96-143 bytes

MFC after: 1 week
Sponsored by: Mellanox Technologies
Differential Revision: https://reviews.freebsd.org/D4411

8 years agoAdd full support for Receive Side Scaling, RSS, to the mlx5en
hselasky [Mon, 7 Dec 2015 12:38:51 +0000 (12:38 +0000)]
Add full support for Receive Side Scaling, RSS, to the mlx5en
driver. This includes binding all interrupt and worker threads
according to the RSS configuration, setting up correct Toeplitz
hashing keys as given by RSS and setting the correct mbuf
hashtype for all received traffic.

MFC after: 1 week
Sponsored by: Mellanox Technologies
Differential Revision: https://reviews.freebsd.org/D4410

8 years agoAdd support for usermode (vdso-like) gettimeofday(2) and
kib [Mon, 7 Dec 2015 12:20:26 +0000 (12:20 +0000)]
Add support for usermode (vdso-like) gettimeofday(2) and
clock_gettime(2) on ARMv7 and ARMv8 systems which have architectural
generic timer hardware. It is similar how the RDTSC timer is used in
userspace on x86.

Fix a permission problem where generic timer access from EL0 (or
userspace on v7) was not properly initialized on APs.

For ARMv7, mark the stack non-executable. The shared page is added for
all arms (including ARMv8 64bit), and the signal trampoline code is
moved to the page.

Reviewed by: andrew
Discussed with: emaste, mmel
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D4209

8 years agoUpdate ctime when atime or birthtime are updated.
kib [Mon, 7 Dec 2015 12:09:04 +0000 (12:09 +0000)]
Update ctime when atime or birthtime are updated.

Cleanup setting of ctime/mtime/birthtime: do not set IN_ACCESS or
IN_UPDATE, then clear them with ufs_itimes(), making transient
(possibly inconsistent) change to the times, and then copy
user-supplied times into the inode.  Instead, directly clear IN_ACCESS
or IN_UPDATE when user supplied the time, and copy the value into the
inode.

Minor inconsistency left is that the inode ctime is updated even when
birthtime update attempt is performed on a UFS1 volume.

Submitted by: bde
MFC after: 2 weeks

8 years agoAdd support for setting the TX moderation mode via a sysctl entry. TX
hselasky [Mon, 7 Dec 2015 11:04:50 +0000 (11:04 +0000)]
Add support for setting the TX moderation mode via a sysctl entry. TX
completion events can be moderated in the same way like RX completion
events. Expose this functionality by a sysctl variable.

MFC after: 1 week
Sponsored by: Mellanox Technologies
Differential Revision: https://reviews.freebsd.org/D4409

8 years agoThe firmware no longer supports setting a port MTU of zero bytes.
hselasky [Mon, 7 Dec 2015 10:57:42 +0000 (10:57 +0000)]
The firmware no longer supports setting a port MTU of zero bytes.
Set the port MTU and then query it and report if any problems instead.

MFC after: 1 week
Submitted by: Shahar Klein <shahark@mellanox.com>
Sponsored by: Mellanox Technologies
Differential Revision: https://reviews.freebsd.org/D4408

8 years agoStart to split apart the different image formats that we need to
imp [Mon, 7 Dec 2015 10:24:40 +0000 (10:24 +0000)]
Start to split apart the different image formats that we need to
make. Add support for generating powerpc64 qemu images. We
can generate them, but there's something wrong booting them.
This also simplifies the user config files a bit, and removes
bits no longer true.

8 years agoMake sure to quote the arg after -n and -z tests.
imp [Mon, 7 Dec 2015 10:24:38 +0000 (10:24 +0000)]
Make sure to quote the arg after -n and -z tests.

8 years agosfxge: [2/6] rework MCDI response polling
arybchik [Mon, 7 Dec 2015 07:22:21 +0000 (07:22 +0000)]
sfxge: [2/6] rework MCDI response polling

Required to support MCDI proxy authorization.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D4418

8 years agosfxge: [1/6] add common code MCDI proxy auth build option
arybchik [Mon, 7 Dec 2015 07:20:49 +0000 (07:20 +0000)]
sfxge: [1/6] add common code MCDI proxy auth build option

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D4417

8 years agosfxge: fix pointer parameter/value signedness mismatch warnings
arybchik [Mon, 7 Dec 2015 06:07:01 +0000 (06:07 +0000)]
sfxge: fix pointer parameter/value signedness mismatch warnings

TLV routines use 'uint8_t *', NVRAM code uses caddr_t. Just cast to
required type to fix the warning.

Required to build with -Werror=pointer-signg.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4391

8 years agosfxge: fix name conflict with crc32_table from sys/crc32.h
arybchik [Mon, 7 Dec 2015 06:05:23 +0000 (06:05 +0000)]
sfxge: fix name conflict with crc32_table from sys/crc32.h

The header is not present on FreeBSD, but exists on OmniOS where sfxge
common code is used as well.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4390

8 years agosfxge: switch to TxQ creation specific flags
arybchik [Mon, 7 Dec 2015 06:04:24 +0000 (06:04 +0000)]
sfxge: switch to TxQ creation specific flags

It is better do not mix TxQ creation and receive event flags since only
checksum flags are applicable to TxQ.
Also it will allow to add a new TxQ creation specific flags.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after: 2    days
Differential Revision: https://reviews.freebsd.org/D4389

8 years agosfxge: [Sorrento] support writing of MUM firmware
arybchik [Mon, 7 Dec 2015 06:01:14 +0000 (06:01 +0000)]
sfxge: [Sorrento] support writing of MUM firmware

When writing the MUM firmware the chunk size must be equal to the erase
size.

Submitted by:   Laurence Evans <levans at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4388

8 years agosfxge: support PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED flag
arybchik [Mon, 7 Dec 2015 05:59:24 +0000 (05:59 +0000)]
sfxge: support PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED flag

Use flag on vadapter alloc when reported as a supported capability.
Use the slow device reset only when the capability is missing.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4387

8 years agoDocument the different config files.
imp [Mon, 7 Dec 2015 05:13:29 +0000 (05:13 +0000)]
Document the different config files.
Document how to run qemu for the ones I've run.
Use qcow2 for all qemu images.

8 years agoImprove cam tracing a little by including the function code in the
imp [Mon, 7 Dec 2015 04:14:29 +0000 (04:14 +0000)]
Improve cam tracing a little by including the function code in the
traces for xpt_action. Note up-calls (down-calls?) to the SIM as well.

Differential Review: https://reviews.freebsd.org/D4382

8 years agoEnable bin/ls testcases disabled previously because of issues with how
ngie [Mon, 7 Dec 2015 04:03:01 +0000 (04:03 +0000)]
Enable bin/ls testcases disabled previously because of issues with how
kyua 0.11's version of report-junit was rendering non-printable characters

Upgrade to kyua 0.12 to obtain a fixed version of the command

Output verified with python 2.7.10's xml.dom.minidom module

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

8 years agoNow that we have dedup of mtree elements in nanobsd, remove the
imp [Mon, 7 Dec 2015 04:02:59 +0000 (04:02 +0000)]
Now that we have dedup of mtree elements in nanobsd, remove the
primitive attempt we made here.

8 years agoFix up mtree with additional entries written to it by
imp [Mon, 7 Dec 2015 04:02:52 +0000 (04:02 +0000)]
Fix up mtree with additional entries written to it by
nanobsd. implement support for NanoBSD touching a file (and possibly
recording that fact) as well as replacing a directory with a symlink.
Also specify the default uname and gname for files and use that as a
/set command at the top of the generated METALOG file.

8 years agoDisable /entropy by default. /var/db/entropy should be enough.
imp [Mon, 7 Dec 2015 04:02:42 +0000 (04:02 +0000)]
Disable /entropy by default. /var/db/entropy should be enough.
# This eliminates the warning message at boot, but more work may be
# needed.

8 years agoimported patch dedup
imp [Mon, 7 Dec 2015 04:02:34 +0000 (04:02 +0000)]
imported patch dedup

8 years agoAllow the .cfg files to specify the ultimate format for the images
imp [Mon, 7 Dec 2015 04:02:32 +0000 (04:02 +0000)]
Allow the .cfg files to specify the ultimate format for the images
created.

8 years agoGenerally use shorter, more idiomatic sh expressions in a bunch of
imp [Mon, 7 Dec 2015 04:02:31 +0000 (04:02 +0000)]
Generally use shorter, more idiomatic sh expressions in a bunch of
places.

8 years agoDefault serial connection to 115200. Hardly anybody uses slower these
imp [Mon, 7 Dec 2015 04:02:19 +0000 (04:02 +0000)]
Default serial connection to 115200. Hardly anybody uses slower these
days, and those that do can use NANO_BOOT2CFG to change it.

8 years agoFix panic on shutdown due to iscsi event priority
smh [Mon, 7 Dec 2015 02:56:08 +0000 (02:56 +0000)]
Fix panic on shutdown due to iscsi event priority

iscsi's shutdown_pre_sync prio was SHUTDOWN_PRI_FIRST which caused it to
run before other high priority handlers such as filesystems e.g. ZFS.

This meant the iscsi sessions where removed before the ZFS geom consumer
was closed, resulting in a panic from g_access calls on debug kernels
due to negative acr.

Instead use the same as the old iscsi_initiator SHUTDOWN_PRI_DEFAULT-1
which allows it to run before dashutdown etc but after filesystems.

MFC after: 2 weeks
Sponsored by: Multiplay

8 years agoAdd definitions for ELF note types used in executables
emaste [Sun, 6 Dec 2015 21:16:01 +0000 (21:16 +0000)]
Add definitions for ELF note types used in executables

Sponsored by: The FreeBSD Foundation

8 years agoFix leak in mkfs_msdos(..) by initializing img to NULL and free'ing at the end
ngie [Sun, 6 Dec 2015 21:07:33 +0000 (21:07 +0000)]
Fix leak in mkfs_msdos(..) by initializing img to NULL and free'ing at the end
of the function

Differential Revision: https://reviews.freebsd.org/D4405
MFC after: 1 week
PR: 204943
Reviewed by: emaste, jilles
Reported by: David Binderman <dcb314@hotmail.com>
Sponsored by: EMC / Isilon Storage Division

8 years agovm_fault_hold: handle vm_page_rename failure
cem [Sun, 6 Dec 2015 17:46:12 +0000 (17:46 +0000)]
vm_fault_hold: handle vm_page_rename failure

On vm_page_rename failure, fix a missing object unlock and a double free of
a page.

First remove the old page, then rename into other page into first_object,
then free the old page.  This avoids the problem on rename failure.  This is
a little ugly but seems to be the most straightforward solution.

Tested with:
  $ sysctl debug.fail_point.uma_zalloc_arg="1%return"
  $ kyua test -k /usr/tests/sys/Kyuafile

Submitted by: Ryan Libby <rlibby@gmail.com>
Reviewed by: kib
Seen by: alc
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4326

8 years agopmap_invalidate_range: For very large ranges, flush the whole TLB
cem [Sun, 6 Dec 2015 17:39:13 +0000 (17:39 +0000)]
pmap_invalidate_range: For very large ranges, flush the whole TLB

Typical TLBs have 40-512 entries available.  At some point, iterating
every single page in a requested invalidation range and issuing invlpg
on it is more expensive than flushing the TLB and allowing it to reload
on demand.

Broadwell CPUs have 1536 L2 TLB entries, so I've picked the arbitrary
number 4096 entries as a hueristic at which point we flush TLB rather
than invalidating every single potential page.

Reviewed by: alc
Feedback from: jhb, kib
MFC notes: Depends on r291688
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4280

8 years agoFix the allocation of outgoing streams:
tuexen [Sun, 6 Dec 2015 16:17:57 +0000 (16:17 +0000)]
Fix the allocation of outgoing streams:
* When processing a cookie, use the number of
  streams announced in the INIT-ACK.
* When sending an INIT-ACK for an existing
  association, use the value from the association,
  not from the end-point.

MFC after: 1 week

8 years agosh: Add limited test for ${#@} and ${#*}.
jilles [Sun, 6 Dec 2015 14:09:31 +0000 (14:09 +0000)]
sh: Add limited test for ${#@} and ${#*}.

POSIX leaves the result of expanding ${#@} and ${#*} unspecified, but ensure
it is numeric.

8 years ago- Fix Tx queues to USB endpoints mapping
kevlo [Sun, 6 Dec 2015 14:07:57 +0000 (14:07 +0000)]
- Fix Tx queues to USB endpoints mapping
- Merge urtwn_r92c_dma_init() and urtwn_r88e_dma_init() into one

Reviewed by: adrian, avos
Differential Revision: https://reviews.freebsd.org/D4381

8 years agoRemove unused atf.test.mk variables
ngie [Sun, 6 Dec 2015 07:30:18 +0000 (07:30 +0000)]
Remove unused atf.test.mk variables

- ATF_BUILD_CC
- ATF_BUILD_CPP
- ATF_BUILD_CXX
- ATF_SHELL
- ATF_PREFIX

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoRemove redundant default TESTSDIR that is already defined in bsd.test.mk
ngie [Sun, 6 Dec 2015 07:00:23 +0000 (07:00 +0000)]
Remove redundant default TESTSDIR that is already defined in bsd.test.mk
after r289158

MFC after: 1 week
X-MFC with: r289158
Sponsored by: EMC / Isilon Storage Division

8 years agoUse .Fx instead of explicitly spelling out FreeBSD
ngie [Sun, 6 Dec 2015 06:53:37 +0000 (06:53 +0000)]
Use .Fx instead of explicitly spelling out FreeBSD

Fix several warnings reported by igor

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoAdapt to new wireless scheme where base wlan interfaces do not show up in
nwhitehorn [Sun, 6 Dec 2015 00:20:45 +0000 (00:20 +0000)]
Adapt to new wireless scheme where base wlan interfaces do not show up in
ifconfig anymore.

8 years agoRemove stray unescaped `%` in `Booting from ...` informational message
ngie [Sat, 5 Dec 2015 23:59:30 +0000 (23:59 +0000)]
Remove stray unescaped `%` in `Booting from ...` informational message

PR: 204944
MFC after: 1 week
X-MFC with: r291164
Reported by: David Binderman <dcb314@hotmail.com>
Sponsored by: EMC / Isilon Storage Division

8 years agoThere is no priority request queue on 16Gig chips.
mav [Sat, 5 Dec 2015 22:07:02 +0000 (22:07 +0000)]
There is no priority request queue on 16Gig chips.

8 years agoRework WWNs generation to make cards without NVRAM more useful.
mav [Sat, 5 Dec 2015 21:38:04 +0000 (21:38 +0000)]
Rework WWNs generation to make cards without NVRAM more useful.

8 years agoFix regression in r291738: This really wants -lssp.
bdrewery [Sat, 5 Dec 2015 18:56:21 +0000 (18:56 +0000)]
Fix regression in r291738: This really wants -lssp.

The normal LIBADD is ssp_nonshared.  This also had a DPADD on LIBSSP which
does not actually exist, it is blank.

Sponsored by: EMC / Isilon Storage Division

8 years agoWhen building no-priv, chmod etc/defaults/rc.conf before appending to
imp [Sat, 5 Dec 2015 17:40:11 +0000 (17:40 +0000)]
When building no-priv, chmod etc/defaults/rc.conf before appending to
it and then chmod back.  There's no chmod -push / chmod -pop so hard
code 444 as the right permissions here.

Also, fix more stray detritus that crept in (out?) while re-arranging
the deck chairs.

8 years agosfxge: erase nvram partitions in chunks equal to their erase size
arybchik [Sat, 5 Dec 2015 17:11:14 +0000 (17:11 +0000)]
sfxge: erase nvram partitions in chunks equal to their erase size

The erase size is reported by the nvram info command.

Submitted by:   Paul Fox <pfox at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4386

8 years agostyle.9: Add a small blurb about allowing bool
cem [Sat, 5 Dec 2015 17:01:38 +0000 (17:01 +0000)]
style.9: Add a small blurb about allowing bool

It was allowed before, but make it very explicit it is allowed now.  And
prefer 'bool' to older types that were used for the same purpose -- int and
boolean_t.

Like with the C99 fixed-width types, use common sense when changing old
code.

No igor regressions.

Suggested by: bde <20151205031713.T3286@besplex.bde.org>
Reviewed by: glebius, davide, bapt (earlier versions)
Reviewed by: imp
Feedback from: julian
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4384

8 years agoStupid last minute changes: Add missing } and fi
imp [Sat, 5 Dec 2015 16:28:14 +0000 (16:28 +0000)]
Stupid last minute changes: Add missing } and fi

Pointed out by: Howard Su

8 years agoRemove a duplicate definition.
kevlo [Sat, 5 Dec 2015 15:09:19 +0000 (15:09 +0000)]
Remove a duplicate definition.

8 years agourtwn: fix some regressions after r290630
avos [Sat, 5 Dec 2015 15:08:01 +0000 (15:08 +0000)]
urtwn: fix some regressions after r290630

- Restore R92C_TXDW4_HWSEQ_EN bit - it is used by non-8188EU chips.
- Fix DRVRATE bit usage.

Tested with:
 - RTL8188EU, STA mode.
 - RTL8188CUS, STA mode.

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4352

8 years agosh: Link tests/parameters/positional8.0 to the build.
jilles [Sat, 5 Dec 2015 12:55:34 +0000 (12:55 +0000)]
sh: Link tests/parameters/positional8.0 to the build.

This was forgotten in r291025.

8 years agoFix RSS build.
np [Sat, 5 Dec 2015 10:10:18 +0000 (10:10 +0000)]
Fix RSS build.

Reported by: arybchik@

8 years agoAllow the artificial profile frames to be adjusted as needed by the user.
andrew [Sat, 5 Dec 2015 10:00:01 +0000 (10:00 +0000)]
Allow the artificial profile frames to be adjusted as needed by the user.
While here update for armv6 to a tested value.

Submitted by: Howard Su <howard0su@gmail.com>
Reviewed by: stat
Differential Revision: https://reviews.freebsd.org/D4315

8 years agoRemove LLE read lock from IPv4 fast path.
melifaro [Sat, 5 Dec 2015 09:50:37 +0000 (09:50 +0000)]
Remove LLE read lock from IPv4 fast path.

LLE structure is mostly unchanged during its lifecycle.
To be more specific, there are 2 things relevant for fast path
  lookup code:
1) link-level address change. Since r286722, these updates are performed
  under AFDATA WLOCK.
2) Some sort of feedback indicating that this particular entry is used so
  we re-send arp request to perform reachability verification instead of
  expiring entry. The only signal that is needed from fast path is something
  like binary yes/no.

The latter is solved by the following changes:
1) introduce special r_skip_req field which is read lockless by fast path,
  but updated under (new) req_mutex mutex. If this field is non-zero, then
  fast path will acquire lock and set it back to 0.
2) introduce simple state machine: incomplete->reachable<->verify->deleted.
  Before that we implicitely had incomplete->reachable->deleted state machine,
  with V_arpt_keep between "reachable" and "deleted". Verification was performed
  in runtime 5 seconds before V_arpt_keep expire.
  This is changed to "change state to verify 5 seconds before V_arpt_keep,
  set r_skip_req to non-zero value and check it every second". If the value
  is zero - then send arp verification probe.
These changes do not introduce any signifficant control plane overhead:
  typically lle callout timer would fire 1 time more each V_arpt_keep (1200s)
  for used lles and up to arp_maxtries (5) for dead lles.

As a result, all packets towards "reachable" lle are handled by fast path without
acquiring lle read lock.

Additional "req_mutex" is needed because callout / arpresolve_slow() or eventhandler
  might keep LLE lock for signifficant amount of time, which might not be feasible
  for fast path locking (e.g. having rmlock as ether AFDATA or lltable own lock).

Differential Revision: https://reviews.freebsd.org/D3688

8 years agoMove the check to see if we are tracing a function with the DTrace Function
andrew [Sat, 5 Dec 2015 09:32:36 +0000 (09:32 +0000)]
Move the check to see if we are tracing a function with the DTrace Function
Boundary Trace to assembly to reduce the overhead of these checks.

Submitted by: Howard Su <howard0su@gmail.com>
Relnotes: Yes
Differential Revision: https://reviews.freebsd.org/D4266

8 years agoIt seems that at least some KVM versions advertise support for EIO
kib [Sat, 5 Dec 2015 08:52:37 +0000 (08:52 +0000)]
It seems that at least some KVM versions advertise support for EIO
suppression but the version of the IOAPIC reported is 0x11 and neither
IOAPIC EOIR nor the Linux trick of temporal reprogramming of the pin
to edge-trigger mode to issue EOI work.

Disable eoi suppression if KVM is detected.  The mode can still be
forced with the tunable.

Reported and tested by: Roman Mamontov <mr.xanto@gmail.com>
Sponsored by: The FreeBSD Foundation

8 years agoIn the pmap_set_pg() function, which enables the global bit on the
kib [Sat, 5 Dec 2015 08:46:41 +0000 (08:46 +0000)]
In the pmap_set_pg() function, which enables the global bit on the
ptes mapping the kernel on CPUs where global TLB entries are
supported, revert to flushing only non-global entries, i.e. to the
pre-r291688 state.  There is no need to flush global TLB entries,
since only global entries created during the previous iterations of
the loop could exist at this moment.

Submitted by: alc
Differential revision: https://reviews.freebsd.org/D4368

8 years agosfxge: pick up the new TLV structures
arybchik [Sat, 5 Dec 2015 08:34:51 +0000 (08:34 +0000)]
sfxge: pick up the new TLV structures

The header is auto-generated from firmware sources.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: cleanup: remove set but not used trailer variable
arybchik [Sat, 5 Dec 2015 08:26:16 +0000 (08:26 +0000)]
sfxge: cleanup: remove set but not used trailer variable

Required to build with -Werror=unused-but-set-variable.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: cleanup: remove set but not used variable with parse error indication
arybchik [Sat, 5 Dec 2015 08:24:54 +0000 (08:24 +0000)]
sfxge: cleanup: remove set but not used variable with parse error indication

Required to build with -Werror=unused-but-set-variable.
Keep it under #if 0 as a reminder for parse error processing.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: cleanup: remove set but not used saved_spec variable
arybchik [Sat, 5 Dec 2015 08:21:45 +0000 (08:21 +0000)]
sfxge: cleanup: remove set but not used saved_spec variable

Required to build with -Werror=unused-but-set-variable.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: cleanup: remove SFL9122 "Huntington" PCI IDs
arybchik [Sat, 5 Dec 2015 08:10:32 +0000 (08:10 +0000)]
sfxge: cleanup: remove SFL9122 "Huntington" PCI IDs

The SFL9122 "Huntington" controller was never built.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: support for MCDI logging implemented
arybchik [Sat, 5 Dec 2015 07:04:11 +0000 (07:04 +0000)]
sfxge: support for MCDI logging implemented

Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4355

8 years agoNew config files for embedded boards.
imp [Sat, 5 Dec 2015 04:43:56 +0000 (04:43 +0000)]
New config files for embedded boards.
Build with ../nanobsd.sh -c rpi.cfg, for example.
This can be done as a normal user.

This is a work in progress. It relies on the new nopriv
build stuff committed to nanobsd, but isn't complete yet.
Currently, one must copy files into the DOS partition
in the image. Also, ownership isn't preserved because
this doesn't use the new mtree-dedup.awk yet, but rather
some crazy mtree stuff. The image building bits will
move up into nanobsd when they are ready.

Also includes very preliminary support for building qemu
images for all platforms that we can for qemu. It is
missing aarch64, and we put the image on s2 instead of
s1 and mkimg can't mark s2 as active, so there's some
issues. Oh, and I didn't do it for arm.

Take a look, kick the tires, expect problems.

8 years agoInitialize errno to 0 in the nul testcase before testing it
ngie [Sat, 5 Dec 2015 04:10:15 +0000 (04:10 +0000)]
Initialize errno to 0 in the nul testcase before testing it

For some odd reason stable/10 requires this, otherwise it always fails
the errno == 0 check on line 196.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix -Wformat issues and minor whitespace issues in surrounding areas
ngie [Sat, 5 Dec 2015 02:25:20 +0000 (02:25 +0000)]
Fix -Wformat issues and minor whitespace issues in surrounding areas

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agosplit.ih:
ngie [Sat, 5 Dec 2015 02:23:44 +0000 (02:23 +0000)]
split.ih:
- Create automatically generated include header for split.c

main.c:
- Use function definitions from debug.ih and split.ih instead of externs

Sponsored by: EMC / Isilon Storage Division

8 years agoUse `==` instead of `=` in the function comment above split(..) so mkh -p
ngie [Sat, 5 Dec 2015 02:18:36 +0000 (02:18 +0000)]
Use `==` instead of `=` in the function comment above split(..) so mkh -p
exposes split(..).

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoUse ANSI C function prototypes/definitions instead of K&R style ones
ngie [Sat, 5 Dec 2015 02:07:55 +0000 (02:07 +0000)]
Use ANSI C function prototypes/definitions instead of K&R style ones

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd missing headers and sort #includes per style(9)
ngie [Sat, 5 Dec 2015 01:19:35 +0000 (01:19 +0000)]
Add missing headers and sort #includes per style(9)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years ago- Use ANSI C function prototypes/definitions instead of K&R style ones
ngie [Sat, 5 Dec 2015 01:13:18 +0000 (01:13 +0000)]
- Use ANSI C function prototypes/definitions instead of K&R style ones
- Add a missing return type for main(..)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoFix -Wformat warnings by using the correct format qualifiers
ngie [Sat, 5 Dec 2015 01:12:58 +0000 (01:12 +0000)]
Fix -Wformat warnings by using the correct format qualifiers

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoAwk helper script that reads in a mtree METALOG file from installworld
imp [Sat, 5 Dec 2015 01:12:44 +0000 (01:12 +0000)]
Awk helper script that reads in a mtree METALOG file from installworld
(and soon augmented by nanobsd), performs the actions documented in
the script, and then spits out a new mtree file suitable for feeding
to makefs.

Discussed on: arch@

8 years agoSetting NANO_NOPRIV_BUILD will now add -DNO_ROOT and METALOG=xxxx as
imp [Sat, 5 Dec 2015 01:10:04 +0000 (01:10 +0000)]
Setting NANO_NOPRIV_BUILD will now add -DNO_ROOT and METALOG=xxxx as
appropriate. First step in supporting a build w/o root. More to
follow as actions by customization scripts are not (yet) recorded in
the metalog, and duplicate entries in it aren't removed.

8 years agoSRCCONF makes no sense in make.conf. Don't set it there. Rely on it
imp [Sat, 5 Dec 2015 00:54:43 +0000 (00:54 +0000)]
SRCCONF makes no sense in make.conf. Don't set it there. Rely on it
being in the environment. Also filter out the new SRC_ENV_CONF as
well. If you really need these set, set them in your config file,
not in the build environment used to launch nanobsd.

Pointed out by: bdrewery@