Skip to content
GitLab
Explore
Sign in
Commits on Source (3)
Zeroth variance before calculating standard deviation
· 170add97
PETAR ANDRIC
authored
Mar 13, 2025
170add97
Detect architecture
· 908dbbfe
PETAR ANDRIC
authored
Mar 13, 2025
908dbbfe
Merge branch 'contrib' into 'main'
· d75d11d7
Ramon Nou
authored
Mar 13, 2025
Contrib See merge request
!5
d75d11d7
Show whitespace changes
Inline
Side-by-side
scripts/run.sh
View file @
d75d11d7
...
@@ -3,7 +3,7 @@ SYSCALL="getpid"
...
@@ -3,7 +3,7 @@ SYSCALL="getpid"
BUILD
=
../build
BUILD
=
../build
REPEATS
=
20
REPEATS
=
20
ARCH
=
"
X86
"
ARCH
=
"
$(
uname
-m
2>/dev/null
||
echo
-n
unknown
)
"
NATIVE
=
"
$BUILD
/opendevnull --syscall
$SYSCALL
"
NATIVE
=
"
$BUILD
/opendevnull --syscall
$SYSCALL
"
INTERC
=
"
$BUILD
/opendevnull --syscall
$SYSCALL
"
INTERC
=
"
$BUILD
/opendevnull --syscall
$SYSCALL
"
...
@@ -22,6 +22,7 @@ calculate_stats() {
...
@@ -22,6 +22,7 @@ calculate_stats() {
local
count
=
${#
values
[@]
}
local
count
=
${#
values
[@]
}
local
min
=
${
values
[0]
}
local
min
=
${
values
[0]
}
local
max
=
${
values
[0]
}
local
max
=
${
values
[0]
}
local
variance
=
0
# Calculate sum, min, and max
# Calculate sum, min, and max
for
value
in
"
${
values
[@]
}
"
;
do
for
value
in
"
${
values
[@]
}
"
;
do
...
...
src/eval.cpp
View file @
d75d11d7
...
@@ -12,7 +12,12 @@ stop_interception() __attribute__((destructor));
...
@@ -12,7 +12,12 @@ stop_interception() __attribute__((destructor));
int
int
hook_openat
(
int
dirfd
,
const
char
*
cpath
,
int
flags
,
mode_t
mode
)
{
hook_openat
(
int
dirfd
,
const
char
*
cpath
,
int
flags
,
mode_t
mode
)
{
#if defined(__x86_64) || defined(__x86_64__)
return
syscall_no_intercept
(
SYS_openat
,
dirfd
,
cpath
,
flags
,
mode
);
return
syscall_no_intercept
(
SYS_openat
,
dirfd
,
cpath
,
flags
,
mode
);
#elif defined(__riscv) || defined(__riscv__)
wrapper_ret
ret
=
syscall_no_intercept
(
SYS_openat
,
dirfd
,
cpath
,
flags
,
mode
);
return
(
int
)
ret
.
a0
;
#endif
}
}
int
int
...
...