]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoMFC r303450:
bdrewery [Tue, 9 May 2017 19:15:11 +0000 (19:15 +0000)]
MFC r303450:

  Pull a copy of the input string before calling basename() and dirname().

7 years agoMFC r306806, r313709, r317058, r317060
gonzo [Tue, 9 May 2017 18:46:49 +0000 (18:46 +0000)]
MFC r306806, r313709, r317058, r317060

r306806 by emaste:
Improvements to BSD-licensed DTC.

- Numerous crash and bug fixes
- Improved warning and error messages
- Permit multiple labels on nodes and properties
- Fix node@address references
- Add support for /delete-node/
- Consume whitespace after a node
- Read the next token before the second /memreserve/
- Fix parsing of whitespace
- Clean up /delete-node/ and add support for /delete-property/
- Handle /delete-node/ specifying a unit address

Obtained from: https://github.com/davidchisnall/dtc @df5ede4

r313709 by dim:
Fix build of BSD dtc when NDEBUG is defined (MK_ASSERT_DEBUG=no):
* Initialize correct parent in binary_operator's constructor.
* Include <errno.h> explicitly, otherwise errno is undefined (without
  NDEBUG, this is accidentally 'fixed' by including <iostream>).

Reported by: matteo

r317058 by emaste:
dtc: remove unused (since r306806) string.hh

r317060 by emaste:
dtc: update to upstream 227d6a3

- Report missing includes at the correct location.
- Add initial support for the -@ option emitting a symbol table.
- Add support for running tests with and without -@
- Add support for generating __fixups__ and __local_fixups__
- Attach the to-string transform to the node path.

7 years agoDocument r307729, unbound 1.5.10.
gjb [Tue, 9 May 2017 18:19:55 +0000 (18:19 +0000)]
Document r307729, unbound 1.5.10.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r309511, Subversion 1.9.5.
gjb [Tue, 9 May 2017 18:19:54 +0000 (18:19 +0000)]
Document r309511, Subversion 1.9.5.

Sponsored by: The FreeBSD Foundation

7 years agoAdd missing revision.
gjb [Tue, 9 May 2017 18:19:53 +0000 (18:19 +0000)]
Add missing revision.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r309847, file version 5.29.
gjb [Tue, 9 May 2017 18:19:52 +0000 (18:19 +0000)]
Document r309847, file version 5.29.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r312517, xz version 5.2.3.
gjb [Tue, 9 May 2017 18:19:51 +0000 (18:19 +0000)]
Document r312517, xz version 5.2.3.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r313537, tcpdump version 4.9.0.
gjb [Tue, 9 May 2017 18:19:51 +0000 (18:19 +0000)]
Document r313537, tcpdump version 4.9.0.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r313680, NetBSD test suite 01.11.2017_23.20 snapshot.
gjb [Tue, 9 May 2017 18:19:50 +0000 (18:19 +0000)]
Document r313680, NetBSD test suite 01.11.2017_23.20 snapshot.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r313795, zlib 1.2.11.
gjb [Tue, 9 May 2017 18:19:49 +0000 (18:19 +0000)]
Document r313795, zlib 1.2.11.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r313980, openresolv version 3.9.0.
gjb [Tue, 9 May 2017 18:19:48 +0000 (18:19 +0000)]
Document r313980, openresolv version 3.9.0.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r314278, libucl version 20170219.
gjb [Tue, 9 May 2017 18:19:47 +0000 (18:19 +0000)]
Document r314278, libucl version 20170219.

Sponsored by: The FreeBSD Foundation

7 years agoFix revision number for libarchive v3.3.1.
gjb [Tue, 9 May 2017 18:19:46 +0000 (18:19 +0000)]
Fix revision number for libarchive v3.3.1.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r315995, DMA 2017-02-10 snapshot.
gjb [Tue, 9 May 2017 18:19:46 +0000 (18:19 +0000)]
Document r315995, DMA 2017-02-10 snapshot.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r316068, ntpd version 4.2.8p10.
gjb [Tue, 9 May 2017 18:19:45 +0000 (18:19 +0000)]
Document r316068, ntpd version 4.2.8p10.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r316337, libarchive version 3.3.1.
gjb [Tue, 9 May 2017 18:19:44 +0000 (18:19 +0000)]
Document r316337, libarchive version 3.3.1.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r316349, tzdata version 2017b.
gjb [Tue, 9 May 2017 18:19:43 +0000 (18:19 +0000)]
Document r316349, tzdata version 2017b.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r316420, mandoc(1) version 1.14.
gjb [Tue, 9 May 2017 18:19:42 +0000 (18:19 +0000)]
Document r316420, mandoc(1) version 1.14.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r316957, tcsh(1) version 6.20.00.
gjb [Tue, 9 May 2017 18:19:41 +0000 (18:19 +0000)]
Document r316957, tcsh(1) version 6.20.00.

