]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoAdd the Cortex-A{53,57,72} ID register values. These can all run 32-bit
andrew [Mon, 3 Oct 2016 18:00:10 +0000 (18:00 +0000)]
Add the Cortex-A{53,57,72} ID register values. These can all run 32-bit
code so could run a 32-bit kernel.

Sponsored by: ABT Systems Ltd

7 years agoRetire WITHOUT_ELFCOPY_AS_OBJCOPY option
emaste [Mon, 3 Oct 2016 17:49:26 +0000 (17:49 +0000)]
Retire WITHOUT_ELFCOPY_AS_OBJCOPY option

In FreeBSD 11 ELF Tool Chain's elfcopy is installed as objcopy by
default, with the option to switch back to GNU objcopy by setting
WITHOUT_ELFCOPY_AS_OBJCOPY in make.conf.

We plan to remove the outdated in-tree binutils in FreeBSD 12, so
remove the temporary transition aid.

Reviewed by: brooks, imp
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7337

7 years agoDon't build libdialog if WITHOUT_DIALOG is set
emaste [Mon, 3 Oct 2016 17:34:50 +0000 (17:34 +0000)]
Don't build libdialog if WITHOUT_DIALOG is set

X-MFC-With: r306375

7 years agoconst-ify struct evdev_methods
gonzo [Mon, 3 Oct 2016 17:20:34 +0000 (17:20 +0000)]
const-ify struct evdev_methods

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>
Suggested by: hselasky

7 years agoRemove the old Allwinner std.* files, these are not part of the common
andrew [Mon, 3 Oct 2016 16:47:46 +0000 (16:47 +0000)]
Remove the old Allwinner std.* files, these are not part of the common
Allwinner kernel configs.

Sponsored by: ABT Systems Ltd

7 years agoRemove unused functions on armv6. Some of the cache handling code is still
andrew [Mon, 3 Oct 2016 16:10:38 +0000 (16:10 +0000)]
Remove unused functions on armv6. Some of the cache handling code is still
used in the elf trampoline so add a macro to handle this.

Sponsored by: ABT Systems Ltd

7 years agoRemove the parts of cpu_functions from armv6 that are unused on that
andrew [Mon, 3 Oct 2016 14:43:57 +0000 (14:43 +0000)]
Remove the parts of cpu_functions from armv6 that are unused on that
architecture.

Sponsored by: ABT Systems Ltd

7 years agoOnly define the CF_* macros on ARMv4/v5. They are unused on armv6.
andrew [Mon, 3 Oct 2016 14:26:55 +0000 (14:26 +0000)]
Only define the CF_* macros on ARMv4/v5. They are unused on armv6.

Sponsored by: ABT Systems Ltd

7 years agoSplit the compiler command line for building the arm elf trampoline code
andrew [Mon, 3 Oct 2016 14:18:13 +0000 (14:18 +0000)]
Split the compiler command line for building the arm elf trampoline code
so common parts of the command are on separate lines.

Sponsored by: ABT Systems Ltd

7 years agoFix remaining bugs in libstancd/cd9660.c reported by Bruce Evans.
tsoome [Mon, 3 Oct 2016 14:07:15 +0000 (14:07 +0000)]
Fix remaining bugs in libstancd/cd9660.c reported by Bruce Evans.

Fixed text in comments.

Reported by: Bruce Evans <brde@optusnet.com.au>
Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8119

7 years agoConditionally move initial vfs bio alloc above 4G
gallatin [Mon, 3 Oct 2016 13:23:43 +0000 (13:23 +0000)]
Conditionally move initial vfs bio alloc above 4G

On machines with just the wrong amount of physical memory (enough to
have a lot of bufs, but not enough to use VM_FREELIST_DMA32) it is
possible for 32-bit address limited devices to have little to no
memory left when attaching, due to potentially large vfs bio configs
consuming all memory below 4GB not protected by VM_FREELIST_ISADMA.
This causes the 32-bit devices to allocate from VM_FREELIST_ISADMA,
leaving that freelist emtpy when ISA devices need DMAable memory.

Rather than decrease VM_DMA32_NPAGES_THRESHOLD, use the time honored
technique of putting initially allocated kernel data structs
at the end (or at least not the beginning) of memory.

Since this allocation is done at boot and is wired, is not freed,
so the system is low on 32-bit (and ISA) dma'ble memory forever.
So it is a good candidate to move above 4GB.

While here, remove an unneeded round_page() from kmem_malloc's size
argument as suggested by alc.  The first thing kmem_malloc() does
is a round_page(size), so there is no need to do it before the call.

Reviewed by: alc
Sponsored by: Netflix

7 years agolibc arc4_stir: use only kern.arandom sysctl
emaste [Mon, 3 Oct 2016 13:12:44 +0000 (13:12 +0000)]
libc arc4_stir: use only kern.arandom sysctl

The sysctl cannot fail. If it does fail on some FreeBSD derivative or
after some future change, just abort() so that the problem will be found
and fixed.

It's preferable to provide an arc4random() function that cannot fail and
cannot return poor quality random data. While abort() is not normally
suitable for a library, it makes sense here.

