|
Revision tags: release/12.4.0, release/13.1.0 |
|
| #
845458a6 |
| 16-Dec-2021 |
Mark Johnston <[email protected]> |
tests: Add some regression tests for a couple of KERN_PROC_* sysctls
Sponsored by: The FreeBSD Foundation
(cherry picked from commit fff0ae77b9960bb26034297fcb885d26432354bf)
|
|
Revision tags: release/12.3.0 |
|
| #
359f5cf2 |
| 23-Nov-2021 |
Warner Losh <[email protected]> |
Basic signal tests: Can we deliver a signal?
Basic signal tests that tests can we deliver a signal via raise() and can we deliver one via SIGALARM asynchronously.
In addition, tests whether or not
Basic signal tests: Can we deliver a signal?
Basic signal tests that tests can we deliver a signal via raise() and can we deliver one via SIGALARM asynchronously.
In addition, tests whether or not on ARM T32 (Thumb) code can interrupt A32 (normal) and vice versa.
While this test is aimed at ensuring basic qemu signals are working, it's good to have in the base.
Sponsored by: Netflix Discussed with: kevans, cognet Differential Revision: https://reviews.freebsd.org/D33078
(cherry picked from commit afc5ab870d8661a7dacdbd65554c2f3533aecb8d)
show more ...
|
| #
64ecbc0c |
| 08-Nov-2021 |
Ed Maste <[email protected]> |
tests: do not build ktls_test if WITHOUT_OPENSSL
ktls_test requires libcrypto to build, and fails if it is not available (which is the case when building WITHOUT_OPENSSL).
Reported by: Michael Dext
tests: do not build ktls_test if WITHOUT_OPENSSL
ktls_test requires libcrypto to build, and fails if it is not available (which is the case when building WITHOUT_OPENSSL).
Reported by: Michael Dexter, Build Option Survey Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32895
(cherry picked from commit e818178e3a597922ce77bee874e441a1b7df0099)
show more ...
|
| #
71e6792c |
| 01-Nov-2021 |
John Baldwin <[email protected]> |
ktls: Add simple transmit tests of kernel TLS.
Note that these tests test the kernel TLS functionality directly. Rather than using OpenSSL to perform negotiation and generate keys, these tests gener
ktls: Add simple transmit tests of kernel TLS.
Note that these tests test the kernel TLS functionality directly. Rather than using OpenSSL to perform negotiation and generate keys, these tests generate random keys send data over a pair of TCP sockets manually decrypting the TLS records generated by the kernel.
Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32652
(cherry picked from commit a10482ea7476d68d1ab028145ae6d97cef747b49)
show more ...
|
|
Revision tags: release/13.0.0 |
|
| #
4ee7ac8d |
| 03-Feb-2021 |
Alex Richardson <[email protected]> |
Fix build with read-only source dir after 83c20b8a2da0
I changed the Makefile to use SRCS instead of LDADD, but since there is still and absolute path to the source the .o file was created inside th
Fix build with read-only source dir after 83c20b8a2da0
I changed the Makefile to use SRCS instead of LDADD, but since there is still and absolute path to the source the .o file was created inside the source directory instead of the build directory. It would be nice if this was an error/warning by default, but for now just fix this issue by using .PATH and the base name of the file.
Reported by: cy, peterj
(cherry picked from commit 8b820df156e065f48857dca89a89462074659e14)
show more ...
|
| #
b20f358a |
| 02-Feb-2021 |
Alex Richardson <[email protected]> |
tests/sys/kern/crc32: Check for SSE4.2 before using it
This avoids a SIGILL when running these tests on QEMU (which defaults to a basic amd64 CPU without SSE4.2).
This commit also tests the table-b
tests/sys/kern/crc32: Check for SSE4.2 before using it
This avoids a SIGILL when running these tests on QEMU (which defaults to a basic amd64 CPU without SSE4.2).
This commit also tests the table-based implementations in addition to testing the hw-accelerated crc32 versions.
Reviewed By: cem, kib, markj Differential Revision: https://reviews.freebsd.org/D28395
(cherry picked from commit 83c20b8a2da04937cf4af127366b3dc92c855784)
show more ...
|
| #
3c85ca21 |
| 22-Nov-2020 |
Robert Wing <[email protected]> |
fd: free old file descriptor tables when not shared
During the life of a process, new file descriptor tables may be allocated. When a new table is allocated, the old table is placed in a free list a
fd: free old file descriptor tables when not shared
During the life of a process, new file descriptor tables may be allocated. When a new table is allocated, the old table is placed in a free list and held onto until all processes referencing them exit.
When a new file descriptor table is allocated, the old file descriptor table can be freed when the current process has a single-thread and the file descriptor table is not being shared with any other processes.
Reviewed by: kevans Approved by: kevans (mentor) Differential Revision: https://reviews.freebsd.org/D18617
show more ...
|
|
Revision tags: release/12.2.0 |
|
| #
93900fe7 |
| 23-Sep-2020 |
Kyle Evans <[email protected]> |
tests: move the memfd tests over to sys/posixshm
memfd_create is implemented on top of posixshm, so this is a logically correct place for them to be. Moreover, this reduces the number of places to l
tests: move the memfd tests over to sys/posixshm
memfd_create is implemented on top of posixshm, so this is a logically correct place for them to be. Moreover, this reduces the number of places to look to run tests when working in this part of the tree.
Discussed with: kib (to some extent, a while ago)
show more ...
|
| #
2a6803de |
| 14-Sep-2020 |
Andrew Turner <[email protected]> |
Use MACHINE_CPUARCH when checking for arm64
Use MACHINE_CPUARCH with arm64 (aarch64) when we build code that could run on any 64-bit Arm instruction set. This will simplify checks in downstream cons
Use MACHINE_CPUARCH when checking for arm64
Use MACHINE_CPUARCH with arm64 (aarch64) when we build code that could run on any 64-bit Arm instruction set. This will simplify checks in downstream consumers targeting prototype instruction sets.
The only place we check for MACHINE_ARCH == aarch64 is when building the device tree blobs. As these are targeting current generation ISAs.
Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D26370
show more ...
|
| #
3b41d99d |
| 20-Jul-2020 |
Chuck Silvers <[email protected]> |
add a few tests for sendfile.
Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D25431
|
|
Revision tags: release/11.4.0 |
|
| #
631d525d |
| 16-Apr-2020 |
Jonathan T. Looney <[email protected]> |
Add a regression test for the changes in r359922 and r359923.
Note that the Python code has been tested on both Python 2.7 and 3.7.
Reviewed by: olivier MFC after: 2 weeks Sponsored by: Netflix, In
Add a regression test for the changes in r359922 and r359923.
Note that the Python code has been tested on both Python 2.7 and 3.7.
Reviewed by: olivier MFC after: 2 weeks Sponsored by: Netflix, Inc.
show more ...
|
|
Revision tags: release/12.1.0 |
|
| #
3e25d1fb |
| 25-Sep-2019 |
Kyle Evans <[email protected]> |
Add linux-compatible memfd_create
memfd_create is effectively a SHM_ANON shm_open(2) mapping with optional CLOEXEC and file sealing support. This is used by some mesa parts, some linux libs, and qem
Add linux-compatible memfd_create
memfd_create is effectively a SHM_ANON shm_open(2) mapping with optional CLOEXEC and file sealing support. This is used by some mesa parts, some linux libs, and qemu can also take advantage of it and uses the sealing to prevent resizing the region.
This reimplements shm_open in terms of shm_open2(2) at the same time.
shm_open(2) will be moved to COMPAT12 shortly.
Reviewed by: markj, kib Differential Revision: https://reviews.freebsd.org/D21393
show more ...
|
| #
cb71f1fa |
| 06-Aug-2019 |
Jilles Tjoelker <[email protected]> |
Add a test for kill() on a zombie
|
|
Revision tags: release/11.3.0 |
|
| #
f89d2072 |
| 17-Jun-2019 |
Xin LI <[email protected]> |
Separate kernel crc32() implementation to its own header (gsb_crc32.h) and rename the source to gsb_crc32.c.
This is a prerequisite of unifying kernel zlib instances.
PR: 229763 Submitted by: Yosh
Separate kernel crc32() implementation to its own header (gsb_crc32.h) and rename the source to gsb_crc32.c.
This is a prerequisite of unifying kernel zlib instances.
PR: 229763 Submitted by: Yoshihiro Ota <ota at j.email.ne.jp> Differential Revision: https://reviews.freebsd.org/D20193
show more ...
|
| #
c1bc2f7a |
| 12-Jan-2019 |
Andrew Turner <[email protected]> |
Temporarily disable the kcov tests. Not all architectures have atomic_store_64 and atomic_store_64.
Sponsored by: DARPA, AFRL
|
| #
b3c0d957 |
| 12-Jan-2019 |
Andrew Turner <[email protected]> |
Add support for the Clang Coverage Sanitizer in the kernel (KCOV).
When building with KCOV enabled the compiler will insert function calls to probes allowing us to trace the execution of the kernel
Add support for the Clang Coverage Sanitizer in the kernel (KCOV).
When building with KCOV enabled the compiler will insert function calls to probes allowing us to trace the execution of the kernel from userspace. These probes are on function entry (trace-pc) and on comparison operations (trace-cmp).
Userspace can enable the use of these probes on a single kernel thread with an ioctl interface. It can allocate space for the probe with KIOSETBUFSIZE, then mmap the allocated buffer and enable tracing with KIOENABLE, with the trace mode being passed in as the int argument. When complete KIODISABLE is used to disable tracing.
The first item in the buffer is the number of trace event that have happened. Userspace can write 0 to this to reset the tracing, and is expected to do so on first use.
The format of the buffer depends on the trace mode. When in PC tracing just the return address of the probe is stored. Under comparison tracing the comparison type, the two arguments, and the return address are traced. The former method uses on entry per trace event, while the later uses 4. As such they are incompatible so only a single mode may be enabled.
KCOV is expected to help fuzzing the kernel, and while in development has already found a number of issues. It is required for the syzkaller system call fuzzer [1]. Other kernel fuzzers could also make use of it, either with the current interface, or by extending it with new modes.
A man page is currently being worked on and is expected to be committed soon, however having the code in the kernel now is useful for other developers to use.
[1] https://github.com/google/syzkaller
Submitted by: Mitchell Horne <[email protected]> (Earlier version) Reviewed by: kib Testing by: tuexen Sponsored by: DARPA, AFRL Sponsored by: The FreeBSD Foundation (Mitchell Horne) Differential Revision: https://reviews.freebsd.org/D14599
show more ...
|
|
Revision tags: release/12.0.0 |
|
| #
984969cd |
| 30-Nov-2018 |
Eric van Gyzen <[email protected]> |
Fix reporting of SS_ONSTACK
Fix reporting of SS_ONSTACK in nested signal delivery when sigaltstack() is used on some architectures.
Add a unit test for this. I tested the test by introducing the b
Fix reporting of SS_ONSTACK
Fix reporting of SS_ONSTACK in nested signal delivery when sigaltstack() is used on some architectures.
Add a unit test for this. I tested the test by introducing the bug on amd64. I did not test it on other architectures.
Reviewed by: kib MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D18347
show more ...
|
| #
da446550 |
| 03-Aug-2018 |
Alan Somers <[email protected]> |
Fix LOCAL_PEERCRED with socketpair(2)
Enable the LOCAL_PEERCRED socket option for unix domain stream sockets created with socketpair(2). Previously, it only worked with unix domain stream sockets cr
Fix LOCAL_PEERCRED with socketpair(2)
Enable the LOCAL_PEERCRED socket option for unix domain stream sockets created with socketpair(2). Previously, it only worked with unix domain stream sockets created with socket(2)/listen(2)/connect(2)/accept(2).
PR: 176419 Reported by: Nicholas Wilson <[email protected]> MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16350
show more ...
|
|
Revision tags: release/11.2.0 |
|
| #
b9408863 |
| 18-Apr-2018 |
Konstantin Belousov <[email protected]> |
Add PROC_PDEATHSIG_SET to procctl interface.
Allow processes to request the delivery of a signal upon death of their parent process. Supposed consumer of the feature is PostgreSQL.
Submitted by: T
Add PROC_PDEATHSIG_SET to procctl interface.
Allow processes to request the delivery of a signal upon death of their parent process. Supposed consumer of the feature is PostgreSQL.
Submitted by: Thomas Munro Reviewed by: jilles, mjg MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D15106
show more ...
|
| #
e9ac2743 |
| 21-Mar-2018 |
Conrad Meyer <[email protected]> |
Implement getrandom(2) and getentropy(3)
The general idea here is to provide userspace programs with well-defined sources of entropy, in a fashion that doesn't require opening a new file descriptor
Implement getrandom(2) and getentropy(3)
The general idea here is to provide userspace programs with well-defined sources of entropy, in a fashion that doesn't require opening a new file descriptor (ulimits) or accessing paths (/dev/urandom may be restricted by chroot or capsicum).
getrandom(2) is the more general API, and comes from the Linux world. Since our urandom and random devices are identical, the GRND_RANDOM flag is ignored.
getentropy(3) is added as a compatibility shim for the OpenBSD API.
truss(1) support is included.
Tests for both system calls are provided. Coverage is believed to be at least as comprehensive as LTP getrandom(2) test coverage. Additionally, instructions for running the LTP tests directly against FreeBSD are provided in the "Test Plan" section of the Differential revision linked below. (They pass, of course.)
PR: 194204 Reported by: David CARLIER <david.carlier AT hardenedbsd.org> Discussed with: cperciva, delphij, jhb, markj Relnotes: maybe Differential Revision: https://reviews.freebsd.org/D14500
show more ...
|
| #
5e1e3ea2 |
| 05-Feb-2018 |
Brooks Davis <[email protected]> |
Fix and enable SysV IPC tests.
Don't declare some types that FreeBSD incorrectly declares.
Fix an incorrect call to open() (missing mode).
ANSIfy prototypes.
Enable SysV message queue, semaphore,
Fix and enable SysV IPC tests.
Don't declare some types that FreeBSD incorrectly declares.
Fix an incorrect call to open() (missing mode).
ANSIfy prototypes.
Enable SysV message queue, semaphore, and shared memory tests.
With exception of the workaround for union semun, these fixes have been committed to NetBSD.
Reviewed by: asomers Approved by: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D13471
show more ...
|
|
Revision tags: release/10.4.0, release/11.1.0 |
|
| #
d7f27102 |
| 27-Apr-2017 |
Michael Tuexen <[email protected]> |
armv8 has support for optional CRC32C instructions. This patch checks if they are available and if that is true make use of them. Thank you very much to Andrew Turner for providing help and review th
armv8 has support for optional CRC32C instructions. This patch checks if they are available and if that is true make use of them. Thank you very much to Andrew Turner for providing help and review the patch! Reviewed by: andrew MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10499
show more ...
|
| #
5be56374 |
| 02-Apr-2017 |
Bruce Evans <[email protected]> |
Remove the unportable -msse4 here too after fixing crc32_sse42.c to not depend on it. This should have been part of r315983.
|
| #
82a4538f |
| 20-Feb-2017 |
Eric Badger <[email protected]> |
Defer ptracestop() signals that cannot be delivered immediately
When a thread is stopped in ptracestop(), the ptrace(2) user may request a signal be delivered upon resumption of the thread. Heretofo
Defer ptracestop() signals that cannot be delivered immediately
When a thread is stopped in ptracestop(), the ptrace(2) user may request a signal be delivered upon resumption of the thread. Heretofore, those signals were discarded unless ptracestop()'s caller was issignal(). Fix this by modifying ptracestop() to queue up signals requested by the ptrace user that will be delivered when possible. Take special care when the signal is SIGKILL (usually generated from a PT_KILL request); no new stop events should be triggered after a PT_KILL.
Add a number of tests for the new functionality. Several tests were authored by jhb.
PR: 212607 Reviewed by: kib Approved by: kib (mentor) MFC after: 2 weeks Sponsored by: Dell EMC In collaboration with: jhb Differential Revision: https://reviews.freebsd.org/D9260
show more ...
|
| #
6be2ff7d |
| 31-Jan-2017 |
Conrad Meyer <[email protected]> |
calculate_crc32c: Add SSE4.2 implementation on x86
Derived from an implementation by Mark Adler.
The fast loop performs three simultaneous CRCs over subsets of the data before composing them. This
calculate_crc32c: Add SSE4.2 implementation on x86
Derived from an implementation by Mark Adler.
The fast loop performs three simultaneous CRCs over subsets of the data before composing them. This takes advantage of certain properties of the CRC32 implementation in Intel hardware. (The CRC instruction takes 1 cycle but has 2-3 cycles of latency.)
The CRC32 instruction does not manipulate FPU state.
i386 does not have the crc32q instruction, so avoid it there. Otherwise the implementation is identical to amd64.
Add basic userland tests to verify correctness on a variety of inputs.
PR: 216467 Reported by: Ben RUBSON <ben.rubson at gmail.com> Reviewed by: kib@, markj@ (earlier version) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9342
show more ...
|