Loading examples/gfind/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ add_executable(sfind sfind.cpp) add_executable(gkfs_lib_example gkfs_lib_example.cpp) target_link_libraries(gkfs_lib_example PRIVATE gkfs_intercept PRIVATE gkfs_user_lib ) if(GKFS_INSTALL_TESTS) Loading examples/gfind/gkfs_lib_example.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -56,8 +56,6 @@ extern "C" int gkfs_end() void init_preload() {}; void destroy_preload() {}; void write_file(std::string filename){ // Opem File int fd = gkfs::syscall::gkfs_open(filename,S_IRWXU,O_RDWR|O_CREAT); Loading src/client/CMakeLists.txt +38 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ # based on syscall interception. # ############################################################################## add_library(gkfs_intercept SHARED) add_library (gkfs_user_lib SHARED) target_sources( gkfs_intercept Loading @@ -52,6 +53,25 @@ target_sources( syscalls/detail/syscall_info.c ) target_sources( gkfs_user_lib PRIVATE void_syscall_intercept.cpp gkfs_functions.cpp hooks.cpp intercept.cpp logging.cpp open_file_map.cpp open_dir.cpp path.cpp preload.cpp preload_context.cpp preload_util.cpp rpc/rpc_types.cpp rpc/forward_data.cpp rpc/forward_management.cpp rpc/forward_metadata.cpp syscalls/detail/syscall_info.c ) if(GKFS_ENABLE_AGIOS) target_compile_definitions(gkfs_intercept PUBLIC GKFS_ENABLE_AGIOS) Loading @@ -69,6 +89,16 @@ target_link_libraries( Syscall_intercept::Syscall_intercept ) target_link_libraries( gkfs_user_lib PRIVATE metadata distributor env_util arithmetic path_util rpc_utils PUBLIC dl Mercury::Mercury hermes fmt::fmt Threads::Threads ) install( TARGETS gkfs_intercept LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} Loading @@ -76,3 +106,11 @@ install( PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gkfs ) install( TARGETS gkfs_user_lib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gkfs ) src/client/void_syscall_intercept.cpp 0 → 100644 +49 −0 Original line number Diff line number Diff line /* Copyright 2018-2022, Barcelona Supercomputing Center (BSC), Spain Copyright 2015-2022, Johannes Gutenberg Universitaet Mainz, Germany This software was partially supported by the EC H2020 funded project NEXTGenIO (Project ID: 671951, www.nextgenio.eu). This software was partially supported by the ADA-FS project under the SPPEXA project funded by the DFG. This file is part of GekkoFS' POSIX interface. GekkoFS' POSIX interface is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. GekkoFS' POSIX interface is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GekkoFS' POSIX interface. If not, see <https://www.gnu.org/licenses/>. SPDX-License-Identifier: LGPL-3.0-or-later */ extern "C" { int (*intercept_hook_point)(long syscall_number, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long *result) {}; void (*intercept_hook_point_clone_child)( unsigned long flags, void *child_stack, int *ptid, int *ctid, long newtls) {}; void (*intercept_hook_point_clone_parent)( unsigned long flags, void *child_stack, int *ptid, int *ctid, long newtls, long returned_pid) {}; void (*intercept_hook_point_post_kernel)(long syscall_number, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long result) {}; long syscall_no_intercept(long syscall_number, ...) { return 0}; } No newline at end of file Loading
examples/gfind/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ add_executable(sfind sfind.cpp) add_executable(gkfs_lib_example gkfs_lib_example.cpp) target_link_libraries(gkfs_lib_example PRIVATE gkfs_intercept PRIVATE gkfs_user_lib ) if(GKFS_INSTALL_TESTS) Loading
examples/gfind/gkfs_lib_example.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -56,8 +56,6 @@ extern "C" int gkfs_end() void init_preload() {}; void destroy_preload() {}; void write_file(std::string filename){ // Opem File int fd = gkfs::syscall::gkfs_open(filename,S_IRWXU,O_RDWR|O_CREAT); Loading
src/client/CMakeLists.txt +38 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ # based on syscall interception. # ############################################################################## add_library(gkfs_intercept SHARED) add_library (gkfs_user_lib SHARED) target_sources( gkfs_intercept Loading @@ -52,6 +53,25 @@ target_sources( syscalls/detail/syscall_info.c ) target_sources( gkfs_user_lib PRIVATE void_syscall_intercept.cpp gkfs_functions.cpp hooks.cpp intercept.cpp logging.cpp open_file_map.cpp open_dir.cpp path.cpp preload.cpp preload_context.cpp preload_util.cpp rpc/rpc_types.cpp rpc/forward_data.cpp rpc/forward_management.cpp rpc/forward_metadata.cpp syscalls/detail/syscall_info.c ) if(GKFS_ENABLE_AGIOS) target_compile_definitions(gkfs_intercept PUBLIC GKFS_ENABLE_AGIOS) Loading @@ -69,6 +89,16 @@ target_link_libraries( Syscall_intercept::Syscall_intercept ) target_link_libraries( gkfs_user_lib PRIVATE metadata distributor env_util arithmetic path_util rpc_utils PUBLIC dl Mercury::Mercury hermes fmt::fmt Threads::Threads ) install( TARGETS gkfs_intercept LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} Loading @@ -76,3 +106,11 @@ install( PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gkfs ) install( TARGETS gkfs_user_lib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gkfs )
src/client/void_syscall_intercept.cpp 0 → 100644 +49 −0 Original line number Diff line number Diff line /* Copyright 2018-2022, Barcelona Supercomputing Center (BSC), Spain Copyright 2015-2022, Johannes Gutenberg Universitaet Mainz, Germany This software was partially supported by the EC H2020 funded project NEXTGenIO (Project ID: 671951, www.nextgenio.eu). This software was partially supported by the ADA-FS project under the SPPEXA project funded by the DFG. This file is part of GekkoFS' POSIX interface. GekkoFS' POSIX interface is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. GekkoFS' POSIX interface is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GekkoFS' POSIX interface. If not, see <https://www.gnu.org/licenses/>. SPDX-License-Identifier: LGPL-3.0-or-later */ extern "C" { int (*intercept_hook_point)(long syscall_number, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long *result) {}; void (*intercept_hook_point_clone_child)( unsigned long flags, void *child_stack, int *ptid, int *ctid, long newtls) {}; void (*intercept_hook_point_clone_parent)( unsigned long flags, void *child_stack, int *ptid, int *ctid, long newtls, long returned_pid) {}; void (*intercept_hook_point_post_kernel)(long syscall_number, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long result) {}; long syscall_no_intercept(long syscall_number, ...) { return 0}; } No newline at end of file