Reviewed by: ed, jonathan, markm
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8077

7 years agoChange from passive to active english. Correctly specify that the task
hselasky [Mon, 3 Oct 2016 12:48:55 +0000 (12:48 +0000)]
Change from passive to active english. Correctly specify that the task
is being drained and not the queue.

Submitted by: wblock @
MFC after: 3 days

7 years agoUse C99 designated initializers to create the armv6 cpu_functions structs.
andrew [Mon, 3 Oct 2016 11:57:10 +0000 (11:57 +0000)]
Use C99 designated initializers to create the armv6 cpu_functions structs.
This will help with a later cleanup of what functions we implement.

Sponsored by: ABT Systems Ltd

7 years agoReplace OFF_MAX with INT64_MAX. The former is defined on Linux.
marcel [Mon, 3 Oct 2016 04:00:30 +0000 (04:00 +0000)]
Replace OFF_MAX with INT64_MAX. The former is defined on Linux.

7 years agoPrefer <stdint.h> over <sys/types.h>. While here remove redundant
marcel [Mon, 3 Oct 2016 02:37:28 +0000 (02:37 +0000)]
Prefer <stdint.h> over <sys/types.h>. While here remove redundant
inclusion of <sys/queue.h>.

Move the inclusion of the disk partitioning headers out of order
and inbetween standard headers and local header. They will change
in a subsequent commit.

7 years agoReplace STAILQ with TAILQ. TAILQs are portable enough that they can
marcel [Mon, 3 Oct 2016 01:46:47 +0000 (01:46 +0000)]
Replace STAILQ with TAILQ. TAILQs are portable enough that they can
be used on both macOS and Linux. STAILQs are not. In particular,
STAILQ_LAST does not next on Linux. Since neither STAILQ_FOREACH_SAFE
nor TAILQ_FOREACH_SAFE exist on Linux, replace its use with a regular
TAILQ_FOREACH. The _SAFE variant was only used for having the next
pointer in a local variable.

7 years agoAdd rpi_ft5406 module and add it to extra modules in Raspberry Pi configs
gonzo [Mon, 3 Oct 2016 01:08:34 +0000 (01:08 +0000)]
Add rpi_ft5406 module and add it to extra modules in Raspberry Pi configs

7 years agoFix attach/detach methods
gonzo [Mon, 3 Oct 2016 01:07:06 +0000 (01:07 +0000)]
Fix attach/detach methods

- Initialize lock before starting worker process
- Do not hold lock when destroying evdev. By that time ther should be no
    other active code pathes that can access softc

7 years agoshutdown appeared as a standalone utility in 4.1BSD.
sevan [Mon, 3 Oct 2016 00:55:18 +0000 (00:55 +0000)]
shutdown appeared as a standalone utility in 4.1BSD.
http://mail-index.netbsd.org/source-changes-d/2016/09/13/msg008686.html
http://mail-index.netbsd.org/source-changes-d/2016/09/14/msg008691.html
PR: 212552
Approved by: bcr (mentor)
Obtained from: NetBSD
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D8105

7 years agosetkey appeared in FreeBSD 4.0
sevan [Mon, 3 Oct 2016 00:42:25 +0000 (00:42 +0000)]
setkey appeared in FreeBSD 4.0

PR: 212551
Approved by: bcr (mentor)
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D8105

7 years agosconfig appeared in FreeBSD 5.2.
sevan [Mon, 3 Oct 2016 00:40:20 +0000 (00:40 +0000)]
sconfig appeared in FreeBSD 5.2.

PR: 212550
Approved by: bcr (mentor)
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoNote the version PF first appeared in FreeBSD & from which version it was ported...
sevan [Mon, 3 Oct 2016 00:35:14 +0000 (00:35 +0000)]
Note the version PF first appeared in FreeBSD & from which version it was ported from.
Address the contractions raised by igor.

PR: 212574
Approved by: bcr (mentor)
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoNote the change of name in FreeBSD 5.0.
sevan [Mon, 3 Oct 2016 00:31:58 +0000 (00:31 +0000)]
Note the change of name in FreeBSD 5.0.

PR: 212542
Approved by: bcr (mentor)
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoNote the name change from mount_null to mount_nullfs in FreeBSD 5.0.
sevan [Mon, 3 Oct 2016 00:28:42 +0000 (00:28 +0000)]
Note the name change from mount_null to mount_nullfs in FreeBSD 5.0.

PR: 212541
Approved by: bcr (mentor)
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoAmend history to mention predecessor originated from 386BSD[1] & current implementati...
sevan [Mon, 3 Oct 2016 00:25:15 +0000 (00:25 +0000)]
Amend history to mention predecessor originated from 386BSD[1] & current implementation from NetBSD[2].
Reword history since the utility was renamed once more in FreeBSD 5.0.
Separate out author & historical information regarding character code conversion.
Add AUTHORS section.

[1] https://groups.google.com/forum/#!search/mount_pcfs.c/comp.unix.bsd/9qhH0v1tZm0/inlPnXZj_2sJ
[2] http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/mount_msdos/mount_msdos.c?rev=1.6&content-type=text/x-cvsweb-markup

