| Age | Commit message (Collapse) | Author |
|
Thanks for Simon Burge for plic(4).
|
|
This was introduced two years ago when the getrandom/getentropy API
question was still open, and removed because the discussion was
ongoing. Now getentropy is more widely adopted and soon to be in
POSIX. So reintroduce the symbol into libc since we'll be keeping it
anyway. Discussion of details of the semantics, as interpreted by
NetBSD, is ongoing, but the symbol needs to get in before the
netbsd-10 branch. The draft POSIX text is
(https://www.opengroup.org/austin/docs/austin_1110.pdf):
SYNOPSIS
#include <unistd.h>
int getentropy(void *buffer, size_t length);
DESCRIPTION
The getentropy() function shall write length bytes of data
starting at the location pointed to by buffer. The output
shall be unpredictable high quality random data, generated by
a cryptographically secure pseudo-random number
generator. The maximum permitted value for the length
argument is given by the {GETENTROPY_MAX} symbolic constant
defined in <limits.h>.
RETURN VALUES
Upon successful completion, getentropy() shall return 0;
otherwise, -1 shall be retunred and errno set to indicate the
error.
ERRORS
The getentropy() function shall fail if:
[EINVAL] The value of length is greater than
{GETENTROPY_MAX}.
The getentropy() function may fail if:
[ENOSYS] The system does not provide the necessary
source of entropy.
RATIONALE
The getentropy() function is not a cancellation point.
Minor changes from the previous introduction of getentropy into libc:
- Return EINVAL, not EIO, on buflen > 256.
- Define GETENTROPY_MAX in limits.h.
The declaration of getentropy in unistd.h and definition of
GETENTROPY_MAX in limits.h are currently conditional on
_NETBSD_SOURCE. When the next revision of POSIX is finalized, we can
expose them also under _POSIX_C_SOURCE > 20yymmL as usual -- and this
can be done as a pullup without breaking existing compiled programs.
|
|
|
|
|
|
|
|
|
|
isQEMU_TCG() should return false. Fixes multiple test cases that were
failing with "Test case was expecting a failure but none were raised"
on that platform.
|
|
|
|
|
|
I also deduplicated some more code
|
|
|
|
needs to be the C source file (not the base name)
|
|
|
|
|
|
|
|
|
|
|
|
curcpu()->ci_pmap_asid_cur" failed"
It's GXemul that has the bug! Unfortunately, there's no way (currently) to
detect if we're running under GXemul emulation, so disable for all mips
for now. Hopefully, GXemul will get fixed soon.
|
|
curcpu()->ci_pmap_asid_cur" failed"
disable the sigbus_adraln test on qemu for now
|
|
Convert to preprocessor directives.
|
|
qemu's TCG CPU emulation, not when running under hardware virtualization
such as qemu -accel nvmm.
|
|
when running under hardware virtualization such as qemu -accel nvmm.
|
|
and for running under qemu's built-in TCG CPU emulation (as opposed to
hardware virtualization via NVMM or KVM).
|
|
|
|
SIGBUS for unaligned accesses is not mandatory for powerpc;
most processors (not all, e.g., 403) can deal with that.
|
|
In struct vfs_file, using an int as a boolean is an anachronism and has
been replaced with a single-character file type, like in ls(1).
Some other redundant test code has been removed as well since it was
either unreachable or existed only for performance reasons.
|
|
The existing test code was geared towards every little bit of
performance. It even duplicated the file definitions in vfs_stat in order
to avoid a few strcmp calls. This made the test code fragile. Therefore,
vfs_stat has been rewritten completely to not duplicate any information
from the vfs.
In vfs_stat, the returned st_mode is now more realistic. It had been 0
before. The file mode is only logged when it makes sense. In the ENOENT
case it is not logged anymore.
The debug logging for opendir/closedir now logs the same pointer, so that
the corresponding calls can be matched easily. Failed vfs_opendir calls
are logged as well, to get a more complete picture of which callbacks are
called.
|
|
Before, the structures and functions defined by the test used the same
prefix as the code to be tested. This made it difficult to draw a line
between these parts.
|
|
This makes the tests more self-contained. The example directory tree that
is common to all the tests is still defined elsewhere, but in the same
file. Setting up the example directory structure in each test would make
the tests even more independent and read.
|
|
Add logic for MKSANITIZER/MKLIBCSANITIZER checks.
|
|
Signal crash events are incompatible with sanitizers.
|
|
Disable ubsan instrumentation on the operation.
|
|
|
|
pass an open mode argument.
|
|
|
|
|
|
-fround-math since with gcc-7, the default mode ignores fenv settings
(the same effect can be achieved with -O0 :-)
https://gcc.gnu.org/wiki/FloatingPointMath
|
|
A suitable test was actually there already - but the results
were not verified. So just add a test that the result string
is what is expected. (Previously for len==128 and bytes==10000
it would have returned "0E" now it returns 10000 as it should.)
|
|
floating point exceptions - but some (actually all currently know ones)
do not implement sending traps when these exceptions are raised.
Pointed out by Peter Maydell.
|
|
|
|
exceptions - so apply the arm handling for aarch64 as well.
|
|
Test on 8.99.26 build of NetBSD/macppc
|
|
|
|
From Ngie Cooper in PR bin/51833
|
|
will overlap with the requested scheduler range, so get the new scheduler
range, and then try to find a different priority. If that fails (to find
a different scheduling range), give up here.
|
|
|
|
"%d" is a valid format string with default format string "%d %s", etc.
|
|
"%d" does not take the same args as "%d %s"
"%%" does not take the same args as "%llx"
How did these ever survive any kind of even basic sanity check?
|
|
- be more descriptive about errors
|
|
|