]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoImplement local sfbuf_map and sfbuf_unmap for MIPS32.
Adrian Chadd [Sat, 6 Sep 2014 22:38:32 +0000 (22:38 +0000)]
Implement local sfbuf_map and sfbuf_unmap for MIPS32.

The pre-rework behaviour was not to keep the cached mappings around after
the sfbuf was used but instead to recycle said mappings.

PR: kern/193400

10 years agoFix a leak of an address, if the address is scheduled for removal
Michael Tuexen [Sat, 6 Sep 2014 20:03:24 +0000 (20:03 +0000)]
Fix a leak of an address, if the address is scheduled for removal
and the stack is torn down.
Thanks to Peter Bostroem and Jiayang Liu from Google for reporting the
issue.

MFC after: 1 week

10 years agoAdd a define for index of IA32_XSS MSR, which is, per SDM rev. 50, an
Konstantin Belousov [Sat, 6 Sep 2014 19:47:37 +0000 (19:47 +0000)]
Add a define for index of IA32_XSS MSR, which is, per SDM rev. 50, an
analog of XCR0 for ring 0 FPU state, used by XSAVES and XRSTORS.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoSave one register read (AHCI_IS) for AHCI controllers with only one port.
Alexander Motin [Sat, 6 Sep 2014 19:43:48 +0000 (19:43 +0000)]
Save one register read (AHCI_IS) for AHCI controllers with only one port.

For controllers with only one port (like PCIe or M.2 SSDs) interrupt can
come from only one source, and skipping read saves few percents of CPU time.

MFC after: 1 month
H/W donated by: I/O Switch

10 years agoSDM rev. 50 defines the use of the next 8 bytes in the xstate header.
Konstantin Belousov [Sat, 6 Sep 2014 19:39:12 +0000 (19:39 +0000)]
SDM rev. 50 defines the use of the next 8 bytes in the xstate header.
It is the compaction bitmask, with the highest bit defining if compact
format of the xsave area is used at all.

Adjust the definition of struct xstate_hdr, provide define for bit 63.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoFix the handling of sysctl variables when used with VIMAGE.
Michael Tuexen [Sat, 6 Sep 2014 19:12:14 +0000 (19:12 +0000)]
Fix the handling of sysctl variables when used with VIMAGE.
While there do some cleanup of the code.

MFC after: 1 week

10 years agoWhen registering an association between a device and an xref phandle, create
Ian Lepore [Sat, 6 Sep 2014 18:43:17 +0000 (18:43 +0000)]
When registering an association between a device and an xref phandle, create
an entry in the xref list if one doesn't already exist for the given handle.

On a system that uses phandle properties, the init-time scan of the tree
which builds the xref list will pre-create entries for every xref handle
that exists in the data.  On systems where the xref and node handles are
synonymous there is no phandle property in referenced nodes, and the xref
list will initialize to an empty state.  In the latter case, we still need
to be able to associate a device_t with an xref handle, so we create list
entries on the fly as needed.  Since the node and xref handles are
synonymous, we have all the info needed to create a list entry at device
registration time.

The downside to this change is that it basically allows on the fly creation
of xref handles as synonyms of node handles, and the association of a
device_t with them.  Whether this is a bug or a feature is in the eye of
the beholder, I guess.

10 years agoRestore order of interrupt setup. Minor problems can result by
Warner Losh [Sat, 6 Sep 2014 18:20:50 +0000 (18:20 +0000)]
Restore order of interrupt setup. Minor problems can result by
setting up the interrupts too early:

Reviewed by: mav@
Sponsored by: Netflix

10 years agoo Remove __unused attribute on variables which actually used
Ruslan Bukin [Sat, 6 Sep 2014 18:08:21 +0000 (18:08 +0000)]
o Remove __unused attribute on variables which actually used
o Unmagic 'configuration done' bit
o Move probe() to place before attach() for better navigation
o Use bus_read_n instead of bus_space_read_n functions

Pointed out by: andrew
Sponsored by: DARPA, AFRL

10 years agoRevert rr271190, it was based on a misunderstanding. The problem of
Ian Lepore [Sat, 6 Sep 2014 17:50:59 +0000 (17:50 +0000)]
Revert rr271190, it was based on a misunderstanding.  The problem of
non-existant device<->xref info needs to be handled by creating the info,
which will come in a subsequent commit.

10 years agoFixthe spelling of ehci
Andrew Turner [Sat, 6 Sep 2014 17:33:41 +0000 (17:33 +0000)]
Fixthe spelling of ehci

10 years agoAdd more bits for the XSAVE features from CPUID 0xd, sub-function 1
Konstantin Belousov [Sat, 6 Sep 2014 15:45:45 +0000 (15:45 +0000)]
Add more bits for the XSAVE features from CPUID 0xd, sub-function 1
%eax report.

Print the XSAVE features 0xd/1 in the boot banner.  The printcpuinfo()
is executed late enough so that XSAVE is already enabled.

There is no known to me off the shelf hardware that implements any
feature bits except XSAVEOPT, the list is taken from SDM rev. 50.  The
banner printing will allow us to note the hardware arrival.

Sponsored by:     The FreeBSD Foundation
MFC after:     1 week

10 years agoFix typo in comments.
Alexander Motin [Sat, 6 Sep 2014 15:37:55 +0000 (15:37 +0000)]
Fix typo in comments.

Submitted by: Benedict Reuschling <bcr@FreeBSD.org>
MFC after: 6 days

10 years agoCreate a separate structure for per-CPU state saved across suspend and
John Baldwin [Sat, 6 Sep 2014 15:23:28 +0000 (15:23 +0000)]
Create a separate structure for per-CPU state saved across suspend and
resume that is a superset of a pcb.  Move the FPU state out of the pcb and
into this new structure.  As part of this, move the FPU resume code on
amd64 into a C function.  This allows resumectx() to still operate only on
a pcb and more closely mirrors the i386 code.

Reviewed by: kib (earlier version)

10 years agoAdd OF_xref_from_node_strict() which returns -1 if there is no xref handle
Ian Lepore [Sat, 6 Sep 2014 15:11:35 +0000 (15:11 +0000)]
Add OF_xref_from_node_strict() which returns -1 if there is no xref handle
for the node.  The default routine returns the untranslated handle, which
is sometimes useful, but sometimes you really need to know there's no
entry in the xref<->node<->device translation table.

10 years agoAllow us to use the virtual timer. It is currently disabled, but should
Andrew Turner [Sat, 6 Sep 2014 13:21:07 +0000 (13:21 +0000)]
Allow us to use the virtual timer. It is currently disabled, but should
be usable as the default timer in place of the physical timer.

We are guaranteed to have access to the virtual timer, but when running
under a hypervisor may not have access to the physical.

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

10 years agomdoc: remove superfluous paragraph macro.
Joel Dahl [Sat, 6 Sep 2014 11:19:12 +0000 (11:19 +0000)]
mdoc: remove superfluous paragraph macro.

10 years agoAvoid ctld(8) crash on getaddrinfo(3) failure.
Edward Tomasz Napierala [Sat, 6 Sep 2014 09:03:13 +0000 (09:03 +0000)]
Avoid ctld(8) crash on getaddrinfo(3) failure.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

10 years agoAdd FPGA Manager driver. This driver allows to program FPGA core
Ruslan Bukin [Sat, 6 Sep 2014 08:48:57 +0000 (08:48 +0000)]
Add FPGA Manager driver. This driver allows to program FPGA core
from FreeBSD userspace running on ARM core.

Sponsored by: DARPA, AFRL

10 years agoPlug unnecessary fp assignments in kern_fcntl.
Mateusz Guzik [Fri, 5 Sep 2014 23:56:25 +0000 (23:56 +0000)]
Plug unnecessary fp assignments in kern_fcntl.

No functional changes.

10 years agoSet vnet context before accessing V_socket_hhh[].
Gleb Smirnoff [Fri, 5 Sep 2014 19:50:18 +0000 (19:50 +0000)]
Set vnet context before accessing V_socket_hhh[].

Submitted by: "Hiroo Ono (小野寛生)" <hiroo.ono+freebsd gmail.com>

10 years agoAdd the virtual timer irq to the list of interrupts we enable on secondary
Andrew Turner [Fri, 5 Sep 2014 19:00:30 +0000 (19:00 +0000)]
Add the virtual timer irq to the list of interrupts we enable on secondary
cores.

10 years agovt_vga: vd_setpixel_t and vd_drawrect_t are noop in text mode
Jean-Sébastien Pédron [Fri, 5 Sep 2014 18:11:39 +0000 (18:11 +0000)]
vt_vga: vd_setpixel_t and vd_drawrect_t are noop in text mode

MFC after: 3 days

10 years agoAdd the fp{get,set}{mask,round} functions to the public symbols in the map.
Andrew Turner [Fri, 5 Sep 2014 18:11:36 +0000 (18:11 +0000)]
Add the fp{get,set}{mask,round} functions to the public symbols in the map.
These are only exported for armv6hf as the soft-float ABIs have these in
the softfloat Symbol.map file.

10 years agoCorrect patch paths (remove contrib/llvm/)
Ed Maste [Fri, 5 Sep 2014 18:07:15 +0000 (18:07 +0000)]
Correct patch paths (remove contrib/llvm/)