PR: 212536
Approved by: bcr (mentor)
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoNote mount_fusefs appeared in FreeBSD 10.
sevan [Mon, 3 Oct 2016 00:16:16 +0000 (00:16 +0000)]
Note mount_fusefs appeared in FreeBSD 10.
Move note regarding implementation to caveats.
Address issued raised by Igor.

PR: 212513
Approved by: bcr (mentor)
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D8105

7 years agocache: ignore purgevfs requests for filesystems with few vnodes
mjg [Mon, 3 Oct 2016 00:02:32 +0000 (00:02 +0000)]
cache: ignore purgevfs requests for filesystems with few vnodes

purgevfs is purely optional and induces lock contention in workloads
which frequently mount and unmount filesystems.

In particular, poudriere will do this for filesystems with 4 vnodes or
less. Full cache scan is clearly wasteful.

Since there is no explicit counter for namecache entries, the number of
vnodes used by the target fs is checked.

The default limit is the number of bucket locks.

Reviewed by: kib

7 years agomksnap_ffs appeared in FreeBSD 5.1.
sevan [Sun, 2 Oct 2016 23:59:31 +0000 (23:59 +0000)]
mksnap_ffs appeared in FreeBSD 5.1.

PR: 212510
Approved by: bcr (mentor)
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D8105

7 years agomknod appeared in V4 UNIX
sevan [Sun, 2 Oct 2016 23:56:08 +0000 (23:56 +0000)]
mknod appeared in V4 UNIX
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man8/mknod.8

PR: 212509
Approved by: bcr (mentor)
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoinit was there in UNIX from V1
sevan [Sun, 2 Oct 2016 23:51:13 +0000 (23:51 +0000)]
init was there in UNIX from V1
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V1/init.s

PR: 212503
Approved by: bcr (mentor)
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D8105

7 years agogbde first appeared in FreeBSD 5.0
sevan [Sun, 2 Oct 2016 23:48:33 +0000 (23:48 +0000)]
gbde first appeared in FreeBSD 5.0

PR: 212478
Approved by: brc (mentor)
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoDocument which version of BSD first showed up in and add the version info
sevan [Sun, 2 Oct 2016 23:44:52 +0000 (23:44 +0000)]
Document which version of BSD first showed up in and add the version info
for NetBSD & FreeBSD.

PR: 212477
Approved by: bcr (mentor)
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoMention the version of NetBSD the utility originated from.
sevan [Sun, 2 Oct 2016 23:40:17 +0000 (23:40 +0000)]
Mention the version of NetBSD the utility originated from.

PR: 212476
Approved by: bcr (mentor)
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D8105

7 years agodumpon(8) appears to be present in FreeBSD 2.0.5,
sevan [Sun, 2 Oct 2016 23:35:45 +0000 (23:35 +0000)]
dumpon(8) appears to be present in FreeBSD 2.0.5,
despite initial import of man page listed FreeBSD 2.1.

PR: 212445
Approved by: bcr (mentor)
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D8105

7 years agodump(8) first appeared in V4 UNIX
sevan [Sun, 2 Oct 2016 23:30:28 +0000 (23:30 +0000)]
dump(8) first appeared in V4 UNIX
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man8

PR: 212444
Approved by: bcr (mentor)
Obtained from: TUHS
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D8105

7 years agodmesg(8) first appeared in 3BSD.
sevan [Sun, 2 Oct 2016 23:26:41 +0000 (23:26 +0000)]
dmesg(8) first appeared in 3BSD.
http://minnie.tuhs.org/cgi-bin/utree.pl?file=3BSD/usr/man/man1/dmesg.1m

PR: 212443
Approved by: bcr (mentor)
Obtained from: TUHS
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoccdconfig first appeared in NetBSD 1.1
sevan [Sun, 2 Oct 2016 23:19:05 +0000 (23:19 +0000)]
ccdconfig first appeared in NetBSD 1.1
From NetBSD man page, confirmed with repo tags in CVS [1]
(there was also no 1.0a release according to [2])

[1] http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/ccdconfig/ccdconfig.c
[2] http://netbsd.org/releases/formal.html#history

PR: 212437
Approved by: bcr (mentor)
Obtained from: NetBSD
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoIn v3 UNIX, the kill utility is documented in category 8, not 1.
sevan [Sun, 2 Oct 2016 23:13:46 +0000 (23:13 +0000)]
In v3 UNIX, the kill utility is documented in category 8, not 1.
Add a note of it.
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man8/kill.8

PR: 211786
Approved by: bcr (mentor)
Obtained from: TUHS
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoBump __FreeBSD_version for net80211(4) changes (r306590, r306591).
avos [Sun, 2 Oct 2016 20:48:12 +0000 (20:48 +0000)]
Bump __FreeBSD_version for net80211(4) changes (r306590, r306591).

7 years agonet80211: ieee80211_ratectl*: switch to reusable KPI
avos [Sun, 2 Oct 2016 20:35:55 +0000 (20:35 +0000)]
net80211: ieee80211_ratectl*: switch to reusable KPI

