104074 Commits

Author SHA1 Message Date
sbruno
ec0d763b35 MFC r297488
Repair an overflow condition where a user could submit a string that was
not getting a proper bounds check.

PR:		206761
Submitted by:	sson
Reviewed by:	cturt@hardenedbsd.org
2016-04-05 18:27:47 +00:00
dumbbell
16a32ce204 CAM: Generalize 4k quirk to all Samsung MZ7* SSDs
This adds Samsung PM851 to the list. It can be found in Lenovo Thinkpad
T440 for instance.

MFC of:		r297370
Reviewed by:	Kevin Bowling <kevin.bowling@kev009.com>,
		Jason Wolfe <j@nitrology.com>
Approved by:	Kevin Bowling <kevin.bowling@kev009.com>,
		Jason Wolfe <j@nitrology.com>
Differential Revision:	https://reviews.freebsd.org/D5753
2016-04-05 08:37:21 +00:00
mav
2b329a8e38 MFC r297179: Optimize IPMI watchdog patting.
Set watchdog timer parameters only when they really need to be changed.
In other cases just restart the timer with single Reset command instead
of two (Set and Reset).

From one side this visually reduces amount of CPU time burned in tight
loop waiting while some slow BMC configures its watchdog hardware, that
seems to be much more complicated task then just resetting the timer.

From another side on some BMCs those slow Set commands sometimes tend to
timeout, that leads to noisy log messages and even more CPU time burned,
so avoiding them can provide even bigger bonuses.
2016-04-05 06:37:58 +00:00
marius
25f9e31d12 MFC: r292563
loader.efi: strip trailing whitespace

MFC: r293244 (remainder missing in r294275)

Introduce and use new EFI_ERROR_CODE macro for EFI errors
2016-04-04 12:21:04 +00:00
marius
83ca45c9a8 Now that 10.3-RELEASE is out, move stable/10 back to STABLE.
Approved by:	re (implicit)
2016-04-04 12:15:06 +00:00
mav
281ccdd8d1 MFC r297421: Plug open count leak on zvol rename. 2016-04-04 09:50:28 +00:00
mav
2bf9d9f911 MFC r297420: Switch from using make_dev_p() to make_dev_s() to close races. 2016-04-04 09:49:45 +00:00
mav
2eb569b386 MFC r297337: Pass through error code from make_dev_p().
ENAMETOOLONG is much more informative in logs then ENXIO.
2016-04-04 09:48:58 +00:00
mav
be0c6e50d7 MFC r297232: Unify ignoring EEXIST from zvol_create_minor().
This fixes creation of zvol devices for snapshots during zfs receive,
that previously failed with "ZFS WARNING: Unable to create ZVOL" message.
This solution is not perfect, but IMHO better then it was before.
2016-04-04 09:47:39 +00:00
mav
2dae0103a3 MFC r277504 (by will): Remove commented log messages. 2016-04-04 09:36:56 +00:00
mav
3edfb33a29 MFC r277450 (by will):
Use the "zfs_gfs" tag for GFS vnodes to make them easier to identify.
2016-04-04 09:35:36 +00:00
mav
e049017c9a MFC r270382 (by delphij): MFV r270197:
Illumos issue:
    5066 remove support for non-ANSI compilation
    5068 Remove SCCSID() macro from <macros.h>
2016-04-04 09:30:57 +00:00
mav
9e293a9e32 MFC r287109 (by trasz): Make it possible to forcibly unmount devfs. 2016-04-03 14:38:02 +00:00
dchagin
238b2f4322 MFC r297309:
Whitespaces and style(9) fix. No functional changes.
2016-04-03 06:22:36 +00:00
dchagin
bb89744b6e MFC r297297:
When write(2) on eventfd object fails with the error EAGAIN do not return the number of bytes written.
2016-04-02 06:18:19 +00:00
dchagin
63a98b35e7 MFC r297296:
Implement O_NONBLOCK flag via fcntl(F_SETFL) for eventfd object.
2016-04-02 06:15:14 +00:00
kevlo
ca4f2c5a4d MFC r297335:
Update superblock and inode structs for ext4.

Reviewed by:	pfg
2016-04-01 03:46:16 +00:00
np
3c07b218c4 MFC r297298:
Plug leak in m_unshare.

m_unshare passes on the source mbuf's flags as-is to m_getcl and this
results in a leak if the flags include M_NOFREE.  The fix is to clear
the bits not listed in M_COPYALL before calling m_getcl.  M_RDONLY
should probably be filtered out too but that's outside the scope of this
fix.

Add assertions in the zone_mbuf and zone_pack ctors to catch similar
bugs.

Update netmap_get_mbuf to not pass M_NOFREE to m_getcl.  It's not clear
what the original code was trying to do but it's likely incorrect.
Updated code is no different functionally but it avoids the newly added
assertions.

Sponsored by:	Chelsio Communications
2016-04-01 01:39:44 +00:00
ae
8dd17d694b MFC r296984:
Change in6_selectsrc() to allow usage of non-local IPv6 addresses in
  IPV6_PKTINFO ancillary data when IPV6_BINDANY socket option is set.
2016-03-31 09:55:21 +00:00
kp
93dab7adee MFC 296932:
pf: Improve forwarding detection

When we guess the nature of the outbound packet (output vs. forwarding) we need
to take bridges into account. When bridging the input interface does not match
the output interface, but we're not forwarding. Similarly, it's possible for the
interface to actually be the bridge interface itself (and not a member interface).
2016-03-30 18:45:18 +00:00
mav
f08e8e5dd4 r297229 (by hselasky): Add more UHCI PCI IDs. 2016-03-29 09:14:28 +00:00
mav
1e83d7e7ec MFC r297051: Fix incorrect (fortunately bigger) malloc size. 2016-03-28 09:28:01 +00:00
mav
a2301ca6a5 MFC r297049: Add IDs for Intel Wellsburg USB controllers. 2016-03-28 09:26:44 +00:00
mav
dac72dea29 MFC r295463 (by hselasky): Correct PCI device description. 2016-03-28 09:26:00 +00:00
mav
73ca295074 MFC r275137 (by adrian): Add PCI ID for Intel Lynx Point LP controller.
PR:		kern/195398
2016-03-28 09:24:47 +00:00
kib
f433ddb387 MFC r297206:
Fix locking mistake in softdep_waitidle().
2016-03-27 08:00:51 +00:00
dchagin
b9ebebfb6d Revert r297303. 2016-03-27 07:34:42 +00:00
dchagin
659b4abe7f MFC r296501:
Link the newly created process to the corresponding parent as
if CLONE_PARENT is set, then the parent of the new process will be
the same as that of the calling process.
2016-03-27 06:55:49 +00:00
dchagin
ae0d39e1ce MFC r296502, r296543, r296546, r297060:
1. Limit secs to INT32_MAX / 2 to avoid errors from kern_setitimer().
     Assert that kern_setitimer() returns 0.
     Remove bogus cast of secs.
     Fix style(9) issues.

  2. Increment the return value if the remaining tv_usec value more than 500000 as a Linux does.
2016-03-27 06:52:40 +00:00
dchagin
ef33877852 MFC r296503, r296504:
Linux accept() system call return EOPNOTSUPP errno instead of EINVAL for UDP sockets.
2016-03-27 06:43:05 +00:00
dchagin
c1237fc26e MFC r297063:
Whitespaces, style(9) fixes. No functional changes.

MFC r297070:
  Return EOVERFLOW in case when actual statfs values are large enough and
  not fit into 32 bit fileds of a Linux struct statfs.

MFC r297072:

  Check bsd_to_linux_statfs() return value.
2016-03-27 06:21:05 +00:00
dchagin
dfb7b90783 MFC r297062:
Regen for r297061 (fstatfs64 Linux syscall).
2016-03-27 06:17:19 +00:00
dchagin
ce9255cc9f MFC r297061;
Implement fstatfs64 system call.

PR:		181012
Submitted by:	John Wehle
2016-03-27 06:10:51 +00:00
kib
4547c952f3 MFC r296652:
Do not perform unneccessary shared recursion on the allproc_lock in
pfs_visible().
2016-03-25 08:26:37 +00:00
pfg
c39d1e620d MFC r297037:
aio_qphysio(): Avoid uninitialized pointer read on error.

For the !unmap case it may happen that pbuf gets called unreferenced
when vm_fault_quick_hold_pages() fails.
Initialize it so it doesn't cause trouble.

CID:		1352776
Reviewed by:	jhb
2016-03-25 01:01:32 +00:00
hselasky
eeaebf7097 MFC r292254:
Properly drain callouts in the IPFW subsystem to avoid use after free
panics when unloading the dummynet and IPFW modules:

- The callout drain function can sleep and should not be called having
a non-sleepable lock locked. Remove locks around "ipfw_dyn_uninit(0)".

- Add a new "dn_gone" variable to prevent asynchronous restart of
dummynet callouts when unloading the dummynet kernel module.