Sponsored by: The FreeBSD Foundation

7 years agoMFC r306773:
bdrewery [Tue, 9 May 2017 18:17:03 +0000 (18:17 +0000)]
MFC r306773:

  Add link for vrefl(9).

7 years agoMFC r306771:
bdrewery [Tue, 9 May 2017 18:14:45 +0000 (18:14 +0000)]
MFC r306771:

  Improve grammar.

7 years agoMFC r303928:
bdrewery [Tue, 9 May 2017 18:13:23 +0000 (18:13 +0000)]
MFC r303928:

  Trim out excessive / with -v when target directory ends with a trailing '/'.

7 years agoDocument r305436, Allwinner A13 support.
gjb [Tue, 9 May 2017 17:21:54 +0000 (17:21 +0000)]
Document r305436, Allwinner A13 support.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r307632, EFI loader tftpfs support.
gjb [Tue, 9 May 2017 17:21:53 +0000 (17:21 +0000)]
Document r307632, EFI loader tftpfs support.

Sponsored by: The FreeBSD Foundation

7 years agoAdd a sponsor entry for r308721
gjb [Tue, 9 May 2017 17:21:52 +0000 (17:21 +0000)]
Add a sponsor entry for r308721

Sponsored by: The FreeBSD Foundation

7 years agoDocument r308720, cron(8) {,/usr/local}/etc/cron.d support
gjb [Tue, 9 May 2017 17:21:51 +0000 (17:21 +0000)]
Document r308720, cron(8) {,/usr/local}/etc/cron.d support

Sponsored by: The FreeBSD Foundation

7 years agoDocument r308721, syslogd(8) 'include' keyword.
gjb [Tue, 9 May 2017 17:21:50 +0000 (17:21 +0000)]
Document r308721, syslogd(8) 'include' keyword.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r309337, GARP retransmit capability.
gjb [Tue, 9 May 2017 17:21:49 +0000 (17:21 +0000)]
Document r309337, GARP retransmit capability.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r309377, bnxt(4) addition.
gjb [Tue, 9 May 2017 17:21:48 +0000 (17:21 +0000)]
Document r309377, bnxt(4) addition.
Add Broadcom to the sponsors.ent file.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r310490, amd(8) updated to version 6.2.
gjb [Tue, 9 May 2017 17:21:47 +0000 (17:21 +0000)]
Document r310490, amd(8) updated to version 6.2.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r311681, ip6_tryforward() addition.
gjb [Tue, 9 May 2017 17:21:47 +0000 (17:21 +0000)]
Document r311681, ip6_tryforward() addition.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r312336, locales v30.0.3, unicode 9.0.0.
gjb [Tue, 9 May 2017 17:21:46 +0000 (17:21 +0000)]
Document r312336, locales v30.0.3, unicode 9.0.0.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r313203, inetd(8) can be built without libwrap support.
gjb [Tue, 9 May 2017 17:21:45 +0000 (17:21 +0000)]
Document r313203, inetd(8) can be built without libwrap support.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r313523, fix garbage IP addresses in UDP log_in_vain messages
gjb [Tue, 9 May 2017 17:21:44 +0000 (17:21 +0000)]
Document r313523, fix garbage IP addresses in UDP log_in_vain messages

Sponsored by: The FreeBSD Foundation

7 years agoDocument r315274, sem_clockwait_np() addition.
gjb [Tue, 9 May 2017 17:21:43 +0000 (17:21 +0000)]
Document r315274, sem_clockwait_np() addition.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r315282, clang nullability attribute added.
gjb [Tue, 9 May 2017 17:21:42 +0000 (17:21 +0000)]
Document r315282, clang nullability attribute added.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r315514:
gjb [Tue, 9 May 2017 17:21:41 +0000 (17:21 +0000)]
Document r315514:
- IPSEC_FILTERTUNNEL deprecation
- ipsec.ko and tcpmd5.ko additions
- IPSEC_NAT_T removal
- setkey(8) updates

Sponsored by: The FreeBSD Foundation

