aboutsummaryrefslogtreecommitdiff
path: root/fesvr/syscall.cc
AgeCommit message (Collapse)AuthorFilesLines
2022-10-04Silence remaining unused-parameter warningsAndrew Waterman1-0/+4
Suppressing these individually would add too much clutter.
2021-08-26fesvr: replace use of `std::vector::operator[0]`Saleem Abdulrasool1-35/+35
This replaces multiple uses of `std::vector::operator[]` where the parameter is a constant `0` with the use of C++11's `std::vector::data` method. This fixes the root cause of invalid memory accesses. `std::vector::operator[]` is an unchecked memory access, and when the buffers are zero-sized (that is the buffer container is empty) either due to a 0 padding in the case of elfloader or NULL parameters to syscalls where permitted, the unchecked access may cause an invalid memory access. The use of `std::vector::data` is permitted even in such a case, though the returned memory may not be dereferenced. The general usage of the returned pointer is to pass to `memif_t`, which is careful about 0-sized buffer accesses, and so passing the result of `std::vector::data` is safe. This is theoretically a better access pattern as it also avoids having the compiler to re-materialize the pointer from the de-referenced location.
2021-03-25Fix Ubuntu 16.04 buildAndrew Waterman1-0/+6
Was broken by #681.
2021-03-25Add `statx` syscallhuaixv1-0/+94
2020-11-16Fix byteorder issues with struct riscv_stat (#596)Marcus Comstedt1-32/+39
2020-11-07Tag target endian values to help guide conversion codeMarcus Comstedt1-4/+4
2020-11-07Implement support for big-endian targetsMarcus Comstedt1-5/+5
2019-10-28Implement support for big-endian hostsMarcus Comstedt1-5/+6
2019-03-31Add fesvr; only globally install fesvr headers/libsstatic-linkAndrew Waterman1-0/+394