Replace various void * / int argument combinations with common structures:
- ieee80211_ratectl_tx_status for *_tx_complete();
- ieee80211_ratectl_tx_stats for *_tx_update();

While here, improve amrr_tx_update() for a bit:
1. In case, if receiver is not known (typical for Ralink USB drivers),
refresh Tx rate for all nodes on the interface.
2. There was a misuse:
- otus(4) sends non-decreasing counters (as originally intended);
- but ural(4), rum(4) and run(4) are using 'read & clear' registers
to obtain statistics for some period of time (and those 'last period'
values are used as arguments for tx_update()). If arguments are not big
enough, they are just discarded after the next call.

Fix: move counting into *_tx_update()
(now otus(4) will zero out all node counters after every tx_update() call)

Tested with:
- Intel 3945BG (wpi(4)), STA mode.
- WUSB54GC (rum(4)), STA / HOSTAP mode.
- RTL8188EU (urtwn(4)), STA mode.

Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D8037

7 years agonet80211: add one-vap version of ieee80211_iterate_nodes()
avos [Sun, 2 Oct 2016 19:39:23 +0000 (19:39 +0000)]
net80211: add one-vap version of ieee80211_iterate_nodes()

- Add a counter into 'struct ieee80211_node_table' to save current number
of allocated nodes.
(allows to remove array overflow checking in ieee80211_iterate_nodes()).
- Add ieee80211_iterate_nodes_vap() function; unlike non-vap version,
it iterates on nodes for specified vap only.

In addition to the above:
- Remove ieee80211_iterate_nt(); it is not used by drivers / net80211
outside ieee80211_iterate_nodes() function + cannot be separated due
to structural changes in code.