- Call "dn_reschedule()" locked so that "dn_gone" can be set and
checked atomically with regard to starting a new callout.

PR:			208171
Requested by:		Franco Fichtner (opnsense.org)
Differential Revision:	https://reviews.freebsd.org/D3855
2016-03-24 09:22:58 +00:00
ae
5fc2be082f MFC r296557:
Add support for IPPROTO_IPV6 socket layer for getsockopt/setsockopt calls.
  Also add mapping for several options from RFC 3493 and 3542.
2016-03-23 18:21:26 +00:00
mav
af59995fd1 MFC r277629 (by will):
When creating or updating a node, use vfs_timestamp() for "now" instead
of gethrestime(), to allow the administrator to decide the appropriate
timestamp precision instead of always using nanosecond precision.
2016-03-21 07:36:02 +00:00
kib
1872309b16 MFC r296467:
Convert all panics from the link_elf_obj kernel linker for object
files format into printfs and errors to caller.
2016-03-21 03:29:45 +00:00
mav
92c72abfb4 MFC r296617: Revert r292074 (by smh): Limit stripesize reported from
nvd(4) to 4K

I believe that this patch handled the problem from the wrong side.
Instead of making ZFS properly handle large stripe sizes, it made
unrelated driver to lie in reported parameters to workaround that.

Alternative solution for this problem from ZFS side was committed at
r296615.
2016-03-21 00:34:22 +00:00
smh
087cec3fd7 MFC r296020:
Fix NULL pointer dereferences

Sponsored by:	Multiplay
2016-03-21 00:31:06 +00:00
mav
138555afff MFC r296615: Make ZFS ignore stripe sizes above SPA_MAXASHIFT (8KB).
If device has stripe size bigger then maximal sector size supported by
ZFS, there is nothing can be done to avoid read-modify-write cycles.
Taking that stripe size into account will only reduce space efficiency
and pointlessly bother user with warnings that can not be fixed.
2016-03-21 00:29:00 +00:00
mav
e9114f9ca1 MFC r296613: Make ZFS more picky to GEOM stripe sizes and offsets.
Use of misaligned or non-power-of-2 stripes is not really useful for ZFS,
since increased ashift won't help to avoid read-modify-write cycles, and
only reduce pool space efficiency and compression rates.
2016-03-21 00:28:13 +00:00
mav
724960037f MFC r296530: MFV r296529:
6672 arc_reclaim_thread() should use gethrtime() instead of ddi_get_lbolt()
6673 want a macro to convert seconds to nanoseconds and vice-versa

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Eli Rosenthal <eli.rosenthal@delphix.com>

illumos/illumos-gate@a8f6344fa0
2016-03-21 00:22:55 +00:00
mav
18f23d7871 MFC r296528: MFV r296527: 6659 nvlist_free(NULL) is a no-op
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Marcel Telka <marcel@telka.sk>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>

illumos/illumos-gate@aab83bb83b
2016-03-21 00:22:09 +00:00
mav
e34c027e2e MFC r296523: MFV r296522:
6541 Pool feature-flag check defeated if "verify" is included in the dedup
property value

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Richard Laager <rlaager@wiktel.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: ilovezfs <ilovezfs@icloud.com>

illumos/illumos-gate@971640e6aa
2016-03-21 00:20:49 +00:00
mav
ad9d624de4 MFC r296521: MFV r296520:
6562 Refquota on receive doesn't account for overage

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Dan McDonald <danmcd@omniti.com>

illumos/illumos-gate@5f7a8e6d75
2016-03-21 00:19:42 +00:00
mav
ccc1ec28f5 MFC r296519: MFV r296518: 5027 zfs large block support (add copyright)
Author: Matthew Ahrens <matt@mahrens.org>

illumos/illumos-gate@c3d26abc9e
2016-03-21 00:18:38 +00:00
mav
7ce7341950 MFC r296516: MFV r296515:
6536 zfs send: want a way to disable setting of DRR_FLAG_FREERECORDS

Reviewed by: Anil Vijarnia <avijarnia@racktopsystems.com>
Reviewed by: Kim Shrier <kshrier@racktopsystems.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Andrew Stormont <astormont@racktopsystems.com>

illumos/illumos-gate@880094b606
2016-03-21 00:16:42 +00:00
mav
e8c59c3978 MFC r296514: MFV r296513:
6450 scrub/resilver unnecessarily traverses snapshots created after the
scrub started

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@38d6103674
2016-03-21 00:15:41 +00:00