The example in contrib/llvm/patches/README.TXT fails otherwise.

Sponsored by: DARPA, AFRL

10 years agoGarbage collect NFSMINOFF() from the NFS stack; this unused macro replicates
Robert Watson [Fri, 5 Sep 2014 17:05:51 +0000 (17:05 +0000)]
Garbage collect NFSMINOFF() from the NFS stack; this unused macro replicates
mbuf-initialisation logic that is best left to centralised mbuf utility
code rather than scattered around the kernel.

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

10 years agoClarify a diagnostic printf() in the mbuf code: M_EXT doesn't necessarily
Robert Watson [Fri, 5 Sep 2014 16:46:28 +0000 (16:46 +0000)]
Clarify a diagnostic printf() in the mbuf code: M_EXT doesn't necessarily
imply a cluster is attached; it could also refer to some other sort of
external storage (e.g., an sf_buf).

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

10 years agoAdd support for gdb's memory searching capabilities to our in-kernel gdb
Benno Rice [Fri, 5 Sep 2014 16:40:47 +0000 (16:40 +0000)]
Add support for gdb's memory searching capabilities to our in-kernel gdb
server.

Submitted by: Daniel O'Connor <daniel.oconnor@isilon.com>
Reviewed by: jhb
Sponsored by: EMC Isilon Storage Division

10 years agoDocument initiator-portal netmask support.
Edward Tomasz Napierala [Fri, 5 Sep 2014 14:58:24 +0000 (14:58 +0000)]
Document initiator-portal netmask support.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

10 years agoTurn two errors, which are possible to trigger only by bugs,
Edward Tomasz Napierala [Fri, 5 Sep 2014 14:48:06 +0000 (14:48 +0000)]
Turn two errors, which are possible to trigger only by bugs,
into assertions.

Discussed with: mav@
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

10 years agoRevert r271159, Mis-patched the tree.
Kevin Lo [Fri, 5 Sep 2014 14:35:34 +0000 (14:35 +0000)]
Revert r271159, Mis-patched the tree.

Pointed out by: kib

10 years agoMake it possible to quote names in autofs maps using double quotes.
Edward Tomasz Napierala [Fri, 5 Sep 2014 14:32:09 +0000 (14:32 +0000)]
Make it possible to quote names in autofs maps using double quotes.

Note that this is a workaround, not a proper solution.  If you know
lex well, and want to help - please let me know, I'll explain how it
should work.

PR: 192968
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

10 years agoInvert AHCI_Q_NOBSYRES quirk meaning, waiting for readiness by default.
Alexander Motin [Fri, 5 Sep 2014 13:45:14 +0000 (13:45 +0000)]
Invert AHCI_Q_NOBSYRES quirk meaning, waiting for readiness by default.

I gave up to update list of Marvell chips that require this quirk.
The final nail was growing number of PCIe/M.2 SSDs where Marvell chips
have PCI IDs of different vendors.

MFC after: 1 week
H/W donated by: I/O Switch

10 years agoThe USB LED driver for the Dream Cheeky WebMail Notifier.
Kevin Lo [Fri, 5 Sep 2014 11:25:58 +0000 (11:25 +0000)]
The USB LED driver for the Dream Cheeky WebMail Notifier.

Reviewed by: hselasky

10 years agoFix typo.
Edward Tomasz Napierala [Fri, 5 Sep 2014 11:10:44 +0000 (11:10 +0000)]
Fix typo.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

10 years agoAdd IDs for Intel Patsburg USB 2.0 controller.
Alexander Motin [Fri, 5 Sep 2014 07:42:34 +0000 (07:42 +0000)]
Add IDs for Intel Patsburg USB 2.0 controller.

10 years agoRoll back r271012 even more aggressively.
Ed Schouten [Fri, 5 Sep 2014 05:36:32 +0000 (05:36 +0000)]
Roll back r271012 even more aggressively.

I've looked at the GCC sources and I now understand what's going wrong.
THe C11 keywords are simply nonexistent when using C++ mode. They are
marked as C-only in the parser. This is absolutely impractical for
multiple reasons:

- The C11 keywords do not conflict with C++ naming rules. They all start
  with _[A-Z]. There is no reason to make them C-only.

- It makes it practically impossible for people to use these keywords in
  C header files and expect them to work from within C++ sources.

As I said in my previous commit message: GCC is by far the weirdest
compiler that I've ever used.

10 years agoPartially revert r271012.
Ed Schouten [Fri, 5 Sep 2014 05:20:52 +0000 (05:20 +0000)]
Partially revert r271012.

