196540 Commits

Author SHA1 Message Date
ache
3b103d7c51 MFC: r269806,r269809,r269811,r269810
r269806:
Fix too long (seed length >12 chars) challenge handling.
1) " ext" length should be included into OPIE_CHALLENGE_MAX (as all places
of opie code expects that).
2) Overflow check in challenge.c is off by 1 even with corrected
OPIE_CHALLENGE_MAX
3) When fallback to randomchallenge() happens and rval is 0 (i.e.
challenge is too long), its value should be set to error state too.

To demonstrate the bug, run opiepasswd with valid seed:
opiepasswd -s 1234567890123456
and notice that it falls back to randomchallenge() (i.e. no
1234567890123456 in the prompt).

r269809:
When sha1 support was added, they forget to increase OPIE_HASHNAME_MAX

r269811:
Last '/' for program name, not first one.

r269810:
Link otp-sha1 to match real challenge prompt, not otp-sha.

PR:     191511
Submitted by: mitsururike@gmail.com (partially, PR 269806)
2014-08-18 02:13:45 +00:00
rmacklem
cdfc4fb07a MFC: r269788
Document the use of the vfs.nfsd sysctls that control the size of
the NFS server's DRC for TCP.
This is a content change.
2014-08-17 19:24:26 +00:00
mav
e13575583f MFC r269631:
Reduce reported additional INQUIRY data length.

sizeof(struct scsi_inquiry_data) of 256 bytes combined with off-by-one
error in the changed code gave total INQUIRY data length above 255 bytes,
that was maximal INQUIRY length in SPC-2.  While SPC-3 increased the
maximal length to 64K, at least sg3_utils are still confused by that.
2014-08-17 18:26:34 +00:00
mav
b70f4cf9fc MFC r269622:
Fix several issues and inconsistencies in UNMAP capabilities reporting.

This makes Windows 2012 to start using UNMAP on our disks.
2014-08-17 18:24:59 +00:00
mav
8fabb08e85 MFC r269587:
Reimplement WRITE USING TOKEN with Block Zero token using WRITE SAME.

On my ZVOL of SSDs that increases speed of zero writing in that way from
1 to 2.5GB/s by reducing CPU overhead.
2014-08-17 18:23:43 +00:00
mav
6f742fb4d6 MFC r269497:
Add support for Windows dialect of EXTENDED COPY command, aka Microsoft ODX.

This allows to avoid extra network traffic when copying files on NTFS iSCSI
disks within one storage host by drag'n'dropping them in Windows Explorer
of Windows 8/2012.  It should also accelerate Hyper-V VM operations, etc.
2014-08-17 18:22:42 +00:00
dim
197183e80f MFC r269954:
Stop telling people to directly report llvm or clang bugs upstream,
point them to the FreeBSD bug tracker instead, since we use our own
patches.
2014-08-17 13:12:07 +00:00
dim
80ec3980a5 MFC r269948:
Supplement r259111 by also using correct casts in gcc's emmintrin.h for
the first argument of the following builtin function:

* __builtin_ia32_psrlqi128() takes __v2di instead of __v4si

This should fix the following errors when building the graphics/webp
port with base gcc:

lossless_sse2.c:403: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'
lossless_sse2.c:404: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'

Reported by:	Jos Chrispijn <ports@webrz.net>
2014-08-17 13:08:15 +00:00
kib
94d67906ea MFC r269457:
Remove Giant acquisition from the mount and unmount pathes.
2014-08-17 09:07:21 +00:00
mjg
75d88c0d5a MFC r269020:
Cosmetic changes to unp_internalize

Don't throw away the result of fget_unlocked.
Move fdp increment to for loop to make it consistent with similar code
elsewhere.
2014-08-17 07:24:23 +00:00
mjg
fd678d23e5 MFC r268636:
Plug p_pptr null test in do_execve. It is always true.
2014-08-17 07:22:40 +00:00
mjg
46f8d5c454 MFC r268634:
Manage struct sigacts refcnt with atomics instead of a mutex.
2014-08-17 07:20:37 +00:00
mjg
789b35542c MFC r264114, r264310, r268570:
r264114 by davidxu:

