Commit Graph

198964 Commits

Author SHA1 Message Date
Pedro F. Giffuni
b904ab99bc sort(1): Cleanups and a small memory leak.
Remove useless check for leading blanks in the month name.  The
code didn't adjust len after stripping blanks so even if a month
*did* start with a blank we'd end up copying garbage at the end.
Also convert a malloc + memcpy to strdup and fix a memory leak in
the wide char version if mbstowcs() fails.
Originally from Andre Smagin.

Obtained from:  OpenBSD (CVS rev. 1.2, 1.3)
MFC after:	1 week
2015-04-07 01:17:29 +00:00
Devin Teske
2df04ab49b Eliminate literal escape sequences from *.rc
Suggested by:	alfred
MFC after:	3 days
X-MFC-to:	stable/10
X-MFC-with:	r280976, r281179
2015-04-06 23:37:04 +00:00
Devin Teske
e076835f9c Partially revert r280976: Back to previous mode-endings based on feedback
Reported by:	lattera
MFC after:	3 days
X-MFC-to:	stable/10
X-MFC-with:	r280976
2015-04-06 23:22:54 +00:00
Devin Teske
be77d1d90c Partially revert r280975: Back to previous mode-endings based on feedback
Reported by:	lattera
MFC after:	3 days
X-MFC-to:	stable/10
X-MFC-with:	r280975
2015-04-06 23:16:03 +00:00
Devin Teske
72bd569df0 Partially revert r280974: Back to previous mode-endings based on feedback
MFC after:	3 days
X-MFC-to:	stable/10
X-MFC-with:	r290974
Reported by:	lattera
2015-04-06 23:13:16 +00:00
Devin Teske
9390da3689 Partially revert r280925: Back to previous mode-endings based on feedback
MFC after:	3 days
X-MFC-with:	r280925
Reported by:	lattera
2015-04-06 23:10:47 +00:00
Mark Johnston
bef6922b96 lockf(1): add a reference to lockf(3).
Submitted by:	Conrad Meyer
MFC after:	1 week
2015-04-06 22:53:23 +00:00
Gleb Smirnoff
c151f24d08 o Make net.inet6.ip6.mif6table return special API structure, that doesn't
contain kernel pointers, and instead has interface index.
  Bump __FreeBSD_version for that change.
o Now, netstat/mroute6.c no longer needs to kvm_read(3) struct ifnet, and
  no longer needs to include if_var.h

Note that this change is far from being a complete move of IPv6 multicast
routing to a proper API. Other structures are still dumped into their
sysctls as is, requiring userland application to #define _KERNEL when
including ip6_mroute.h and then call kvm_read(3) to gather all bits and
pieces. But fixing this is out of scope of the opaque ifnet project.

Sponsored by:	Nginx, Inc.
Sponsored by:	Netflix
2015-04-06 22:12:18 +00:00
Jung-uk Kim
7ecb60344d Tidy up battery status information. Remove a trailing white space.
PR:		193671
2015-04-06 21:51:55 +00:00
John Baldwin
b871bfa1a2 vfork() first appeared in 3BSD which pre-dates 2.9BSD. Verified via the
copy of 3BSD on disc 1 of "The CSRG Archives".

PR:		198612
MFC after:	1 week
2015-04-06 20:40:01 +00:00
Andrew Turner
533e5098de Make global variabled only used in this file static. 2015-04-06 19:58:28 +00:00
Devin Teske
1ebd9bd41c Unbreak ZFS+GELI install option.
Reported by:	delphij
Submitted by:	delphij
Pointy hat to:	dteske (me)
MFC after:	3 days
X-MFC-to:	stable/10 stable/9
X-MFC-with:	r281160
2015-04-06 19:26:45 +00:00
Josh Paetzel
fe56ff1ccc Typo fix in comment
MFC after:	3 days
2015-04-06 19:23:45 +00:00
Kristof Provost
31e2e88c27 Remove duplicate code
We'll just fall into the same local delivery block under the
'if (m->m_flags & M_FASTFWD_OURS)'.

