summaryrefslogtreecommitdiffstats
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
...
* MFC r326561: Use strlcpy().delphij2017-12-201-2/+2
|
* MFC r326560: Create links for xzdiff.delphij2017-12-201-0/+2
|
* MFC r326030: Install strings unconditionallyemaste2017-12-201-1/+1
| | | | | | | | | | Previously it was enabled by WITH_/WITHOUT_TOOLCHAIN, but it is commonly expected to be available and may have non-toolchain consumers. As it is now taken from the BSD-licensed ELF Tool Chain project, just install it unconditionally. PR: 213665, 223725 Sponsored by: The FreeBSD Foundation
* MFC r326361: Remove unused include.delphij2017-12-131-1/+0
|
* MFC r326039:asomers2017-12-113-0/+144
| | | | | | | | Add ATF tests for head(1) Submitted by: Fred Schlecter <https://github.com/fjs-github> Reviewed by: asomers, jilles Differential Revision: https://github.com/freebsd/freebsd/pull/127
* MFC r326273: Make ctlstat -n option work reasonably for sparse LUN list.mav2017-12-111-28/+21
|
* MFC r325723:delphij2017-12-111-2/+7
| | | | | | | | | | | find(1): Don't treat statfs() error as fatal in f_fstype, which can happen when a directory is removed in the middle of find. Instead of a full err(), allow find to continue, plus print a warning with exitstatus set when appropriate. Reported by: 100.chksetuid via gordon Reviewed by: jilles
* MFC r326527:bapt2017-12-081-1/+1
| | | | | | | | | | Only skip looking for manpages if both man directory and cat directory are not existing. This allows man(1) to read catpages when no man directories are available at all PR: 223559 Reported by: wosch
* MFC r326526:bapt2017-12-081-0/+3
| | | | | | | | | | | | | | | | | In case man(1) found a catpage to display skip looking ".so" which is manpage only. In case we are trying to read a catpage, the manpage variable is not defined. It results in the "cattool" having no arguments. In case the catpage is compressed, the cattool used is "zcat" which dies if the standard input is a terminal, meaning the function calling it is exiting as if there were no ".so" In case the catpage is uncompressed, the cattool used is "zcat -f" which waits reading standard input, making the man(1) command hang. PR: 223560 Reported by: wosch
* MFC r326052: Support SIGINFO.delphij2017-12-055-95/+263
| | | | Obtained from: NetBSD
* MFC 319493,319509,319520,319595,319677,319679-319681,319688,319689,jhb2017-11-215-49/+369
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 319761-319768,320010,322899,322959,323020,323021,323151: Sync libsysdecode, kdump, and truss with head (aside from changes such as ino64 that are not applicable to 11). 319493: Decode the arguments passed to __cap_rights_get() and cap_rights_limit(). 319509: Decode the argument passed to cap_getmode(). The returned integer value is output. 319520: Decode the 'who' argument passed to getrusage(). Add a new sysdecode_getrusage_who() which decodes the RUSAGE_* constant passed as the first argument to getrusage(). Use this function in both kdump and truss to decode the first argument to getrusage(). 319595: Decode arguments to dup, dup2, getdirentries, pread, and pwrite. - dup and dup2 print fd arguments in decimal. - pread and pwrite are similar to read and write with the addition of the file offset. - getdirentries displays the output entries as a string for now and also prints the value returned in *basep. Eventually the buffer for getdirentries should perhaps be decoded as an array of dirent structures. 319677: Decode arguments to ACL related system calls. This only decodes the raw arguments but not the contents of the struct acl objects. 319679: Decode arguments passed to extended attribute related system calls. The cmd argument passed to extattrctl() is not decoded as a string constant but is just printed in hex. The value is filesystem-specific but in practice is only used with UFS1 filesystems. 319680: Decode arguments to minherit(). 319681: Decode arguments to mlock(), mlockall(), and munlock(). 319688: Decode flags passed to mount(), nmount(), and unmount(). 319689: Decode arguments passed to msync(). 319761: Fix decoding of setpriority() arguments. The PRIO_* 'which' value is stored in the first argument to setpriority(2), not the last. While here, decode the arguments to getpriority(2). 319762: Decode arguments to getpriority() and setpriority(). 319763: Decode the arguments to ptrace(). This does not decode structures returned by ptrace(). 319764: Decode the arguments to quotactl(). 319765: Improve decoding of RB_AUTOBOOT in the 'howto' argument to reboot(). The reboot() system call accepts a mode (RB_AUTOBOOT, RB_HALT, RB_POWEROFF, or RB_REROOT) as well as zero or more optional flags in 'howto'. However, RB_AUTOBOOT was only displayed if 'howto' was exactly 0. Combinations like 'RB_AUTOBOOT | RB_DUMP' were decoded as 'RB_DUMP'. Instead, imply that RB_AUTOBOOT was specified if none of the other "mode" flags were specified. 319766: Decode the 'howto' argument to reboot(). 319767: Decode arguments to rtprio_thread() (same as rtprio()). 319768: Decode arguments to rtprio() and rtprio_thread(). 320010: Decode arguments to sched_* family of system calls. This includes decoding both scheduler policy constants and the sched_param structure for sched_get_priority_max(), sched_get_priority_min(), sched_getparam(), sched_getscheduler(), sched_rr_get_interval(), sched_setparam(), and sched_setscheduler(). 322899: Decode arguments passed to thr_set_name(). 322959: Decode extra signal information for caught signals. Decode fields from the siginfo_t stored in the PT_LWPINFO structure when a signal is caught by a traced process. This includes the signal code (si_code) as well as additional members such as si_addr, si_pid, etc. 323020: Trim stale prototype for ioctlname(). 323021: Decode signal information returned by system calls. Specifically, decode the siginfo structure returned by sigtimedwait(), sigwaitinfo(), and wait6(). While here, also decode the signal number returned in the second argument to sigwait(). 323151: Decode pathconf() names, *at() flags, and sysarch() numbers in libsysdecode. Move tables that were previously in truss over to libsysdecode. truss output is unchanged, but kdump has been updated to decode these fields. In addition, sysdecode_sysarch_number() should support all platforms whereas the old table in truss only supported x86. PR: 214885, 215448
* MFC r324727 and r325555:ed2017-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import the latest CloudABI definitions, version 0.16. The most important change in this release is the removal of the poll_fd() system call; CloudABI's equivalent of kevent(). Though I think that kqueue is a lot saner than many of its alternatives, our experience is that emulating this system call on other systems accurately isn't easy. It has become a complex API, even though I'm not convinced this complexity is needed. This is why we've decided to take a different approach, by looking one layer up. We're currently adding an event loop to CloudABI's C library that is API compatible with libuv (except when incompatible with Capsicum). Initially, this event loop will be built on top of plain inefficient poll() calls. Only after this is finished, we'll work our way backwards and design a new set of system calls to optimize it. Interesting challenges will include integrating asynchronous I/O into such a system call API. libuv currently doesn't aio(4) on Linux/BSD, due to it being unreliable and having undesired semantics. Upgrade to CloudABI v0.17. Compared to the previous version, v0.16, there are a couple of minor changes: - CLOUDABI_AT_PID: Process identifiers for CloudABI processes. Initially, BSD process identifiers weren't exposed inside the runtime, due to them being pretty much useless inside of a cluster computing environment. When jobs are scheduled across systems, the BSD process number doesn't act as an identifier. Even on individual systems they may recycle relatively quickly. With this change, the kernel will now generate a UUIDv4 when executing a process. These UUIDs can be obtained within the process using program_getpid(). Right now, FreeBSD will not attempt to store this value. This should of course happen at some point in time, so that it may be printed by administration tools. - Removal of some unused structure members for polling. With the polling framework being simplified/redesigned, it turns out some of the structure fields were not used by the C library. We can remove these to keep things nice and tidy.
* MFC r325717:bapt2017-11-151-1/+1
| | | | Remove __unused attributed on arguments that are actually used
* MFC 323584: Add a NT_ARM_VFP ELF core note to hold VFP registers for each ↵jhb2017-11-151-0/+31
| | | | | | | | thread. The core note matches the format and layout of NT_ARM_VFP on Linux. Debuggers use the AT_HWCAP flags to determine how many VFP registers are actually used and their format.
* MFC r324972:kib2017-11-081-1/+12
| | | | | | Tweaks to the top swap size calculations. PR: 223149
* MFC r325371ken2017-11-061-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r325371 | ken | 2017-11-03 15:04:22 -0600 (Fri, 03 Nov 2017) | 19 lines Add the LTO-8 Type M density code (0x5d, LTO-8M) to libmt and the mt(1) man page. LTO-8 Type M (also known as M8) is a pristine LTO-7 cartridge formatted in a LTO-8 drive in a new, higher density format. It has a separate density code, and is only readable in an LTO-8 drive. lib/libmt/mtlib.c: Add the LTO-8 Type M density code to the density table in libmt. usr.bin/mt/mt.1: Add the LTO-8 Type M density code to the density table in the mt(1) man page. Sponsored by: Spectra Logic ------------------------------------------------------------------------
* MFC r324212:eugen2017-11-062-11/+26
| | | | | | | rsh: introduce new option -N disabling shutdown of socket sending path. PR: 205144 Approved by: mav (mentor)
* MFC r320481:bdrewery2017-10-272-4/+52
| | | | Store a 32-bit PT_LWPINFO struct for 32-bit process core dumps.
* MFC r316286:bdrewery2017-10-236-4/+129
| | | | | | | | Add support for capturing 'struct ptrace_lwpinfo' for signals resulting in a process dumping core in the corefile. Direct stable changed: Padding added to struct thread and td_si added to end with explicit bzeroing when forking/initializing a thread to preserve KBI.
* MFC r324594: truss: mention 'H' in usageemaste2017-10-201-2/+2
| | | | | | | | r295930 (MFC of r295930) introduced the 'H' option to display thread IDs, but did not add the option to usage(). PR: 222837 Submitted by: Oliver Kiddle <okiddle@yahoo.co.uk>
* MFC r324497:ngie2017-10-171-1/+1
| | | | | | | Mute gcc warning about p not being possibly initialized I'm running into this warning on a tinderbox run with gcc 4.2.1 with mips and powerpc.
* MFH r324148:mm2017-10-083-0/+10
| | | | | | | | | | | | | | Sync libarchive with vendor. Relevant vendor changes: PR #905: Support for Zstandard read and write filters PR #922: Avoid overflow when reading corrupt cpio archive Issue #935: heap-based buffer overflow in xml_data (CVE-2017-14166) OSS-Fuzz 2936: Place a limit on the mtree line length OSS-Fuzz 2394: Ensure that the ZIP AES extension header is large enough OSS-Fuzz 573: Read off-by-one error in RAR archives (CVE-2017-14502) Security: CVE-2017-14166, CVE-2017-14502
* MFC r321422:trasz2017-10-041-3/+11
| | | | | | Improve the ktrace(1) man page to make it slightly more obvious that there are _two_ options that control its behaviour wrt child processes; slightly improve the example[1], and add Xrefs.
* MFC r320363:trasz2017-10-041-1/+1
| | | | Improve terminology in a comment.
* MFC r320360:trasz2017-10-041-7/+2
| | | | | Make resizewin(1) do flushing by using TCSAFLUSH instead of TCSANOW followed by tcflush(3). This works just as well and is more elegant.
* MFC r321514, r322885, r323015, r323177ed2017-10-041-71/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings the CloudABI code more or less in sync with HEAD. r321514: Upgrade to the latest sources generated from the CloudABI specification. The CloudABI specification has had some minor changes over the last half year. No substantial features have been added, but some features that are deemed unnecessary in retrospect have been removed: - mlock()/munlock(): These calls tend to be used for two different purposes: real-time support and handling of sensitive (cryptographic) material that shouldn't end up in swap. The former use case is out of scope for CloudABI. The latter may also be handled by encrypting swap. Removing this has the advantage that we no longer need to worry about having resource limits put in place. - SOCK_SEQPACKET: Support for SOCK_SEQPACKET is rather inconsistent across various operating systems. Some operating systems supported by CloudABI (e.g., macOS) don't support it at all. Considering that they are rarely used, remove support for the time being. - getsockname(), getpeername(), etc.: A shortcoming of the sockets API is that it doesn't allow you to create socket(pair)s, having fake socket addresses associated with them. This makes it harder to test applications or transparently forward (proxy) connections to them. With CloudABI, we're slowly moving networking connectivity into a separate daemon called Flower. In addition to passing around socket file descriptors, this daemon provides address information in the form of arbitrary string labels. There is thus no longer any need for requesting socket address information from the kernel itself. This change also updates consumers of the generated code accordingly. Even though system calls end up getting renumbered, this won't cause any problems in practice. CloudABI programs always call into the kernel through a kernel-supplied vDSO that has the numbers updated as well. Obtained from: https://github.com/NuxiNL/cloudabi r322885: Sync CloudABI compatibility against the latest upstream version (v0.13). With Flower (CloudABI's network connection daemon) becoming more complete, there is no longer any need for creating any unconnected sockets. Socket pairs in combination with file descriptor passing is all that is necessary, as that is what is used by Flower to pass network connections from the public internet to listening processes. Remove all of the kernel bits that were used to implement socket(), listen(), bindat() and connectat(). In principle, accept() and SO_ACCEPTCONN may also be removed, but there are still some consumers left. Obtained from: https://github.com/NuxiNL/cloudabi r323015: Complete the CloudABI networking refactoring. Now that all of the packaged software has been adjusted to either use Flower (https://github.com/NuxiNL/flower) for making incoming/outgoing network connections or can have connections injected, there is no longer need to keep accept() around. It is now a lot easier to write networked services that are address family independent, dual-stack, testable, etc. Remove all of the bits related to accept(), but also to getsockopt(SO_ACCEPTCONN). r323177: Merge pipes and socket pairs. Now that CloudABI's sockets API has been changed to be addressless and only connected socket instances are used (e.g., socket pairs), they have become fairly similar to pipes. The only differences on CloudABI is that socket pairs additionally support shutdown(), send() and recv(). To simplify the ABI, we've therefore decided to remove pipes as a separate file descriptor type and just let pipe() return a socket pair of type SOCK_STREAM. S_ISFIFO() and S_ISSOCK() are now defined identically.
* MFC r324100:bapt2017-10-031-1/+1
| | | | | | | | | man(1): silent the output of mandoc when testing This reduce the spam a user may face when mandoc tries to figure out if it can renders a manpage or fallback on groff(1) Reported by: bdrewery
* MFC 323631: Add an -a flag to getconf.jhb2017-09-306-8/+154
| | | | | | | When -a is specified, the name and value of all system or path configuration values is reported to standard output. Sponsored by: Chelsio Communications
* Merge clang, llvm, lld, lldb, compiler-rt and libc++ 5.0.0 release.dim2017-09-267-16/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC r309126 (by emaste): Correct lld llvm-tblgen dependency file name MFC r309169: Get rid of separate Subversion mergeinfo properties for llvm-dwarfdump and llvm-lto. The mergeinfo confuses Subversion enormously, and these directories will just use the mergeinfo for llvm itself. MFC r312765: Pull in r276136 from upstream llvm trunk (by Wei Mi): Use ValueOffsetPair to enhance value reuse during SCEV expansion. In D12090, the ExprValueMap was added to reuse existing value during SCEV expansion. However, const folding and sext/zext distribution can make the reuse still difficult. A simplified case is: suppose we know S1 expands to V1 in ExprValueMap, and S1 = S2 + C_a S3 = S2 + C_b where C_a and C_b are different SCEVConstants. Then we'd like to expand S3 as V1 - C_a + C_b instead of expanding S2 literally. It is helpful when S2 is a complex SCEV expr and S2 has no entry in ExprValueMap, which is usually caused by the fact that S3 is generated from S1 after const folding. In order to do that, we represent ExprValueMap as a mapping from SCEV to ValueOffsetPair. We will save both S1->{V1, 0} and S2->{V1, C_a} into the ExprValueMap when we create SCEV for V1. When S3 is expanded, it will first expand S2 to V1 - C_a because of S2->{V1, C_a} in the map, then expand S3 to V1 - C_a + C_b. Differential Revision: https://reviews.llvm.org/D21313 This should fix assertion failures when building OpenCV >= 3.1. PR: 215649 MFC r312831: Revert r312765 for now, since it causes assertions when building lang/spidermonkey24. Reported by: antoine PR: 215649 MFC r316511 (by jhb): Add an implementation of __ffssi2() derived from __ffsdi2(). Newer versions of GCC include an __ffssi2() symbol in libgcc and the compiler can emit calls to it in generated code. This is true for at least GCC 6.2 when compiling world for mips and mips64. Reviewed by: jmallett, dim Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D10086 MFC r318601 (by adrian): [libcompiler-rt] add bswapdi2/bswapsi2 This is required for mips gcc 6.3 userland to build/run. Reviewed by: emaste, dim Approved by: emaste Differential Revision: https://reviews.freebsd.org/D10838 MFC r318884 (by emaste): lldb: map TRAP_CAP to a trace trap In the absense of a more specific handler for TRAP_CAP (generated by ENOTCAPABLE or ECAPMODE while in capability mode) treat it as a trace trap. Example usage (testing the bug in PR219173): % proccontrol -m trapcap lldb usr.bin/hexdump/obj/hexdump -- -Cv -s 1 /bin/ls ... (lldb) run Process 12980 launching Process 12980 launched: '.../usr.bin/hexdump/obj/hexdump' (x86_64) Process 12980 stopped * thread #1, stop reason = trace frame #0: 0x0000004b80c65f1a libc.so.7`__sys_lseek + 10 ... In the future we should have LLDB control the trapcap procctl itself (as it does with ASLR), as well as report a specific stop reason. This change eliminates an assertion failure from LLDB for now. MFC r319796: Remove a few unneeded files from libllvm, libclang and liblldb. MFC r319885 (by emaste): lld: ELF: Fix ICF crash on absolute symbol relocations. If two sections contained relocations to absolute symbols with the same value we would crash when trying to access their sections. Add a check that both symbols point to sections before accessing their sections, and treat absolute symbols as equal if their values are equal. Obtained from: LLD commit r292578 MFC r319918: Revert r319796 for now, it can cause undefined references when linking in some circumstances. Reported by: Shawn Webb <shawn.webb@hardenedbsd.org> MFC r319957 (by emaste): lld: Add armelf emulation mode Obtained from: LLD r305375 MFC r321369: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 5.0.0 (trunk r308421). Upstream has branched for the 5.0.0 release, which should be in about a month. Please report bugs and regressions, so we can get them into the release. Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11 support to build; see UPDATING for more information. MFC r321420: Add a few more object files to liblldb, which should solve errors when linking the lldb executable in some cases. In particular, when the -ffunction-sections -fdata-sections options are turned off, or ineffective. Reported by: Shawn Webb, Mark Millard MFC r321433: Cleanup stale Options.inc files from the previous libllvm build for clang 4.0.0. Otherwise, these can get included before the two newly generated ones (which are different) for clang 5.0.0. Reported by: Mark Millard MFC r321439 (by bdrewery): Move llvm Options.inc hack from r321433 for NO_CLEAN to lib/clang/libllvm. The files are only ever generated to .OBJDIR, not to WORLDTMP (as a sysroot) and are only ever included from a compilation. So using a beforebuild target here removes the file before the compilation tries to include it. MFC r321664: Pull in r308891 from upstream llvm trunk (by Benjamin Kramer): [CodeGenPrepare] Cut off FindAllMemoryUses if there are too many uses. This avoids excessive compile time. The case I'm looking at is Function.cpp from an old version of LLVM that still had the giant memcmp string matcher in it. Before r308322 this compiled in about 2 minutes, after it, clang takes infinite* time to compile it. With this patch we're at 5 min, which is still bad but this is a pathological case. The cut off at 20 uses was chosen by looking at other cut-offs in LLVM for user scanning. It's probably too high, but does the job and is very unlikely to regress anything. Fixes PR33900. * I'm impatient and aborted after 15 minutes, on the bug report it was killed after 2h. Pull in r308986 from upstream llvm trunk (by Simon Pilgrim): [X86][CGP] Reduce memcmp() expansion to 2 load pairs (PR33914) D35067/rL308322 attempted to support up to 4 load pairs for memcmp inlining which resulted in regressions for some optimized libc memcmp implementations (PR33914). Until we can match these more optimal cases, this patch reduces the memcmp expansion to a maximum of 2 load pairs (which matches what we do for -Os). This patch should be considered for the 5.0.0 release branch as well Differential Revision: https://reviews.llvm.org/D35830 These fix a hang (or extremely long compile time) when building older LLVM ports. Reported by: antoine PR: 219139 MFC r321719: Pull in r309503 from upstream clang trunk (by Richard Smith): PR33902: Invalidate line number cache when adding more text to existing buffer. This led to crashes as the line number cache would report a bogus line number for a line of code, and we'd try to find a nonexistent column within the line when printing diagnostics. This fixes an assertion when building the graphics/champlain port. Reported by: antoine, kwm PR: 219139 MFC r321723: Upgrade our copies of clang, llvm, lld and lldb to r309439 from the upstream release_50 branch. This is just after upstream's 5.0.0-rc1. MFC r322320: Upgrade our copies of clang, llvm and libc++ to r310316 from the upstream release_50 branch. MFC r322326 (by emaste): lldb: Make i386-*-freebsd expression work on JIT path * Enable i386 ABI creation for freebsd * Added an extra argument in ABISysV_i386::PrepareTrivialCall for mmap syscall * Unlike linux, the last argument of mmap is actually 64-bit(off_t). This requires us to push an additional word for the higher order bits. * Prior to this change, ktrace dump will show mmap failures due to invalid argument coming from the 6th mmap argument. Submitted by: Karnajit Wangkhem Differential Revision: https://reviews.llvm.org/D34776 MFC r322360 (by emaste): lldb: Report inferior signals as signals, not exceptions, on FreeBSD This is the FreeBSD equivalent of LLVM r238549. This serves 2 purposes: * LLDB should handle inferior process signals SIGSEGV/SIGILL/SIGBUS/ SIGFPE the way it is suppose to be handled. Prior to this fix these signals will neither create a coredump, nor exit from the debugger or work for signal handling scenario. * eInvalidCrashReason need not report "unknown crash reason" if we have a valid si_signo llvm.org/pr23699 Patch by Karnajit Wangkhem Differential Revision: https://reviews.llvm.org/D35223 Submitted by: Karnajit Wangkhem Obtained from: LLVM r310591 MFC r322474 (by emaste): lld: Add `-z muldefs` option. Obtained from: LLVM r310757 MFC r322740: Upgrade our copies of clang, llvm, lld and libc++ to r311219 from the upstream release_50 branch. MFC r322855: Upgrade our copies of clang, llvm, lldb and compiler-rt to r311606 from the upstream release_50 branch. As of this version, lib/msun's trig test should also work correctly again (see bug 220989 for more information). PR: 220989 MFC r323112: Upgrade our copies of clang, llvm, lldb and compiler-rt to r312293 from the upstream release_50 branch. This corresponds to 5.0.0 rc4. As of this version, the cad/stepcode port should now compile in a more reasonable time on i386 (see bug 221836 for more information). PR: 221836 MFC r323245: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 5.0.0 release (upstream r312559). Release notes for llvm, clang and lld will be available here soon: <http://releases.llvm.org/5.0.0/docs/ReleaseNotes.html> <http://releases.llvm.org/5.0.0/tools/clang/docs/ReleaseNotes.html> <http://releases.llvm.org/5.0.0/tools/lld/docs/ReleaseNotes.html> Relnotes: yes
* MFC r323611: fastmatch.h: remove duplicate #definesemaste2017-09-221-13/+0
|
* MFC r323439:markj2017-09-211-2/+7
| | | | Provide an error message if KTR symbols in a vmcore cannot be resolved.
* MFC r323016:bapt2017-09-171-3/+2
| | | | | | | | | | | | Don't call kresolv_list() if using netstat on live kernel kresolve_list() is calling many kldsym(2). Removing that call on when collecting stats for the running kernel improves the startup time and CPU usage. Submitted by: Nikita Kozlov (nikita.kozlov@blade-group.com) Reviewed by: cem Sponsored by: blade Differential Revision: https://reviews.freebsd.org/D12151
* bsdgrep: add a primitive literal matcher to unbreak fgrep in some scenarioskevans2017-09-113-3/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC r322825: bsdgrep: add some additional tests for fgrep Previously added tests only check that fgrep is somewhat sane and works. Add some more tests that check that the implementation is basically functional and not producing incorrect results with various flags. MFC r322826: bsdgrep: add a primitive literal matcher fgrep/grep -F will error out at runtime if compiled with a regex(3) that does not define REG_NOSPEC or REG_LITERAL. glibc is one such regex(3) implementation, and as it turns out they don't support literal matching at all. Provide a primitive literal matcher for use with glibc and other implementations that don't support literal matching so that we don't completely lose fgrep/grep -F if compiled against libgnuregex on stable/10, stable/11, or other systems that we don't necessarily support. This is a wholly unoptimized implementation with no plans to optimize it as of now. This is due to both its use-case being primarily on unsupported systems in the near-distant future and that it's reinventing the wheel that we already have available as a feature of regex(3). PR: 222201 Approved by: emaste (mentor, blanket MFC)
* MFC r320701:ngie2017-09-081-2/+0
| | | | | | | | | | | | | Remove SUBDIR ordering/uniquifying in *bin/Makefile After the addition of SUBDIR.yes, uniquifying/ordering the SUBDIRs doesn't make a whole lot of sense, and it's in effect a half measure. Ordering SUBDIR (after adding SUBDIR.yes to it) in bsd.subdir.mk is a separate change that warrants more discussion/testing, because while the SUBDIR_PARALLEL work largely fixed dependency ordering for SUBDIRs, there might be downstream FreeBSD consumers that rely on the SUBDIR ordering.
* MFC r322888:ed2017-09-011-1/+2
| | | | | | Make entries for the United States more consistent. As sbruno@'s entry wasn't merged back, also MFC r322336.
* MFC r320048+r320301+r320277:sobomax2017-08-285-29/+131
| | | | | | | | | o Move logic that determines size of the input image into its own file. That logic has grown quite significantly now; o add a special handling for the snapshot images. Those have some extra headers at the end of the image and we don't need those in the output image really.
* MFC r320807:asomers2017-08-251-1/+1
| | | | | | | | | | | | stdbuf(1): Add buffer definition "B" to the usage message This option has been missing from the usage message ever since the program was first imported. Submitted by: shivansh Reviewed by: asomers Sponsored by: Google, Inc (GSoC 2017) Differential Revision: https://reviews.freebsd.org/D11529
* MFC r322410:ken2017-08-221-3/+57
| | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r322410 | ken | 2017-08-11 12:43:52 -0600 (Fri, 11 Aug 2017) | 16 lines Add historical notes on QIC tape drives and fix a couple of issues in mt(1). o Density code 0x5 is also known as QIC-11, and should have a footnote reference. o Add notes on QIC tape drives from the bug report. These may help anyone trying to use a QIC drive. o Take out a "more more" instance found by igor. o Bump the man page date. The PR is 14 years old, so it's past time to retire it. PR: doc/53596 Submitted by: tedm@toybox.placo.com Reviewed by: bcr Sponsored by: Spectra Logic ------------------------------------------------------------------------
* MFC r321450: bsdgrep(1): Don't exit before processing every filekevans2017-08-221-10/+2
| | | | | | | | | | Given an empty pattern (i.e. grep "" A B), bsdgrep(1) would previously exit() with the appropriate exit code upon encountering an empty file. Likely intended as an optimization, but this behavior is technically incorrect since an empty pattern should match every line. PR: 220924 Approved by: emaste (mentor, blanket MFC)
* MFC r321080:ngie2017-08-191-2/+2
| | | | | | | | | | | | | Expose the ILP32/LP64 programming environments based on __ILP32__/__LP64__ instead of by architecture. The list was incomplete (previous commits purged invalid architectures, like __alpha__, but failed to add new ones). It's best to base the symbol presence on whether or not the architecture is ILP32 / LP64 capable, per the compiler. This fixes the ILP32/LP64 program environments on some architectures like arm64, and by proxy fixes the tests on those architectures.
* bsdgrep: bump version number to 2.6.0 and update copyright informationkevans2017-08-173-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC r319132: bsdgrep: bump version number and add Kyle Evans copyright The following changes have been made over the last couple of months: Features: - With bsdgrep -r, the working directory is implied if no directory is specified - bsdgrep will now behave as bsdgrep -r does when it's named rgrep - bsdgrep now understands -z/--null-data to use \0 as EOL - GNU regex compatibility is now indicated with a "GNU compatible" in the version string Fixes: - --mmap no longer hangs when coming across an EOF without an accompanying EOL - -o/--color matching generally improved, now produces earliest / longest matches - Context output now more closely aligns with GNU grep - Zero-length matches no longer exhibit broken behavior - Every output line now honors -b/-H/-n flags Tests have been added for previous regressions as well as other previously untested behaviors. Various other fixes have been commited, and refactoring for further / later improvements has taken place. (The original submission changed the version string to 2.5.2, but I decided to use 2.6.0 to reflect the addition of new features.) MFC r320754: Update copyright e-mail address to @FreeBSD.org address Approved by: emaste (mentor, blanket MFC)
* MFC r318916: bsdgrep: use safer sizeof() constructkevans2017-08-171-2/+2
| | | | Approved by: emaste (mentor, blanket MFC)
* MFC r318914: bsdgrep: correct assumptions to prepare for chunkingkevans2017-08-173-6/+6
| | | | | | | Correct a couple of minor BSD grep assumptions that are valid for line processing but not future chunk-based processing. Approved by: emaste (mentor, blanket MFC)
* bsdgrep: fix build when linking against libgnuregexkevans2017-08-171-1/+1
| | | | | | | MFC r322618: bsdgrep: cast pmatch.rm_so to fix build when linking against libgnuregex Approved by: emaste (mentor)
* MFC r318574: bsdgrep: Correct per-line line metadata printingkevans2017-08-173-10/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | Metadata printing with -b, -H, or -n flags suffered from a few flaws: 1) -b/offset printing was broken when used in conjunction with -o 2) With -o, bsdgrep did not print metadata for every match/line, just the first match of a line 3) There were no tests for this Address these issues by outputting this data per-match if the -o flag is specified, and prior to outputting any matches if -o but not --color, since --color alone will not generate a new line of output for every iteration over the matches. To correct -b output, fudge the line offset as we're printing matches. While here, make sure we're using grep_printline in -A context. Context printing should *never* look at the parsing context, just the line. The tests included do not pass with gnugrep in base due to it exhibiting similar quirky behavior that bsdgrep previously exhibited. Approved by: emaste (mentor, blanket MFC)
* MFC r318571: bsdgrep: emit more than MAX_LINE_MATCHES per linekevans2017-08-171-7/+23
| | | | | | | | | | | | | | | | | | We should not set an arbitrary cap on the number of matches on a line, and in any case MAX_LINE_MATCHES of 32 is much too low. Instead, if we match more than MAX_LINE_MATCHES, keep processing and matching from the last match until all are found. For the regression test, we produce 4096 matches (larger than we expect we'll ever set MAX_LINE_MATCHES) and make sure we actually get 4096 lines of output with the -o flag. We'll also make sure that every distinct line is getting its own line number to detect line metadata not being printed as appropriate along the way. PR: 218811 Approved by: emaste (mentor, blanket MFC)
* bsdgrep: fix segfault with --mmap and add relevant testkevans2017-08-171-11/+11
| | | | | | | | | | | | | | | MFC r318565: bsdgrep: fix segfault with --mmap r313948 partially fixed --mmap behavior but was incomplete. This commit generally reverts it and does it the more correct way- by just consuming the rest of the buffer and moving on. MFC r318908: bsdgrep: add --mmap tests Basic sanity tests as well as coverage for the bug fixed in r318565. PR: 219402 Approved by: emaste (mentor, blanket MFC)
* bsdgrep: Don't allow negative context flags, add more testskevans2017-08-174-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC r318302: bsdgrep: don't allow negative -A / -B / -C Previously, when given a negative -A/-B/-C argument bsdgrep would overflow the respective context flag(s) and exhibited surprising behavior. Fix this by removing unsignedness of Aflag/Bflag and erroring out if we're given a value < 0. Also adjust the type used to track 'tail' context in procfile() so that it accurately reflects the Aflag value rather than overflowing and losing trailing context. This also fixes an inconsistency previously existing between -n and -C "n" behavior. They are now both limited to LLONG_MAX, to be consistent. Add some test cases to make sure grep errors out properly for both negative context values as well as non-numeric context values rather than giving bogus matches. MFC r318317: bsdgrep: add more tests for different binary flags The existing 'binary' test in netbsd-tests/ does a basic check of the default treatment for binary behavior, but not much more than that. Given some opportunity for breakage recently that did not trigger any failures, add some tests to cover the three different binary file behaviors (a, -I, -U) and their --binary-files= equivalent values. Approved by: emaste (mentor, blanket MFC)
* MFC r317705: bsdgrep: avoid use of magic number for REG_NOSPECkevans2017-08-161-2/+7
| | | | Approved by: emaste (mentor, blanket MFC)
* bsdgrep: fix -w flag matching with an empty patternkevans2017-08-165-183/+256
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC r317703: bsdgrep: fix -w flag matching with an empty pattern -w flag matching with an empty pattern was generally 'broken', allowing matches to occur on any line whether or not it actually matches -w criteria. This fix required a good amount of refactoring to address. procline() is altered to *only* process the line and return whether it was a match or not, necessary to be able to short-circuit the whole function in case of this matchall flag. -m flag handling is moved out as well because it suffers from the same fate as context handling if we bypass any actual pattern matching. The matching context (matches, mostly) didn't previously exist outside of procline(), so we go ahead and create context object for file processing bits to pass around. grep_printline() was created due to this, for the scenarios where the matches don't actually matter and we just want to print a line or two, a la flushing the context queue and no -o or --color specified. Damage from this broken behavior would have been mitigated by the fact that it is unlikely users would invoke grep -w with an empty pattern. This was identified while checking PR 105221 for problems it this may cause in BSD grep, but PR 105221 is *not* a report of this behavior. MFC r317741: bsdgrep: correct uninitialized variable introduced in r317703 MFC r317842: bsdgrep: don't ouptut matches with -c, -l, -L Refactoring done in r317703 broke -c, -l, and -L flags implying suppression of match printing. Fortunately this is just a matter of not doing any printing of the resulting matches and context printing was not broken in this refactoring. Add some regression tests since this area may still see further refactoring, include different context flags as well even though they were not broken in this case. PR: 219077 Approved by: emaste (mentor, blanket MFC)
OpenPOWER on IntegriCloud