7 years agoDocument r315539, vfs.root_mount_always_wait tunable addition.
gjb [Tue, 9 May 2017 17:21:41 +0000 (17:21 +0000)]
Document r315539, vfs.root_mount_always_wait tunable addition.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r316039, kvm_close(3) return accumulated close(2) error.
gjb [Tue, 9 May 2017 17:21:40 +0000 (17:21 +0000)]
Document r316039, kvm_close(3) return accumulated close(2) error.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r316045, libthr(3) evaluation/removal in OLD_FILES.
gjb [Tue, 9 May 2017 17:21:39 +0000 (17:21 +0000)]
Document r316045, libthr(3) evaluation/removal in OLD_FILES.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r316098, getaddrinfo(1) utility added.
gjb [Tue, 9 May 2017 17:21:38 +0000 (17:21 +0000)]
Document r316098, getaddrinfo(1) utility added.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r316120, reevaluate absolute sleep times based on the RTC
gjb [Tue, 9 May 2017 17:21:37 +0000 (17:21 +0000)]
Document r316120, reevaluate absolute sleep times based on the RTC
when the RTC is adjusted.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r316274, ipfw(4) named dynamic state support added.
gjb [Tue, 9 May 2017 17:21:36 +0000 (17:21 +0000)]
Document r316274, ipfw(4) named dynamic state support added.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r316303, ACPICA update to version 20170303.
gjb [Tue, 9 May 2017 17:21:35 +0000 (17:21 +0000)]
Document r316303, ACPICA update to version 20170303.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r316423, clang, llvm, lld, lldb, compiler-rt and libc++
gjb [Tue, 9 May 2017 17:21:35 +0000 (17:21 +0000)]
Document r316423, clang, llvm, lld, lldb, compiler-rt and libc++
updated to 4.0.0, WITH_LDD_AS_LD knob addition.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r316444, ipfw_nptv6 kernel module addition.
gjb [Tue, 9 May 2017 17:21:34 +0000 (17:21 +0000)]
Document r316444, ipfw_nptv6 kernel module addition.

Sponsored by: The FreeBSD Foundation

7 years agoRe-order by svn revision.
gjb [Tue, 9 May 2017 17:21:33 +0000 (17:21 +0000)]
Re-order by svn revision.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r316446, ipfw_nat64 kernel module addition.
gjb [Tue, 9 May 2017 17:21:32 +0000 (17:21 +0000)]
Document r316446, ipfw_nat64 kernel module addition.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r316660, cfumass(4) addition.
gjb [Tue, 9 May 2017 17:21:31 +0000 (17:21 +0000)]
Document r316660, cfumass(4) addition.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r316944, allow explicitly assigned IPv4 and IPv6 addresses to be
gjb [Tue, 9 May 2017 17:21:30 +0000 (17:21 +0000)]
Document r316944, allow explicitly assigned IPv4 and IPv6 addresses to be
used in jails.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r317045, ipfw_pmod kernel module addition.
gjb [Tue, 9 May 2017 17:21:29 +0000 (17:21 +0000)]
Document r317045, ipfw_pmod kernel module addition.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r317386, Use estimated RTT for receive buffer auto resizing
gjb [Tue, 9 May 2017 17:21:28 +0000 (17:21 +0000)]
Document r317386, Use estimated RTT for receive buffer auto resizing
instead of timestamps

Sponsored by: The FreeBSD Foundation

7 years agoDocument r317434, ipf(4) 'keep state' no longer assumes 'keep frags'
gjb [Tue, 9 May 2017 17:21:28 +0000 (17:21 +0000)]
Document r317434, ipf(4) 'keep state' no longer assumes 'keep frags'

Sponsored by: The FreeBSD Foundation

7 years agoDocument r317618, clock_nanosleep() addition.
gjb [Tue, 9 May 2017 17:21:27 +0000 (17:21 +0000)]
Document r317618, clock_nanosleep() addition.
Update the 'Dell EMC' entity.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r317855, daemon(8) logging stdout/stderr to file or syslog(3).
gjb [Tue, 9 May 2017 17:21:26 +0000 (17:21 +0000)]
Document r317855, daemon(8) logging stdout/stderr to file or syslog(3).

Sponsored by: The FreeBSD Foundation

7 years agoDocument r317857, 410.status-mfi periodic(8) script addition.
gjb [Tue, 9 May 2017 17:21:25 +0000 (17:21 +0000)]
Document r317857, 410.status-mfi periodic(8) script addition.

Sponsored by: The FreeBSD Foundation

7 years agoMFC r317888:
dim [Tue, 9 May 2017 17:01:25 +0000 (17:01 +0000)]
MFC r317888:

Pull in r302362 from upstream libc++ trunk (by me):

  Ensure showbase does not overflow do_put buffers

  Summary:
  In https://bugs.freebsd.org/207918, Daniel McRobb describes how using
  std::showbase with ostreams can cause truncation of unsigned long long
  when output format is octal.  In fact, this can even happen with
  unsigned int and unsigned long.

  To ensure this does not happen, add one additional character to the
  do_put buffers if std::showbase is on.  Also add a test case.

  Reviewers: EricWF, mclow.lists

  Reviewed By: EricWF

  Subscribers: cfe-commits, emaste

  Differential Revision: https://reviews.llvm.org/D32670

