lapi/procfs.h: Add elf_prstatus and elf_prpsinfo fallbacks
PATCH 1/1 lapi/procfs.h: Add elf_prstatus and elf_prpsinfo fallbacks
Bionic's <sys/procfs.h> provides elf_gregset_t and struct elf_siginfo, but not struct elf_prstatus or struct elf_prpsinfo, so coredump02 fails to build on Android:
error: incomplete definition of type 'const struct elf_prstatus'
Add configure checks and fallback definitions which follow include/linux/elfcore.h. The timevals and pr_uid/pr_gid use the kernel types, so the layout matches the native core dump format, e.g. 16-bit pr_uid on 32-bit x86 and arm. Use the new header in coredump02.
--- configure.ac | 1 + include/lapi/procfs.h | 56 ++++++++++++++++++++++++++ testcases/kernel/coredump/coredump02.c | 2 +- 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 include/lapi/procfs.h
configure.ac +1 -0
@@ -201,6 +201,7 @@ AC_CHECK_TYPES([struct acct_v3],,,[#include <sys/acct.h>]) AC_CHECK_TYPES([struct af_alg_iv, struct sockaddr_alg],,,[# include <linux/if_alg.h>]) AC_CHECK_TYPES([struct clone_args],,,[#include <sched.h>]) AC_CHECK_TYPES([struct sched_attr],,,[#include <sched.h>]) +AC_CHECK_TYPES([struct elf_prpsinfo, struct elf_prstatus],,,[#include <sys/procfs.h>]) AC_CHECK_TYPES([struct fanotify_event_info_fid, struct fanotify_event_info_error, struct fanotify_event_info_header, struct fanotify_event_info_pidfd, struct fanotify_event_info_range],,,[#include <sys/fanotify.h>])
include/lapi/procfs.h new file +56 -0
56 lines not on this page · raw message
testcases/kernel/coredump/coredump02.c +1 -1
@@ -40,9 +40,9 @@*/ #include <link.h> -#include <sys/procfs.h> #include "coredump_common.h" +#include "lapi/procfs.h" #define NOTE_ALIGN (x) (((x) + 3) & ~3U)
Signature · 5 lines
2.56.0.rc1.315.gc6ed9934b7-goog -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Wake,
Quoted 1 line · Wake Liu
lapi/procfs.h: Addelf_prstatusandelf_prpsinfofallbacks
Verdict - Reviewed
---
Note:
The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Andrea Cervesato via ltp
AppliedMerged, Thanks!
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp