]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoqlxgbe: add GCC_MS_EXTENSIONS to CFLAGS to make old base GCC happy
Andriy Gapon [Tue, 7 Mar 2017 15:43:49 +0000 (15:43 +0000)]
qlxgbe: add GCC_MS_EXTENSIONS to CFLAGS to make old base GCC happy

The module uses unnamed structure and union fields and base GCC in
stable/10 doesn't like it.
I think that that is a C11 feature, so it is courteous of more modern
compilers to not complain about it when compiling in C99 mode.

Approved by: davidcs
MFC after: 5 days

7 years agoImplement time_is_after_eq_jiffies() function in the LinuxKPI.
Hans Petter Selasky [Tue, 7 Mar 2017 15:37:51 +0000 (15:37 +0000)]
Implement time_is_after_eq_jiffies() function in the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agoFix implementation of the DECLARE_RWSEM() macro in the LinuxKPI.
Hans Petter Selasky [Tue, 7 Mar 2017 15:34:49 +0000 (15:34 +0000)]
Fix implementation of the DECLARE_RWSEM() macro in the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agoMake sure jiffies value is cast to an integer in the LinuxKPI before
Hans Petter Selasky [Tue, 7 Mar 2017 15:33:38 +0000 (15:33 +0000)]
Make sure jiffies value is cast to an integer in the LinuxKPI before
doing millisecond conversion. Under FreeBSD jiffies are 32-bit.

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agoUpdate our Allwinner DTS to latest DTS changes in Linux 4.10
Emmanuel Vadot [Tue, 7 Mar 2017 13:59:30 +0000 (13:59 +0000)]
Update our Allwinner DTS to latest DTS changes in Linux 4.10

7 years agoUpdate our device tree files to a Linux 4.10
Emmanuel Vadot [Tue, 7 Mar 2017 13:56:49 +0000 (13:56 +0000)]
Update our device tree files to a Linux 4.10

7 years agoUse grouptaskqueue for tasklets in the LinuxKPI.
Hans Petter Selasky [Tue, 7 Mar 2017 13:51:14 +0000 (13:51 +0000)]
Use grouptaskqueue for tasklets in the LinuxKPI.

This avoids creating own per-CPU threads and also ensures the tasklet
execution happens on the same CPU core invoking the tasklet.

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agodon't stop in issignal() if P_SINGLE_EXIT is set
Eric Badger [Tue, 7 Mar 2017 13:41:01 +0000 (13:41 +0000)]
don't stop in issignal() if P_SINGLE_EXIT is set

Suppose a traced process is stopped in ptracestop() due to receipt of a
SIGSTOP signal, and is awaiting orders from the tracing process on how
to handle the signal. Before sending any such orders, the tracing
process exits. This should kill the traced process. But suppose a second
thread handles the SIGKILL and proceeds to exit1(), calling
thread_single(). The first thread will now awaken and will have a chance
to check once more if it should go to sleep due to the SIGSTOP.  It must
not sleep after P_SINGLE_EXIT has been set; this would prevent the
SIGKILL from taking effect, leaving a stopped orphan behind after the
tracing process dies.

Also add new tests for this condition.

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D9890

7 years agoWhen selecting brand based on old Elf branding, prefer the brand which
Konstantin Belousov [Tue, 7 Mar 2017 13:38:25 +0000 (13:38 +0000)]
When selecting brand based on old Elf branding, prefer the brand which
interpreter exactly matches the one requested by the activated image.

This change applies r295277, which did the same for note branding, to
the old brand selection, with the same reasoning of fixing compat32
interpreter substitution.

PR: 211837
Reported by: kenji@kens.fm
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoRequire whole brand string matching for old Elf branding.
Konstantin Belousov [Tue, 7 Mar 2017 13:37:35 +0000 (13:37 +0000)]
Require whole brand string matching for old Elf branding.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoConsistently use vm_ooffset_t type for the vm object offset in
Konstantin Belousov [Tue, 7 Mar 2017 13:36:43 +0000 (13:36 +0000)]
Consistently use vm_ooffset_t type for the vm object offset in
elf_load_section.

The values passed currently as vm_offset_t are phdr.p_offset, which
have the native Elf word size.  Since elf_load_section interprets them
as the file offset, use vm object offset type.

Noted and reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoUpdate to Linux 4.10
Emmanuel Vadot [Tue, 7 Mar 2017 12:41:06 +0000 (12:41 +0000)]
Update to Linux 4.10

7 years agoLinuxKPI workqueue cleanup.
Hans Petter Selasky [Tue, 7 Mar 2017 12:09:14 +0000 (12:09 +0000)]
LinuxKPI workqueue cleanup.

This change makes the workqueue implementation behave more like in
Linux, both functionality wise and structure wise.

All workqueue code has been moved to linux_work.c

Add an atomic based statemachine to the work_struct to ensure proper
operation. Prior to this change struct_work was directly mapped to a
FreeBSD task. When a taskqueue has multiple threads the same task may
end up being executed on more than one worker thread simultaneously.
This might cause problems with code coming from Linux, which expects
serial behaviour, similar to Linux tasklets.

Move all global workqueue function names into the linux_xxx domain to
avoid symbol name clashes in the future.

Implement a few more workqueue related functions and macros.

Create two multithreaded taskqueues for the LinuxKPI during module
load, one for time-consuming callbacks and one for non-time consuming
callbacks.

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agoxen/netfront: fix inbound packet flags for checksum offload
Roger Pau Monné [Tue, 7 Mar 2017 09:18:52 +0000 (09:18 +0000)]
xen/netfront: fix inbound packet flags for checksum offload

Currently netfront is setting the flags of inbound packets with the checksum
not present (offloaded) to (CSUM_IP_CHECKED | CSUM_IP_VALID | CSUM_DATA_VALID |
CSUM_PSEUDO_HDR). According to the mbuf(9) man page this is not the correct
combination of flags, it should instead be (CSUM_DATA_VALID |
CSUM_PSEUDO_HDR).

Reviewed by: Wei Liu <wei.liu2@citrix.com>
MFC after: 2 weeks
Sponsored by: Citrix Systems R&D
Differential revision: https://reviews.freebsd.org/D9831

7 years agoxenstore: fix suspension when using the xenstore device
Roger Pau Monné [Tue, 7 Mar 2017 09:17:48 +0000 (09:17 +0000)]
xenstore: fix suspension when using the xenstore device

Lock the xenstore request mutex when suspending user-space processes, in order
to prevent any process from holding this lock when going into suspension, or
else the xenstore suspend process is going to deadlock.

Submitted by: Liuyingdong <liuyingdong@huawei.com>
Reviewed by: royger
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D9638

7 years agoxen: add support for canceled suspend
Roger Pau Monné [Tue, 7 Mar 2017 09:16:51 +0000 (09:16 +0000)]
xen: add support for canceled suspend

When running on Xen, it's possible that a suspend request to the hypervisor
fails (return from HYPERVISOR_suspend different than 0). This means that the
suspend hasn't succeed, and the resume procedure needs to properly handle this
case.

First of all, when such situation happens there's no need to reset the vector
callback, hypercall page, shared info, event channels or grant table, because
it's state is preserved. Also, the PV drivers don't need to be reset to the
initial state, since the connection with the backed has not been interrupted.

Submitted by: Liuyingdong <liuyingdong@huawei.com>
Reviewed by: royger
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D9635

7 years agoiwn: deduplicate (RXON + txpower + broadcast node) command sequence.
Andriy Voskoboinyk [Tue, 7 Mar 2017 07:49:25 +0000 (07:49 +0000)]
iwn: deduplicate (RXON + txpower + broadcast node) command sequence.

Was previously applied to wpi(4) as a part of r278366.

Tested with Intel 6205, STA / MONITOR modes.

7 years agoFix the KASSERT check from r314813.
Hiren Panchasara [Tue, 7 Mar 2017 06:46:38 +0000 (06:46 +0000)]
Fix the KASSERT check from r314813.
len being 0 is valid.

Submitted by: ngie
Reported by: ngie (via jenkins test run)
Sponsored by: Limelight Networks

7 years agoThe relative symlink fix causes downstream issues for
Rodney W. Grimes [Tue, 7 Mar 2017 06:11:36 +0000 (06:11 +0000)]
The relative symlink fix causes downstream issues for
EMC DELL Isilon so revert the relative symlink fix
pending a better solution.

Reported by: ngie
Approved by: greham (mentor) Implicit as reverting
MFC after: 1 week

7 years agoConvert absolute links to relative links.
Rodney W. Grimes [Tue, 7 Mar 2017 05:10:38 +0000 (05:10 +0000)]
Convert absolute links to relative links.
Style.Makefile(9) has been ignored to produce minimal diffs.

Approved by: grehan (mentor)
MFC after: 1 week

7 years agops(1): Fix -w + UNLIMITED handling
Conrad Meyer [Tue, 7 Mar 2017 04:51:35 +0000 (04:51 +0000)]
ps(1): Fix -w + UNLIMITED handling

A follow-up fix for r314685.

Because the -w flag is parsed after ps(1) infers termwidth from COLUMNS and
stdout, and UNLIMITED happens to be the zero value, the single -w flag in
combination with a non-terminal stdout or COLUMNS=0 could result in output
truncated at 131 characters.  (Despite the output being unlimited without
-w.)

Obviously, adding more -w shouldn't truncate output lines.

The committed patch is from bdrewery@, and I've reviewed and tested it.

Submitted by: bdrewery@
Reported by: bdrewery@
Sponsored by: Dell EMC Isilon

7 years agoDon't rely on dependency in Makefile.inc1 for strfile; make datfiles depend on strfile
Enji Cooper [Tue, 7 Mar 2017 04:33:17 +0000 (04:33 +0000)]
Don't rely on dependency in Makefile.inc1 for strfile; make datfiles depend on strfile

In most cases strfile is built as part of build-tools, but in the event that someone
cd'ed to the directory, tried to build from scratch, and had MK_GAMES=no previously,
the build would fail in .../datfiles , trying to find strfile .

Mark this directory tree "SUBDIR_PARALLEL" safe to help facilitate this, instead of
shuffling around the SUBDIR entries (all of the other Makefiles will build standalone).

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agomergemaster: fix description of -p
Enji Cooper [Tue, 7 Mar 2017 04:13:22 +0000 (04:13 +0000)]
mergemaster: fix description of -p

-p only handles updating /etc/master.passwd and /etc/group . No more,
no less.

Also, mergemaster (and no other portions of the vanilla FreeBSD build
process) should be messing with __MAKECONF or SRCCONF as part of the
installworld or distribution process. Don't insinuate that mergemaster
does that as it's a false claim.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoloader.efi: fix an off-by-one bug in efi_verify_staging_size()
Dexuan Cui [Tue, 7 Mar 2017 03:35:50 +0000 (03:35 +0000)]
loader.efi: fix an off-by-one bug in efi_verify_staging_size()

Also remove the warning message: it may not be unusual to see
the memory range containing 2MB is not of EfiConventionalMemory.

MFC after: 2 weeks2 weeks
Sponsored by: Microsoft

7 years agoClang in base now supports -mlongcall, so remove this hack
Justin Hibbits [Tue, 7 Mar 2017 02:17:38 +0000 (02:17 +0000)]
Clang in base now supports -mlongcall, so remove this hack

PR: 215947
MFC after: 2 weeks

7 years agoFix typo in comment.
Simon J. Gerraty [Tue, 7 Mar 2017 01:42:30 +0000 (01:42 +0000)]
Fix typo in comment.

7 years agocxgbe/iw_cxgbe: Abort connection if there is an error during c4iw_modify_qp.
Navdeep Parhar [Tue, 7 Mar 2017 01:13:26 +0000 (01:13 +0000)]
cxgbe/iw_cxgbe: Abort connection if there is an error during c4iw_modify_qp.

Submitted by: KrishnamRaju ErapaRaju @ Chelsio
MFC after: 3 days
Sponsored by: Chelsio Communications

7 years agoWe've found a recurring problem where some userland process would be
Hiren Panchasara [Tue, 7 Mar 2017 00:20:01 +0000 (00:20 +0000)]
We've found a recurring problem where some userland process would be
stuck spinning at 100% cpu around sbcut_internal(). Inside
sbflush_internal(), sb_ccc reached to about 4GB and before passing it
to sbcut_internal(), we type-cast it from uint to int making it -ve.

The root cause of sockbuf growing this large is unknown. Correct fix
is also not clear but based on mailing list discussions, adding
KASSERTs to panic instead of looping endlessly.

Reviewed by: glebius
Sponsored by: Limelight Networks

7 years agoIntroduce the concept of IPsec security policies scope.
Andrey V. Elsukov [Tue, 7 Mar 2017 00:13:53 +0000 (00:13 +0000)]
Introduce the concept of IPsec security policies scope.

Currently are defined three scopes: global, ifnet, and pcb.
Generic security policies that IKE daemon can add via PF_KEY interface
or an administrator creates with setkey(8) utility have GLOBAL scope.
Such policies can be applied by the kernel to outgoing packets and checked
agains inbound packets after IPsec processing.
Security policies created by if_ipsec(4) interfaces have IFNET scope.
Such policies are applied to packets that are passed through if_ipsec(4)
interface.
And security policies created by application using setsockopt()
IP_IPSEC_POLICY option have PCB scope. Such policies are applied to
packets related to specific socket. Currently there is no way to list
PCB policies via setkey(8) utility.

Modify setkey(8) and libipsec(3) to be able distinguish the scope of
security policies in the `setkey -DP` listing. Add two optional flags:
'-t' to list only policies related to virtual *tunneling* interfaces,
i.e. policies with IFNET scope, and '-g' to list only policies with GLOBAL
scope. By default policies from all scopes are listed.

To implement this PF_KEY's sadb_x_policy structure was modified.
sadb_x_policy_reserved field is used to pass the policy scope from the
kernel to userland. SADB_SPDDUMP message extended to support filtering
by scope: sadb_msg_satype field is used to specify bit mask of requested
scopes.

For IFNET policies the sadb_x_policy_priority field of struct sadb_x_policy
is used to pass if_ipsec's interface if_index to the userland. For GLOBAL
policies sadb_x_policy_priority is used only to manage order of security
policies in the SPDB. For IFNET policies it is not used, so it can be used
to keep if_index.

After this change the output of `setkey -DP` now looks like:
# setkey -DPt
0.0.0.0/0[any] 0.0.0.0/0[any] any
in ipsec
esp/tunnel/87.250.242.144-87.250.242.145/unique:145
spid=7 seq=3 pid=58025 scope=ifnet ifname=ipsec0
refcnt=1
# setkey -DPg
::/0 ::/0 icmp6 135,0
out none
spid=5 seq=1 pid=872 scope=global
refcnt=1

No objection from: #network
Obtained from: Yandex LLC
MFC after: 2 weeks
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D9805

7 years agoo Another round fixes for mmc(4), mmcsd(4) and sdhci(4) regarding
Marius Strobl [Mon, 6 Mar 2017 23:47:59 +0000 (23:47 +0000)]
o Another round fixes for mmc(4), mmcsd(4) and sdhci(4) regarding
  comments, marking unused parameters as such, style(9), whitespace,
  etc.
o In the mmc(4) bridges and sdhci(4) (bus) front-ends:
  - Remove redundant assignments of the default bus_generic_print_child
    device method (I've whipped these out of the tree as part of r227843
    once, but they keep coming back ...),
  - use DEVMETHOD_END,
  - use NULL instead of 0 for pointers.
o Trim/adjust includes.

7 years agopf: Fix a crash in low-memory situations
Kristof Provost [Mon, 6 Mar 2017 23:41:23 +0000 (23:41 +0000)]
pf: Fix a crash in low-memory situations

If the call to pf_state_key_clone() in pf_get_translation() fails (i.e. there's
no more memory for it) it frees skp. This is wrong, because skp is a
pf_state_key **, so we need to free *skp, as is done later in the function.
Getting it wrong means we try to free a stack variable of the calling
pf_test_rule() function, and we panic.

7 years agoUpdate dirdeps/meta bits from latest bmake.
Simon J. Gerraty [Mon, 6 Mar 2017 23:13:25 +0000 (23:13 +0000)]
Update dirdeps/meta bits from latest bmake.

7 years agoMerge bmake-20170301
Simon J. Gerraty [Mon, 6 Mar 2017 23:02:33 +0000 (23:02 +0000)]
Merge bmake-20170301

7 years agoMove ATF_TC_WITHOUT_HEAD(getgrent) near the testcase it annotates
Enji Cooper [Mon, 6 Mar 2017 22:46:49 +0000 (22:46 +0000)]
Move ATF_TC_WITHOUT_HEAD(getgrent) near the testcase it annotates

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoFix compilation of r314784 on 32 bit.
Gleb Smirnoff [Mon, 6 Mar 2017 22:32:56 +0000 (22:32 +0000)]
Fix compilation of r314784 on 32 bit.

7 years agoRemove *-api(3) manpages removed in ATF 0.21
Enji Cooper [Mon, 6 Mar 2017 22:18:14 +0000 (22:18 +0000)]
Remove *-api(3) manpages removed in ATF 0.21

I overlooked the fact that these manpages had been removed upstream
and replaced with their non *-api(3) equivalents. Follow upstream's
lead and remove the unused manpages.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoFix issues noted by igor/manlint
Enji Cooper [Mon, 6 Mar 2017 22:08:47 +0000 (22:08 +0000)]
Fix issues noted by igor/manlint

- Fix typos [1]:
-- manged -> managed
-- specifiying -> specifying
- Escape '.' at start of lines using & to tell the roff processor
  that the line isn't meant to be treated as a command [2].

Bump .Dd for the change

MFC after: 1 week
Reported by: igor [1], manlint [2]
Sponsored by: Dell EMC Isilon

7 years agoFix typos
Enji Cooper [Mon, 6 Mar 2017 21:50:35 +0000 (21:50 +0000)]
Fix typos

- specifiying -> specifying
- manged -> managed

