__NR_process_vm_readv not defined (2.6 kernel)
Dmitry V. Levin
ldv at altlinux.org
Tue May 30 23:38:37 UTC 2017
On Tue, May 30, 2017 at 05:43:15PM -0400, David Robins wrote:
> I compiled strace 4.17 release for MIPS with Linux 2.6.35 (which the
> README says is supported) and ran into an error in util.c:
> __NR_process_vm_readv not defined (the syscall was added in 3.2).
> Proposed patch attached.
>
> --- util.c.orig 2017-05-30 17:08:51.310510179 -0400
> +++ util.c 2017-05-30 17:25:40.624754865 -0400
> @@ -1116,7 +1116,12 @@
> unsigned long riovcnt,
> unsigned long flags)
> {
> +#ifdef __NR_process_vm_readv
> return syscall(__NR_process_vm_readv, (long)pid, lvec, liovcnt, rvec, riovcnt, flags);
> +#else
> + errno = ENOSYS;
> + return -1;
> +#endif
> }
> # define process_vm_readv strace_process_vm_readv
> #endif /* !HAVE_PROCESS_VM_READV */
Thanks for the bug report but the patch is not correct.
In commit v4.15-247-gb58f75c we deliberately removed all such __NR_*
checks assuming that scno.h provides definitions for all __NR_* constants
not provided by system header files.
Unfortunately, generation of scno.h was broken on mips.
I've just pushed a fix to strace.git; if you cannot build from the git
repository, here is the diff of two generated Makefile.in files:
--- Makefile.in
+++ Makefile.in
@@ -6660,8 +6660,8 @@
ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h
cat $^ > $@
-syscallent.i: $(top_srcdir)/$(OS)/$(ARCH)/syscallent.h
- $(CPP) -P $(SCNO_CPPFLAGS) $^ -o $@
+syscallent.i: $(top_builddir)/config.h $(top_srcdir)/$(OS)/$(ARCH)/syscallent.h
+ $(CPP) -P $(SCNO_CPPFLAGS) -include $^ -o $@
scno.h: $(top_srcdir)/scno.head syscallent.i
echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
--- tests/Makefile.in
+++ tests/Makefile.in
@@ -7014,8 +7014,8 @@
clean-local-check:
-rm -rf -- $(TESTS:.test=.dir) $(GEN_TESTS:.gen.test=.dir)
-syscallent.i: $(top_srcdir)/$(OS)/$(ARCH)/syscallent.h
- $(CPP) -P $(SCNO_CPPFLAGS) $^ -o $@
+syscallent.i: $(top_builddir)/config.h $(top_srcdir)/$(OS)/$(ARCH)/syscallent.h
+ $(CPP) -P $(SCNO_CPPFLAGS) -include $^ -o $@
scno.h: $(top_srcdir)/scno.head syscallent.i
echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
> Also, the 4.16 archive (at
> https://sourceforge.net/projects/strace/files/latest/download/strace-4.16.tar.xz)
> actually has a strace-4.17 tree in it.
SF seems to be serving strace-4.17.tar.xz in response to
https://sourceforge.net/projects/strace/files/latest/download/any/thing/whatsoever
and there is nothing that could be done about it.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20170531/5fca87c0/attachment.bin>
More information about the Strace-devel
mailing list