PR: 207918

7 years agoMFC r317707:
brooks [Tue, 9 May 2017 16:27:20 +0000 (16:27 +0000)]
MFC r317707:

Correct an out-of-bounds read in regcomp when the RE is bad.

When passed the invalid regular expression "a**", the error is
eventually detected and seterr() is called. It sets p->error
appropriatly and p->next and p->end to nuls which is a never used char
nuls[10] which is zeros due to .bss initialization. Unfortunatly,
p_ere_exp() and p_simp_re() both have fall through cases where they set
the error, decrement p->next and access it which means a read from
whatever .bss variable comes before nuls.

Found with regex_test:repet_multi and CHERI bounds checking.

Reviewed by: ngie, pfg, emaste
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D10541

7 years agoPrune stale entries from 11.0-RELEASE.
gjb [Tue, 9 May 2017 13:44:53 +0000 (13:44 +0000)]
Prune stale entries from 11.0-RELEASE.
Bump copyright year while here.

Sponsored by: The FreeBSD Foundation

7 years agoMFC r316754: loader/multiboot: fix multiboot loading
royger [Tue, 9 May 2017 09:53:18 +0000 (09:53 +0000)]
MFC r316754: loader/multiboot: fix multiboot loading

Sponsored by: Citrix Systems R&D

7 years agoMFC r317706:
brooks [Tue, 9 May 2017 01:08:45 +0000 (01:08 +0000)]
MFC r317706:

Use MAN=<empty> rather than MK_MAN=no to not install a manpage.

7 years agoMFC r315019:
gonzo [Tue, 9 May 2017 00:29:29 +0000 (00:29 +0000)]
MFC r315019:

[loader][fdt] Fix applying overlays without __local_fixups__ node

Do not return error if __local_fixups__ node is missing in DTB overlay
because local fixup data is optional.

Reported by: Manuel Stuhn

7 years agoMFC r315010:
gonzo [Mon, 8 May 2017 23:57:54 +0000 (23:57 +0000)]
MFC r315010:

[dtc] regenerate version file if upstream Makefile has been changed

Keep version file in sync by adding dependency to upstream Makefile

7 years agoMFC r317180
davidcs [Mon, 8 May 2017 22:37:37 +0000 (22:37 +0000)]
MFC r317180
Cleanup QLA_LOCK/QLA_UNLOCK macros
remove unused QLA_TX_LOCK/QLA_TX_UNLOCK macros
format qla_error_recovery()

7 years agoMFC r315176-r315178
gonzo [Mon, 8 May 2017 22:35:15 +0000 (22:35 +0000)]
MFC r315176-r315178

r315176:
[evdev] Do not ignore result evdev_register in UI_DEV_CREATE handler

Make sure that uinput state field reflects actual state by checking
evdev_register result for errors

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>
Differential Revision: https://reviews.freebsd.org/D9320

r315177:
[evdev] Fix race condition between client's event queue reading and dropping

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>
Differential Revision: https://reviews.freebsd.org/D9320

r315178:
[evdev] Fix Right Alt and Keypad Enter event codes for atkbd(4) and kbdmux(4) drivers

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>
Differential Revision: https://reviews.freebsd.org/D9320

7 years agoMFC r317370: Change ctl_free_lun() locking.
mav [Mon, 8 May 2017 22:24:06 +0000 (22:24 +0000)]
MFC r317370: Change ctl_free_lun() locking.

This fixes potential callout_drain() sleep under non-sleepable lock.

PR: 218167

7 years agoMFC r317369: Slightly compact the code.
mav [Mon, 8 May 2017 22:23:01 +0000 (22:23 +0000)]
MFC r317369: Slightly compact the code.

7 years agoMFC: r317382
rmacklem [Mon, 8 May 2017 21:49:55 +0000 (21:49 +0000)]
MFC: r317382
Allow use of a write open stateid for reading in the NFSv4 server.

The NFSv4 RFCs give a server the option of allowing the use of an open
stateid for write access to be used for a Read operation.
This patch enables this by default and adds a sysctl to disable it,
for anyone who does not want this capability.
Allowing this is particularily useful for a pNFS Data Server (DS), since
they are not permitted to allow the use of special stateids.
Discovered during recent testing of the pNFS server under development.

7 years agoMFC: r317345
rmacklem [Mon, 8 May 2017 21:29:29 +0000 (21:29 +0000)]
MFC: r317345
Make the NFSv4 client to use a write open for reading if allowed by the server.

An NFSv4 server has the option of allowing a Read to be done using a Write
Open. If this is not allowed, the server will return NFSERR_OPENMODE.
This patch attempts the read with a write open and then disables this
if the server replies NFSERR_OPENMODE.
This change will avoid some uses of the special stateids. This will be
useful for pNFS/DS Reads, since they cannot use special stateids.
It will also be useful for any NFSv4 server that does not support reading
via the special stateids. It has been tested against both types of NFSv4 server.