Incredibly weird: GCC 4.7/4.9 do support the _Noreturn and _Thread_local
keywords, but not during bootstrapping. GCC is by far the weirdest
compiler that I've ever used.

Reported by: andreast@

10 years agoMerge forgotten .h files from vendor branch.
Warner Losh [Fri, 5 Sep 2014 02:21:45 +0000 (02:21 +0000)]
Merge forgotten .h files from vendor branch.

10 years agoBring in forgotten pinfunc.h files from last import.
Warner Losh [Fri, 5 Sep 2014 02:20:06 +0000 (02:20 +0000)]
Bring in forgotten pinfunc.h files from last import.

10 years agoApply known workarounds for modern MacBooks.
Pedro F. Giffuni [Fri, 5 Sep 2014 01:06:45 +0000 (01:06 +0000)]
Apply known workarounds for modern MacBooks.

The legacy USB circuit tends to give trouble on MacBook.
While the original report covered MacBook, extend the fix
preemptively for the newer MacBookPro too.

PR: 191693
Reviewed by: emaste
MFC after: 5 days

10 years agouse a straight buffer instead of an iov w/ 1 segment... The aesni
John-Mark Gurney [Thu, 4 Sep 2014 23:53:51 +0000 (23:53 +0000)]
use a straight buffer instead of an iov w/ 1 segment...  The aesni
driver when it hits a mbuf/iov buffer, it mallocs and copies the data
for processing..  This improves perf by ~8-10% on my machine...

I have thoughts of fixing AES-NI so that it can better handle segmented
buffers, which should help improve IPSEC performance, but that is for
the future...

10 years agoRemove an initialized, but otherwise, unused variable.
Steve Kargl [Thu, 4 Sep 2014 23:50:05 +0000 (23:50 +0000)]
Remove an initialized, but otherwise, unused variable.

10 years agoSeparate out PCI attachment from the main AHCI driver. Move checks of
Warner Losh [Thu, 4 Sep 2014 22:22:53 +0000 (22:22 +0000)]
Separate out PCI attachment from the main AHCI driver. Move checks of
PCI IDs into quirks, which mostly fit (though you'd get no argument
from me that AHCI_Q_SATA1_UNIT0 is oddly specific). Set these quirks
in the PCI attachment. Make some shared functions public so that PCI
and possibly other bus attachments can use them.

The split isn't perfect yet, but it is functional. The split will be
perfected as other bus attachments for AHCI are written.

Sponsored by: Netflix
Reviewed by: kan, mav
Differential Revision: https://reviews.freebsd.org/D699

10 years agoFix a bug which prevented mount.fstab parameter from being converted
Hiroki Sato [Thu, 4 Sep 2014 22:00:52 +0000 (22:00 +0000)]
Fix a bug which prevented mount.fstab parameter from being converted
when jail_JID_devfs_enable=NO.

Spotted by: peter

10 years agosh: Allow enabling job control without a tty in non-interactive mode.
Jilles Tjoelker [Thu, 4 Sep 2014 21:48:33 +0000 (21:48 +0000)]
sh: Allow enabling job control without a tty in non-interactive mode.

If no tty is available, 'set -m' is still useful to put jobs in their own
process groups.

10 years agoReimport dts files from vendor repo now that it has been properly
Warner Losh [Thu, 4 Sep 2014 21:48:33 +0000 (21:48 +0000)]
Reimport dts files from vendor repo now that it has been properly
trimmed.

10 years agoAllow multiple image activators to run on the same execution by changing
Sean Bruno [Thu, 4 Sep 2014 21:31:25 +0000 (21:31 +0000)]
Allow multiple image activators to run on the same execution by changing
imgp->interpreted to a bitmask instead of, functionally, a bool. Each
imgactivator now requires its own flag in interpreted to indicate whether
or not it has already examined argv[0].

Change imgp->interpreted to an unsigned char to add one extra bit for
future use.

With this change, one can execute a shell script from a 64bit host native
make and still get the binmisc image activator to fire for the script
interpreter.  Prior to this, execution would fail.

Phabric: https://reviews.freebsd.org/D696
Reviewed by: jhb@
MFC after: 4 weeks

10 years agoDelete old arm dts tree. This was created by cherry picking from a
Warner Losh [Thu, 4 Sep 2014 21:28:25 +0000 (21:28 +0000)]
Delete old arm dts tree. This was created by cherry picking from a
full vendor tree. This worked great until it was time to update, but
now it is time to update. Hit the rest button by removing this branch
and re-adding it by a full copy of whatever is in the vendor tree.

