]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoMFhead @ r293006
ngie [Thu, 31 Dec 2015 21:51:38 +0000 (21:51 +0000)]
MFhead @ r293006

8 years agosh: Remove redundant CTLQUOTEMARK checks.
jilles [Thu, 31 Dec 2015 20:15:57 +0000 (20:15 +0000)]
sh: Remove redundant CTLQUOTEMARK checks.

With the new expand.c code, the intermediate representation passed to the
pathname generation code only contains CTLESC, not CTLQUOTEMARK.

CTLQUOTEMARK now only occurs in the text of NARG nodes (output of the
parser).

8 years agoIntroduce the ZFS Boot Environments menu to the loader menu
allanjude [Thu, 31 Dec 2015 20:00:53 +0000 (20:00 +0000)]
Introduce the ZFS Boot Environments menu to the loader menu

If the system was booted with ZFS, a new menu item (#7) appears
It contains an autogenerated list of ZFS Boot Environments

This allows the user to switch to an alternate root file system
Use Cases:
 - Revert a failed upgrade
 - Concurrently run different versions of FreeBSD with common home directory
 - Easier integration with the sysadmin/beadm utility

Requested by: many
Reviewed by: dteske
MFC after: 10 days
Relnotes: yes
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D3167

8 years agoRemove supposition comment that code would better live elsewhere.
dteske [Thu, 31 Dec 2015 19:37:14 +0000 (19:37 +0000)]
Remove supposition comment that code would better live elsewhere.
Thinking this through, and looking at process_assignment, I believe
moving the code would be wrong considering that set_conf_files is
called in one condition while set_nextboot_conf is guarded by a
different condition of having nextboot_enable="YES". So these must
stay separated and not combined.

MFC after: 1 week

8 years agoFix a memory leak. nextboot_conf_file is not volatile, as far as I
dteske [Thu, 31 Dec 2015 19:33:17 +0000 (19:33 +0000)]
Fix a memory leak. nextboot_conf_file is not volatile, as far as I
can tell, and thus the strdup is entirely unnecessary.

Thanks to: Toomas Soome (tsoome at-me dot-com)
MFC after: 1 week

8 years agonewvers.sh: put variable assignments on separate lines
emaste [Thu, 31 Dec 2015 19:25:35 +0000 (19:25 +0000)]
newvers.sh: put variable assignments on separate lines

This makes it easier to grep for where they're set, and may simplify
future merging for FreeBSD derivatives that change these.

8 years agoRemove debugging messages. NB: SVN r187143 reads:
dteske [Thu, 31 Dec 2015 19:00:45 +0000 (19:00 +0000)]
Remove debugging messages. NB: SVN r187143 reads:
comment out some debugging messages that slipped in by mistake
(removing them 7 years after they have been commented out)

MFC after: 1 week

8 years agosh: Reindent expandmeta().
jilles [Thu, 31 Dec 2015 18:56:11 +0000 (18:56 +0000)]
sh: Reindent expandmeta().

8 years agosh: Perform pathname generation during the first expansion phases.
jilles [Thu, 31 Dec 2015 18:47:54 +0000 (18:47 +0000)]
sh: Perform pathname generation during the first expansion phases.

This avoids the need to add and remove CTLESC bytes if pathname generation
will not be performed (set -f).

Side effect: the order of operations is slightly different: pathname
generation in ${$+* $(CMD)} will not see filesystem changes from CMD.

8 years agoWhen building libstand for arm, don't emit instructions that require
ian [Thu, 31 Dec 2015 18:29:24 +0000 (18:29 +0000)]
When building libstand for arm, don't emit instructions that require
relocation fixups unsupported by the self_reloc() code, and don't optimize
memcpy/memset using floating point registers, because in a standalone
environment nothing has initialized the fpu hardware.

8 years agoAdd suppoort for the Sitecom LN-031
kp [Thu, 31 Dec 2015 18:12:35 +0000 (18:12 +0000)]
Add suppoort for the Sitecom LN-031

This is an AX88178 chip, which we already support so all we have to do is add
the USB product and vendor ID.

8 years agosh: Perform IFS splitting during the first expansion phases.
jilles [Thu, 31 Dec 2015 17:51:15 +0000 (17:51 +0000)]
sh: Perform IFS splitting during the first expansion phases.

This simplifies the code and should be faster in some cases.

Side effect: the order of operations is different so that the value of IFS
used when IFS is modified during expansion (${IFS:=...}, ${IFS=...} or
$((...IFS=...))) may be different. Note that this order is highly unportable
between shells.

8 years agoHandle when filedescriptors are closed before initialized. An early
hselasky [Thu, 31 Dec 2015 14:47:45 +0000 (14:47 +0000)]
Handle when filedescriptors are closed before initialized. An early
fdclose() call can cause fget_unlocked() to fail.

Found by: mjg @
MFC after: 1 week
Reviewed by: Mark Block <markb@mellanox.com>
Sponsored by: Mellanox Technologies
Differential Revision: https://reviews.freebsd.org/D4351

8 years agoMinor LinuxKPI code cleanup:
hselasky [Thu, 31 Dec 2015 12:30:19 +0000 (12:30 +0000)]
Minor LinuxKPI code cleanup:
- Declare some static functions in linux_compat.c instead if inside
  various header files.
- Prefix FreeBSD local functions in the LinuxKPI with "linux_" to
  avoid symbol name conflicts in the future and to make debugging
  easier.
- Make the "struct kobj_ktype" declaractions constant to shave off a
  few bytes from the data segment.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoMake the kobject refcounting compliant with Linux. Refcounting on the
hselasky [Thu, 31 Dec 2015 11:27:36 +0000 (11:27 +0000)]
Make the kobject refcounting compliant with Linux. Refcounting on the
parent kobject cannot be factored out and must be done by the kobject
consumers.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoBump copyright year.
bz [Thu, 31 Dec 2015 11:21:45 +0000 (11:21 +0000)]
Bump copyright year.

Happy New Year 2016!

8 years agoRemove unused variable after r292981 to unbreak the build.
bz [Thu, 31 Dec 2015 10:55:50 +0000 (10:55 +0000)]
Remove unused variable after r292981 to unbreak the build.

8 years agoClean up unused-but-set-variable spotted by gcc-4.9.
araujo [Thu, 31 Dec 2015 07:08:21 +0000 (07:08 +0000)]
Clean up unused-but-set-variable spotted by gcc-4.9.

Reviewed by: grehan
Approved by: rodrigc (mentor)
Differential Revision: https://reviews.freebsd.org/D4734

8 years agoClean up unused-but-set-variable spotted by gcc4.9.
araujo [Thu, 31 Dec 2015 07:03:41 +0000 (07:03 +0000)]
Clean up unused-but-set-variable spotted by gcc4.9.

Reviewed by: ngie
Approved by: rodrigc (mentor)
Differential Revision: https://reviews.freebsd.org/D4719

8 years agoImplement interface link header precomputation API.
melifaro [Thu, 31 Dec 2015 05:03:27 +0000 (05:03 +0000)]
Implement interface link header precomputation API.

Add if_requestencap() interface method which is capable of calculating
  various link headers for given interface. Right now there is support
  for INET/INET6/ARP llheader calculation (IFENCAP_LL type request).
  Other types are planned to support more complex calculation
  (L2 multipath lagg nexthops, tunnel encap nexthops, etc..).

Reshape 'struct route' to be able to pass additional data (with is length)
  to prepend to mbuf.

These two changes permits routing code to pass pre-calculated nexthop data
  (like L2 header for route w/gateway) down to the stack eliminating the
  need for other lookups. It also brings us closer to more complex scenarios
  like transparently handling MPLS nexthops and tunnel interfaces.
  Last, but not least, it removes layering violation introduced by flowtable
  code (ro_lle) and simplifies handling of existing if_output consumers.

ARP/ND changes:
Make arp/ndp stack pre-calculate link header upon installing/updating lle
  record. Interface link address change are handled by re-calculating
  headers for all lles based on if_lladdr event. After these changes,
  arpresolve()/nd6_resolve() returns full pre-calculated header for
  supported interfaces thus simplifying if_output().
Move these lookups to separate ether_resolve_addr() function which ether
  returs error or fully-prepared link header. Add <arp|nd6_>resolve_addr()
  compat versions to return link addresses instead of pre-calculated data.

BPF changes:
Raw bpf writes occupied _two_ cases: AF_UNSPEC and pseudo_AF_HDRCMPLT.
Despite the naming, both of there have ther header "complete". The only
  difference is that interface source mac has to be filled by OS for
  AF_UNSPEC (controlled via BIOCGHDRCMPLT). This logic has to stay inside
  BPF and not pollute if_output() routines. Convert BPF to pass prepend data
  via new 'struct route' mechanism. Note that it does not change
  non-optimized if_output(): ro_prepend handling is purely optional.
Side note: hackish pseudo_AF_HDRCMPLT is supported for ethernet and FDDI.
  It is not needed for ethernet anymore. The only remaining FDDI user is
  dev/pdq mostly untouched since 2007. FDDI support was eliminated from
  OpenBSD in 2013 (sys/net/if_fddisubr.c rev 1.65).

Flowtable changes:
  Flowtable violates layering by saving (and not correctly managing)
  rtes/lles. Instead of passing lle pointer, pass pointer to pre-calculated
  header data from that lle.

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

8 years agoWrap using #ifdef 'notyet' those variables and statements not yet
araujo [Thu, 31 Dec 2015 02:01:20 +0000 (02:01 +0000)]
Wrap using #ifdef 'notyet' those variables and statements not yet
implemented to lower the compiler warnings.

It fix the case of unused-but-set-variable spotted by gcc4.9.

Reviewed by: ngie, ae
Approved by: bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D4720

8 years agoClean up unused-but-set-variable spotted by gcc-4.9.
araujo [Thu, 31 Dec 2015 01:57:55 +0000 (01:57 +0000)]
Clean up unused-but-set-variable spotted by gcc-4.9.

Approved by: bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D4736

8 years agoClean up unused-but-set-variable spotted by gcc-4.9.
araujo [Thu, 31 Dec 2015 01:55:51 +0000 (01:55 +0000)]
Clean up unused-but-set-variable spotted by gcc-4.9.

Reviewed by: grehan
Approved by: bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D4735

8 years agoClean up unused-but-set-variable spotted by gcc-4.9.
araujo [Thu, 31 Dec 2015 01:54:07 +0000 (01:54 +0000)]
Clean up unused-but-set-variable spotted by gcc-4.9.

Reviewed by: royger
Approved by: rodrigc (mentor)
Differential Revision: https://reviews.freebsd.org/D4733

8 years agoBump __FreeBSD_version because r292782 removes sys/crypto/sha2.h
allanjude [Wed, 30 Dec 2015 23:27:24 +0000 (23:27 +0000)]
Bump __FreeBSD_version because r292782 removes sys/crypto/sha2.h

Submitted by: Oliver Pinter <oliver.pinter@hardenedbsd.org>

8 years agoAdd the MOVT/MOVW types to the list of relocs which do not generate .plt
ian [Wed, 30 Dec 2015 23:04:08 +0000 (23:04 +0000)]
Add the MOVT/MOVW types to the list of relocs which do not generate .plt
entries.  This fixes the segfaults in arm userland code compiled with
-march= or -mcpu= values that allow the compiler to generate movw/movt
sequences to load 32-bit constants.

8 years agoBreak up opencrypto/xform.c so it can be reused piecemeal
allanjude [Wed, 30 Dec 2015 22:43:07 +0000 (22:43 +0000)]
Break up opencrypto/xform.c so it can be reused piecemeal

Keep xform.c as a meta-file including the broken out bits
existing code that includes xform.c continues to work as normal

Individual algorithms can now be reused elsewhere, including outside
of the kernel

Reviewed by: bapt (previous version), gnn, delphij
Approved by: secteam
MFC after: 1 week
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D4674

8 years agoForce nullfs vnode reclaim after unlinking, to potentially unlink
kib [Wed, 30 Dec 2015 19:49:22 +0000 (19:49 +0000)]
Force nullfs vnode reclaim after unlinking, to potentially unlink
lower vnode.  Otherwise, reference to the lower vnode from the upper
one prevents final unlink.

PR: 178238
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoChange the - hopefully - last piece of ktr(9) to use PCPU_GET(cpuid)
marius [Wed, 30 Dec 2015 18:57:29 +0000 (18:57 +0000)]
Change the - hopefully - last piece of ktr(9) to use PCPU_GET(cpuid)
instead of the MD module ID for KTR_CPU.

8 years agoRename `recvfd` and `sendfd` variables in recvfd/sendfd functions to avoid
ngie [Wed, 30 Dec 2015 18:13:43 +0000 (18:13 +0000)]
Rename `recvfd` and `sendfd` variables in recvfd/sendfd functions to avoid
-Wshadow issues with gcc

MFC after: 1 week
Reported by: bz, jenkins
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd the appropriate case statement for IPV6_BINDMULTI so the option can be
jtl [Wed, 30 Dec 2015 18:08:05 +0000 (18:08 +0000)]
Add the appropriate case statement for IPV6_BINDMULTI so the option can be
retrieved with getsockopt().

CID: 1229928
Differential Revision: https://reviews.freebsd.org/D4737
Reviewed by: adrian
Sponsored by: Juniper Networks

8 years agoFix a file descriptor leak in mdXhl.c (which is used by numerous hashing
jtl [Wed, 30 Dec 2015 18:04:50 +0000 (18:04 +0000)]
Fix a file descriptor leak in mdXhl.c (which is used by numerous hashing
algorithms.

CID: 1305669,1305611,1305663,1305603,1305584,1305639,1346865,1305601
Differential Revision: https://reviews.freebsd.org/D4732
Reviewed by: allanjude, delphij
MFC after: 2 weeks
Sponsored by: Juniper Networks

8 years agoDecode and print the ID_AA64* registers on boot. These registers hold
andrew [Wed, 30 Dec 2015 17:36:34 +0000 (17:36 +0000)]
Decode and print the ID_AA64* registers on boot. These registers hold
information on what the core supports. In most cases these will be
identical across most CPUs in the SoC, however there may be the case where,
with a big.LITTLE setup they may differ. In this case we print the
decoded data on all CPUs.

Reviewed by: kib
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D4725

8 years agoThis code is not in modules that need KPI stability so no need to use
bz [Wed, 30 Dec 2015 17:10:03 +0000 (17:10 +0000)]
This code is not in modules that need KPI stability so no need to use
the wrapper functions as used in r252511.  We can directly use the
locking macros.

Reviewed by: jtl, rwatson
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4731

8 years agoDrop the clang patch which adds recognition of 'CC' suffixes as aliases
dim [Wed, 30 Dec 2015 16:14:30 +0000 (16:14 +0000)]
Drop the clang patch which adds recognition of 'CC' suffixes as aliases
for --driver-mode=g++, since this was never upstreamed.  For backwards
compatibility, add a wrapper shell script.

MFC after: 1 week

8 years agoAdd support for modifying coalescing parameters runtime.
hselasky [Wed, 30 Dec 2015 15:01:47 +0000 (15:01 +0000)]
Add support for modifying coalescing parameters runtime.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoAllow I2C to read address 0x51 as well as address 0x50.
hselasky [Wed, 30 Dec 2015 14:58:55 +0000 (14:58 +0000)]
Allow I2C to read address 0x51 as well as address 0x50.

MFC after: 1 week
Submitted by: Shahar Klein <shahark@mellanox.com>
Sponsored by: Mellanox Technologies

8 years agoFix use of uninitialised Nflag
smh [Wed, 30 Dec 2015 14:57:42 +0000 (14:57 +0000)]
Fix use of uninitialised Nflag

Initialise Nflag to 0 preventing use of uninitialised value.

Reported by: uqs
MFC after: 1 week
X-MFC-With: r292266
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D4449

8 years ago10G ER/LR should present itself as LR.
hselasky [Wed, 30 Dec 2015 14:54:08 +0000 (14:54 +0000)]
10G ER/LR should present itself as LR.

MFC after: 1 week
Submitted by: Shahar Klein <shahark@mellanox.com>
Sponsored by: Mellanox Technologies

8 years ago- (Ab)use udivx for dividing the u_int pc_cpuid when implementing
marius [Wed, 30 Dec 2015 13:49:20 +0000 (13:49 +0000)]
- (Ab)use udivx for dividing the u_int pc_cpuid when implementing
  CPU_ISSET(), CPU_SET etc. in sparc64 asm. This approach has the
  benefit of not clobbering %y, allowing to revert r222827 and
  partially r222828.
- In r222828, CATR() already was changed to use the equivalent of
  PCPU_GET(cpuid) instead of the MD module ID for KTR_CPU, so
  belatedly also catch up with the C side of ktr(9). Originally,
  in r203838 CATR() was moved away from directly reading the
  module ID or equivalent as that became impractical with other
  CPU types than USI/II supported. With r222828 in place, per-CPU
  data generally is set up soon enough, though, that employing
  PCPU things in ktr(9) also for use during early stages works.
- Unfortunately, an exception to the latter is the ktr(9) use
  in pmap_bootstrap(), which actually is run so early that even
  checking for bootverbose being set via the loader doesn't work.
  Consequently, replace the ktr(9) use in pmap_bootstrap() with
  OF_printf(9) and put it under #ifdef DIAGNOSTIC instead.

MFC after: 3 days

8 years agoIntegrate tools/regression/sockets/unix_passfd into the FreeBSD test
ngie [Wed, 30 Dec 2015 11:15:07 +0000 (11:15 +0000)]
Integrate tools/regression/sockets/unix_passfd into the FreeBSD test
suite as tests/sys/kern/unix_passfd_test

- Convert testcases to ATF
- Fix an alignment issues
- Mark rights_creds_payload(..) as an expected failure (see PR # 181741)

Based [in part] on the following Differential Revision:
https://reviews.freebsd.org/D689

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

8 years agoAdd some more obsolete files, left over from the clang 3.7.0 -> 3.7.1
dim [Wed, 30 Dec 2015 09:15:02 +0000 (09:15 +0000)]
Add some more obsolete files, left over from the clang 3.7.0 -> 3.7.1
upgrade.

Noticed by: Nikolai Lifanov <lifanov@mail.lifanov.com>, jtl

8 years agoHook the tests into the build automatically by creating a stub tests/ directory
ngie [Wed, 30 Dec 2015 08:02:11 +0000 (08:02 +0000)]
Hook the tests into the build automatically by creating a stub tests/ directory
which installs the autotraversing Kyuafile

8 years agoAdd platform support for QorIQ SoCs.
jhibbits [Wed, 30 Dec 2015 03:43:25 +0000 (03:43 +0000)]
Add platform support for QorIQ SoCs.

This includes the following changes:
* SMP kickoff for QorIQ (tested on P5020)
* Errata fixes for some silicon revisions
* Enables L2 (and L3 if available) caches
Obtained from: Semihalf
Sponsored by: Alex Perez/Inertial Computing

8 years agoUse __alignof__ instead of assuming int64_t to get the right
imp [Wed, 30 Dec 2015 03:36:22 +0000 (03:36 +0000)]
Use __alignof__ instead of assuming int64_t to get the right
alignment.

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

8 years agoOptimize zero_page for book-e mmu.
jhibbits [Wed, 30 Dec 2015 02:26:04 +0000 (02:26 +0000)]
Optimize zero_page for book-e mmu.

Instead of indirectly calling bzero() through mmu_booke_zero_page_area, zero the
full page the same way as the AIM pmap logic does: using dcbz.

8 years agoRewrite tid_flush() in C.
jhibbits [Wed, 30 Dec 2015 02:23:14 +0000 (02:23 +0000)]
Rewrite tid_flush() in C.

There's no need for it to be in asm.  Also, by writing in C, and marking it
static in pmap.c, it saves a branch to the function itself, as it's only used in
one location.  The generated asm is virtually identical to the handwritten code.

8 years agoFix stack leak introduced by SVN r97201 (nextboot_conf support).
dteske [Wed, 30 Dec 2015 02:15:12 +0000 (02:15 +0000)]
Fix stack leak introduced by SVN r97201 (nextboot_conf support).
Fix erroneous error path in error messages when processing boot_conf.
Fixup stack comments for functions introduced by SVN r97201.
Remove a questioning stack comment introduced by SVN r186789.
NB: Comment removed because strdup usage here is correct/not a leak.

MFC after: 1 week

8 years agoAdapt CATR() to r283283.
marius [Wed, 30 Dec 2015 00:17:37 +0000 (00:17 +0000)]
Adapt CATR() to r283283.

8 years agoDocument the recently added support for ptrace(2) LWP events.
jhb [Wed, 30 Dec 2015 00:04:57 +0000 (00:04 +0000)]
Document the recently added support for ptrace(2) LWP events.

8 years agoAdd ptrace(2) reporting for LWP events.
jhb [Tue, 29 Dec 2015 23:25:26 +0000 (23:25 +0000)]
Add ptrace(2) reporting for LWP events.

Add two new LWPINFO flags: PL_FLAG_BORN and PL_FLAG_EXITED for reporting
thread creation and destruction. Newly created threads will stop to report
PL_FLAG_BORN before returning to userland and exiting threads will stop to
report PL_FLAG_EXIT before exiting completely. Both of these events are
only enabled and reported if PT_LWP_EVENTS is enabled on a process.

8 years agoCall kern_thr_exit() instead of duplicating it.
jhb [Tue, 29 Dec 2015 23:16:20 +0000 (23:16 +0000)]
Call kern_thr_exit() instead of duplicating it.

This code is missing the racct_subr() call from kern_thr_exit() and would
require further code duplication in future changes.

Reviewed by: kib
MFC after: 1 week

8 years agoBring some of the recent locore-v4.S improvements into locore-V6...
ian [Tue, 29 Dec 2015 22:18:35 +0000 (22:18 +0000)]
Bring some of the recent locore-v4.S improvements into locore-V6...

 - Map all 4GB as VA=PA so that args passed in from a bootloader can
   be accessed regardless of where they are.
 - Figure out the kernel load address by directly masking the PC rather
   then by doing pc-relative math on the _start symbol.
 - For EARLY_PRINTF support, map device memory as uncacheable (no-op for
   ARM_NEW_PMAP because all TEX types resolve to uncacheable).

8 years agoAdd standard extended feature bit 6 from the Intel SDM rev. 57, which
kib [Tue, 29 Dec 2015 22:14:21 +0000 (22:14 +0000)]
Add standard extended feature bit 6 from the Intel SDM rev. 57, which
indicates that data-pointer in the saved x87 FPU state is only updated
on FPU exceptions.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoFix the error checking for the ubenv command. This moves the check for an
ian [Tue, 29 Dec 2015 21:29:05 +0000 (21:29 +0000)]
Fix the error checking for the ubenv command.  This moves the check for an
empty ldvar (which amounts to the varname string starting with '=') into
the if block that manipulates ldvar, which avoids later referencing ldvar
when it was never initialized.

Submitted by: Thomas Skibo
Pointy hat: ian

8 years agosh: Split subevalvar() in #/##/%/%% and =/? parts.
jilles [Tue, 29 Dec 2015 20:51:29 +0000 (20:51 +0000)]
sh: Split subevalvar() in #/##/%/%% and =/? parts.

8 years agoFix getopt(3) argument after r290180; I forgot to change -r to -R
ngie [Tue, 29 Dec 2015 20:17:40 +0000 (20:17 +0000)]
Fix getopt(3) argument after r290180; I forgot to change -r to -R
by accident

MFC after: 3 days
Pointyhat to: ngie
Reported by: vangyzen
Sponsored by: EMC / Isilon Storage Division

8 years agoMFhead @ r292618
ngie [Tue, 29 Dec 2015 19:56:26 +0000 (19:56 +0000)]
MFhead @ r292618

8 years agoWhen checking the inp_ip_minttl restriction for IPv6 packets, don't check
jtl [Tue, 29 Dec 2015 19:20:39 +0000 (19:20 +0000)]
When checking the inp_ip_minttl restriction for IPv6 packets, don't check
the IPv4 header.

CID: 1017920
Differential Revision: https://reviews.freebsd.org/D4727
Reviewed by: bz
MFC after: 2 weeks
Sponsored by: Juniper Networks

8 years ago- Add entries for the more prominent members of the Digi International
marius [Tue, 29 Dec 2015 17:07:28 +0000 (17:07 +0000)]
- Add entries for the more prominent members of the Digi International
  Neo series, which are based on Exar PCI chips.
- Mark some unused parameters as such.
- Fix style

MFC after: 3 days

8 years agopax: prevent possible buffer overflow
pfg [Tue, 29 Dec 2015 16:31:28 +0000 (16:31 +0000)]
pax: prevent possible buffer overflow

Or at least quiet down some static analyzers about it.

CID: 978835
MFC after: 1 week
Obtained from: OpenBSD

8 years agoImprovements to BSD-licensed DTC.
theraven [Tue, 29 Dec 2015 16:29:42 +0000 (16:29 +0000)]
Improvements to BSD-licensed DTC.

- Added an expression parser so that expressions from headers are now working
- Fixed missing null terminators on cross references
- Disabled exceptions / RTTI in the build for smaller binaries
- Changed phandle order generation to be identical to GPL'd dtc

8 years ago- Sort ports-secteam
miwi [Tue, 29 Dec 2015 15:54:34 +0000 (15:54 +0000)]
- Sort ports-secteam

8 years agoext2: recognize ext4 INCOMPAT_RECOVER flag
pfg [Tue, 29 Dec 2015 15:51:52 +0000 (15:51 +0000)]
ext2: recognize ext4 INCOMPAT_RECOVER flag

This is a flag specific for journalling in ext4.
Add it to the list of ext4 features we ignore for
read-only purposes.

PR: 205668
MFC after: 1 week

8 years ago- Add myself to ports-secteam
miwi [Tue, 29 Dec 2015 15:36:46 +0000 (15:36 +0000)]
- Add myself to ports-secteam

Approved by: delphij (implicit)

8 years agoCorrect the code for sign-extending a 16 bit value. As near as I can tell
ian [Tue, 29 Dec 2015 15:23:03 +0000 (15:23 +0000)]
Correct the code for sign-extending a 16 bit value.  As near as I can tell
this is effectively a no-op -- the addend term in MOVT/MOVW relocations
always seems to be zero.  But this is correct and the old code wasn't.

8 years agoUpdate metadata for "tools/tools/bus_autoconf" after r292080. Use
hselasky [Tue, 29 Dec 2015 11:53:13 +0000 (11:53 +0000)]
Update metadata for "tools/tools/bus_autoconf" after r292080. Use
BYTE_ORDER instead of _BYTE_ORDER due to 3rd party USB software for
now.

8 years agoFix type mismatches for malloc(3) and Co.
uqs [Tue, 29 Dec 2015 11:24:41 +0000 (11:24 +0000)]
Fix type mismatches for malloc(3) and Co.

This is rather pedantic, as for most architectures it holds that
sizeof(type *) == sizeof(type **)

Found by: clang static analyzer
Reviewed by: ed
Differential Revision: https://reviews.freebsd.org/D4722

8 years agoFix type mismatches for malloc(3) and Co.
uqs [Tue, 29 Dec 2015 11:24:35 +0000 (11:24 +0000)]
Fix type mismatches for malloc(3) and Co.

Found by: clang static analyzer
Reviewed by: ed
Differential Revision: https://reviews.freebsd.org/D4722

8 years agohyperv: vmbus: run non-blocking message handlers in vmbus_msg_swintr()
delphij [Tue, 29 Dec 2015 08:19:43 +0000 (08:19 +0000)]
hyperv: vmbus: run non-blocking message handlers in vmbus_msg_swintr()

We'll remove the per-channel control_work_queue because it can't properly
do serialization of message handling, e.g., when there are 2 NIC devices,
vmbus_channel_on_offer() -> hv_queue_work_item() has a race condition:
for an SMP VM, vmbus_channel_process_offer() can run concurrently on
different CPUs and if the second NIC's
vmbus_channel_process_offer() -> hv_vmbus_child_device_register() runs
first, the second NIC's name will be hn0 and the first NIC's name will
be hn1!

We can fix the race condition by removing the per-channel control_work_queue
and run all the message handlers in the global
hv_vmbus_g_connection.work_queue -- we'll do this in the next patch.

With the coming next patch, we have to run the non-blocking handlers
directly in the kernel thread vmbus_msg_swintr(), because the special
handling of sub-channel: when a sub-channel (e.g., of the storvsc driver)
is received and being handled in vmbus_channel_on_offer() running on the
global hv_vmbus_g_connection.work_queue, vmbus_channel_process_offer()
invokes channel->sc_creation_callback, i.e., storvsc_handle_sc_creation,
and the callback will invoke hv_vmbus_channel_open() -> hv_vmbus_post_message
and expect a further reply from the host, but the handling of the further
messag can't be done because the current message's handling hasn't finished
yet; as result, hv_vmbus_channel_open() -> sema_timedwait() will time out
and th device can't work.

Also renamed the handler type from hv_pfn_channel_msg_handler to
vmbus_msg_handler: the 'pfn' and 'channel' in the old name make no sense.

Submitted by: Dexuan Cui <decui microsoft com>
Reviewed by: royger
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4596

8 years agohyperv: vmbus: remove the per-channel control_work_queue
delphij [Tue, 29 Dec 2015 07:54:55 +0000 (07:54 +0000)]
hyperv: vmbus: remove the per-channel control_work_queue

Now vmbus_channel_on_offer() -> vmbus_channel_process_offer() can
safely run on the global hv_vmbus_g_connection.work_queue now.

We remove the per-channel control_work_queue to achieve the proper
serialization of the message handling.

I removed the bogus TODO in vmbus_channel_on_offer(): a vmbus offer
can only come from the parent partition, i.e., the host.

PR: kern/205156
Submitted by: Dexuan Cui <decui microsoft com>
Reviewed by: Howard Su <howard0su gmail com>, delphij
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4597

8 years agoUpdate capabilities of e500mc, e5500, e6500.
jhibbits [Tue, 29 Dec 2015 03:31:06 +0000 (03:31 +0000)]
Update capabilities of e500mc, e5500, e6500.

8 years agoSimplify code for parsing extra groups
bapt [Tue, 29 Dec 2015 00:08:32 +0000 (00:08 +0000)]
Simplify code for parsing extra groups

8 years agoRemove useless assignement of linelen
bapt [Tue, 29 Dec 2015 00:02:08 +0000 (00:02 +0000)]
Remove useless assignement of linelen

8 years agoRestore dryrun support for pw groupmod
bapt [Mon, 28 Dec 2015 23:57:22 +0000 (23:57 +0000)]
Restore dryrun support for pw groupmod

8 years ago- Add an entry for the SIIG Cyber 2SP1 PCIe adapter, which is based
marius [Mon, 28 Dec 2015 20:24:08 +0000 (20:24 +0000)]
- Add an entry for the SIIG Cyber 2SP1 PCIe adapter, which is based
  on an Oxford Semiconductor OX16PCI954 but uses only two ports and
  a non-default clock rate.
- Fix style/whitespace

PR: 176407
MFC after: 3 days

8 years agoAdd interests/maintainerships + notes
dteske [Mon, 28 Dec 2015 19:29:05 +0000 (19:29 +0000)]
Add interests/maintainerships + notes

8 years agoAdd support for CQE zipping. CQE zipping reduces PCI overhead by
hselasky [Mon, 28 Dec 2015 18:50:18 +0000 (18:50 +0000)]
Add support for CQE zipping. CQE zipping reduces PCI overhead by
coalescing and zipping multiple CQEs into a single merged CQE. The
feature is enabled by default and can be disabled by a sysctl.

Implementing this feature mlx5_cqwq_pop() has been separated from
mlx5e_get_cqe().

MFC after: 1 week
Submitted by: Mark Bloch <markb@mellanox.com>
Differential Revision: https://reviews.freebsd.org/D4598
Sponsored by: Mellanox Technologies

8 years agoAdd support for sysctl tunables to 10-stable and older. Pushed through
hselasky [Mon, 28 Dec 2015 18:36:00 +0000 (18:36 +0000)]
Add support for sysctl tunables to 10-stable and older. Pushed through
head first to simplify driver maintenance.

MFC after: 1 week
Submitted by: Drew Gallatin <gallatin@freebsd.org>
Differential Revision: https://reviews.freebsd.org/D4552
Sponsored by: Mellanox Technologies

8 years agoin6_if2idlen: treat bridge(4) interfaces like other Ethernet interfaces
wollman [Mon, 28 Dec 2015 18:29:47 +0000 (18:29 +0000)]
in6_if2idlen: treat bridge(4) interfaces like other Ethernet interfaces

bridge(4) interfaces have an if_type of IFT_BRIDGE, rather than
IFT_ETHER, even though they only support Ethernet-style links.  This
caused in6_if2idlen to emit an "unknown link type (209)" warning to
the console every time it was called.  Add IFT_BRIDGE to the case
statement in the appropriate place, indicating that it uses the same
IPv6 address format as other Ethernet-like interfaces.

MFC after: 1 week

8 years agoMake the eeprom dump function more readable and rename variables for
hselasky [Mon, 28 Dec 2015 18:28:18 +0000 (18:28 +0000)]
Make the eeprom dump function more readable and rename variables for
better clarity.

MFC after: 1 week
Submitted by: Daria Genzel <dariaz@mellanox.com>
Differential Revision: https://reviews.freebsd.org/D4551
Sponsored by: Mellanox Technologies

8 years agoReduce memory consumption when allocating kobject strings in the
hselasky [Mon, 28 Dec 2015 18:20:05 +0000 (18:20 +0000)]
Reduce memory consumption when allocating kobject strings in the
LinuxKPI. Compute string length before allocating memory instead of
using fixed size allocations. Make kobject_set_name_vargs() global
instead of inline to save some bytes when compiling.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoExplicitly set permissions on entropy files
dteske [Mon, 28 Dec 2015 17:27:20 +0000 (17:27 +0000)]
Explicitly set permissions on entropy files

Differential Revision: https://reviews.freebsd.org/D3933
Submitted by: jmg
Reviewed by: delphij, markm
Approved by: secteam (delphij)
MFC after: 3 days
X-MFC-to: stable/10 stable/9

8 years agoAdd SFF-8024 Extended Specification Compliance
melifaro [Mon, 28 Dec 2015 09:26:07 +0000 (09:26 +0000)]
Add SFF-8024 Extended Specification Compliance

Submitted by: markb_mellanox.com
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4666

8 years agoEliminate unneeded includes.
delphij [Mon, 28 Dec 2015 08:53:31 +0000 (08:53 +0000)]
Eliminate unneeded includes.

Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D4716

8 years agoThe sdp opens the database with PERM_SECURE mode and it is different than
araujo [Mon, 28 Dec 2015 05:48:22 +0000 (05:48 +0000)]
The sdp opens the database with PERM_SECURE mode and it is different than
dp that opens the database with PERM_INSECURE, so we need to check sdp->put
against sdp instead of use dp->put.

PR: bin/191720
Submitted by: Miles Ohlrich <turingsboy@yahoo.com>
Approved by: rodrigc (mentor)
Differential Revision: https://reviews.freebsd.org/D4255

8 years agoRemove retval to fix a -Wunused-but-set-variable warning from gcc 4.9
ngie [Mon, 28 Dec 2015 02:36:57 +0000 (02:36 +0000)]
Remove retval to fix a -Wunused-but-set-variable warning from gcc 4.9

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

8 years ago- Remove unused but set ssize in shutdown_send_sigpipe
ngie [Mon, 28 Dec 2015 02:34:59 +0000 (02:34 +0000)]
- Remove unused but set ssize in shutdown_send_sigpipe
- Add #ifdef TEST_SEQ_PACKET_SOURCE_ADDRESS` for untestable code
  because FreeBSD doesn't have a means to map source addresses for
  SEQ_PACKET AF_UNIX sockets (paraphrased). Put pathname variable
  under the #ifdef to mute another unused but set variable warning

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

8 years agoClean trailing whitespace
ngie [Mon, 28 Dec 2015 02:28:12 +0000 (02:28 +0000)]
Clean trailing whitespace

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

8 years ago- Fix an improperly sized buffer for `pathname` [1]
ngie [Mon, 28 Dec 2015 02:21:36 +0000 (02:21 +0000)]
- Fix an improperly sized buffer for `pathname` [1]
- Fix a -Wunused-but-set-variable warning [2]

MFC after: 1 week
Reported by: cppcheck [1], gcc 4.9 [2]
Sponsored by: EMC / Isilon Storage Division

8 years agoFix style(9) a bit and ensure that error from initializing kqueue(2) is
ngie [Mon, 28 Dec 2015 02:18:22 +0000 (02:18 +0000)]
Fix style(9) a bit and ensure that error from initializing kqueue(2) is
sane

- Push the kqueue(2) initialization down so the errno will correspond with
  the failure instead of potentially being stomped on by functions called
  by `PLAIN_REQUIRE_KERNEL_MODULE`
- Delete trailing whitespace
- Add spaces between braces for conditional and control blocks (for/if)
- Use err/errx instead of perror+printf+exit/printf+exit.
- Remove braces for single-line conditionals

Tested with and without -DDEBUG

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

8 years agoAdd on systat -vm the ability to display the physical and kernel memory
araujo [Mon, 28 Dec 2015 02:07:56 +0000 (02:07 +0000)]
Add on systat -vm the ability to display the physical and kernel memory
percent usage.

PR: bin/203917
Submitted by: ota <ota@j.email.ne.jp>
Approved by: bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D4281

8 years agoPlace cancel and error under #ifdef DEBUG to mute
ngie [Mon, 28 Dec 2015 02:01:41 +0000 (02:01 +0000)]
Place cancel and error under #ifdef DEBUG to mute
-Wunused-but-set-variable warnings reported by gcc 4.9

Remove some trailing whitespace as well

Tested with and without -DDEBUG

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

8 years agoStaticize several variables that are used exclusively in bsnmpd/main.c and
ngie [Mon, 28 Dec 2015 01:51:20 +0000 (01:51 +0000)]
Staticize several variables that are used exclusively in bsnmpd/main.c and
bsnmpd/trap.c

This fixes several -Wmissing-variable-declaration warnings noted by clang

Differential Revision: https://reviews.freebsd.org/D4718
MFC after: 1 week
Reported by: Jenkins
Reviewed by: araujo
Sponsored by: EMC / Isilon Storage Division

8 years ago- Explicitly initialize ch to 0
ngie [Mon, 28 Dec 2015 00:53:37 +0000 (00:53 +0000)]
- Explicitly initialize ch to 0
- Delete some spurious whitespace
- Use calloc instead of malloc in the last test to ensure that
  sendspace is properly zero'ed out

Differential Revision: https://reviews.freebsd.org/D689 (part of a larger diff)
MFC after: 1 week
Reviewed by: asomers, ngie
Submitted by: markj
Sponsored by: EMC / Isilon Storage Division

8 years agoCorrect __FreeBSD__ check.
cy [Mon, 28 Dec 2015 00:42:15 +0000 (00:42 +0000)]
Correct __FreeBSD__ check.

MFC after: 3 days

8 years agoUse a macro to create the names for the library path names. This will
imp [Sun, 27 Dec 2015 23:04:12 +0000 (23:04 +0000)]
Use a macro to create the names for the library path names. This will
allow later substitution at run time instead of compile time of the
environment variable name prefix.

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

8 years agoThe FILE structure has a mbstate_t in it. This structure needs to be
imp [Sun, 27 Dec 2015 23:04:11 +0000 (23:04 +0000)]
The FILE structure has a mbstate_t in it. This structure needs to be
aligned on a int64_t boundary. However, when we allocate the array of
these structures, we use ALIGNBYTES which defaults to sizeof(int) on
arm, i386 and others. The i386 stuff can handle unaligned accesses
seemlessly. However, arm cannot. Take this into account when creating
the array of FILEs, and add some comments about why.

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

8 years agoThere's currently some issues with armv7-class of CPUs code generation
imp [Sun, 27 Dec 2015 23:04:10 +0000 (23:04 +0000)]
There's currently some issues with armv7-class of CPUs code generation
with our default toolchain. Turn it off here until that all gets
sorted out.

8 years agoAdd some additional GPT partition types
allanjude [Sun, 27 Dec 2015 18:12:13 +0000 (18:12 +0000)]
Add some additional GPT partition types

4 ChromeOS GPT types
2 Microsoft partition types
the new OpenBSD partition type

Approved by: marcel (mentor)
MFC after: 1 week
Relnotes: yes
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D3841