Fix SIGIO delivery. Use fsetown() to handle file descriptor owner
ioctl and use pgsigio() to send SIGIO.

r264310 by davidxu:

Add kqueue support for devctl.

r268570:

Clear nonblock and async on devctl close instaed of open.

This is a purely cosmetic change.
2014-08-17 07:16:03 +00:00
mjg
9e281fe64e MFC r268514:
Eliminate plim and vtmp local vars in exit1.

No functional changes.
2014-08-17 07:06:55 +00:00
mjg
8a70582e79 MFC r259407:
proc exit: don't take PROC_LOCK while freeing rlimits

Code wishing to check rlimits of some process should check whether it
is exiting first, which current consumers do.
2014-08-17 07:05:30 +00:00
mjg
ce59684e4d MFC r268505, r268507:
Avoid relocking filedesc lock when closing fds during fdp destruction.

Don't call bzero nor fdunused from fdfree for such cases. It would do
unnecessary work and complain that the lock is not taken.

=======

Don't zero fd_nfiles during fdp destruction.

Code trying to take a look has to check fd_refcnt and it is 0 by that time.

This is a follow up to r268505, without this the code would leak memory for
tables bigger than the default.
2014-08-17 07:00:47 +00:00
mjg
8fa92f4d0b MFC r268365:
Don't call crdup nor uifind under vnode lock.

A locked vnode can get into the way of satisyfing malloc with M_WATOK.

This is a fixup to r268087.
2014-08-17 06:58:14 +00:00
mjg
98ac4e9b08 MFC r268136:
Plug gcc warning after r268074 about unitialized newsigacts
2014-08-17 06:56:22 +00:00
mjg
9cebe2439f MFC r268087:
Don't call crcopysafe or uifind unnecessarily in execve.
2014-08-17 06:54:49 +00:00
mjg
f377401ca1 MFC r268074:
Perform a lockless check in sigacts_shared.

It is used only during execve (i.e. singlethreaded), so there is no fear
of returning 'not shared' which soon becomes 'shared'.

While here reorganize the code a little to avoid proc lock/unlock in
shared case.
2014-08-17 06:52:35 +00:00
grehan
766feae596 MFC r267338
Replace enum forward declarations with complete definitions
2014-08-17 03:01:56 +00:00
ian
93369e5cce MFC r269688: m4 now requires libohash, build it when bootstrapping. 2014-08-17 02:40:44 +00:00
ian
504042caa3 MFC r269769, r269770:
Use a separate variable for resource id, because 'i' may increment at a
  rate greater than 1 on each iteration.

  Handle various ways that interrupt config data can be malformed by
  warning and assuming more or less reasonable values.
2014-08-17 01:59:54 +00:00
ian
266195b56b MFC r269646: Use a SYSINIT to init the array of interrupt names on arm. 2014-08-17 01:48:12 +00:00
ian
704fa959ad MFC r269607, r269698:
Cache the imx6 SoC type in a static var so that it only has to be figured
  out by sniffing hardware registers once.

  Add a missing clock register definition.
2014-08-17 01:32:33 +00:00
ian
2cc6abb7fb MFC r269594, r269596, r269597, r269598, r269605, r269606:
Set ofwbus and simplebus to attach during BUS_PASS_BUS.

  Define names that drivers can use to adjust their position relative to
  other drivers within a BUS_PASS

  Adjust ofwbus and simplebus to attach at BUS_PASS_ORDER_MIDDLE, so that
  a platform can attach some other bus first if necessary.

  Set the pl310 L2 cache driver to attach during the middle of BUS_PASS_CPU.

  Attach arm generic interrupt and timer drivers in the middle of
  BUS_PASS_INTERRUPT and BUS_PASS_TIMER, respectively.

  Add an arm option, ARM_DEVICE_MULTIPASS, used to opt-in to multi-pass
  device attachment on arm platforms.  If this is defined, nexus attaches
  early in BUS_PASS_BUS, and other busses and devices attach later, in the
  pass number they are set up for.  Without it defined, nexus attaches in
  BUS_PASS_DEFAULT and thus so does everything else, which is status quo.