10 years agoProperly trim the vendor tree to include only those files that we want
Warner Losh [Thu, 4 Sep 2014 21:26:34 +0000 (21:26 +0000)]
Properly trim the vendor tree to include only those files that we want
merged into FreeBSD. Cherry picking from a full vendor tree was too
hard and lead to undestirable svn results.

Note: We only tim the dts* files, we don't trim the dt-bindings tree,
since having all of them causes no problems and the benefit to
trimming there is far out weighed by the cost of doing the trim each
time.

10 years agoAdd mrsas(4) to GENERIC for i386 and amd64.
Mark Johnston [Thu, 4 Sep 2014 21:06:33 +0000 (21:06 +0000)]
Add mrsas(4) to GENERIC for i386 and amd64.

Approved by: ambrisko, kadesai
MFC after: 3 days

10 years agoUpdate bindings to latest vendor branch representing 3.17-rc2 level of
Warner Losh [Thu, 4 Sep 2014 20:48:16 +0000 (20:48 +0000)]
Update bindings to latest vendor branch representing 3.17-rc2 level of
Linux DTS API.

10 years agoStop setting the iomux device status to disabled, now that we have a driver.
Ian Lepore [Thu, 4 Sep 2014 19:52:17 +0000 (19:52 +0000)]
Stop setting the iomux device status to disabled, now that we have a driver.

10 years agoSatisfy assertion in m_demote().
Gleb Smirnoff [Thu, 4 Sep 2014 19:28:02 +0000 (19:28 +0000)]
Satisfy assertion in m_demote().

Sponsored by: Nginx, Inc.

10 years agoChange a very strange code in m_demote() to simple assertion.
Gleb Smirnoff [Thu, 4 Sep 2014 19:27:30 +0000 (19:27 +0000)]
Change a very strange code in m_demote() to simple assertion.

Sponsored by: Nginx, Inc.

10 years agoIn tcp_input(), don't acquire the pcbinfo global write lock for SYN
John Baldwin [Thu, 4 Sep 2014 19:09:08 +0000 (19:09 +0000)]
In tcp_input(), don't acquire the pcbinfo global write lock for SYN
packets targeting a listening socket.  Permit to reduce TCP input
processing starvation in context of high SYN load (e.g. short-lived TCP
connections or SYN flood).

Submitted by: Julien Charbon <jcharbon@verisign.com>
Reviewed by: adrian, hiren, jhb, Mike Bentkofsky

10 years agolibc/locale: Remove a wrong comma.
Pedro F. Giffuni [Thu, 4 Sep 2014 17:36:21 +0000 (17:36 +0000)]
libc/locale: Remove a wrong comma.

This only had some effect when debugging.

Obtained from: DragonflyBSD
MFC after: 3 days

10 years agoFix debug output that has erroneously been committed with the last update.
Stefan Eßer [Thu, 4 Sep 2014 17:19:16 +0000 (17:19 +0000)]
Fix debug output that has erroneously been committed with the last update.

Obtained from: Jan Beich
MFC after: 3 days

10 years agoFixes for tcp_respond() comment.
Gleb Smirnoff [Thu, 4 Sep 2014 17:05:57 +0000 (17:05 +0000)]
Fixes for tcp_respond() comment.

10 years agoWrap some long lines.
Warner Losh [Thu, 4 Sep 2014 16:40:54 +0000 (16:40 +0000)]
Wrap some long lines.

10 years agoImplement the imx_iomux_get/set_gpr() interface for imx6.
Ian Lepore [Thu, 4 Sep 2014 15:11:57 +0000 (15:11 +0000)]
Implement the imx_iomux_get/set_gpr() interface for imx6.

10 years agoThe iomux driver is no longer optional, all imx platforms have it as
Ian Lepore [Thu, 4 Sep 2014 14:59:27 +0000 (14:59 +0000)]
The iomux driver is no longer optional, all imx platforms have it as
standard now, so remove it from kernel configs.

10 years agoImplement the same public interface in imx51 and imx6 iomux; use the common
Ian Lepore [Thu, 4 Sep 2014 14:57:04 +0000 (14:57 +0000)]
Implement the same public interface in imx51 and imx6 iomux; use the common
header file for both.  Remove some unused code from imx51_iomux.  The iomux
drivers are required, not optional, adjust the files.* entries accordingly.

10 years agoRevert r269814: blkfront: add support for unmapped IO
Roger Pau Monné [Thu, 4 Sep 2014 14:56:24 +0000 (14:56 +0000)]
Revert r269814: blkfront: add support for unmapped IO

Current busdma code for unmapped bios will not properly align the segment
size, causing corruption on blkfront devices. Revert the commit until
busdma code is fixed.

Reported by: mav
MFC after: 1 day

