From e3e0d461af1842eaa520d0cec7bef09267ec6eb6 Mon Sep 17 00:00:00 2001 From: Ramon Date: Mon, 2 Feb 2026 17:37:34 +0100 Subject: [PATCH] updated riscv syscall --- .../profiles/0.9.6-dev/install/syscall_intercept.install | 6 +----- scripts/profiles/0.9.6-dev/riscv.specs | 2 +- src/client/CMakeLists.txt | 4 +++- src/client/syscalls/util.S | 3 ++- tests/scripts/dl_dep.sh/0.9.6-dev/riscv.out | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/scripts/profiles/0.9.6-dev/install/syscall_intercept.install b/scripts/profiles/0.9.6-dev/install/syscall_intercept.install index ad3969c4..c4e71d6c 100644 --- a/scripts/profiles/0.9.6-dev/install/syscall_intercept.install +++ b/scripts/profiles/0.9.6-dev/install/syscall_intercept.install @@ -61,16 +61,12 @@ pkg_install() { -DCMAKE_BUILD_TYPE:STRING=Debug \ -DBUILD_EXAMPLES:BOOL=OFF \ -DSTATIC_CAPSTONE:BOOL=OFF \ - -DBUILD_TESTS:BOOK=OFF -DCMAKE_POLICY_VERSION_MINIMUM=3.5 .. + -DBUILD_TESTS:BOOK=OFF -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -S .. make -j"${CORES}" install if [[ ${EXTRA_INSTALL_ARGS} == "ARM64" ]]; then cp "${CURR}"/arch/aarch64/include/libsyscall_intercept_hook_point.h ${INSTALL_DIR}/include fi - # patch for riscv syscall_intercept version to fit other implementations - # it replaces line 91 only if there is the struct wrapper_ret of riscv - sed -i '89s/struct wrapper_ret/long/g' \ - ${INSTALL_DIR}/include/libsyscall_intercept_hook_point.h } pkg_check() { diff --git a/scripts/profiles/0.9.6-dev/riscv.specs b/scripts/profiles/0.9.6-dev/riscv.specs index ee8ae6eb..37efd781 100644 --- a/scripts/profiles/0.9.6-dev/riscv.specs +++ b/scripts/profiles/0.9.6-dev/riscv.specs @@ -50,7 +50,7 @@ clonedeps=( ["libfabric"]="HEAD@v1.20.1" ["mercury"]="v2.4.1" ["margo"]="v0.21.0" - ["syscall_intercept"]="fcc6d7bd4a62c2fa0419ad65ecd8d5ed95b99f63" + ["syscall_intercept"]="5a6a416395422346e0086b75abd11bc8f5210f4a" ) # Extra arguments for git clone diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index 5a8bc3e8..60a4d13b 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -152,7 +152,7 @@ if (GKFS_ENABLE_CLIENT_METRICS) endif () if (GKFS_BUILD_USER_LIB) -target_link_libraries( + target_link_libraries( gkfs_user_lib PRIVATE gkfs_common metadata distributor env_util arithmetic path_util rpc_utils PUBLIC dl @@ -160,6 +160,7 @@ target_link_libraries( fmt::fmt Threads::Threads Microsoft.GSL::GSL + Syscall_intercept::Syscall_intercept ) endif() @@ -172,6 +173,7 @@ target_link_libraries( fmt::fmt Threads::Threads Microsoft.GSL::GSL + Syscall_intercept::Syscall_intercept ) # Enable MSGPack metrics for intercept only if (GKFS_ENABLE_CLIENT_METRICS) diff --git a/src/client/syscalls/util.S b/src/client/syscalls/util.S index e9ec0ef4..f9b46bd4 100644 --- a/src/client/syscalls/util.S +++ b/src/client/syscalls/util.S @@ -29,7 +29,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - +#ifndef __riscv .global syscall_no_intercept; .type syscall_no_intercept, @function @@ -69,3 +69,4 @@ syscall_no_intercept: #endif .size syscall_no_intercept, .-syscall_no_intercept +#endif diff --git a/tests/scripts/dl_dep.sh/0.9.6-dev/riscv.out b/tests/scripts/dl_dep.sh/0.9.6-dev/riscv.out index d2d1052e..09014c7e 100644 --- a/tests/scripts/dl_dep.sh/0.9.6-dev/riscv.out +++ b/tests/scripts/dl_dep.sh/0.9.6-dev/riscv.out @@ -7,5 +7,5 @@ Cloned 'https://github.com/mercury-hpc/mercury' to 'mercury' with commit '[v2.4. Downloaded 'https://github.com/pmodels/argobots/archive/v1.2.tar.gz' to 'argobots' Cloned 'https://github.com/mochi-hpc/mochi-margo' to 'margo' with commit '[v0.18.3]' and flags '' Downloaded 'https://github.com/facebook/rocksdb/archive/v8.10.0.tar.gz' to 'rocksdb' -Cloned 'https://github.com/GekkoFS/syscall_intercept.git' to 'syscall_intercept' with commit '[2a25b21926ab115d667e135389458a7a159e8bb1]' and flags '' +Cloned 'https://github.com/GekkoFS/syscall_intercept.git' to 'syscall_intercept' with commit '[5a6a416395422346e0086b75abd11bc8f5210f4a]' and flags '' Done -- GitLab