Bump .Dd for the change

MFC after: 1 week
Reported by: igor
Sponsored by: Dell EMC Isilon

7 years agoFix atf-c-api(3) manpage issues
Enji Cooper [Mon, 6 Mar 2017 21:45:25 +0000 (21:45 +0000)]
Fix atf-c-api(3) manpage issues

- Fix typo (specifiying -> specifying).
- Remove surrounding ellipses in i.e. section and add a comma before
  and after the i.e. reference.

Bump .Dd for the change

MFC after: 1 week
Reported by: igor
Sponsored by: Dell EMC Isilon

7 years agoFix igor/manlint issues with atf-c(3)
Enji Cooper [Mon, 6 Mar 2017 21:43:47 +0000 (21:43 +0000)]
Fix igor/manlint issues with atf-c(3)

- Remove surrounding ellipses in i.e. section and add a comma before
  and after the i.e. reference [1].
- Fix typo (specifiying -> specifying) [1].
- Escape '.' at start of lines using & to tell the roff processor
  that the line isn't meant to be treated as a command [2].

Bump .Dd for the change

MFC after: 1 week
Reported by: igor [1], manlint [2]
Sponsored by: Dell EMC Isilon

7 years agoFix issues with atf-check(1) found by igor and refer to atf-check(1)
Enji Cooper [Mon, 6 Mar 2017 21:39:57 +0000 (21:39 +0000)]
Fix issues with atf-check(1) found by igor and refer to atf-check(1)

- Fix typo (specifiying -> specifying)
- Add atf-check(1) to SEE ALSO section for completeness. It's mentioned
  above, but by convention the SEE ALSO section should list all relevant
  references to other tools and APIs.

Bump .Dd for the change

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoFix manlint issues with atf-check(1)
Enji Cooper [Mon, 6 Mar 2017 21:35:33 +0000 (21:35 +0000)]
Fix manlint issues with atf-check(1)

- Use `.Bf Em`/`.Ef` instead of prefixing lines with `.Em`. The forms
  are equivalent with traditional roff, but unnecessarily verbose. The
  former form applies the .Em macro to the enclosed block.
- Move EXIT_STATUS section down so the section complies with section
  ordering specified by mdoc(7) and enforced by manlint(1).

Bump .Dd for the change

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoFix out-of-order sections in atf-sh(1)
Enji Cooper [Mon, 6 Mar 2017 21:30:06 +0000 (21:30 +0000)]
Fix out-of-order sections in atf-sh(1)

- `.Op` must be used in the SYNOPSIS section, not the NAME section.
- Move ATF_SHELL environment variable description up to first
  ENVIRONMENT section. Garbage collect the duplicate ENVIRONMENT
  section.

Bump .Dd for the change

MFC after: 1 week
Reported by: manlint
Sponsored by: Dell EMC Isilon

7 years agoFix grammar warning noted by igor
Enji Cooper [Mon, 6 Mar 2017 21:26:45 +0000 (21:26 +0000)]
Fix grammar warning noted by igor

Remove surrounding ellipses in e.g. section and add a comma before and after
the e.g. reference.

MFC after: 1 week
Reported by: igor
Sponsored by: Dell EMC Isilon

7 years agoFix atf-sh(3) manpage issues
Enji Cooper [Mon, 6 Mar 2017 21:24:55 +0000 (21:24 +0000)]
Fix atf-sh(3) manpage issues

- Fix spelling errors (specifiying -> specifying) [1]
- Escape '.' at start of lines using & to tell the roff processor
  that the line isn't meant to be treated as a command [2].

Bump .Dd for the change

MFC after: 1 week
Reported by: igor [1], manlint [2]
Sponsored by: Dell EMC Isilon

7 years agoReapply r287232 from upstream llvm trunk (by Daniil Fukalov):
Dimitry Andric [Mon, 6 Mar 2017 21:14:20 +0000 (21:14 +0000)]
Reapply r287232 from upstream llvm trunk (by Daniil Fukalov):

  [SCEV] limit recursion depth of CompareSCEVComplexity

  Summary:
  CompareSCEVComplexity goes too deep (50+ on a quite a big unrolled
  loop) and runs almost infinite time.

  Added cache of "equal" SCEV pairs to earlier cutoff of further
  estimation. Recursion depth limit was also introduced as a parameter.

  Reviewers: sanjoy

  Subscribers: mzolotukhin, tstellarAMD, llvm-commits

  Differential Revision: https://reviews.llvm.org/D26389

Pull in r296992 from upstream llvm trunk (by Sanjoy Das):

  [SCEV] Decrease the recursion threshold for CompareValueComplexity

  Fixes PR32142.

  r287232 accidentally increased the recursion threshold for
  CompareValueComplexity from 2 to 32.  This change reverses that
  change by introducing a separate flag for CompareValueComplexity's
  threshold.

The latter revision fixes the excessive compile times for skein_block.c.

7 years agoFix bootstrapping libmd on older systems after r314709.
Bryan Drewery [Mon, 6 Mar 2017 21:06:55 +0000 (21:06 +0000)]
Fix bootstrapping libmd on older systems after r314709.

This follows another fix to bootstrap libmd after r313404.  The
MD5FileChunk prototype is needed to build libmd, but it is
only reliably in the src tree's sys/md5.h header.  Rather than
polluting the legacy build with this header for the entire build,
just symlink it in here for now as is done in the elftoolchain
build.  Libmd is already referencing other src tree headers by
its used of CFLAGS+= ${SRCTOP}/sys/crypto/sha2.  This, and
other uses of CFLAGS+= ${SRCTOP}/sys..., may later change to
be in the legacy mechanism.

Reported by: bde, ian, sjg
Tested by: ian

7 years agoFix ATF_TP_ADD_TCS example in atf-c-api(3)
Enji Cooper [Mon, 6 Mar 2017 20:54:21 +0000 (20:54 +0000)]
Fix ATF_TP_ADD_TCS example in atf-c-api(3)

ATF_TP_ADD_TC should use `tp` as the second argument, not `tcs`, as
ATF_TP_ADD_TCS uses `tp` as its first argument.

Bump .Dd for the change.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoAdded comments for why nmtree/libmd are bootstrapped.
Bryan Drewery [Mon, 6 Mar 2017 20:32:17 +0000 (20:32 +0000)]
Added comments for why nmtree/libmd are bootstrapped.

7 years agoImport bmake-20170301
Simon J. Gerraty [Mon, 6 Mar 2017 19:54:54 +0000 (19:54 +0000)]
Import bmake-20170301

7 years agoImport mpr(4) driver P12 to P14 diff from vendor site.
Alexander Motin [Mon, 6 Mar 2017 19:39:31 +0000 (19:39 +0000)]
Import mpr(4) driver P12 to P14 diff from vendor site.

This is mostly a version bump to stay in version number sync with firmware.
The only change there was cosmetic:  Display degraded speed message upon
receiving Active Cable Exception Event with DEGRADED reason code.

Discussed with: slm@
MFC after: 1 week

7 years agoFix some trivial manlint warnings
Enji Cooper [Mon, 6 Mar 2017 19:33:15 +0000 (19:33 +0000)]
Fix some trivial manlint warnings

Sentences should begin on new lines, per manlint.

Bump .Dd for the change

MFC after: 1 month
Reviewed by: bcr
Reported by: make manlint
Sponsored by: Dell EMC Isilon

7 years agoIn panic() print current timestamp, which matches timestamp in the dump
Gleb Smirnoff [Mon, 6 Mar 2017 19:14:08 +0000 (19:14 +0000)]
In panic() print current timestamp, which matches timestamp in the dump
header.  This will help to correlate console server logs with dump files,
no matter how precise is clock on a console server appliance, and how
buggy the appliance is.

7 years agoRegenerated Linuxulator syscall tables for r314782
Mahdi Mokhtari [Mon, 6 Mar 2017 18:20:37 +0000 (18:20 +0000)]
Regenerated Linuxulator syscall tables for r314782

Approved by: dchagin
MFC after: 1 month

7 years agoAdd UNIMPLEMENTED() placeholder macro for
Mahdi Mokhtari [Mon, 6 Mar 2017 18:11:38 +0000 (18:11 +0000)]
Add UNIMPLEMENTED() placeholder macro for
the syscalls that are not implemented in Linux kernel itself.
Cleanup DUMMY() macros.

Reviewed by: dchagin, trasz
Approved by: dchagin
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D9804

7 years agolibpam: extra bounds checking through reallocarray(3).
Pedro F. Giffuni [Mon, 6 Mar 2017 15:45:46 +0000 (15:45 +0000)]
libpam: extra bounds checking through reallocarray(3).

Reviewed by: des
MFC after: 1 week

7 years agoRevert r314777: wrong log, the change was to libpam.
Pedro F. Giffuni [Mon, 6 Mar 2017 15:42:03 +0000 (15:42 +0000)]
Revert r314777: wrong log, the change was to libpam.

7 years agolibfetch: extra bounds checking through reallocarray(3).
Pedro F. Giffuni [Mon, 6 Mar 2017 15:38:03 +0000 (15:38 +0000)]
libfetch: extra bounds checking through reallocarray(3).

Reviewed by: des
MFC after: 1 week

7 years agolibfetch: extra bounds checking through reallocarray(3).
Pedro F. Giffuni [Mon, 6 Mar 2017 15:37:34 +0000 (15:37 +0000)]
libfetch: extra bounds checking through reallocarray(3).

Reviewed by: des
MFC after: 1 week

7 years agoImplement add_timer_on() function in the LinuxKPI.
Hans Petter Selasky [Mon, 6 Mar 2017 14:56:57 +0000 (14:56 +0000)]
Implement add_timer_on() function in the LinuxKPI.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agoInstead of direct use of vm_map_insert(), call vm_map_fixed(MAP_CHECK_EXCL).
Konstantin Belousov [Mon, 6 Mar 2017 14:09:54 +0000 (14:09 +0000)]
Instead of direct use of vm_map_insert(), call vm_map_fixed(MAP_CHECK_EXCL).

This KPI explicitely indicates the intent of creating the mapping at
the fixed address, and incorporates the map locking into the callee.

Suggested and reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoImplement DECLARE_RWSEM() macro in the LinuxKPI to initialize a
Hans Petter Selasky [Mon, 6 Mar 2017 12:22:05 +0000 (12:22 +0000)]
Implement DECLARE_RWSEM() macro in the LinuxKPI to initialize a
Read-Write semaphore during module init time.

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agoGive LinuxKPI Read-Write semaphores better debug names when
Hans Petter Selasky [Mon, 6 Mar 2017 12:20:56 +0000 (12:20 +0000)]
Give LinuxKPI Read-Write semaphores better debug names when
WITNESS_ALL is defined. The lock name is based on the filename and
line number where the initialisation happens.

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agoloader.efi: fix recent UEFI-boot regression on physical machines
Dexuan Cui [Mon, 6 Mar 2017 09:34:31 +0000 (09:34 +0000)]
loader.efi: fix recent UEFI-boot regression on physical machines

This patch fixes my recent patch
"loader.efi: reduce the size of the staging area if necessary", which
causes EFI-boot failure on physical machines since Mar 2:
on the host there is a 1MB LoaderData memory range, which splits
the big Conventional Memory range into a small one (15MB) and a
big one: the small one is too small to hold the staging area.

We can actually use the LoaderData range safely, because when
amd64_tramp -> efi_copy_finish() starts to run, we're almost at
the very end of the efi loader code and we're going to "return"
to the kernel entry, so we're pretty sure we won't access any loader
data any more.

For people who are interested in the details: please see
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211746#c22

PS, some people also reported the regression happened to FreeBSD VM
running on Bhyve in EFI mode. This patch should resolve it too,
though I don't have such a setup to test.

Reviewed by: sephe
Approved by: sephe (mentor)
MFC after: 2 weeks
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D9904

7 years agoRemove compatibility with old libpcap.
Xin LI [Mon, 6 Mar 2017 08:13:19 +0000 (08:13 +0000)]
Remove compatibility with old libpcap.

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

7 years agoFix mismerge of r280849.
Cy Schubert [Mon, 6 Mar 2017 07:11:23 +0000 (07:11 +0000)]
Fix mismerge of r280849.

Reported by: des
MFC after: 3 days

7 years agoBuild the dtb files for the revb1 versions of wandboard.
Ian Lepore [Mon, 6 Mar 2017 04:16:35 +0000 (04:16 +0000)]
Build the dtb files for the revb1 versions of wandboard.

7 years agoThe patch provides the same socket option as Linux IP_ORIGDSTADDR.
Ermal Luçi [Mon, 6 Mar 2017 04:01:58 +0000 (04:01 +0000)]
The patch provides the same socket option as Linux IP_ORIGDSTADDR.
Unfortunately they will have different integer value due to Linux value being already assigned in FreeBSD.

The patch is similar to IP_RECVDSTADDR but also provides the destination port value to the application.

This allows/improves implementation of transparent proxies on UDP sockets due to having the whole information on forwarded packets.

Reviewed by: adrian, aw
Approved by: ae (mentor)
Sponsored by: rsync.net
Differential Revision: D9235

7 years agoRevert r314669, r314670:
Pedro F. Giffuni [Mon, 6 Mar 2017 03:52:15 +0000 (03:52 +0000)]
Revert r314669, r314670:
Bring back the i486 option in GENERIC by default.

The code related to i386 CPU variants configuration has received many
changes in the last years: most of the features are detected automatically,
so there are no performance penalties from keeping the 486 support enabled.

Re-instate the 486 support: while the general configuration could still be
cleaned a bit, there is no advantage in removing it.

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

7 years agoUpgrade to OpenSSH 7.4p1.
Dag-Erling Smørgrav [Mon, 6 Mar 2017 01:37:05 +0000 (01:37 +0000)]
Upgrade to OpenSSH 7.4p1.

7 years agoFix the build. Use new ipfw_lookup_table() in the nat64 too.
Andrey V. Elsukov [Mon, 6 Mar 2017 00:41:59 +0000 (00:41 +0000)]
Fix the build. Use new ipfw_lookup_table() in the nat64 too.

Reported by: cy
MFC after: 2 weeks

7 years agoStyle and punctuation fixes.
Alan Cox [Sun, 5 Mar 2017 23:59:04 +0000 (23:59 +0000)]
Style and punctuation fixes.

Reviewed by: kib
MFC after: 3 days

7 years agoAdd IPv6 support to O_IP_DST_LOOKUP opcode.
Andrey V. Elsukov [Sun, 5 Mar 2017 23:48:24 +0000 (23:48 +0000)]
Add IPv6 support to O_IP_DST_LOOKUP opcode.

o check the size of O_IP_SRC_LOOKUP opcode, it can not exceed the size of
  ipfw_insn_u32;
o rename ipfw_lookup_table_extended() function into ipfw_lookup_table() and
  remove old ipfw_lookup_table();
o use args->f_id.flow_id6 that is in host byte order to get DSCP value;
o add SCTP ports support to 'lookup src/dst-port' opcode;
o add IPv6 support to 'lookup src/dst-ip' opcode.

PR: 217292
Reviewed by: melifaro
MFC after: 2 weeks
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D9873

7 years agoReject invalid object types that can not be used with specific opcodes.
Andrey V. Elsukov [Sun, 5 Mar 2017 22:19:43 +0000 (22:19 +0000)]
Reject invalid object types that can not be used with specific opcodes.

When we doing reference counting of named objects in the new rule,
for existing objects check that opcode references to correct object,
otherwise return EINVAL.

PR: 217391
MFC after: 1 week
Sponsored by: Yandex LLC

7 years agoDon't kill pid -1 on overflow from strtol(3).
Bryan Drewery [Sun, 5 Mar 2017 21:56:04 +0000 (21:56 +0000)]
Don't kill pid -1 on overflow from strtol(3).

Store the result in a proper long and then compare to the proper pid_t
for overflow, so that no MD assumptions are made.

Reviewed by: jilles
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D9887

7 years agoFix bootstrapping mtree after r313404 for older systems.
Bryan Drewery [Sun, 5 Mar 2017 21:16:50 +0000 (21:16 +0000)]
Fix bootstrapping mtree after r313404 for older systems.

r313404 made libnetbsd require sha384.h from libmd.  Libmd added it in
r292782.  Update BOOTSTRAPPING to account for this.

Reported by: bde
Reviewed by: ngie

7 years agoFor now, revert r287232 from upstream llvm trunk (by Daniil Fukalov):
Dimitry Andric [Sun, 5 Mar 2017 19:56:20 +0000 (19:56 +0000)]
For now, revert r287232 from upstream llvm trunk (by Daniil Fukalov):

  [SCEV] limit recursion depth of CompareSCEVComplexity

  Summary:
  CompareSCEVComplexity goes too deep (50+ on a quite a big unrolled
  loop) and runs almost infinite time.

  Added cache of "equal" SCEV pairs to earlier cutoff of further
  estimation. Recursion depth limit was also introduced as a parameter.

  Reviewers: sanjoy

  Subscribers: mzolotukhin, tstellarAMD, llvm-commits

  Differential Revision: https://reviews.llvm.org/D26389

This commit is the cause of excessive compile times on skein_block.c
(and possibly other files) during kernel builds on amd64.

We never saw the problematic behavior described in this upstream commit,
so for now it is better to revert it.  An upstream bug has been filed
here: https://bugs.llvm.org/show_bug.cgi?id=32142

Reported by: mjg

7 years agoadd missing MLINKS for functions that this man page documents.
John-Mark Gurney [Sun, 5 Mar 2017 18:37:25 +0000 (18:37 +0000)]
add missing MLINKS for functions that this man page documents.

This page should be renamed to eliminate an unneeded inode.

Forgotten by: markm

7 years agoremove the the duplicate words from share/
Eitan Adler [Sun, 5 Mar 2017 18:00:52 +0000 (18:00 +0000)]
remove the the duplicate words from share/

7 years agoAdd macOS 10.12
Eitan Adler [Sun, 5 Mar 2017 16:48:14 +0000 (16:48 +0000)]
Add macOS 10.12

7 years agobc/dc/patch: make some use of reallocarray(3).
Pedro F. Giffuni [Sun, 5 Mar 2017 16:10:35 +0000 (16:10 +0000)]
bc/dc/patch: make some use of reallocarray(3).

reallocarray(3) is a non portable extension from OpenBSD. Given that it is
already in FreeBSD, make easier future merges by adopting in some cases
where the code has some shared heritage with OpenBSD.

Obtained from: OpenBSD

7 years agoAdd support for card detect and write protect gpio pins to Tegra SDHCI.
Michal Meloun [Sun, 5 Mar 2017 15:34:32 +0000 (15:34 +0000)]
Add support for card detect and write protect gpio pins to Tegra SDHCI.

7 years agoFix partial requests (used by fetch -r) when the requested file is
Dag-Erling Smørgrav [Sun, 5 Mar 2017 12:06:45 +0000 (12:06 +0000)]
Fix partial requests (used by fetch -r) when the requested file is
already complete.

Since 416 is an error code, any Content-Range header in the response
would refer to the error message, not the requested document, so
relying on the value of size when we know we got a 416 is wrong.
Instead, just verify that offset == 0 and assume that we've reached
the end of the document (if offset > 0, we did not request a range,
and the server is screwing with us).  Note that we cannot distinguish
between reaching the end and going past it, but that is a flaw in the
protocol, not in the code, so we just have to assume that the caller
knows what it's doing.  A smart caller would request an offset
slightly before what it believes is the end and compare the result to
what is already in the file.

PR: 212065
Reported by: mandree
MFC after: 3 weeks

7 years agomca: fix up couple of issues introduced with amd thresholding in r314636
Andriy Gapon [Sun, 5 Mar 2017 07:46:48 +0000 (07:46 +0000)]
mca: fix up couple of issues introduced with amd thresholding in r314636

1. There a was a typo in one place where the processor family is
   checked (16 vs 0x16).  Now the checks are consolidated in a single
   function.
2. Instead of an array of struct amd_et_state objects the code allocated
   an array of pointers.  That was no problem on amd64 where the sizes
   are the same, but could be a problem on i386.

Reported by: tuexen and others
Tested by: tuexen (earlier version of the fix)
Pointyhat to: avg
MFC after: 5 days
X-MFC with: r314636

7 years agoExport a sysctl dev.<clkdom>.<unit>.clocks for each clock domain containing
Emmanuel Vadot [Sun, 5 Mar 2017 07:13:29 +0000 (07:13 +0000)]
Export a sysctl dev.<clkdom>.<unit>.clocks for each clock domain containing
all the clocks that they provide.
Each clocks are exported under the node 'clock.<clkname>' and have the following
children nodes :
- frequency
- parent (The selected parent, if any)
- parents (The list of parents, if any)
- childrens (The list of childrens, if any)
- enable_cnt (The enabled counter)

This give us the possibility to examine clocks at runtime and make graph of
the clock flow.

Reviewed by: mmel
MFC after: 2 month
Differential Revision: https://reviews.freebsd.org/D9833

7 years agoMake vmrun.sh passthrough -u and -w to bhybe
Rodney W. Grimes [Sun, 5 Mar 2017 05:02:13 +0000 (05:02 +0000)]
Make vmrun.sh passthrough -u and -w to bhybe

PR: 214273
Submitted by: Martin Birgmeier <la5lbtyi@aon.at>
Approved by: grehan
MFC after: 1 week

7 years agoChange /etc/rmt symlink from absolute to relative path,
Rodney W. Grimes [Sun, 5 Mar 2017 04:09:18 +0000 (04:09 +0000)]
Change /etc/rmt symlink from absolute to relative path,
correcting the mistake made in r6499

Approved by: grehan
MFC after: 1 week

7 years agoMove me from Alumni to active src committer.
Rodney W. Grimes [Sun, 5 Mar 2017 04:02:47 +0000 (04:02 +0000)]
Move me from Alumni to active src committer.
Promote Peter Grehan to a brother of day1 by
adding Peter Grehan (grehan) as my mentor.

Reviewed by: gjb
Approved by: grehan
Verified by: dot to make sure it produces output and no cycles occur

7 years agoDocument 3 more src/ directories
Rodney W. Grimes [Sun, 5 Mar 2017 03:58:57 +0000 (03:58 +0000)]
Document 3 more src/ directories

Approved by: grehan(mentor)
MFC after: 1 week
Verified by: igor (same errors before and after)

7 years agoremove procfs ctl interface
Eric Badger [Sun, 5 Mar 2017 03:05:24 +0000 (03:05 +0000)]
remove procfs ctl interface

This interface has no in-tree consumers and has been more or less
non-functional for several releases.

Remove manpage note that the procfs special file 'mem' is grouped to
kmem. This hasn't been true since r81107.

Remove procfs' README file. It is an out of date duplication of the manpage
(quoth the README: "since the bsd kernel is single-processor...").

Reviewed by: vangyzen, bcr (manpage)
Approved by: des (procfs maintainer), vangyzen (mentor)
Differential Revision: https://reviews.freebsd.org/D9802

7 years agoiwn: drop 'channel' parameter from iwn*_set_txpower()
Andriy Voskoboinyk [Sat, 4 Mar 2017 23:07:54 +0000 (23:07 +0000)]
iwn: drop 'channel' parameter from iwn*_set_txpower()

For 4965 just extract 'is_chan_5ghz' flag from the RXON structure
(like it was done in r281287); for others it was never used.

Tested with Intel 6205, STA mode.

7 years agosh: Fix crash if a -T trap is taken during command substitution.
Jilles Tjoelker [Sat, 4 Mar 2017 22:58:34 +0000 (22:58 +0000)]
sh: Fix crash if a -T trap is taken during command substitution.

Code like  t=$(stat -f %m "$file")  segfaulted if -T was active and a trap
was taken while the shell was waiting for the child process to finish.