10 years agoMerge the amd64 and i386 identcpu.c into a single x86 implementation.
John Baldwin [Thu, 4 Sep 2014 14:26:25 +0000 (14:26 +0000)]
Merge the amd64 and i386 identcpu.c into a single x86 implementation.
This brings the structured extended features mask and VT-x reporting to
i386 and Intel cache and TLB info (under bootverbose) to amd64.

10 years agoAdd a basic iomux driver for imx6.
Ian Lepore [Thu, 4 Sep 2014 14:25:32 +0000 (14:25 +0000)]
Add a basic iomux driver for imx6.

Submitted by: bsam@

10 years agoFix typo in variable name.
Ian Lepore [Thu, 4 Sep 2014 13:13:42 +0000 (13:13 +0000)]
Fix typo in variable name.

10 years agoAdd initial support for Altera SOCFPGA (heterogeneous ARM/FPGA) SoC family.
Ruslan Bukin [Thu, 4 Sep 2014 12:44:40 +0000 (12:44 +0000)]
Add initial support for Altera SOCFPGA (heterogeneous ARM/FPGA) SoC family.
Include board configuration for Terasic SoCKit (Altera Cyclone V).

Sponsored by: DARPA, AFRL

10 years agoImprove r265338. When inserting mbufs into TCP reassembly queue,
Gleb Smirnoff [Thu, 4 Sep 2014 09:15:44 +0000 (09:15 +0000)]
Improve r265338. When inserting mbufs into TCP reassembly queue,
try to collapse adjacent pieces using m_catpkt(). In best case
scenario it copies data and frees mbufs, making mbuf exhaustion
attack harder.

Suggested by: Jonathan Looney <jonlooney gmail.com>
Security: Hardens against remote mbuf exhaustion attack.
Sponsored by: Netflix
Sponsored by: Nginx, Inc.

10 years agoProvide m_catpkt(), a wrapper around m_cat() that deals with M_PKTHDR mbufs.
Gleb Smirnoff [Thu, 4 Sep 2014 09:07:14 +0000 (09:07 +0000)]
Provide m_catpkt(), a wrapper around m_cat() that deals with M_PKTHDR mbufs.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

10 years agoSystems with lots of geom providers can end up with a kern.geom.confxml
Benno Rice [Thu, 4 Sep 2014 03:31:48 +0000 (03:31 +0000)]
Systems with lots of geom providers can end up with a kern.geom.confxml
value too large for the buffer allocated. Work around this by retrying
a few times with larger buffer sizes.

Submitted by: Scott Ferris <scott.ferris@isilon.com>
Reviewed by: mlaier, ngie
Sponsored by: EMC Isilon Storage Division

10 years agoThe imx5x and imx6 chips have an onboard IOMUX device which also contains a
Ian Lepore [Thu, 4 Sep 2014 03:04:37 +0000 (03:04 +0000)]
The imx5x and imx6 chips have an onboard IOMUX device which also contains a
few "general purpose registers" whose values control chip behavior in ways
that have nothing to do with IO pin mux control.  Define a simple API that
other soc-specific code can use to read and write the registers, and provide
the imx51 implementation of them.

10 years agoRemove a stray blank line from the Intel cache and TLB info.
John Baldwin [Thu, 4 Sep 2014 02:28:17 +0000 (02:28 +0000)]
Remove a stray blank line from the Intel cache and TLB info.

10 years ago- Move blacklists of broken TSCs out of the printcpuinfo() function
John Baldwin [Thu, 4 Sep 2014 02:25:59 +0000 (02:25 +0000)]
- Move blacklists of broken TSCs out of the printcpuinfo() function
  and into the TSC probe routine.
- Initialize cpu_exthigh once in finishidentcpu() which is called
  before printcpuinfo() (and matches the behavior on amd64).

10 years agoFix typo: s/_maske/_mask/
Glen Barber [Thu, 4 Sep 2014 02:06:33 +0000 (02:06 +0000)]
Fix typo: s/_maske/_mask/

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoRemove trailing whitespace.
John Baldwin [Thu, 4 Sep 2014 01:56:15 +0000 (01:56 +0000)]
Remove trailing whitespace.

10 years ago- Move prototypes for various functions into out of C files and into
John Baldwin [Thu, 4 Sep 2014 01:46:06 +0000 (01:46 +0000)]
- Move prototypes for various functions into out of C files and into
  <machine/md_var.h>.
- Move some CPU-related variables out of i386/i386/identcpu.c to
  initcpu.c to match amd64.
- Move the declaration of has_f00f_hack out of identcpu.c to machdep.c.
- Remove a misleading comment from i386/i386/initcpu.c (locore zeros
  the BSS before it calls identify_cpu()) and remove explicit zero
  assignments to reduce the diff with amd64.