7 years agoMFC: r317305
rmacklem [Mon, 8 May 2017 20:21:10 +0000 (20:21 +0000)]
MFC: r317305
Fix the NFSv4.1/pNFS client return layout on close.

The "return layout on close" case in the pNFS client was badly broken.
Fortunately, extant pNFS servers that I have tested against do not
do this. This patch fixes it. It also changes the way the layout stateid.seqid
is set for LayoutReturn. I think this change is correct w.r.t. the RFC,
but I am not 100% sure.
This was found during recent testing of the pNFS server under development.

7 years agoMFC r310791:
gonzo [Mon, 8 May 2017 20:09:23 +0000 (20:09 +0000)]
MFC r310791:

[qemu] Fix VERSATILEPB kernel boot in QEMU broken by r300968

QEMU does not implement hardware debug registers so when
dbg_monitor_is_enabled is called kernel receives "invalid instruction"
exception. QEMU implements only DIDR register and on read returns all
zeroes to indicate that it doesn't support other registers. Real
hardware has Version bits set.

7 years agoMFC r308424, r310636
gonzo [Mon, 8 May 2017 19:57:15 +0000 (19:57 +0000)]
MFC r308424, r310636

r308424:
Fix locking in bcm2835_audio driver

- Move all VCHI activity to worker thread: channel methods are called with
    non-sleepable lock held and VCHI uses sleepable lock.

- In worker thread use sx(9) lock instead of mutex(9) for the same reason.

PR: 213801, 205979

r310636:
[rpi] Fix bcm2835_audio locking and samples starvation

Rework general approach to locking and working with audio worker thread:

- Use flags to signal requested worker action
- Fix submitted buffer calculations to avoid samples starvation
- Protect buffer pointers with locks to fix race condition between callback
  and audio worker thread
- Remove unnecessary vchi_service_use
- Do not use lock to serialize VCHI requests since only one thread issues them now
- Fix unloading signaling per hselasky@ suggestion
- Add output to detect inconsistent callback data caused by possible firmware bug
  https://github.com/raspberrypi/firmware/issues/696
- Add stats/debug sysctls to troubleshoot possible bugs

PR: 213687, 205979, 215194

7 years agoMFC: r317296
rmacklem [Mon, 8 May 2017 19:50:35 +0000 (19:50 +0000)]
MFC: r317296
Fix some krpc leaks for the NFSv4.1/pNFS client.

The NFSv4.1/pNFS client wasn't doing a newnfs_disconnect() call for the
connection to the Data Server (DS) under some circumstances. The main
effect of this was a leak of malloc'd structures in the krpc. This patch
adds the newnfs_disconnect() calls to fix this.
Detected during recent testing against the pNFS server under development.

7 years agoMFC r310560:
gonzo [Mon, 8 May 2017 19:22:59 +0000 (19:22 +0000)]
MFC r310560:

[vchi] replace non-reproducible __DATE__/__TIME__ with hardcoded string

Although vchiq_build_date and vchiq_build_time are not used in current
vchi driver at the moment, make sure these value will not leak into
build later on if at some point they will be refered in some new
imported code

PR: 215494
Reported by: emaste

7 years agoMFC r317854:
ken [Mon, 8 May 2017 18:30:55 +0000 (18:30 +0000)]
MFC r317854:

  When editing a mode page on a tape drive, do not clear the device
  specific parameter.

  Tape drives include write protect (WP), Buffered Mode and Speed
  settings in the device-specific parameter.  Clearing this
  parameter on a mode select can have the effect of turning off
  write protect or buffered mode, or changing the speed setting of
  the tape drive.

  Disks report DPO/FUA support via the device specific parameter
  for MODE SENSE, but the bit is reserved for MODE SELECT.  So we
  clear this for disks (and other non-tape devices) to avoid
  potential errors from the target device.

  sbin/camcontrol/modeedit.c:
   Clear the device-specific parameter in the mode page
   header if we're not operating on a tape drive.

Sponsored by: Spectra Logic

