summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC 281170:jhb2015-06-021-2/+2
| | | | | | | 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 281601:jhb2015-06-021-2/+0
| | | | | | | Remove THRMISC_VERSION. The thrmisc structure doesn't include a version number, so this wasn't used (and can't easily be added). If at some point we want to extend thrmisc, we will probably need to just add a new note type and ensure that the new type includes a version number.
* MFC 281266:jhb2015-06-028-46/+40
| | | | | | | | | | | | Move the 32-bit compatible procfs types from freebsd32.h to <sys/procfs.h> and export them to userland. - Define __HAVE_REG32 on platforms that define a reg32 structure and check for this in <sys/procfs.h> to control when to export prstatus32, etc. - Add prstatus32_t and prpsinfo32_t typedefs for the 32-bit structures. libbfd looks for these types, and having them fixes 'gcore' in gdb of a 32-bit process on a 64-bit platform. - Use the structure definitions from <sys/procfs.h> in gcore's elf32 core dump code instead of duplicating the definitions.
* MFC 269128:jhb2015-06-023-15/+123
| | | | | | Create 32-bit core files for 32-bit processes on 64-bit machines. The 64-bit machine supported right now is amd64, but it's not too hard to add powerpc64.
* MFC r283406,283418:tijl2015-06-021-29/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix decoding of UTF-7 when a base64 encoded chunk appears at the end of the input buffer. _citrus_UTF7_mbtoutf16 stored the decoder state at the beginning so it could restore this state on an incomplete character such that the next call would restart the decoding. The problem was that "-" (end of base64 mode) at the end of a string was also treated as an incomplete character but was also removed from the state buffer. So the initial state would be restored (with base64 mode) and the next call would no longer see the "-" so it continued in base64 mode. This state saving/restoring isn't needed here. It's already handled elsewhere (citrus_iconv_std.c:_citrus_iconv_std_iconv_convert) so just remove it. Also initialise *nresult. When only 2 bytes can be read from a 4 byte UTF-16 character in a base64 encoded chunk of a UTF-7 string, treat that as an incomplete character and return an error instead of a shift sequence and no error. Also check that the low 2 bytes have a valid value. PR: 200398
* MFC: r282866hiren2015-06-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | Fix pmcstat symbol resolution for userland processes. When examining existing processes pmcstat fails to correctly determine the locations of executable sections of the process due to a miscalculated virtual load address. This does not affect the newly launched processes as the same value passed as a "start address" to the pmcstat_image_link() thus nullifying the effect of it. The issue manifests itself in processes not being reported in the pmcstat(8) output and "dubious frames" being reported. Fix it for now by ignoring all the sections except the executable one. This won't fix the issue for objects with multiple executable sections but helps in majority of real world usecases. The real solution would be to modify the MAP-IN event to include the appropriate load address so pmcstat(8) won't have to manually parse object files to try to determine it. PR: 198147, 198148 Submitted by: stas
* MFC r283101:ae2015-06-021-40/+38
| | | | | | | | | | | | | | | | Teach key_expire() send SADB_EXPIRE message with the SADB_EXT_LIFETIME_HARD extension header type. The key_flush_sad() now will send SADB_EXPIRE message when HARD lifetime expires. This is required by RFC 2367 and some keying daemons rely on these messages. HARD lifetime messages have precedence over SOFT lifetime messages, so now they will be checked first. Also now SADB_EXPIRE messages will be send even the SA has not been used, because keying daemons might want to rekey such SA. PR: 200282, 200283 MFC r283102: Change SA's state before sending SADB_EXPIRE message. This state will be reported to keying daemon.
* MFC r275390:ae2015-06-0210-474/+306
| | | | | | | | | | | | Remove unused declartations. MFC r275437: ANSIfy function declarations. MFC r275438: Remove __P() macro. Sponsored by: Yandex LLC
* MFC r275392:ae2015-06-0219-95/+5
| | | | | | | | | | Remove route chaching support from ipsec code. It isn't used for some time. * remove sa_route_union declaration and route_cache member from struct secashead; * remove key_sa_routechange() call from ICMP and ICMPv6 code; * simplify ip_ipsec_mtu(); * remove #include <net/route.h>; Sponsored by: Yandex LLC
* MFC r283104:ae2015-06-021-15/+25
| | | | | | | | | Read GEOM_UNCOMPRESS metadata using several requests that fit into MAXPHYS. For large compressed images the metadata size can be bigger than MAXPHYS and this triggers KASSERT in g_read_data(). Also use g_free() to free memory allocated by g_read_data(). PR: 199476
* MFC r283577:ae2015-06-021-1/+1
| | | | | | Print leading zeroes of UFS2 fs_id like we do for UFS1. PR: 156908
* MFC: r283261jkim2015-06-012-11/+18
| | | | Do not probe Intel PIIX4 south bridge quirks on amd64.
* MFC 283123:jhb2015-06-012-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix two bugs that could result in PMC sampling effectively stopping. In both cases, the the effect of the bug was that a very small positive number was written to the counter. This means that a large number of events needed to occur before the next sampling interrupt would trigger. Even with very frequently occurring events like clock cycles wrapping all the way around could take a long time. Both bugs occurred when updating the saved reload count for an outgoing thread on a context switch. First, the counter-independent code compares the current reload count against the count set when the thread switched in and generates a delta to apply to the saved count. If this delta causes the reload counter to go negative, it would add a full reload interval to wrap it around to a positive value. The fix is to add the full reload interval if the resulting counter is zero. Second, occasionally the raw counter value read during a context switch has actually wrapped, but an interrupt has not yet triggered. In this case the existing logic would return a very large reload count (e.g. 2^48 - 2 if the counter had overflowed by a count of 2). This was seen both for fixed-function and programmable counters on an E5-2643. Workaround this case by returning a reload count of zero. PR: 198149 Sponsored by: Norse Corp, Inc.
* MFC 282643:jhb2015-06-012-30/+36
| | | | | | | | Use the kern.bootfile sysctl to set the default kernel path rather than hardcoding /boot/kernel. This allows pmcstat(8) to work without -k when using nextboot -k or 'boot foo' at the loader to boot alternate kernels. Sponsored by: Norse Corp, Inc.
* MFC 282641,282658:jhb2015-06-0119-259/+298
| | | | | | | | - Move hwpmc(4) debugging code under a new HWPMC_DEBUG option instead of the broader DEBUG option. - Convert hwpmc(4) debug printfs over to KTR. Sponsored by: Norse Corp, Inc.
* MFC r283673, r283674:gjb2015-06-013-2/+3
| | | | | | | | | | r283673: Sort configuration options for consistency with other boards. r283674: Export 'BOARDNAME' when differs from the KERNCONF. Sponsored by: The FreeBSD Foundation
* MFC r282208:smh2015-06-018-142/+164
| | | | | | | Standardise chmod, chflags, chown and chgrp recursive symlink processing Relnotes: Yes Sponsored by: Multiplay
* MFC r283515:kib2015-06-011-2/+0
| | | | Remove excess Giant acquisition around the dounmount() call.
* MFC SVN revisions 280310-280311,281160,281167,282443,283023,283288:dteske2015-06-011-49/+77
| | | | | | | | | | r280310: Whitespace cleanup(s) r280311: Update copyright(s) r281160: [mergeinfo only] Fix root encryption key permissions (see r281230) r281167: [mergeinfo only] Unbreak ZFS+GELI install option (see r281230) r282443: Add swap size sanity check (allanjude) r283023: Skip adding swap to fstab(5) if unused (allanjude) r283288: Fix a syntax error (allanjude)
* MFC SVN revisions 280234-280235:dteske2015-06-011-1/+4
| | | | | r280234: Fix the handbook install option in bsdinstall (allanjude) r280235: Fixup to previous (allanjude)
* MFC SVN revisions 272278,272379,275874:dteske2015-06-013-174/+270
| | | | | | r272278: Prevent buffer overflow(s) + style(9) nits r272379: Optimize program performance + style(9) nits r275874: Improve feedback to user by using dpv(3)
* MFC r280921: Fix typo in a comment.dteske2015-06-011-1/+1
|
* MFC r273480, r273750, r273753, r273797, and r274461.np2015-05-313-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | r273480: cxgbe/iw_cxgbe: wake up waiters after flushing the qp. r273750: Some cxgbe/iw_cxgbe fixes: - Free rt in c4iw_connect only if it is allocated. - Call soclose instead of so_shutdown if there is an abort from the peer. - Close socket and return failure if TOE is not enabled. r273753: iwcm_event status needs to be populated for close_complete_upcall r273797: Always request a completion for every work request for iWARP. The initial MPA exchange must be tracked this way so that t4_tom's state for the tid is all clean at the time the tid transitions to RDMA mode. Once it does, t4_tom is out of the way and iw_cxgbe uses the qp endpoints directly. r274461: iw_cxgbe: don't forget to close the socket in c4iw_connect if soconnect fails.
* MFC r283313:ae2015-05-312-7/+19
| | | | | | | | | | | | Properly update TX statistics for wlan(4). ieee80211_pwrsave() can fail due to queue overflow, check its return code and increment oerrors counter when it fails. Also handle more error cases and update oerrors counter when we don't send mbuf due to some errors. Return ENETDOWN when parent interface isn't ready. Update obytes and omcasts counters in corresponding places. PR: 184626 Differential Revision: https://reviews.freebsd.org/D2621
* MFC r272719:np2015-05-315-34/+93
| | | | | | cxgbe/tom: don't leak resources tied to an active open request that cannot be sent to the chip because a prerequisite L2 resolution failed.
* MFC r283147:ngie2015-05-313-0/+6
| | | | | | | Build cddl/{sbin,usr.bin,usr.sbin} in parallel as all of the applications are freestanding (they require libraries build via make libraries in buildworld) Sponsored by: EMC / Isilon Storage Division
* MFC r282965:ae2015-05-315-9/+33
| | | | | | | | | | Add an ability accept encapsulated packets from different sources by one gif(4) interface. Add new option "ignore_source" for gif(4) interface. When it is enabled, gif's encapcheck function requires match only for packet's destination address. Differential Revision: https://reviews.freebsd.org/D2004 Sponsored by: Yandex LLC
* MFC r283357:ngie2015-05-313-293/+0
| | | | Remove directory for test that has been integrated in under tests/sys/...
* MFC r283117:ae2015-05-311-2/+0
| | | | | | Remove unneded mbuf length adjustment, M_PREPEND() already did that. PR: 139387
* MFC r283170:ngie2015-05-312-14/+22
| | | | | | | | | | | | | | | | | | | | | | | | Import proposed fix from upstream for atf-sh/atf_check_test:flush_stdout_on_timeout Many thanks for jmmv for the fix! PR: 197060 Original commit message: From 0e546407567ea858e261e72f75c5ed61e07d0ddf Mon Sep 17 00:00:00 2001 From: Julio Merino <jmmv@google.com> Date: Tue, 17 Feb 2015 18:10:11 -0500 Subject: [PATCH] Fix atf-sh/atf_check_test:flush_stdout_on_death The test atf-sh/atf_check_test:flush_stdout_on_timeout was flaky as it was playing solely with time. Fix this by making the test more robust and rename it while we are at it: there is nothing left about "timeouts" in this test, considering that ATF itself does not enforce deadlines any longer. Fixes FreeBSD PR 197060.
* MFC r283502:ngie2015-05-311-1/+0
| | | | | | Remove SUBDIR_DEPEND for non-existent libreadline directory libreadline lives under gnu/lib
* MFC r277627,r277650,r282059,r283056,r283840,r283845:ngie2015-05-316-6/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r277627 (by will): Add routing_test:static_ipv6_loopback_route_for_each_fib. It tests that all FIBs get a static IPv6 loopback route. Submitted by: asomers Sponsored by: Spectra Logic MFSpectraBSD: 1048456 on 2014/03/13 1114523 on 2015/01/23 r277650 (by will): Add tests/etc/rc.d to mtree. Submitted by: stefanf MFC with: 277627 r282059: Move etc/tests/rc.d to etc/rc.d/tests to match the directory layout jmmv@ documented and implemented in other areas of the FreeBSD tree r283056: Move all test integration pieces for etc/ from etc/ to tests/ This is being done to fix breakage with make distribution with read-only source trees as make distribution doesn't use make obj like building tests/ does in all cases Reported by: Wolfgang Zenker <wolfgang@lyxys.ka.sub.org> Suggested by: jhb r283840: Remove empty tests directory r283845: Append to SUBDIR, not set it Pointyhat to: ngie
* MFC r283691:tuexen2015-05-311-2/+0
| | | | Remove printf() noise...
* MFC r283666:tuexen2015-05-311-25/+74
| | | | | | Report the MTU consistently as specified in https://tools.ietf.org/html/rfc6458 Thanks to Irene Ruengeler for helping me to fix this bug.
* MFC r283665:tuexen2015-05-311-14/+18
| | | | | | | | Take source and destination address into account when determining the scope. This fixes a problem when a client with a global address connects to a server with a private address. Thanks to Irene Ruengeler in helping me to find the issue.
* MFC r283664:tuexen2015-05-312-12/+0
| | | | Retire SCTP_DONT_DO_PRIVADDR_SCOPE which was never defined.
* MFC r283662:tuexen2015-05-312-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a bug where messages would not be sent in SHUTDOWN_RECEIVED state. This problem was reported by Mark Bonnekessel and Markus Boese. Thanks to Irene Ruengeler for helping me to fix the cause of the problem. It can be tested with the following packetdrill script: +0.0 socket(..., SOCK_STREAM, IPPROTO_SCTP) = 3 +0.0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR) +0.0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 // Check the handshake with an empty(!) cookie +0.1 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress) +0.0 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=0, ...] +0.1 < sctp: INIT_ACK[flgs=0, tag=2, a_rwnd=10000, os=1, is=1, tsn=0, STATE_COOKIE[len=4, val=...]] +0.0 > sctp: COOKIE_ECHO[flgs=0, len=4, val=...] +0.1 < sctp: COOKIE_ACK[flgs=0] +0.0 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 +0.0 write(3, ..., 1024) = 1024 +0.0 > sctp: DATA[flgs=BE, len=1040, tsn=0, sid=0, ssn=0, ppid=0] +0.0 write(3, ..., 1024) = 1024 // Pending due to Nagle +0.0 < sctp: SHUTDOWN[flgs=0, cum_tsn=0] +0.0 > sctp: DATA[flgs=BE, len=1040, tsn=1, sid=0, ssn=1, ppid=0] +0.0 < sctp: SACK[flgs=0, cum_tsn=1, a_rwnd=10000, gaps=[], dups=[]] // Do we need another SHUTDOWN here? +0.0 > sctp: SHUTDOWN_ACK[flgs=0] +0.0 < sctp: SHUTDOWN_COMPLETE[flgs=0] +0.0 close(3) = 0
* MFC r283658:tuexen2015-05-311-14/+17
| | | | | Use macros for overhead in a consistent way. No functional change. Thanks to Irene Ruengeler for suggesting the change.
* MFC r283654:tuexen2015-05-311-10/+20
| | | | Some more debug info cleanup.
* MFC r283650:tuexen2015-05-3111-107/+171
| | | | | Fix and cleanup the debug information. This has no user-visible changes. Thanks to Irene Ruengeler for proving a patch.
* MFC r283648:tuexen2015-05-313-9/+11
| | | | Address some compiler warnings. No functional change.
* MFC: r283695bapt2015-05-311-1/+0
| | | | | | Remove dead declaration PR: 195928
* MFC: r281039bapt2015-05-301-13/+6
| | | | Allow fetching pkg(8) even if servers/proxies are not passing Content-length
* MFC: r273778 (by nwhitehorn)bapt2015-05-301-1/+1
| | | | | | Remove spurious libelf dependency. Submitted by: pluknet
* MFC: r273754 (by nwhitehorn)bapt2015-05-302-341/+22
| | | | | | | | | Use pkg-1.4-style platform identifiers based on MACHINE_ARCH (e.g. FreeBSD:11:amd64 instead of freebsd:11:x86:64) when bootstrapping pkg. Thanks to portmgr for providing symlinks so both styles work. Reviewed by: bapt MFC after: 3 weeks
* MFC: r259773, r259774, r259775bapt2015-05-301-2/+9
| | | | | | | Do not print a question in non-interractive mode but explain why boostrapping has failed and how to allow it to happen Reported by: jmmv
* MFC: r258226bapt2015-05-301-1/+1
| | | | argc is now used
* MFC: r258020 (by bdrewery)bapt2015-05-301-8/+4
| | | | | | | Remove useless checks for NULL pointer before free(3) Reported by: eadler Approved by: eadler
* MFC: r257701 (by bdrewery)bapt2015-05-301-3/+0
| | | | | Remove condition which can never be true as the previous loop is never exited while remote == NULL.
* MFC r283320:kib2015-05-301-5/+2
| | | | Always obey thread request to not stop on non-boundary.
OpenPOWER on IntegriCloud