Suggested by:	ae
Differential Revision:	https://reviews.freebsd.org/D2225
Approved by:	gnn (mentor)
2015-04-06 19:08:44 +00:00
Kristof Provost
1873dcc8c9 pf: Skip firewall for refragmented ip6 packets
In cases where we scrub (fragment reassemble) on both input and output
we risk ending up in infinite loops when forwarding packets.

Fragmented packets come in and get collected until we can defragment. At
that point the defragmented packet is handed back to the ip stack (at
the pfil point in ip6_input(). Normal processing continues.

Eventually we figure out that the packet has to be forwarded and we end
up at the pfil hook in ip6_forward(). After doing the inspection on the
defragmented packet we see that the packet has been defragmented and
because we're forwarding we have to refragment it.

In pf_refragment6() we split the packet up again and then ip6_forward()
the individual fragments.  Those fragments hit the pfil hook on the way
out, so they're collected until we can reconstruct the full packet, at
which point we're right back where we left off and things continue until
we run out of stack.

Break that loop by marking the fragments generated by pf_refragment6()
as M_SKIP_FIREWALL. There's no point in processing those packets in the
firewall anyway. We've already filtered on the full packet.

Differential Revision:	https://reviews.freebsd.org/D2197
Reviewed by:	glebius, gnn
Approved by:	gnn (mentor)
2015-04-06 19:05:00 +00:00
Alexander Motin
83dd77c3c1 Make ctld to not exit on ECONNABORTED on accept().
That is not really an error for the main process.

MFC after:	1 week
Sponsored by:	iXsystems, Inc.
2015-04-06 18:56:02 +00:00
Dmitry Chagin
6723fdfe46 Properly calculate "UMA Zones" per cpu cache size. Avoid allocating
an extra struct uma_cache since the struct uma_zone already has one.

PR:		199169
Submitted by:	luke.tw gmail com
MFC after:	1 week
2015-04-06 18:45:41 +00:00
Devin Teske
4ef4026223 Fix permissions on ZFS root encryption key (644 -> 600).
MFC after:	3 days
X-MFC-to:	stable/10 stable/9
Security:	CVE-2015-1415
Reported by:	Pierre Kim
2015-04-06 18:03:35 +00:00
John Baldwin
44947d3aeb Move the message complaining about failed system resource allocations
under bootverbose.  Every example I've seen to date has been due to
an ACPI system resource device reserving a range that overlaps with
system memory (which ram0 attempts to reserve) or a local or I/O APIC
(which apic0 attempts to reserve).  These are always harmless but look
scary to users.

MFC after:	1 week
2015-04-06 17:39:36 +00:00
Justin Hibbits
7a9d50b370 Fix the index for FAULTBUF_R13, missed during merge/cleanup. 2015-04-06 16:29:45 +00:00
Andrew Turner
46f52b028f Split out the _acq and _rel functions. These were the same, but there is
no need for them to be this strong, we only need to provide one or the
other.

While here replace atomic_load_acq_* and atomic_store_rel_* with a single
instruction version, and fix the definition of atomic_clear_* to point to
the correct functions.

Sponsored by:	The FreeBSD Foundation
2015-04-06 16:27:22 +00:00
Andrew Turner
63d071445e Add support to the efi boot1 and loader for 32-bit ARM. This will be used
by the future qemu virt support.

Differential Revision:	https://reviews.freebsd.org/D2238
Reviewed by:	emaste
2015-04-06 15:50:20 +00:00
Gleb Smirnoff
93d4534cdc Add sleepable lock to protect at least against two parallel SIOCSVHs.
Sponsored by:	Nginx, Inc.
2015-04-06 15:31:19 +00:00
Ed Maste
5d93595789 Update reported elftoolchain version to 3179
Missed in r280932
2015-04-06 13:55:33 +00:00
Raphael Kubo da Costa
fe4313f887 bthidd: Remove unused macros from hid.c.
ASIZE() was never used, and min() stopped being used in r207812.

Differential Revision:	https://reviews.freebsd.org/D2230
Reviewed by:	emax
Approved by:	emax
MFC after:	1 week
2015-04-06 12:36:24 +00:00
Tycho Nightingale
fb5e95b4f6 Enhance the support for Group 1 Extended opcodes:
* Implemement the 0x81 and 0x83 CMP instructions.
  * Implemement the 0x83 AND instruction.
  * Implemement the 0x81 OR instruction.

Reviewed by:	neel
2015-04-06 12:22:41 +00:00
Gleb Smirnoff
56d5e0967c Stop including if_var.h from userland.
Sponsored by:	Nginx, Inc.
2015-04-06 09:42:23 +00:00
Gleb Smirnoff
f06a9bb77e Convert printfs in m_ext allocator to KASSERTs.
Discussed with:	rwatson
Sponsored by:	Nginx, Inc.
2015-04-06 09:15:18 +00:00
Andrew Turner
8c5075340f Respect DESTDIR when creating the directory structure when NO_ROOT is set.
Reviewed by:	bapt
MFC after:	1 Week
2015-04-06 08:37:40 +00:00
Rui Paulo
bb09480677 SMBIOS support for EFI.
MFC after:	1 week
2015-04-06 06:55:47 +00:00
Rui Paulo
63f9a9fa26 ichsmb: add a device id for the Wildcat Point-LP.
MFC after:	1 week
2015-04-06 06:02:58 +00:00
Pedro F. Giffuni
3d4c8bbc51 Make strlcpy/strlcat slightly easier to read.
Bring small upstream updates.

Obtained from:	OpenBSD
2015-04-06 03:21:22 +00:00
Pedro F. Giffuni
45e151e97d sort: style knits / cleanups.
Minor cleanups that got accidentally reverted.

Obtained from:	OpenBSD
2015-04-06 03:02:20 +00:00
Pedro F. Giffuni
e5f71a07e4 Revert (partial) r281123, r281125:
sort: style knits / cleanups.

Our style guide(9) specifies that in absence of local variables
an empty line must be inserted.

Pointed out by:	eadler
2015-04-06 02:35:55 +00:00
Baptiste Daroussin
91dda36bda Enforce LC_COLLATE="C" until we do support proper UTF-8 collation 2015-04-06 01:53:47 +00:00
Pedro F. Giffuni
153cbcd657 Make use of gcc attributes in some standard include headers.
The `nonnull' attribute specifies that some function parameters should be
non-null pointers.  This is very useful as it helps the compiler generate
warnings on suspicious code and can also enable some small optimizations.

Also start using 'alloc_size' attribute in the allocator functions.

This is an initial step to better integrate our libc with the compiler:
these attributes are fully supported by clang and they are also useful
for the static analyzer.

Note that due to some bogus internal procedure in the way gcc ports
are built they may require updating if they were built before r280801.

Relnotes:		yes
Hinted by:		Android's bionic libc
Differential Revision:	https://reviews.freebsd.org/D2107
2015-04-06 01:39:16 +00:00
Dmitry Marakasov
a1c1feb511 Switch russian login class to UTF-8
Reviewed by:	glebius
Approved by:	glebius
Differential Revision:	D2129
2015-04-06 01:32:26 +00:00
Adrian Chadd
03ab093569 Return the correct HAL data type for HAL_DIAG_ANI_STATS.
I .. stupidly added code to return HAL_ANI_STATS to HAL_DIAG_ANI_STATS.
I discovered this in a noisy environment when the returned values were
enough to .. well, make everything terrible.

So - restore functionality.

Tested:

* AR5416 (uses the AR5212 HAL), in a /very/ noisy 2GHz environment.
  Enough to trigger ANI to get upset and generate useful data.
2015-04-06 01:12:53 +00:00
Rui Paulo
c282164d42 psm: print newer Synaptics Touchpad capabilities. 2015-04-06 01:04:08 +00:00
Adrian Chadd
d338532820 Typecast things. 2015-04-06 00:34:59 +00:00
Pedro F. Giffuni
db8026c7bb sort: style knits / cleanups.
Obtained from:	OpenBSD
2015-04-05 23:06:42 +00:00
Pedro F. Giffuni
bd0f80c667 sort: Fix a comment.
Obtained from:	OpenBSD
2015-04-05 22:34:03 +00:00
Pedro F. Giffuni
f79477ebd5 sort: Cleanup small issues with spaces.
Obtained from:	OpenBSD
2015-04-05 22:22:43 +00:00
Adrian Chadd
c2dc6e2aab Convert the DIR-825C1 to use the new map based MAC address configuration.
Tested:

* DIR-825C1
2015-04-05 22:00:44 +00:00
Konstantin Belousov
2359e2dcc3 Do not call msdosfs_sync() on the read-only msdosfs mounts. In fact,
it should be a nop for ro.

PR:	199152
Reviewed by:	bde (PR version of the patch)
Submitted by:	longwitz@incore.de
MFC after:	1 week
2015-04-05 21:10:38 +00:00
Konstantin Belousov
420d65d9e4 Assert that an msdosfs mount is not read-only when FAT modifications
are requested.

PR:	199152
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-04-05 21:08:04 +00:00
Adrian Chadd
e1f0bb305b Update the board MAC address configuration for the DIR-655A1.
The MAC addresses were totally wrong. They're like the DIR-625C1 - at
0x1ffe0004 and 0x1ffe0018. They're however stored as text strings.
The ath0 MAC address is also not set, even though the calibration
partition is valid.

So, pick the board address / first MAC as the ath0 MAC, and derive
arge0/arge1 from that.  That way they're hopefully unique enough
for people with multiple devices.

Tested:

* DIR-655A1

TODO:

* Do the same for the DIR-625A1 and DIR-625C1.
2015-04-05 20:56:51 +00:00
Alan Cox
b5ab20c066 Until the lock assertions in vm_page_advise() are properly reevaluated,
vm_fault_dontneed() should acquire a write lock on the first object in
the shadow chain.

Reported by:	gleb, David Wolfskill
2015-04-05 20:07:33 +00:00
Andrew Turner
45304e75b9 Move boot1.efi to the global CLEANFILES list, it's not x86 specific. 2015-04-05 18:57:58 +00:00
Raphael Kubo da Costa
822a51b396 bthidd: Consider usage ranges when dealing with array inputs.
So far, we were always using HID_USAGE() to determine the Usage ID of a
certain HID report input item. This does not work as intended if a field
is an array and the allowed usages are specified with a usage range, as
HID_USAGE() will return 0. We need to use the field value as an index in
the usage range list in this case instead.

This makes the volume keys in a Microsoft Bluetooth Mobile Keyboard
5000 be properly recognized. The relevant part of the HID report looks
like this:

  0xA1, 0x01,        // Collection (Application)
  0x85, 0x07,        //   Report ID (7)
  0x05, 0x0C,        //   Usage Page (Consumer)
  0x19, 0x00,        //   Usage Minimum (Unassigned)
  0x2A, 0xFF, 0x03,  //   Usage Maximum (0x03FF)
  0x95, 0x01,        //   Report Count (1)
  0x75, 0x10,        //   Report Size (16)
  0x15, 0x00,        //   Logical Minimum (0)
  0x27, 0xFF, 0x03, 0x00, 0x00,  //   Logical Maximum (1023)
  0x81, 0x00,        //   Input (Data,Array,Abs,No Wrap,Linear,Preferred
                     //   State,No Null Position)

When a key such as "volume down" is pressed, the following data is
transferred through Interrupt In:

  0x07 0xEA 0x00

Differential Revision:	https://reviews.freebsd.org/D2229
Reviewed by:	emax
Approved by:	emax
MFC after:	1 week
2015-04-05 18:53:48 +00:00