10 years agoPlug a hypothetical use after free in sysctl kern.proc.groups.
Mateusz Guzik [Thu, 4 Sep 2014 01:21:33 +0000 (01:21 +0000)]
Plug a hypothetical use after free in sysctl kern.proc.groups.

MFC after: 1 week

10 years agoDo not blindly announce 1000baseT half-duplex capability in
Pyun YongHyeon [Thu, 4 Sep 2014 01:04:37 +0000 (01:04 +0000)]
Do not blindly announce 1000baseT half-duplex capability in
autonegotiation.  Some controllers like cgem(4) do not support
half-duplex at gigabit speeds.

10 years agoAdd KASSERTs to catch the case where a developer may have forgotten to
Benno Rice [Thu, 4 Sep 2014 00:10:06 +0000 (00:10 +0000)]
Add KASSERTs to catch the case where a developer may have forgotten to
set bo_bsize on a bufobj.

This is a slight modification of the patch provided.

PR: 193146
Submitted by: Conrad Meyer <conrad.meyer@isilon.com>
Sponsored by: EMC Isilon Storage Division

10 years agoCreate a /boot/dtb directory to house DTB blobs. The flattened device
Warner Losh [Wed, 3 Sep 2014 21:59:07 +0000 (21:59 +0000)]
Create a /boot/dtb directory to house DTB blobs. The flattened device
tree support includes a device tree source compiler dtc(8) which
converts .dts files into .dtb files. /boot/loader will load dtb files
from this directory by default, allowing for fewer differences between
images for different SoCs. Compiled dts files will wind up here
eventually as an alternative to embedding them into the kernel.
Document this in hier(7), as well as add missing entries for
/boot/firmware and /boot/zfs, though the latter two should only be
considered place holders if someone wants to make them better.

10 years agoAdd a function to get the frequency of the AHB bus. Another stopgap
Ian Lepore [Wed, 3 Sep 2014 21:45:39 +0000 (21:45 +0000)]
Add a function to get the frequency of the AHB bus.  Another stopgap
function until we have full clock support for imx6.

10 years agoWhen built with FDT support, add /boot/dtb to the list of search directories.
Ian Lepore [Wed, 3 Sep 2014 21:25:36 +0000 (21:25 +0000)]
When built with FDT support, add /boot/dtb to the list of search directories.

10 years agoActually save and restore FPU state on APs during suspend and resume.
John Baldwin [Wed, 3 Sep 2014 21:17:09 +0000 (21:17 +0000)]
Actually save and restore FPU state on APs during suspend and resume.

Committed from: Atom-based HP netbook after resuming in X

10 years agoRemove DIAGNOSTIC from the kernel config of low-end arm systems. Sanity
Ian Lepore [Wed, 3 Sep 2014 19:37:41 +0000 (19:37 +0000)]
Remove DIAGNOSTIC from the kernel config of low-end arm systems.  Sanity
checks such as vmem_check() can make a low-end system go completely
unresponsive for as much as 3 seconds out of every 10.

10 years agoNote that script(1) consumes filemon(4).
David E. O'Brien [Wed, 3 Sep 2014 19:06:08 +0000 (19:06 +0000)]
Note that script(1) consumes filemon(4).

10 years agoAlways seek back to the beginning of a regular directory, even if the
John Baldwin [Wed, 3 Sep 2014 19:01:34 +0000 (19:01 +0000)]
Always seek back to the beginning of a regular directory, even if the
previous seek location was 0.  Without this, readdir() would see
dd_loc of zero and call getdirentries() which would start reading
entries at the current seek location of the directory ignoring the
first batch of entries.  Also, rewinddir() should always seek so that
it reads the directory from the beginning to get updated entries.

PR: 192935
Reported by: iron@mail.ua
MFC after: 3 days

10 years agoAvoid ./ in zoneinfo entries in METALOG
Ed Maste [Wed, 3 Sep 2014 18:51:33 +0000 (18:51 +0000)]
Avoid ./ in zoneinfo entries in METALOG

Use of "find ." resulted in METALOG entries with an extra ./ -- e.g.,
./usr/share/zoneinfo/./America/Toronto.  Avoid this by using globbing
via "find *" instead.

Reviewed by: brooks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D719

10 years agoFixes and enhancements for the if_cgem driver...
Ian Lepore [Wed, 3 Sep 2014 17:51:03 +0000 (17:51 +0000)]
Fixes and enhancements for the if_cgem driver...

