| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Use memmove(3) to avoid overlapping copy.
|
|
|
|
| |
Add more SUBDIR_PARALLEL.
|
|
|
|
|
|
|
|
| |
MFH (r283301, r289592, r291582): rc script improvements
MFH (r287880): respect manually configured forwarders when using DHCP
MFH (r289321): deconfuse man page
PR: 184047 203580 204931
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r285140 (by oshogbo):
Add fdclose(3) function.
This function is equivalent to fclose(3) function except that it
does not close the underlying file descriptor.
fdclose(3) is step forward to make FILE structure private.
Reviewed by: wblock, jilles, jhb, pjd
Approved by: pjd (mentor)
Differential Revision: https://reviews.freebsd.org/D2697
|
|
|
|
|
|
|
|
|
|
|
| |
r278932 (by pfg):
libc: clean some set-but-not-used errors.
These were found by gcc 5.0 on Dragonfly BSD, however I
made no attempt to silence the false positives.
Obtained from: DragonFly (cf515c3a6f3a8964ad592e524442bc628f8ed63b)
|
|
|
|
|
|
| |
r269326 (by n_hibma):
Fix the example: free the memory that was allocated by getline().
|
|
|
|
|
|
|
|
|
|
| |
Use __MAKE_SHELL instead of HOST_SHELL when generating aton_ether_subr.c
(HOST_SHELL is used in NetBSD)
This fixes permission denied issues when gen_ether_subr is not executable
Reported by: José Pérez <fbl@aoek.com>
Suggested by: bdrewery, sjg
|
|
|
|
|
|
|
| |
Replace SRCTOP with the relevant path via .CURDIR
Pointyhat to: ngie
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r288006 (by rodrigc):
Add declarations to eliminate -Wmissing-prototypes warnings
r288031 (by rodrigc):
Remove names from some prototypes
r288032 (by rodrigc):
Remove names from some prototypes
r288033 (by rodrigc):
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
|
|
|
|
|
|
|
|
| |
r258245 (by eadler):
Add missing include files for the printf_l and scanf_l man pages.
Reported by: swildner@dragonflybsd.org
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Discussed with: jilles
r264737 (by jilles):
libc/stdio: Fail fdopen() on an execute-only fd.
An execute-only fd (opened with O_EXEC) allows neither read() nor write()
and is therefore incompatible with all stdio modes. Therefore, the [EINVAL]
error applies.
Also adjust the similar check in freopen() with a NULL path, even though
this checks an fd which is already from a FILE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r290572:
Integrate tools/regression/lib/libc/gen into the FreeBSD test suite
as lib/libc/tests/gen
The code in test-fnmatch that was used for generating:
- bin/sh/tests/builtins/case2.0
- bin/sh/tests/builtins/case3.0
has been left undisturbed. The target `make sh-tests` has been moved over
from tools/regression/lib/libc/gen/Makefile to
lib/libc/tests/gen/Makefile and made into a PHONY target
case2.0 and case3.0 test input generation isn't being done automatically.
This needs additional discussion.
Sponsored by: EMC / Isilon Storage Division
r290646:
Add missing licensing boilerplate to test-fnmatch.c
Carry over licensing author info from fnmatch_test.c (jilles@)
Sponsored by: EMC / Isilon Storage Division
r290848:
Fix -Wunused warnings
Sponsored by: EMC / Isilon Storage Division
r290849:
Fix -Wmissing-braces warnings by adding braces around all the
testcase inputs
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
| |
Add some initial tests for SLIST and STAILQ macros
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r290532:
Integrate tools/regression/lib/libc/locale into the FreeBSD test suite
as lib/libc/tests/locale
Sponsored by: EMC / Isilon Storage Division
r290561:
Delete leftover printfs from when these were TAP tests
Sponsored by: EMC / Isilon Storage Division
r290843:
Polish up the tests a bit more after projects/collation was merged to head
Provide more meaningful diagnostic messages if LC_CTYPE can't be set properly
instead of segfaulting, because setlocale returns NULL and strcmp(NULL, b) will
always segfault
Split up the testcases so one failing (in this case en_US.ISO8859-15) won't
cause the rest of the testcases to be skipped
Remove some unused variables
Sponsored by: EMC / Isilon Storage Division
r290844:
Polish up iswctype_test
- Split up the testcases into C locale and ja_JP.eucJP testcases.
- Avoid a segfault in the event that setlocale fails, similar to r290843
- Replace `sizeof(x) / sizeof(*x)` pattern with `nitems(x)`
Sponsored by: EMC / Isilon Storage Division
r290845:
Remove unused variables; sort by alignment where needed
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r290563:
Integrate tools/regression/lib/libc/net into the FreeBSD test suite
as lib/libc/tests/net
Also, fix eui64_aton_test:test_str(..). The test was comparing the result
of eui64_aton to a pointer of the expected result.
Sponsored by: EMC / Isilon Storage Division
r290868:
Fix -Wformat issues
Reported by: gcc
Sponsored by: EMC / Isilon Storage Division
r291038:
Do not print out errno if the call succeeded unexpectedly; this was a mistake
made in r290868
Reported by: jilles
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r290549:
Reorganize code to elimitate one _sseek() call for append modes.
r290729:
1) Remove my overcomplicated error fallback and just return error
immediatelly as old code does, now for append modes too.
Real use case for such fallback is impossible (unless specially crafted).
2) Remove now unneded include I forgot to remove in prev. commits.
|
|
|
|
|
|
|
| |
Remove unnecessary `if (x)` tests before calling `free(x)`; free(3)
already employs this check
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
| |
Add _test suffix to multiple tests in lib/libc to conform to the design noted
in the FreeBSD Test Suite wiki
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Integrate the tests from lib/libarchive, usr.bin/cpio, and usr.bin/tar in to
the FreeBSD test suite
functional_test.sh was ported from bin/sh/tests/functional_test.sh, as a
small wrapper around libarchive_test, bsdcpio_test, and bsdtar_test provided
by upstream.
A handful of testcases in lib/libarchive/tests have been disabled as they
were failing when run with kyua test (see BROKEN_TESTS in
lib/libarchive/tests/Makefile)
As a sidenote: this removes the check/test targets from the Makefiles as they
don't match the pattern used in the rest of the FreeBSD test suite.
Sponsored by: EMC / Isilon Storage Division
Conflicts:
lib/libarchive/test
usr.bin/cpio/test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Integrate the tests from lib/libarchive, usr.bin/cpio, and usr.bin/tar in to
the FreeBSD test suite
functional_test.sh was ported from bin/sh/tests/functional_test.sh, as a
small wrapper around libarchive_test, bsdcpio_test, and bsdtar_test provided
by upstream.
A handful of testcases in lib/libarchive/tests have been disabled as they
were failing when run with kyua test (see BROKEN_TESTS in
lib/libarchive/tests/Makefile)
As a sidenote: this removes the check/test targets from the Makefiles as they
don't match the pattern used in the rest of the FreeBSD test suite.
Sponsored by: EMC / Isilon Storage Division
Conflicts:
lib/libarchive/test
usr.bin/cpio/test
|
|
|
|
|
|
|
|
|
| |
Fix some TAP -> ATF conversion errors
- Remove a leftover printf from when this was a TAP based testcase
- Catch mmap failures properly
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
|
| |
Integrate tools/regression/lib/libc/stdlib into the FreeBSD test suite
as lib/libc/tests/stdlib
- Make the code a bit more style(9) compliant
- Convert a sizeof(x)/sizeof(x[0]) to nitems
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
| |
Integrate tools/regression/lib/libc/string into the FreeBSD test suite
as lib/libc/tests/string
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
| |
Correct posix_openpt reference in pty(3)
Sponsored by: Multiplay
|
|
|
|
|
|
|
|
|
|
| |
Integrate contrib/netbsd-tests/lib/libc/rpc into the FreeBSD test suite
as lib/libc/rpc
This testcase requires rpcbind be up in running; otherwise the testcases
will time out and be skipped
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
| |
Remove a set but unused variable in __getgroupmembership to fix a gcc 4.9+ warning
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r290232:
Microoptimize.
r290231:
Addition to prev. commit.
In some edge cases fp->_p can be changed in _sseek(), recalculate.
r290230:
Don't seek to the end if write buffer is empty (in append modes).
PR: 204156
r290110:
Add _flags2 per jhb@ suggestion since no room left in _flags.
Rewrite O_APPEND flag checking using new __S2OAP flag.
r289931:
According to POSIX, a write operation shall start at the current size of
the stream (if mode had 'a' as the first character).
r289863:
Since no room left in the _flags, reuse __SALC for O_APPEND.
It helps to remove _fcntl() call from _ftello() and optimize seek position
calculation in _swrite().
|
|
|
|
| |
Switch pl_child_pid from int to pid_t.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
file 5.25.
Relnotes: yes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clang emits SSE instructions on amd64 in the common path of
pthread_mutex_unlock. If the thread does not otherwise use SSE,
this usage incurs a context-switch of the FPU/SSE state, which
reduces the performance of multiple real-world applications by a
non-trivial amount (3-5% in one application).
Instead of this change, I experimented with eagerly switching the
FPU state at context-switch time. This did not help. Most of the
cost seems to be in the read/write of memory--as kib@ stated--and
not in the #NM handling. I tested on machines with and without
XSAVEOPT.
One counter-argument to this change is that most applications already
use SIMD, and the number of applications and amount of SIMD usage
are only increasing. This is absolutely true. I agree that--in
general and in principle--this change is in the wrong direction.
However, there are applications that do not use enough SSE to offset
the extra context-switch cost. SSE does not provide a clear benefit
in the current libthr code with the current compiler, but it does
provide a clear loss in some cases. Therefore, disabling SSE in
libthr is a non-loss for most, and a gain for some.
I refrained from disabling SSE in libc--as was suggested--because
I can't make the above argument for libc. It provides a wide variety
of code; each case should be analyzed separately.
https://lists.freebsd.org/pipermail/freebsd-current/2015-March/055193.html
Suggestions from: dim, jmg, rpaulo
Sponsored by: Dell Inc.
|
|
|
|
|
|
|
|
|
|
| |
Set dev->fd to -1 when calling cam_close_spec_device with a valid dev->fd
descriptor to avoid trashing valid file descriptors that access dev->fd at a
later point in time
PR: 192671
Submitted by: Scott Ferris <scott.ferris@isilon.com>
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
| |
The old code was exponential in the number of asterisks in the pattern.
However, once a match has been found upto the next asterisk, the previous
asterisks are no longer relevant.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Shell syntax is too complicated to detect command substitution and unquoted
operators reliably without implementing much of sh's parser. Therefore, have
sh do this detection.
While changing sh's support anyway, also read input from a pipe instead of
arguments to avoid {ARG_MAX} limits and improve privacy, and output count
and length using 16 instead of 8 digits.
The basic concept is:
execl("/bin/sh", "sh", "-c", "freebsd_wordexp ${1:+\"$1\"} -f "$2",
"", flags & WRDE_NOCMD ? "-p" : "", <pipe with words>);
The WRDE_BADCHAR error is still implemented in libc. POSIX requires us to
fail strings containing unquoted braces with code WRDE_BADCHAR. Since this
is normally not a syntax error in sh, there is still a need for checking
code in libc, we_check().
The new we_check() is an optimistic check that all the characters
<newline> | & ; < > ( ) { }
are quoted. To avoid duplicating too much sh logic, such characters are
permitted when quoting characters are seen, even if the quoting characters
may themselves be quoted. This code reports all WRDE_BADCHAR errors; bad
characters that get past it and are a syntax error in sh return WRDE_SYNTAX.
Although many implementations of WRDE_NOCMD erroneously allow some command
substitutions (and ours even documented this), there appears to be code that
relies on its security (codesearch.debian.net shows quite a few uses).
Passing untrusted data to wordexp() still exposes a denial of service
possibility and a fairly large attack surface.
This is also a MFC of r286830 to reduce conflicts. I changed the code
somewhat to avoid changes from r286941; in particular, WRDE_BADVAL can still
only be returned if WRDE_UNDEF was passed.
Relnotes: yes
Security: fixes command execution with wordexp(untrusted, WRDE_NOCMD)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Export current system call code and argument count for system call entry
and exit events. To preserve the ABI, the new fields are moved to the
end of struct thread in these branches (unlike HEAD) and explicitly copied
when new threads are created. In addition, the new tests are only added
in 10.
r287386:
Export current system call code and argument count for system call entry
and exit events. procfs stop events for system call tracing report these
values (argument count for system call entry and code for system call exit),
but ptrace() does not provide this information. (Note that while the system
call code can be determined in an ABI-specific manner during system call
entry, it is not generally available during system call exit.)
The values are exported via new fields at the end of struct ptrace_lwpinfo
available via PT_LWPINFO.
r288949:
Fix various edge cases related to system call tracing.
- Always set td_dbg_sc_* when P_TRACED is set on system call entry
even if the debugger is not tracing system call entries. This
ensures the fields are valid when reporting other stops that
occur at system call boundaries such as for PT_FOLLOW_FORKS or
when only tracing system call exits.
- Set TDB_SCX when reporting the stop for a new child process in
fork_return(). This causes the event to be reported as a system
call exit.
- Report a system call exit event in fork_return() for new threads in
a traced process.
- Copy td_dbg_sc_* to new threads instead of zeroing. This ensures
that td_dbg_sc_code in particular will report the system call that
created the new thread or process when it reports a system call
exit event in fork_return().
- Add new ptrace tests to verify that new child processes and threads
report system call exit events with a valid pl_syscall_code via
PT_LWPINFO.
r288993:
Document the recently added pl_syscall_* fields in struct ptrace_lwpinfo.
|
|
|
|
|
|
|
|
|
| |
PR: 203440 (based on)
Submitted by: ceratv@rpi.edu
Approved by: wblock@ (mentor)
Differential Revision: https://reviews.freebsd.org/D3813
- address grammar
|
|
|
|
| |
Stop linking libc++.so verbosely, there is no need to.
|
|
|
|
| |
does, so this file should not be in CLEANFILES / .NOPATH.
|
|
|
|
|
|
|
| |
r273756:
only install .pc files when we are not installing 32bit compat libs...
r287980:
Replace beforeinstall: handling with FILES.
|
|
|
|
| |
Add missing CLEANFILES.
|
|
|
|
| |
Fix a couple of markup typos.
|
|
|
|
|
|
| |
Export a list of VM objects in the system via a sysctl. The list can be
examined via 'vmstat -o'. It can be used to determine which files are
using physical pages of memory and how much each is using.
|
|
|
|
|
| |
Avoid adding duplicates into OBJS. bsd.lib.mk already handles adding entries
to OBJS based on SRCS.
|
|
|
|
| |
Correct the description of MADV_DONTNEED.
|
|
|
|
|
|
|
|
| |
In libz's inflateMark(), avoid left-shifting a negative integer, which
is undefined.
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D3344
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NetBSD commit log:
Use a constant array for the MIB. Newer LLVM decided that mib[] warranted
stack protections, with the obvious crash after the setup was done.
As a positive side effect, code size shrinks a bit.
I'm not sure why this hasn't bitten us yes, but it is certainly possible and
there are no real drawbacks to this change anyway.
Submitted by: pfg
Obtained from: NetBSD
|
|
|
|
| |
Reported by: clang scan-build
|
|
|
|
|
|
|
|
|
| |
- Print sdl->sdl_data when sdl->sdl_nlen > 0 && sdl->sdl_alen == 0
as link_ntoa(3) does.
- snprintf() returns at most size-1 of the chars printed into
the buffer. (n == hostlen) also means the buffer length was
too short.
|