2014-08-17 01:28:03 +00:00
grehan
46d28d66fb MFC r267311, r267330, r267811, r267884
Turn on interrupt window exiting unconditionally when an ExtINT is being
injected into the guest.

Add helper functions to populate VM exit information for rendezvous and
astpending exits.

Provide APIs to directly get 'lowmem' and 'highmem' size directly.

Expose the amount of resident and wired memory from the guest's vmspace
2014-08-17 01:23:52 +00:00
grehan
c00f011a6e MFC r267178, r267300
Support guest accesses to %cr8

Add reserved bit checking when doing %CR8 emulation and inject #GP if required.
2014-08-17 01:16:40 +00:00
ian
799b3dd5bf MFC r269387: Update the ARMv6 core clang targets to be an arm1176jzf-s. 2014-08-17 01:15:34 +00:00
grehan
7a365d2c05 MFC r267216
Add ioctl(VM_REINIT) to reinitialize the virtual machine state maintained
by vmm.ko. This allows the virtual machine to be restarted without having
to destroy it first.
2014-08-17 01:00:42 +00:00
grehan
e83027edbb MFC r266933
Activate vcpus from bhyve(8) using the ioctl VM_ACTIVATE_CPU instead of doing
it implicitly in vmm.ko.
2014-08-17 00:52:07 +00:00
rmacklem
c64921fe8d MFC: r269771
Change the NFS server's printf related to hitting
the DRC cache's flood level so that it suggests
increasing vfs.nfsd.tcphighwater.
2014-08-16 21:36:22 +00:00
bz
fe69d82910 MFC r264601,264646,265766,267918,267919,267920:
Merge if_nf10bmac(4), a driver to support an NetFPGA-10G Embedded
 CPU Ethernet Core.

 The current version operates on a simple PIO based interface connected
 to a NetFPGA-10G port.

 To avoid confusion: this driver operates on a CPU running on the FPGA,
 e.g. BERI/mips, and is not suited for the PCI host interface.

 Adjust the register layout to allow for 64bit registers in the
 future for nf10bmac(4).  Also, add support for and enable RX interrupts.

 Allow switching between 32bit and 64bit bus width data access at compile
 time by setting NF10BMAC_64BIT and using a REGWTYPE #define to set correct
 variable and return value widths.

 Adjust comments to indicate the 32 or 64bit register widths.

Relnotes:	yes
Sponsored by:	DARPA/AFRL
2014-08-16 14:30:46 +00:00
bz
919a837058 MFC r263632:
For BERI on NetFPGA assume HZ=100 by default.

 Remove the uart support in favour of a "jtag-uart" interface imitation
 providing a much simpler interface, directly exported to the host,
 allowing the toolchain to be shared with BERI on Altera. [1]

 Submitted by:	Jong Hun HAN (jong.han cl.cam.ac.uk) [1]
Sponsored by:	DARPA/AFRL
2014-08-16 14:21:03 +00:00
bz
62c1685fc5 MFC r264542:
Use ETHER_ALIGN as argument to m_adj() to offset the beginning of packet
 rather than the magic number 2.

 While here fix a typo in a comment.

 No functional changes.

Sponsored by:	DARPA/AFRL
2014-08-16 14:17:09 +00:00
bz
fdfedc3bb4 MFC r264605:
Based on xlp_machdep.c and completed the list of options based on
 boot/mips/beri/loader/metadata.c allow FDT configuration to set
 command line options.
 This leads to an interesting quesiton of future interactions with loader.
 However for configurations without loader this allows bootverbose or boot
 single user to be set by compiling a new kernel, which is good enough for
 testing and debugging.

 Reviewed by:	rwatson