- miibus fixes as suggested by Yonghyeon Pyun.
- enable VLAN MTU support.
- fix a few WITNESS complaints in cgem_attach().
- have cgem_attach() properly init the ifnet struct before calling
  mii_attach() to fix panic when using e1000phy.
- fix ethernet address changing.
- fix transmit queue overflow handling.
- tweak receive queue handling to reduce receive overflows.
- bring out MAC statistic counters to sysctls.
- add e1000phy to config file.
- implement receive hang work-around described in reference guide.
- change device name from if_cgem to cgem to be consistent with other
  interfaces.

Submitted by: Thomas Skibo <ThomasSkibo@sbcglobal.net>
Reviewed by: wkoszek, Yonghyeon PYUN <pyunyh@gmail.com>

10 years agoUse sh -c '...' to launch the dtb build scripts with env stuff prepended,
Ian Lepore [Wed, 3 Sep 2014 17:32:17 +0000 (17:32 +0000)]
Use sh -c '...' to launch the dtb build scripts with env stuff prepended,
otherwise it tries to treat the env var stuff as a script file name.

10 years agoImport a hackish tool I use to examine the skew of the TSC across
John Baldwin [Wed, 3 Sep 2014 17:26:46 +0000 (17:26 +0000)]
Import a hackish tool I use to examine the skew of the TSC across
CPUs in a system.  The tool queries the kernel for its set of CPUs
and compares TSC values on each of the additional CPUs to the first
CPU in turn.  It then outputs a table of simple statistics.

10 years agoUpdate the autofs(5) manual to reflect it first appeared in
Glen Barber [Wed, 3 Sep 2014 17:15:12 +0000 (17:15 +0000)]
Update the autofs(5) manual to reflect it first appeared in
FreeBSD 10.1-RELEASE.

Submitted by: dhw
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoApparently, the patch commited in svn r271029 doesn't actually do anyting,
Sean Bruno [Wed, 3 Sep 2014 15:48:07 +0000 (15:48 +0000)]
Apparently, the patch commited in svn r271029 doesn't actually do anyting,
so we still need to modify the code in place. Pointed out by emaste.

MFC after: 2 days
Relnotes: yes

10 years agoDo not direct commit to contrib/llvm. Make the change a patch file instead.
Sean Bruno [Wed, 3 Sep 2014 15:32:38 +0000 (15:32 +0000)]
Do not direct commit to contrib/llvm.  Make the change a patch file instead.
Reverts 271025 but still functionally patches it.  Original intent is still
the same.  Pointed out by rdivacky.

MFV:  Only emit movw on ARMv6T2

Building for the FreeBSD default target ARMv6 was emitting movw ASM on certain
test cases (found building qmake4/5 for ARM).  Don't do that, moreover, the AS
in base doesn't understand this instruction for this target.  One would need
to use --integrated-as to get this to build if desired.

http://llvm.org/viewvc/llvm-project?view=revision&revision=216989

Submitted by: ian
Reviewed by: dim
Obtained from: llvm.org
MFC after: 2 days
Relnotes: yes

10 years agoUse better type for i.
Pawel Jakub Dawidek [Wed, 3 Sep 2014 15:08:33 +0000 (15:08 +0000)]
Use better type for i.

10 years agoDeclare i.
Pawel Jakub Dawidek [Wed, 3 Sep 2014 15:06:47 +0000 (15:06 +0000)]
Declare i.

Reported by: sbruno

10 years agoFix descriptors leak in case of nvlist_xunpack() failure.
Pawel Jakub Dawidek [Wed, 3 Sep 2014 14:44:23 +0000 (14:44 +0000)]
Fix descriptors leak in case of nvlist_xunpack() failure.

Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>

10 years agoMFV: Only emit movw on ARMv6T2
Sean Bruno [Wed, 3 Sep 2014 14:16:50 +0000 (14:16 +0000)]
MFV:  Only emit movw on ARMv6T2

Building for the FreeBSD default target ARMv6 was emitting movw ASM on certain
test cases (found building qmake4/5 for ARM).  Don't do that, moreover, the AS
in base doesn't understand this instruction for this target.  One would need
to use --integrated-as to get this to build if desired.

http://llvm.org/viewvc/llvm-project?view=revision&revision=216989

Submitted by: ian
Reviewed by: dim
Obtained from: llvm.org
MFC after: 2 days

10 years agoFix spelling.
Hans Petter Selasky [Wed, 3 Sep 2014 13:15:16 +0000 (13:15 +0000)]
Fix spelling.

PR: 193279
MFC after: 1 week

10 years agoAdd new quirk.
Hans Petter Selasky [Wed, 3 Sep 2014 11:46:43 +0000 (11:46 +0000)]
Add new quirk.

PR: 193279
MFC after: 1 week