What happened was that the dotrap() call in waitforjob() was hit. This
re-entered command execution (including expand.c) at a point not expected by
expbackq(), and global state (unallocated stack string and argbackq) was
corrupted.

To fix this, change expbackq() to prepare for command execution to be
re-entered.

Reported by: bdrewery
MFC after: 1 week

7 years agops(1): Only detect terminal width if stdout is a tty
Conrad Meyer [Sat, 4 Mar 2017 22:38:10 +0000 (22:38 +0000)]
ps(1): Only detect terminal width if stdout is a tty

If stdout isn't a tty, use unlimited width output rather than truncating to
79 characters.  This is helpful for shell scripts or e.g., 'ps | grep foo'.

This hardcoded width has some history: In The Beginning of History[0], the
width of ps was hardcoded as 80 bytes.  In 1985, Bloom@ added detection
using TIOCGWINSZ on stdin.[1]  In 1986, Kirk merged a change to check
stdout's window size instead.  In 1990, the fallback checks to stderr and
stdin's TIOCGWINSZ were added by Marc@, with the commit message "new
version."[2]

OS X Darwin has a very similar modification to ps(1), which simply sets
UNLIMITED for all non-tty outputs.[3]  I've chosen to respect COLUMNS
instead of behaving identically to Darwin here, but I don't feel strongly
about that.  We could match OS X for parity if that is desired.

[0]: https://svnweb.freebsd.org/csrg/bin/ps/ps.c?annotate=1065
[1]: https://svnweb.freebsd.org/csrg/bin/ps/ps.c?r1=18105&r2=18106
[2]:
https://svnweb.freebsd.org/csrg/bin/ps/ps.c?r1=40675&r2=40674&pathrev=40675
[3]:
https://opensource.apple.com/source/adv_cmds/adv_cmds-168/ps/ps.c.auto.html

PR: 217159
Reported by: Deepak Nagaraj <n.deepak at gmail.com>

7 years agoReconfigure the fifo watermark levels on the pl011 uart to interrupt when
Ian Lepore [Sat, 4 Mar 2017 22:00:05 +0000 (22:00 +0000)]
Reconfigure the fifo watermark levels on the pl011 uart to interrupt when
the fifos are 3/4 full (rc) or empty (tx).

7 years agoFix bugs exposed by the recent enabling of FIFOs in the pl011 uart. These
Ian Lepore [Sat, 4 Mar 2017 21:47:43 +0000 (21:47 +0000)]
Fix bugs exposed by the recent enabling of FIFOs in the pl011 uart.  These
have been in the code all along, but were masked by having a fifo depth of
one byte at the hardware level, so everything kinda worked by accident.

The hardware interrupts when the TX fifo is half empty, so set
sc->sc_txfifosz to 8 bytes (half the hardware fifo size) to match.  This
eliminates dropped characters on output.

Restructure the read loop to consume all the bytes in the fifo by using
the "rx fifo empty" bit of the flags register rather than the "rx ready"
bit of the interrupt status register.  The rx-ready interrupt is cleared
when the number of bytes in the fifo fall below the interrupt trigger
level, leaving the fifo half full every time receive routine was called.
Now it loops until the fifo is completely empty every time (including
when the function is called due to a receive timeout as well as for
fifo-full).

7 years agofts: Fix a potential memory leak in error case
Conrad Meyer [Sat, 4 Mar 2017 20:46:57 +0000 (20:46 +0000)]
fts: Fix a potential memory leak in error case

Dan Krejsa reports a potential memory leak in an fts_build error case,
detected by Coverity.  (It doesn't seem to show up in Coverity Scan, so I
don't have a CID to point to.)

I don't know whether it is actually possible to arrive in this case with a
non-empty 'head' list.  The cost is low, though.  One additional branch in a
terminal error case isn't the end of the world.

PR: 217125
Submitted by: Dan Krejsa <dan.krejsa at gmail.com>

7 years agoFix build after r314656
Enji Cooper [Sat, 4 Mar 2017 20:35:34 +0000 (20:35 +0000)]
Fix build after r314656

Some of the changes I introduced to use .ALLSRC were correct in spirit,
but incorrect in reality -- in particular, ../Makefile.inc hadn't been
pulled in via bsd.init.mk (via bsd.lib.mk, bsd.prog.mk), so the value
of .ALLSRC (evaluated immediately) was empty. .include bsd.init.mk
explicitly so we can be certain that the values used as dependencies in
the targets are defined when the target recipe has been evaluated.

Reminder: thou shalt separate out separate functional changes before
          committing them.

(YUGE) Pointyhat to: ngie
In collaboration with: bdrewery
MFC after: 1 month
Reported by: Jenkins, cy, ler, O. Hartmann, Michael Butler
Sponsored by: Dell EMC Isilon

7 years agoRemove duplicate prototype in the LinuxKPI to fix compilation warning.
Hans Petter Selasky [Sat, 4 Mar 2017 20:06:47 +0000 (20:06 +0000)]
Remove duplicate prototype in the LinuxKPI to fix compilation warning.

Reported by: emaste @
MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years ago[rpi] rpi3 should use the same cpufreq logic as rpi2, not rpi-b
Oleksandr Tymoshenko [Sat, 4 Mar 2017 17:34:36 +0000 (17:34 +0000)]
[rpi] rpi3 should use the same cpufreq logic as rpi2, not rpi-b

RPi3 cpufreq is more like that on RPi2. Setting arm frequency
above min (say, "sysctl hw.cpufreq.arm_freq=600000001") turns on
turbo mode, and the firmware automatically raises voltage, sets
frequency to max 1200MHz, and throttle when overheat, etc.

Swap if/else parts and use SOC_BCM2835 def so RPi3 can share the
same cpufreq logic as RPi2, instead of falling to that for RPi.

Submitted by: Jia-Shiun Li <jiashiun@gmail.com>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D9640

7 years agonewfs_nandfs: Fix unaligned pointer warning
Conrad Meyer [Sat, 4 Mar 2017 16:59:55 +0000 (16:59 +0000)]
newfs_nandfs: Fix unaligned pointer warning

PR: 217532
Submitted by: Trond Endrestol <Trond.Endrestol at ximalas.info>