This series updates the brk LTP tests to use direct syscalls which makes
the compat tests pass on our musl-based distribution.
Add a simple sanity check for purecap that checks for ENOSYS and fails
otherwise. Deactivate brk02 in purecap as it cannot be completed.
checkpatch complains about using ENOSYS but brk should not be implemented
in purecap, so this is expected.
Branch for review : review/teo/brk-fixes-v5
https://git.morello-project.org/Teo-CD/morello-linux-ltp/-/commits/review/t…
---
v2: Better descriptions, switched to direct syscall and not checking for EINTR.
v3: Fix tst_syscall return type and use it again for brk.
v4: Check if enabled in brk01 _and_ brk02 via setup, unify types, commit
message improvements.
v5: Commit message improvements.
Teo Couprie Diaz (2):
syscalls/brk: use direct syscall
syscalls/brk: add a sanity check for purecap
runtest/morello_transitional_extended | 3 +++
testcases/kernel/syscalls/brk/brk01.c | 23 +++++++++++++++--------
testcases/kernel/syscalls/brk/brk02.c | 24 ++++++++++++++++--------
3 files changed, 34 insertions(+), 16 deletions(-)
base-commit: fa9f8b217b1f298a10e8cc3e825db8e2aaf82ea2
--
2.25.1
This series updates the brk LTP tests to use direct syscalls which makes
the compat tests pass on our musl-based distribution.
Add a simple sanity check for purecap that checks for ENOSYS and fails
otherwise. Deactivate brk02 in purecap as it cannot be completed.
checkpatch complains about using ENOSYS but brk should not be implemented
in purecap, so this is expected.
Branch for review : review/teo/brk-fixes-v4
https://git.morello-project.org/Teo-CD/morello-linux-ltp/-/commits/review/t…
---
v2: Better descriptions, switched to direct syscall and not checking for EINTR.
v3: Fix tst_syscall return type and use it again for brk.
v4: Check if enabled in brk01 _and_ brk02 via setup, unify types, commit
message improvements.
Teo Couprie Diaz (2):
syscalls/brk: use direct syscall
syscalls/brk: add a sanity check for purecap
runtest/morello_transitional_extended | 3 +++
testcases/kernel/syscalls/brk/brk01.c | 23 +++++++++++++++--------
testcases/kernel/syscalls/brk/brk02.c | 24 ++++++++++++++++--------
3 files changed, 34 insertions(+), 16 deletions(-)
base-commit: 75fda47a48d1b6f1c6671fa9819ca9fd9169cf2a
--
2.25.1
Accessing elements in an empty va_list is undefined behaviour.
Therefore, remove the variadicness from safe_* wrappers that always call
the functions with the optional argument included.
Adapt the SAFE_OPEN, SAFE_OPENAT, SAFE_SEMCTL macros to handle the
change by passing a default arguments if they're omitted.
v5:
- Simplified the SAFE_ macros
- Removed the SAFE_COND_HANDLER
v4:
- Updated the commit message of Patch 1 and some comments
- Renamed safe_vararg_macros.h -> tst_safe_vararg_macros.h
- Renamed SAFE_WRAPPER_COND_HANDLER -> SAFE_COND_HANDLER
- Improved alignment to make macros more readable
v3:
- Combined the open/openat patch with the semctl one into a single
series.
- Split the open/openat patch into two patches.
- Introduced a new PATCH (i.e. 1/4) that implements a common handler
chooser for open/openat/semctl cases.
- Removed an unused va_list variable.
v2:
- Added parenthesis around macro arguments
Review branch:
https://git.morello-project.org/tudcre01/morello-linux-ltp/-/commits/review…
Tudor Cretu (3):
safe_open: Fix undefined behaviour in vararg handling
safe_openat: Fix undefined behaviour in vararg handling
safe_semctl: Fix undefined behaviour in vararg handling
include/old/safe_macros.h | 6 ++++--
include/safe_macros_fn.h | 3 ++-
include/tst_safe_file_at.h | 10 ++++++----
include/tst_safe_macros.h | 6 ++++--
include/tst_safe_sysv_ipc.h | 14 +++++++++-----
lib/safe_macros.c | 13 +------------
lib/tst_safe_file_at.c | 11 +++--------
lib/tst_safe_sysv_ipc.c | 10 +---------
8 files changed, 30 insertions(+), 43 deletions(-)
--
2.25.1
Accessing elements in an empty va_list is undefined behaviour.
Therefore, remove the variadicness from safe_* wrappers that always call
the functions with the optional argument included.
Adapt the SAFE_OPEN, SAFE_OPENAT, SAFE_SEMCTL macros to handle the
change by passing a default arguments if they're omitted.
v4:
- Updated the commit message of Patch 1 and some comments
- Renamed safe_vararg_macros.h -> tst_safe_vararg_macros.h
- Renamed SAFE_WRAPPER_COND_HANDLER -> SAFE_COND_HANDLER
- Improved alignment to make macros more readable
v3:
- Combined the open/openat patch with the semctl one into a single
series.
- Split the open/openat patch into two patches.
- Introduced a new PATCH (i.e. 1/4) that implements a common handler
chooser for open/openat/semctl cases.
- Removed an unused va_list variable.
v2:
- Added parenthesis around macro arguments
Review branch:
https://git.morello-project.org/tudcre01/morello-linux-ltp/-/commits/review…
Tudor Cretu (4):
safe_macros: Introduce macro to avoid undefined behaviour in variadic
safe functions
safe_open: Fix undefined behaviour in vararg handling
safe_openat: Fix undefined behaviour in vararg handling
safe_semctl: Fix undefined behaviour in vararg handling
include/old/safe_macros.h | 13 +++++++++--
include/safe_macros_fn.h | 3 ++-
include/tst_safe_file_at.h | 16 ++++++++++----
include/tst_safe_macros.h | 12 ++++++++--
include/tst_safe_sysv_ipc.h | 19 +++++++++++-----
include/tst_safe_vararg_macros.h | 38 ++++++++++++++++++++++++++++++++
lib/safe_macros.c | 13 +----------
lib/tst_safe_file_at.c | 11 +++------
lib/tst_safe_sysv_ipc.c | 10 +--------
9 files changed, 92 insertions(+), 43 deletions(-)
create mode 100644 include/tst_safe_vararg_macros.h
--
2.25.1
This series updates the brk LTP tests to use direct syscalls which makes
the compat tests pass on our musl-based distribution.
Add a simple sanity check for purecap that checks for ENOSYS and fails
otherwise. Deactivate brk02 in purecap as it cannot be completed.
checkpatch complains about using ENOSYS but brk should not be implemented
in purecap, so this is expected.
Branch for review : review/teo/brk-fixes-v3
https://git.morello-project.org/Teo-CD/morello-linux-ltp/-/commits/review/t…
---
v2: Better descriptions, switched to direct syscall and not checking for EINTR.
v3: Fix tst_syscall return type and use it again for brk.
Teo Couprie Diaz (2):
syscalls/brk: use direct syscall
syscalls/brk: add a sanity check for purecap
runtest/morello_transitional_extended | 3 +++
testcases/kernel/syscalls/brk/brk01.c | 19 +++++++++++++------
testcases/kernel/syscalls/brk/brk02.c | 14 ++++++--------
3 files changed, 22 insertions(+), 14 deletions(-)
base-commit: 75fda47a48d1b6f1c6671fa9819ca9fd9169cf2a
--
2.25.1
Accessing elements in an empty va_list is undefined behaviour.
Therefore, remove the variadicness from safe_* wrappers that always call
the functions with the optional argument included.
Adapt the SAFE_OPEN, SAFE_OPENAT, SAFE_SEMCTL macros to handle the
change by passing a default arguments if they're omitted.
v3:
- Combined the open/openat patch with the semctl one into a single
series.
- Split the open/openat patch into two patches.
- Introduced a new PATCH (i.e. 1/4) that implements a common handler
chooser for open/openat/semctl cases.
- Removed an unused va_list variable.
v2:
- Added parenthesis around macro arguments
Review branch:
https://git.morello-project.org/tudcre01/morello-linux-ltp/-/commits/review…
Tudor Cretu (4):
safe_macros: Introduce macro to avoid undefined behaviour in variadic
safe functions
safe_open: Fix undefined behaviour in vararg handling
safe_openat: Fix undefined behaviour in vararg handling
safe_semctl: Fix undefined behaviour in vararg handling
include/old/safe_macros.h | 12 ++++++++++--
include/safe_macros_fn.h | 3 ++-
include/safe_vararg_macros.h | 37 ++++++++++++++++++++++++++++++++++++
include/tst_safe_file_at.h | 19 ++++++++++++++----
include/tst_safe_macros.h | 11 +++++++++--
include/tst_safe_sysv_ipc.h | 14 +++++++++++---
lib/safe_macros.c | 13 +------------
lib/tst_safe_file_at.c | 11 +++--------
lib/tst_safe_sysv_ipc.c | 10 +---------
9 files changed, 89 insertions(+), 41 deletions(-)
create mode 100644 include/safe_vararg_macros.h
--
2.25.1
This series updates the brk LTP tests to use direct syscalls which makes
the compat tests pass on our musl-based distribution.
Add a simple sanity check for purecap that checks for ENOSYS and fails
otherwise. Deactivate brk02 in purecap as it cannot be completed.
checkpatch complains about using ENOSYS but brk should not be implemented
in purecap, so this is expected.
Depends on merging the corresponding Linux patch disabling brk :
https://op-lists.linaro.org/archives/list/linux-morello@op-lists.linaro.org…
Branch for review : review/teo/brk-fixes-v2
https://git.morello-project.org/Teo-CD/morello-linux-ltp/-/commits/review/t…
---
v2: Better descriptions, switched to direct syscall and not checking for EINTR.
Teo Couprie Diaz (2):
syscalls/brk: use direct syscall
syscalls/brk: add a sanity check for purecap
runtest/morello_transitional_extended | 3 +++
testcases/kernel/syscalls/brk/brk01.c | 33 +++++++++++++++++++++++----
testcases/kernel/syscalls/brk/brk02.c | 17 ++++++++------
3 files changed, 42 insertions(+), 11 deletions(-)
base-commit: 04d5526fb44bffdb785e28a334f906c9221bef94
--
2.25.1