7 years agoMFC r317848:
ken [Mon, 8 May 2017 17:55:49 +0000 (17:55 +0000)]
MFC r317848:

  Add basic programmable early warning error injection to the sa(4) driver.

  This will help application developers simulate end of tape conditions.

  To inject an error in sa0:

  sysctl kern.cam.sa.0.inject_eom=1

  This will return the next read or write request queued with 0 bytes
  written.  Any subsequent writes or reads will go along as usual.

  This will also cause the early warning position flag to get set
  for the next position query.  So, 'mt status' will show the BPEW
  (Beyond Programmable Early Warning) flag on the first query after
  an error injection.  After that, the position flags will be as they
  are in the underlying tape drive.

  Also, update the sa(4) man page to describe tape parameters,
  which can be set via 'mt param'.

  sys/cam/scsi/scsi_sa.c:
   In saregister(), create the inject_eom sysctl variable.

   In sastart(), check to see whether inject_eom is set.  If
   so, return the read or write with 0 bytes written to
   indicate EOM.  Set the set_pews_status flag so that we
   fake PEWS status in the next position call for reads, and the
   next 3 calls for writes.  This allows the user to see the BPEW
   flag one time via 'mt status'.

   In sagetpos(), check the set_pews_status flag and fake
   PEWS status and decrement the counter if it is set.

  share/man/man4/sa.4:
   Document the inject_eom sysctl variable.

   Document all of the parameters currently supported via
   'mt param'.

  usr.bin/mt/mt.1:
   Point the user to the sa(4) man page for more details on
   supported parameters.

Sponsored by: Spectra Logic

7 years agoMFC r317799:
ken [Mon, 8 May 2017 17:21:55 +0000 (17:21 +0000)]
MFC r317799:

  Add the SCSI Solid State Media Log page (0x11) definition.

  sys/cam/scsi/scsi_all.h:
   Add the SCSI Solid State Media log page (0x11) structure
   definition.  This gives the percentage used (in terms of
     lifetime flash wear) of an SSD.

Sponsored by: Spectra Logic

7 years agoMFC r317774, r317776
ken [Mon, 8 May 2017 17:02:01 +0000 (17:02 +0000)]
MFC r317774, r317776

r317774:
  Add the ability to rescan or reset devices specified by peripheral
  name and unit number in camcontrol(8).

  Previously camcontrol(8) only supported rescanning or resetting
  devices specified by bus:target:lun.  This is because for
  rescanning at least, you don't have a peripheral name and unit
  number (e.g. da4) for devices that don't exist yet.

  That is still the case after this change, but in other cases, when
  the device does exist in the CAM EDT (Existing Device Table), we
  do a careful lookup of the bus/target/lun if the user supplies a
  peripheral name and unit number to find the bus:target:lun and then
  issue the requested reset or rescan.

  The lookup is done without actually opening the device in question,
  since a rescan is often done to make a device go away after it has
  been pulled.  (This is especially true for busses/controllers, like
  parallel SCSI controllers, that don't automatically detect changes
  in topology.)  Opening a device that is no longer there to
  determine the bus/target/lun might result in error recovery actions
  when the user really just wanted to make the device go away.

  sbin/camcontrol/camcontrol.c:
   In dorescan_or_reset(), if the use hasn't specified a
   numeric argument, assume he has specified a device.  Lookup
   the pass(4) instance for that device using the transport
   layer CAMGETPASSTHRU ioctl.  If that is successful, we can
   use the returned bus:target:lun to rescan or reset the
   device.

   Under the hood, resetting a device using XPT_RESET_DEV is
   actually sent via the pass(4) device anyway.  But this
   provides a way for the user to specify devices in a more
   convenient way, and can work on device rescans when the
   device is going away, assuming it still exists in the EDT.

  sbin/camcontrol/camcontrol.8:
   Update the man page for the rescan and reset subcommands
   to reflect that you can now use a device name and unit
   number with them.

Sponsored by: Spectra Logic

r317776:
  Bump the camcontrol(8) man page date.

Sponsored by: Spectra Logic

7 years agoMFC r317810:
dim [Mon, 8 May 2017 16:06:20 +0000 (16:06 +0000)]
MFC r317810:

Pull in r302183 from upstream llvm trunk (by Krzysztof Parzyszek):

  [PPC] When restoring R30 (PIC base pointer), mark it as <def>

  This happened on the PPC32/SVR4 path and was discovered when building
  FreeBSD on PPC32. It was a typo-class error in the frame lowering
  code.

  This fixes PR26519.

Reported by: Mark Millard
PR: 206990