Sponsored by:	DARPA/AFRL
2014-08-16 14:14:29 +00:00
bz
1344b41f0b MFC r266907:
While PAWS is disabled, there are no consumers for the tcp options
 argument to tcp_twcheck();  thus mark it __unused.
2014-08-16 14:09:26 +00:00
bz
9d2fdc5f67 MFC r266620:
Remove the prototpye for the static inline function
 tcp_signature_verify_input().
 The function is defined before first use already.
2014-08-16 14:05:31 +00:00
bz
f8953220b8 MFC r266619:
syncache_lookup() is a file local function.  Make it static and
 take it out of the public KPI; seems it was never used elsewhere.
2014-08-16 14:03:00 +00:00
bz
a0d3819845 MFC r266618:
Make tcp_twrespond() file local private;  this removes it from the
 public KPI; it is not used anywhere else and seems it never was.
2014-08-16 13:58:45 +00:00
bz
5876bf013b MFC r266606:
Only do a ports check if this is a NAT-T SA.  Otherwise other
 lookups providing ports may get unexpected results.
2014-08-16 13:55:44 +00:00
bz
dd062e6c84 MFC r266597:
Remove the prototypes for things that are no longer file local but were
 moved to the header file.

 Was suppoed to be MFCed with: r266596
 Pointy hat to:	bz
2014-08-16 13:53:05 +00:00
bz
6f5b0b94bc MFC r266596:
Move the tcp_fields_to_host() and tcp_fields_to_net() (inline)
 functions to the tcp_var.h header file in order to avoid further
 duplication with upcoming commits.

 Reviewed by:	np
2014-08-16 13:50:15 +00:00
bz
a771dfd28a MFC r264539:
When switching variables to flags in r243185 a few cases were missed.
 After r263152 (in head) this leaves unused variables if route(8) is
 compiled without INET support.
 Switch the remaining variable accesses to flags and remove now obsolete
 variables.

 Reviewed by:	glebius
2014-08-16 13:47:04 +00:00
bz
4e0609eb85 MFC r261525:
Print the MD5 signature information introduced in r221023 (head) in the
 TCP statistics output.
2014-08-16 13:25:49 +00:00
bz
10ac38c809 MFC r259886:
Bite the bullet and start removing the first compile time warnings
 by removing unsued file local functions and then unused callees.
 A lot more warnings to resolve but someone had to break the ice.

 X-Comment:	I am not the new maintainer; chime in, it's ours.
2014-08-16 13:23:23 +00:00
bz
f57b2f8c40 MFC r259916:
Use feature_present(3) to determine whether to open an INET or an
 INET6 socket when needed to allow pfctl to work on noinet and noinet6
 kernels (and try to provide a fallback using AF_LINK as best effort).
 Adjust the Makefile to also respect relevant src.conf(5) options
 for compile time decisions on INET and INET6 support.

 Reviewed by:	glebius (no objections)
2014-08-16 13:20:44 +00:00
bz
7aec0e65a0 MFC r259885:
As constantly reported during kernel compilation, m_buflen is unsigned so
 can never be < 0.  Remove the expression, which can never be true.
2014-08-16 13:11:59 +00:00
bz
2ec5bb69f4 MFC r259884:
Correct warnings comparing unsigned variables < 0 constantly reported
 while building kernels.  All instances removed are indeed unsigned so
 the expressions could not be true.
2014-08-16 13:09:40 +00:00
bz
1843acbd6d MFC r269583:
Provide -o vers= support for mount_nfs.

 Our mount_nfs does use -o nfsv<2|3|4> or -2 or -3 to specify the version.
 OSX (these days), Solaris, and Linux use -o vers=<2,3,4>.

 With the upcoming autofs support we can make a lot of (entrerprisy) setups
 getting mount options from LDAP just work by providing -o vers= compatibility.

 Reviewed by:	wblock, bjk (man page), rmacklem, emaste
 Sponsored by:	DARPA,AFRL
PR:		192379
2014-08-16 13:06:11 +00:00