Since size of 'struct ieee80211_node_table' (part of ieee80211com,
which is a part of driver's softc) is changed all wireless drivers /
kernel need to be recompiled.

Tested with wpi(4), STA mode.

Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D7996

7 years agoImplement iicbus_write_ivar and impelemnt the NOSTOP ivar in both read
imp [Sun, 2 Oct 2016 17:36:55 +0000 (17:36 +0000)]
Implement iicbus_write_ivar and impelemnt the NOSTOP ivar in both read
and write.

7 years agoExport the mq_getfd_np() symbol from librt.so, which allows to get
kib [Sun, 2 Oct 2016 17:02:59 +0000 (17:02 +0000)]
Export the mq_getfd_np() symbol from librt.so, which allows to get
file descriptor for the given posix mqueue.  Export the
timer_oshandle_np() symbol to get ktimer id for the given posix timer.

Requested by: Lewis Donzis <lew@perftech.com>
Reviewed by: jilles
Discussed with: kan
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoswapon(8): Update to reality: swapoff ignores -L and the late option in fstab.
jilles [Sun, 2 Oct 2016 15:01:31 +0000 (15:01 +0000)]
swapon(8): Update to reality: swapoff ignores -L and the late option in fstab.

MFC after: 1 week

7 years agoMove the description of CHANGER variable to ENVIRONMENT section rather than in the...
sevan [Sun, 2 Oct 2016 14:42:46 +0000 (14:42 +0000)]
Move the description of CHANGER variable to ENVIRONMENT section rather than in the DESCRIPTION section.
From OpenBSD src/bin/chio/chio.1 r1.23

PR: 212158
Approved by: bjk
Obtained from: OpenBSD
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D8117

7 years agoIgor suggested moving sentence to new line.
sevan [Sun, 2 Oct 2016 14:32:04 +0000 (14:32 +0000)]
Igor suggested moving sentence to new line.
Zap traililng whitespace.

PR: 212447
Approved by: bcr (mentor)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D8116

7 years ago"POSIX doesn't specify -h." - r1.27 from NetBSD
sevan [Sun, 2 Oct 2016 14:27:18 +0000 (14:27 +0000)]
"POSIX doesn't specify -h." - r1.27 from NetBSD
http://man.openbsd.org/?query=chmod&apropos=0&sec=0&arch=default&manpath=POSIX-2013

PR: 212337
Approved by: bcr (mentor)
Obtained from: NetBSD
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D8118

7 years agoUse .At macro instead of specifying AT&T UNIX literaly.
sevan [Sun, 2 Oct 2016 14:22:09 +0000 (14:22 +0000)]
Use .At macro instead of specifying AT&T UNIX literaly.

PR: 212034
Approved by: bcr (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8114

7 years agoFix libjail reached latest sysctl entry.
br [Sun, 2 Oct 2016 11:56:17 +0000 (11:56 +0000)]
Fix libjail reached latest sysctl entry.

Reviewed by: jamie
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D8096

7 years agoModularize evdev
gonzo [Sun, 2 Oct 2016 03:20:31 +0000 (03:20 +0000)]
Modularize evdev

- Convert "options EVDEV" to "device evdev" and "device uinput", add
    modules for both new devices. They are isolated subsystems and do not
    require any compile-time changes to general kernel subsytems
- For hybrid drivers that have evdev as an optional way to deliver input
    events add option EVDEV_SUPPORT. Update all existing hybrid drivers
    to use it instead of EVDEV
- Remove no-op DECLARE_MODULE in evdev, it's not required, MODULE_VERSION
    is enough
- Add evdev module dependency to uinput

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>

7 years agoFix gcc compilation error
gonzo [Sun, 2 Oct 2016 03:06:58 +0000 (03:06 +0000)]
Fix gcc compilation error

input_absinfo.code is unsigned so condition is always false

7 years agoAdd GARP retransmit capability
vangyzen [Sun, 2 Oct 2016 01:42:45 +0000 (01:42 +0000)]
Add GARP retransmit capability

A single gratuitous ARP (GARP) is always transmitted when an IPv4
address is added to an interface, and that is usually sufficient.
However, in some circumstances, such as when a shared address is
passed between cluster nodes, this single GARP may occasionally be
dropped or lost.  This can lead to neighbors on the network link
working with a stale ARP cache and sending packets destined for
that address to the node that previously owned the address, which
may not respond.

To avoid this situation, GARP retransmissions can be enabled by setting
the net.link.ether.inet.garp_rexmit_count sysctl to a value greater
than zero.  The setting represents the maximum number of retransmissions.
The interval between retransmissions is calculated using an exponential
backoff algorithm, doubling each time, so the retransmission intervals
are: {1, 2, 4, 8, 16, ...} (seconds).

Due to the exponential backoff algorithm used for the interval
between GARP retransmissions, the maximum number of retransmissions
is limited to 16 for sanity.  This limit corresponds to a maximum
interval between retransmissions of 2^16 seconds ~= 18 hours.
Increasing this limit is possible, but sending out GARPs spaced
days apart would be of little use.

Submitted by: David A. Bright <david.a.bright@dell.com>
MFC after: 1 month
Relnotes: yes
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D7695

7 years agortsold: Log messages about unexpected RAs at LOG_DEBUG.
markj [Sun, 2 Oct 2016 00:56:21 +0000 (00:56 +0000)]
rtsold: Log messages about unexpected RAs at LOG_DEBUG.

Because rtsold listens for RAs on a raw socket, it may receive RAs from
interfaces that it does not manage. Such events can result in excessive
logging.

Submitted by: Franco Fichtner <franco@opnsense.org>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8108

7 years agoAllow tracing of functions prefixed by "__".
markj [Sun, 2 Oct 2016 00:35:00 +0000 (00:35 +0000)]
Allow tracing of functions prefixed by "__".

This restriction was inherited from upstream but is not relevant on FreeBSD.
Furthermore, it hindered the tracing of locking primitive subroutines.

MFC after: 1 week

7 years agoAdd the __printflike attribute to the declaration of vdprintf(3)
vangyzen [Sat, 1 Oct 2016 23:08:26 +0000 (23:08 +0000)]
Add the __printflike attribute to the declaration of vdprintf(3)

I intended to add this in r306568.

MFC after: 3 days
Sponsored by: Dell EMC

7 years agoAdd the __printflike attribute to the declaration of dprintf(3)
vangyzen [Sat, 1 Oct 2016 22:34:38 +0000 (22:34 +0000)]
Add the __printflike attribute to the declaration of dprintf(3)

MFC after: 3 days
Sponsored by: Dell EMC

7 years agolmc(4): fix the build without the bpf device
vangyzen [Sat, 1 Oct 2016 22:21:10 +0000 (22:21 +0000)]
lmc(4): fix the build without the bpf device

"make buildkernel" now works with and without "device bpf".

Reported by: Dave Mischler <dave@mischler.com>
MFC after: 3 days
Sponsored by: Dell EMC

7 years agoDon't declare the 'temp' timeval as static.
jhb [Sat, 1 Oct 2016 22:17:40 +0000 (22:17 +0000)]
Don't declare the 'temp' timeval as static.

7 years agoUse timercmp() and timersub() in kdump.
jhb [Sat, 1 Oct 2016 22:12:33 +0000 (22:12 +0000)]
Use timercmp() and timersub() in kdump.

Previously, kdump used the kernel-only timervalsub() macro which required
defining _KERNEL when including <sys/time.h>.  Now, kdump uses the existing
userland API.  The timercmp() usage to check for a backwards timestamp is
also clearer and simpler than the previous code which checked the result of
the subtraction for a negative value.

While here, take advantage of the 3-arg timersub() to store the subtraction
results in a tempory timeval instead of overwriting the timestamp in the
ktrace record and then having to restore it.

7 years agoExpose kernel-only errno values if _WANT_KERNEL_ERRNO is defined.
jhb [Sat, 1 Oct 2016 22:08:07 +0000 (22:08 +0000)]
Expose kernel-only errno values if _WANT_KERNEL_ERRNO is defined.

The kernel uses a few negative errno values for internal conditions
such as requesting a system call restart.  Normally these errno values
are not exposed to userland.  However, kdump needs access to these
values as some of then can be present in a ktrace system call return
record.  Previously kdump was defining _KERNEL to gain access to ehse
values, but was then having to manually declare 'errno' (and doing it
incorrectly).  Now, kdump uses _WANT_KERNEL_ERRNO instead of _KERNEL
and uses the system-provided declaration of errno.

7 years agoDecode arguments to truncate and ftruncate.
jhb [Sat, 1 Oct 2016 22:03:41 +0000 (22:03 +0000)]
Decode arguments to truncate and ftruncate.

In particular, decode the off_t argument as a 64-bit argument to fix
decoding for 32-bit processes.

7 years agoHandle 64-bit system call arguments (off_t, id_t).
jhb [Sat, 1 Oct 2016 22:01:41 +0000 (22:01 +0000)]
Handle 64-bit system call arguments (off_t, id_t).

In particular, 64-bit system call arguments use up two register_t
arguments for 32-bit processes.  They must also be aligned on a 64-bit
boundary on 32-bit powerpc processes.  This fixes the decoding of
lseek(), procctl(), and wait6() arguments for 32-bit processes (both
native and via freebsd32).

Note that the ktrace system call return record only returns a single
register, so the return value of lseek is always truncated to the low
32-bits for 32-bit processes.

7 years agopatch(1): make some macros look boolean.
pfg [Sat, 1 Oct 2016 20:46:01 +0000 (20:46 +0000)]
patch(1): make some macros look boolean.

Similar to r306560, plus remove an unused macro.

Suggested by: jmallett

7 years agopatch(1): make some macros look boolean.
pfg [Sat, 1 Oct 2016 20:31:00 +0000 (20:31 +0000)]
patch(1): make some macros look boolean.

Minor cleanup inspired by a new patch(1) variant in schily tools.

For reference:
https://sourceforge.net/p/schillix-on/

MFC after: 1 week

7 years agor297225 broke udp_output() for the case where the "addr" argument
rmacklem [Sat, 1 Oct 2016 19:39:09 +0000 (19:39 +0000)]
r297225 broke udp_output() for the case where the "addr" argument
is NULL and the function jumps to the "release:" label.
For this case, the "inp" was write locked, but the code attempted to
read unlock it. This patch fixes the problem.
This case could occur for NFS over UDP mounts, where the server was
down for a few minutes under certain circumstances.

Reported by: bde
Tested by: bde
Reviewed by: gnn
MFC after: 2 weeks

7 years agoUse VM_MEMATTR_WRITE_COMBINING memattr for mmap(2) on framebuffer
gonzo [Sat, 1 Oct 2016 17:57:32 +0000 (17:57 +0000)]
Use VM_MEMATTR_WRITE_COMBINING memattr for mmap(2) on framebuffer

VM_MEMATTR_WRITE_COMBINING sets write-through cache flag for framebuffer
memory that prevents pixel data from being stuck in cache until evicition
happens

7 years agoBump _FreeBSD_version after adding fb_memattr field to fb_info in r306555
gonzo [Sat, 1 Oct 2016 17:48:41 +0000 (17:48 +0000)]
Bump _FreeBSD_version after adding fb_memattr field to fb_info in r306555

7 years agoProvide way for framebuffer driver to request mmap(2) mapping type
gonzo [Sat, 1 Oct 2016 17:43:02 +0000 (17:43 +0000)]
Provide way for framebuffer driver to request mmap(2) mapping type

On ARM if memattr is not overriden mmap(2) maps framebuffer
memory as WBWA which means part of changes to content in userland
end up in cache and appear on screen gradually as cache lines are
evicted. This change adds configurable memattr that hardware fb
implementation can set to get the memory mapping type it
requires:

- Add new flag FB_FLAG_MEMATTR that indicates that framebuffer
    driver overrides default memattr
- Add new field fb_memattr to struct fb_info to specify requested
    memattr

Reviewed by: ray
Differential Revision: https://reviews.freebsd.org/D8064

7 years agoUse accept4 with O_NONBLOCK rather than accept + fcntl
bapt [Sat, 1 Oct 2016 11:43:37 +0000 (11:43 +0000)]
Use accept4 with O_NONBLOCK rather than accept + fcntl

7 years agoFix remaining cstyle issues in libstand/cd9660.c
tsoome [Sat, 1 Oct 2016 07:46:28 +0000 (07:46 +0000)]
Fix remaining cstyle issues in libstand/cd9660.c

Reported by: Bruce Evans <brde@optusnet.com.au>
Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8107

7 years agoTEGRA: Fix bindings for cpufreq and coretemp drivers,
mmel [Sat, 1 Oct 2016 06:50:16 +0000 (06:50 +0000)]
TEGRA: Fix bindings for cpufreq and coretemp drivers,
it was broken in r306477.
Correct a description for coretemp driver.

7 years agoTEGRA: Extend timeout for PLLs lock to 5 ms. Real lock time for PLLA
mmel [Sat, 1 Oct 2016 03:35:03 +0000 (03:35 +0000)]
TEGRA: Extend timeout for PLLs lock to 5 ms. Real lock time for PLLA
has been very near to old limit.

7 years agond6_dad_timer(): don't assert that the address is tentative.
markj [Sat, 1 Oct 2016 01:30:34 +0000 (01:30 +0000)]
nd6_dad_timer(): don't assert that the address is tentative.

It appears that this assertion can be tripped in some cases when
multiple interfaces are on the same link. Until this is resolved, revert a
part of r306305 and simply log a message if the DAD timer fires on a
non-tentative address.

Reported by: jhb
X-MFC With: r306305

7 years agoRevert r306473.
jhibbits [Sat, 1 Oct 2016 01:10:51 +0000 (01:10 +0000)]
Revert r306473.

Some objections were noted, and it was purely a cosmetic change anyway.

7 years agoImport libucl 20160812
bapt [Sat, 1 Oct 2016 00:14:01 +0000 (00:14 +0000)]
Import libucl 20160812

7 years agoUpdate libucl to snapshot 20160812
bapt [Sat, 1 Oct 2016 00:11:09 +0000 (00:11 +0000)]
Update libucl to snapshot 20160812

7 years agoImport dma 20160929
bapt [Fri, 30 Sep 2016 23:38:26 +0000 (23:38 +0000)]
Import dma 20160929

MFC after: 1 week

7 years agocstyle fix of cd9660_open in libstand
tsoome [Fri, 30 Sep 2016 23:19:08 +0000 (23:19 +0000)]
cstyle fix of cd9660_open in libstand

rS306534 did create bad cstyle by my mistake, correcting it.

Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8103

7 years agoopen.2: Document Capsicum behavior
cem [Fri, 30 Sep 2016 23:01:37 +0000 (23:01 +0000)]
open.2: Document Capsicum behavior

Document open(2) and openat(2) behavior in Capsicum capability mode.

Reviewed by: ed (previous version), emaste, rwatson (previous version),
wblock
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D7947

7 years agocd9660_open should check for padding
tsoome [Fri, 30 Sep 2016 22:28:20 +0000 (22:28 +0000)]
cd9660_open should check for padding

The libstand cd9660 reader code must check for extents having padding.

Reviewed by: jhb
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8101

7 years agoAdd dependency to evdev module
gonzo [Fri, 30 Sep 2016 21:14:42 +0000 (21:14 +0000)]
Add dependency to evdev module

7 years agoAdd dependency to evdev module (if required)
gonzo [Fri, 30 Sep 2016 21:13:19 +0000 (21:13 +0000)]
Add dependency to evdev module (if required)

7 years agoDeclare a module for evdev and add dependency to ukbd(4) and ums(4)
gonzo [Fri, 30 Sep 2016 21:04:56 +0000 (21:04 +0000)]
Declare a module for evdev and add dependency to ukbd(4) and ums(4)

Prepare for making evdev a module. "Pure" evdev device drivers (like
touchscreen) and evdev itself can be built as a modules regardless of
"options EVDEV" in kernel config. So if people does not require evdev
functionality in hybrid drivers like ums and ukbd they can, for instance,
kldload evdev and utouchscreen to run FreeBSD in kiosk mode.

7 years agocam_periph_ccbwait could return while ccb in progress
markj [Fri, 30 Sep 2016 21:00:09 +0000 (21:00 +0000)]
cam_periph_ccbwait could return while ccb in progress

In cam_periph_runccb, cam_periph_ccbwait was using the value of the ccb
pinfo.index and status fields to determine whether the ccb was done,
but these fields are updated without a contending lock and could glitch
into states that would be erroneously interpreted as done.  Instead,
have cam_periph_ccbwait look for the explicit result of the function
cam_periph_done.

Submitted by: Ryan Libby <rlibby@gmail.com>
Reviewed by: mav
MFC after: 3 weeks
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8020

7 years agoFix `sesutil fault` operation.
mav [Fri, 30 Sep 2016 20:35:12 +0000 (20:35 +0000)]
Fix `sesutil fault` operation.

Fault and ident bits are located in different control bytes, so previous
code was just doing nothing, writing into reserved bit.

MFC after: 1 week

7 years agolibm: remove unused variables for LDBL_MANT_DIG != 113
emaste [Fri, 30 Sep 2016 20:20:07 +0000 (20:20 +0000)]
libm: remove unused variables for LDBL_MANT_DIG != 113

Sponsored by: The FreeBSD Foundation

7 years agoAdd NetBSD 5.1.4, 5.2.2 & 7.0.1 releases to the tree.
sevan [Fri, 30 Sep 2016 20:06:05 +0000 (20:06 +0000)]
Add NetBSD 5.1.4, 5.2.2 & 7.0.1 releases to the tree.
Ammend the position of NetBSD 6.0.2 release in the tree as it came
after OpenBSD[1] & DragonFlyBSD[2] release according to the release
information.
The entries for the 6.0.5 & 6.1.5 releases were incorrect (fetched from
NetBSD CVS copy) and confirmed with history page[3]

[1] http://www.openbsd.org/53.html
[2] https://www.dragonflybsd.org/releases/
[3] http://netbsd.org/releases/formal.html#history

Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8099

7 years agoAdd librss, a simple wrapper around RSS APIs so applications can begin auto-tuning.
adrian [Fri, 30 Sep 2016 19:59:56 +0000 (19:59 +0000)]
Add librss, a simple wrapper around RSS APIs so applications can begin auto-tuning.

I've used this in a handful of RSS test applications.  It is just some
very simple functions to fetch the RSS configuration, query the per-bucket
CPU set, and mark sockets as local to an RSS bucket.  It should be sufficient
for both thread-based and process-based workloads.

(Yes, I wrote a manpage.)

This is based on some early RSS API and wrapper API work I did whilst
I was at Netflix.  Thanks to Netflix for the very original work that
spawned this; thanks to Peter Grehan for his feedback about RSS APIs
and thanks to Jack Vogel and Navdeep Parhar for the NIC-facing side of the
APIs.  These fed into the simple userland API I wrote up here.

Reviewed by: gallatin

7 years agoUpgrade Firmware/Bootloader/ResetSeq/Minidump to revision 5.4.62
davidcs [Fri, 30 Sep 2016 19:21:02 +0000 (19:21 +0000)]
Upgrade Firmware/Bootloader/ResetSeq/Minidump to revision 5.4.62

MFC after:5 days

7 years agoRevert r306516 for now, it is incomplete on i386
cem [Fri, 30 Sep 2016 18:58:50 +0000 (18:58 +0000)]
Revert r306516 for now, it is incomplete on i386

Noted by: kib

7 years agonet80211: do not cancel scan when packet is sent.
avos [Fri, 30 Sep 2016 18:43:39 +0000 (18:43 +0000)]
net80211: do not cancel scan when packet is sent.

Restore pre-r300383 behavior when a frame is sent:
- stop scan;
- send frame;
- when beacon arrives and our bit in TIM is not set - restart the scan.

NOTE:
Ideally, this should introduce new interface (ieee80211_pause_anyscan());
however, since ieee80211_cancel_anyscan() is not used by drivers and only
called by ieee80211_start_pkt() the current patch overrides it's behavior
instead.

Tested with Intel 3945BG, STA mode

Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D7979

7 years agoAdd myself to the list & note who is my mentor.
sevan [Fri, 30 Sep 2016 18:36:23 +0000 (18:36 +0000)]
Add myself to the list & note who is my mentor.

Approved by: bcr (mentor)

7 years agoReduce the cost of TLB invalidation on x86 by using per-CPU completion flags
cem [Fri, 30 Sep 2016 18:12:16 +0000 (18:12 +0000)]
Reduce the cost of TLB invalidation on x86 by using per-CPU completion flags

Reduce contention during TLB invalidation operations by using a per-CPU
completion flag, rather than a single atomically-updated variable.

On a Westmere system (2 sockets x 4 cores x 1 threads), dtrace measurements
show that smp_tlb_shootdown is about 50% faster with this patch; observations
with VTune show that the percentage of time spent in invlrng_single_page on an
interrupt (actually doing invalidation, rather than synchronization) increases
from 31% with the old mechanism to 71% with the new one.  (Running a basic file
server workload.)

Submitted by: Anton Rang <rang at acm.org>
Reviewed by: cem (earlier version), kib
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8041

7 years agoRevert commit
davidcs [Fri, 30 Sep 2016 18:08:16 +0000 (18:08 +0000)]
Revert commit
r306284 - Fixes for issues under high workloads

Will fix and recommit patch

7 years agoCompute two new metrics. Disk load, the average number of transactions
imp [Fri, 30 Sep 2016 17:49:04 +0000 (17:49 +0000)]
Compute two new metrics. Disk load, the average number of transactions
we have queued up normaliazed to the queue size. Also compute buckets
of latency to help compute, in userland, estimates of Median, P90, P95
and P99 values.

Sponsored by: Netflix, Inc

7 years agoRemove the GLOBAL queue lock which just adds unnecessary complexity to code
loos [Fri, 30 Sep 2016 17:30:39 +0000 (17:30 +0000)]
Remove the GLOBAL queue lock which just adds unnecessary complexity to code
(when used together with the individual tx and rx locks).

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agovfs: batch free vnodes in per-mnt lists
mjg [Fri, 30 Sep 2016 17:27:17 +0000 (17:27 +0000)]
vfs: batch free vnodes in per-mnt lists

Previously free vnodes would always by directly returned to the global
LRU list. With this change up to mnt_free_list_batch vnodes are collected
first.

syncer runs always return the batch regardless of its size.

While vnodes on per-mnt lists are not counted as free, they can be
returned in case of vnode shortage.

Reviewed by: kib
Tested by: pho

7 years agoFix a typo in CPSW_DEBUG MACRO and then replace all the CPSWP_DEBUG() calls
loos [Fri, 30 Sep 2016 17:19:43 +0000 (17:19 +0000)]
Fix a typo in CPSW_DEBUG MACRO and then replace all the CPSWP_DEBUG() calls
with CPSW_DEBUG().

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoSort and remove unnecessary includes.
loos [Fri, 30 Sep 2016 17:16:02 +0000 (17:16 +0000)]
Sort and remove unnecessary includes.

No functional changes.

Sponsored by: Rubicon Communications, LLC (Netgate)