7 years agoMFC r317745:
ken [Mon, 8 May 2017 14:48:37 +0000 (14:48 +0000)]
MFC r317745:

  Don't bother retrying errors for encrypted drives that are locked.

  sys/cam/scsi/scsi_all.c:
   In the asc_table, if we get a 0x20,0x02 error ("Access denied -
   no access rights"), don't bother retrying.  Instead, immediately
   fail the command.

   This is the error returned by Self Encrypting Drives (SED) when
   they are locked.

Sponsored by: Spectra Logic

7 years agoMFC r317645:
dchagin [Mon, 8 May 2017 10:51:30 +0000 (10:51 +0000)]
MFC r317645:

Fix NULL pointer dereference in futex_wake_op() in case when the same
address specified for arguments uaddr and uaddr2.

PR: 218987

7 years agoMFC r317371: elfcopy: allow empty symbol list files
emaste [Mon, 8 May 2017 01:29:40 +0000 (01:29 +0000)]
MFC r317371: elfcopy: allow empty symbol list files

7 years agoMFC: r317276
rmacklem [Sun, 7 May 2017 22:10:55 +0000 (22:10 +0000)]
MFC: r317276
Don't set ND_NOMOREDATA for a failed Setattr operation (NFSv4).

The NFSv4 Setattr operation always has reply data even when it fails,
so don't set the ND_NOMOREDATA for it. This would only affect unusual
cases where Setattr fails and the RPC code wants to parse the rest of
the compound. Detected during recent development related to the pNFS server.

7 years agoMFC: r317275, r317344
rmacklem [Sun, 7 May 2017 21:42:02 +0000 (21:42 +0000)]
MFC: r317275, r317344
Don't create a backchannel for a DS connection.

An NFSv4.1 client connection to a Data Server (DS) should not have a
backchannel. This patch fixes the NFSv4.1/pNFS client to not do a backchannel
for this case.
Found during recent testing with the pNFS server under development.

7 years agoMFC: r317272
rmacklem [Sun, 7 May 2017 21:22:47 +0000 (21:22 +0000)]
MFC: r317272
Add checks for failed operations to the NFSv4 client function nfscl_mtofh().

The nfscl_mtofh() function didn't check for failed operations and, as such,
would have returned EBADRPC for these cases, due to parsing failure.
This patch adds checks, so that it returns with ND_NOMOREDATA set.
This is needed for future use in the pNFS server and acts as a safety
belt in the meantime.

7 years agoMFC: r317270
rmacklem [Sun, 7 May 2017 20:57:13 +0000 (20:57 +0000)]
MFC: r317270
Get rid of bogus statement in the nfsuserd.8 man page.

The nfsuserd.8 man page stated that a usertimeout of 0 would disable
the cache timeout. This was simply not true, so this patch deletes
the sentence.

This is a content change.

7 years agoMFC: r317350
rmacklem [Sun, 7 May 2017 20:42:01 +0000 (20:42 +0000)]
MFC: r317350
Fix the default uid/gid values in nfsuserd.c

This patch sets the default uid/gid values for "nobody" and "nogroup"
to the values in the password and group databases. Normally nfsuserd(8)
will override these with whatever is in the password/group databases,
so these values are only used when the databases entries aren't available.
It would be nice to use the definitions in sys/conf.h, but those are
in the _KERNEL section of the file.

7 years agoMFC: r317269
rmacklem [Sun, 7 May 2017 20:11:58 +0000 (20:11 +0000)]
MFC: r317269
Set default uid/gid to nobody/nogroup for NFSv4 mapping.

The default uid/gid for NFSv4 are set by the nfsuserd(8) daemon.
However, they were 0 until the nfsuserd(8) was run. Since it is
possible to use NFSv4 without running the nfsuserd(8) daemon, set them
to nobody/nogroup initially.
Without this patch, the values would be set by the nfsuserd(8) daemon
and left changed even if the nfsuserd(8) daemon was killed. The default
values of 0 meant that setting a group to "wheel" would fail even when
done by root.
It also adds a definition of GID_NOGROUP to sys/conf.h.

7 years agoMFC: r317236
rmacklem [Sun, 7 May 2017 19:47:50 +0000 (19:47 +0000)]
MFC: r317236
Fix the setting of atime for Linux client NFSv4 mounts.

The FreeBSD NFSv4 server did not set the attribute bit for TimeAccess in
the reply to an Open with exclusive_create, as required by the RFCs.
(This is required since the FreeBSD NFS server stores the create_verifier
 in the va_atime attribute.)
As such, the Linux NFSv4 client did not set the TimeAccess (atime) in
the Setattr done in an RPC after the one with the Open/exclusive_create.
This patch fixes the server to set the TimeAccess bit in the reply.

I believe that storing the create_verifier in an extended attribute for
file systems that support extended attributes might be a good idea,
but I will wait for a discussion of this on the freebsd-fs@ email list
before considering committing a patch to do this.

7 years agoMFC: r317591
nyan [Sun, 7 May 2017 11:09:58 +0000 (11:09 +0000)]
MFC: r317591

  Add TUNABLE_INT to radeonkms driver parameters.
  They are required by PowerMac G5 DP.

  PR:           217852
  Submitted by: Hiroo Ono

7 years agoMFC r317611:
kib [Sun, 7 May 2017 07:55:58 +0000 (07:55 +0000)]
MFC r317611:
Make semaphore names list mutex non-recursive.

7 years agoMFC r317610:
kib [Sun, 7 May 2017 07:54:21 +0000 (07:54 +0000)]
MFC r317610:
Restructure normal (non-error) control flow in sem_close().

7 years agoMFC r317606:
kib [Sun, 7 May 2017 07:51:36 +0000 (07:51 +0000)]
MFC r317606:
Style.

7 years agoMFC r317346:
pfg [Sun, 7 May 2017 01:31:42 +0000 (01:31 +0000)]
MFC r317346:
regex: unsign and constify some variables.

Taking some hints from the regex variant in nvi(1) and higher-level
compiler warnings, update some types in our regex(3) implementation.

Joint work with: Kyle Evans

7 years agoMFC r317036:
pfg [Sun, 7 May 2017 01:28:52 +0000 (01:28 +0000)]
MFC r317036:
libjail: make allocation in jailparam_all() somewhat more robust.

Unsign some variables involved in allocation as they will never be
negative anyways. Provide some bounds checking through reallocarray(3).

This is all very unlikely to have any visible effect.

Reviewed by: jamie

7 years agoMFC r317340: Report NTB link speed to console and interface.
mav [Sun, 7 May 2017 00:26:57 +0000 (00:26 +0000)]
MFC r317340: Report NTB link speed to console and interface.

7 years agoMFC r317751:
dim [Sat, 6 May 2017 11:18:36 +0000 (11:18 +0000)]
MFC r317751:

Pull in r301983 from upstream llvm trunk (by Tim Northover):

  ARM: avoid handing a deleted node back to TableGen during ISel.

  When we replaced the multiplicand the destination node might already
  exist. When that happens the original gets CSEd and deleted. However,
  it's actually used as the offset so nonsense is produced.

  Should fix PR32726.

This fixes an assertion failure when building building www/firefox 53.0
for arm.

Reported by: Bob Prohaska
PR: 218782

7 years agoMFC r317458:
dim [Sat, 6 May 2017 11:13:33 +0000 (11:13 +0000)]
MFC r317458:

Pull in r294458 from upstream llvm trunk (by Sanne Wouda):

  [Assembler] Enable nicer diagnostics for inline assembly.

  Fixed test.

  Summary:
  Enables source location in diagnostic messages from the backend.
  This is after parsing, during finalization.  This requires the
  SourceMgr, the inline assembly string buffer, and DiagInfo to still
  be alive after EmitInlineAsm returns.

  This patch creates a single SourceMgr for inline assembly inside the
  AsmPrinter.  MCContext gets a pointer to this SourceMgr.  Using one
  SourceMgr per call to EmitInlineAsm would make it difficult for
  MCContext to figure out in which SourceMgr the SMLoc is located,
  while a single SourceMgr can figure it out if it has multiple
  buffers.

  The Str argument to EmitInlineAsm is copied into a buffer and owned
  by the inline asm SourceMgr.  This ensures that DiagHandlers won't
  print garbage.  (Clang emits a "note: instantiated into assembly
  here", which refers to this string.)

  The AsmParser gets destroyed before finalization, which means that
  the DiagHandlers the AsmParser installs into the SourceMgr will be
  stale.  Restore the saved DiagHandlers.

  Since now we're using just one SourceMgr for multiple inline asm
  strings, we need to tell the AsmParser which buffer it needs to parse
  currently.  Hand a buffer id -- returned from SourceMgr::
  AddNewSourceBuffer -- to the AsmParser.

  Reviewers: rnk, grosbach, compnerd, rengolin, rovka, anemet

  Reviewed By: rnk

  Subscribers: llvm-commits

  Differential Revision: https://reviews.llvm.org/D29441

This improves error reporting for some inline assembly constructs that
clang does not approve of: instead of crashing with a "fatal backend
error", it will now show a normal error message, and point out the
location of the problematic assembly.

Reported by: mmel

7 years agoMFC r317284:
pfg [Sat, 6 May 2017 02:43:26 +0000 (02:43 +0000)]
MFC r317284:
pmcstat(8); unsign some allocation variables and use reallocarray(3).

Use unsigned values in some internal variables that will be used during
allocation. The variables are used in reduced scope and have no chance of
becoming negative.

Provide bounds checking through reallocarray(3).

7 years agoMFC r317283:
pfg [Sat, 6 May 2017 02:39:11 +0000 (02:39 +0000)]
MFC r317283:
fsck_ffs: Unsign some variables and make use of reallocarray(3).

Instead of casting listmax and numdirs to unsigned values just define
them as unsigned and avoid the casts. Use reallocarray(3).

While here, fs_ncg is already unsigned so the cast is unnecessary.

Reviewed by: mckusick