diff options
author | Eugene Syromyatnikov <evgsyr@gmail.com> | 2023-04-30 15:53:58 +0200 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2023-04-30 14:41:13 +0000 |
commit | 5bfbcdc03ba59c03c13e0241ee9bad3e411aca0c (patch) | |
tree | 434a7fb57724fae784cfea5c280fe7a7a9a30e8a /tests/pure_executables.list | |
parent | afa50399904c71460bc8ca9f2446b58265b72b12 (diff) | |
download | strace-5bfbcdc03ba59c03c13e0241ee9bad3e411aca0c.tar.gz |
mem: handle hppa MADV_* UAPI breakage
Linux commit v6.2-rc1~39^2~7 has broken UAPI on PA-RISC by changing
the values of some MADV_* constants; that forces some special handling
for them, since we cannot have any assumptions about the version
of the kernel headers and/or kernel both strace and tracees are built
and/or being run on.
* src/mem.c: Include "xlat/madvise_hppa_generic_cmds.h".
[HPPA]: Include "xlat/madvise_hppa_old_cmds.h".
(SYS_FUNC(madvise)) <advice>: New local variable, set to tcp->u_arg[2].
[HPPA] (SYS_FUNC(madvise)): Check madvise_hppa_old_cmds for the advice
value and print it appropriately if it is there; then check
madvise_hppa_generic_cmds and print it appropriately if it is there;
then fallback to printing advice as madvise_cmds xval.
[!HPPA] (SYS_FUNC(madvise)): Print advice as madvise_cmds
and madvise_hppa_generic_cmds xval.
* src/xlat/madvise_cmds.in: Add sorted; remove "Generated ..." comment;
move hppa-specific values to madvise_hppa_old_cmds.in and their generic
counterparts to madvise_hppa_generic_cmds.in.
* src/xlat/madvise_hppa_generic_cmds.in: New file.
* src/xlat/madvise_hppa_old_cmds.in: Likewise.
* tests/.gitignore: Add madvise-Xabbrev, madvise-Xraw,
and madvise-Xverbose.
* tests/pure_executables.list: Likewise.
* tests/gen_tests.in (advise-Xabbrev, madvise-Xraw, madvise-Xverbos):
New tests.
* tests/madvise.c: Add checks for the advice argument decoding.
* tests/madvise-Xabbrev.c: New file.
* tests/madvise-Xraw.c: Likewise.
* tests/madvise-Xverbose.c: Likewise.
* NEWS: Mention it.
Reported-by: Matoro Mahri <matoro@users.noreply.github.com>
Closes: https://github.com/strace/strace/issues/241
Diffstat (limited to 'tests/pure_executables.list')
-rwxr-xr-x | tests/pure_executables.list | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/pure_executables.list b/tests/pure_executables.list index 9948e9c2a..14f88ea0a 100755 --- a/tests/pure_executables.list +++ b/tests/pure_executables.list @@ -322,6 +322,9 @@ lseek lstat lstat64 madvise +madvise-Xabbrev +madvise-Xraw +madvise-Xverbose maybe_switch_current_tcp maybe_switch_current_tcp--quiet-thread-execve mbind |