|
From: Naveen K. <g_n...@ya...> - 2005-07-25 21:28:41
|
Is there a way then that vex can inform valgrind the type of the syscall ? Instead of just saying that it is a syscall maybe give additional information specifying the actual syscall instruction like 1 for int $0xZZ 2 for sysentry 3 for lcall or something like that. Then all the additional work would have to be done in the do_syscall_for_client_WRK routine. Naveen > > > the sysenter instruction is the culprit > > > > How did you get to a sysenter instruction though? We don't support > > that and instead force all system calls to go the int $80 route. > > This is on solaris-x86. >So presumably you just need to make vex-x86 treat that >as a syscall >instruction and end the BB so valgrind gets control >and then Naveen >can worry about writing a system call handler to haul >values out of >the appropriate registers. >In principle we could use that on linux as well and >remove the hack >that forces int $80 for system calls. >Tom __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
|
From: Bart V. A. <bva...@so...> - 2022-12-24 23:37:45
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=2bd7f7042125c99326ffa21c52f368f0721040ca commit 2bd7f7042125c99326ffa21c52f368f0721040ca Author: Bart Van Assche <bva...@ac...> Date: Mon Jun 20 12:46:40 2022 -0700 syscall Diff: --- memcheck/tests/arm64-linux/scalar.h | 8 +------- memcheck/tests/x86-linux/scalar.h | 7 +------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/memcheck/tests/arm64-linux/scalar.h b/memcheck/tests/arm64-linux/scalar.h index 9008816d6e..3dbfa79673 100644 --- a/memcheck/tests/arm64-linux/scalar.h +++ b/memcheck/tests/arm64-linux/scalar.h @@ -1,6 +1,3 @@ -/* This is the arm64 variant of memcheck/tests/x86-linux/scalar.h */ -#include "../../../include/vki/vki-scnums-arm64-linux.h" - #include <assert.h> #include <errno.h> #include <fcntl.h> @@ -11,10 +8,7 @@ #include <sys/ptrace.h> #include <sys/types.h> #include <sys/mman.h> - -// Since we use vki_unistd.h, we can't include <unistd.h>. So we have to -// declare this ourselves. -extern long int syscall (long int __sysno, ...) __THROW; +#include <unistd.h> // Thorough syscall scalar arg checking. Also serves as thorough checking // for (very) basic syscall use. Generally not trying to do anything diff --git a/memcheck/tests/x86-linux/scalar.h b/memcheck/tests/x86-linux/scalar.h index ef28b03550..3dbfa79673 100644 --- a/memcheck/tests/x86-linux/scalar.h +++ b/memcheck/tests/x86-linux/scalar.h @@ -1,5 +1,3 @@ -#include "../../../include/vki/vki-scnums-x86-linux.h" - #include <assert.h> #include <errno.h> #include <fcntl.h> @@ -10,10 +8,7 @@ #include <sys/ptrace.h> #include <sys/types.h> #include <sys/mman.h> - -// Since we use vki_unistd.h, we can't include <unistd.h>. So we have to -// declare this ourselves. -extern long int syscall (long int __sysno, ...) __THROW; +#include <unistd.h> // Thorough syscall scalar arg checking. Also serves as thorough checking // for (very) basic syscall use. Generally not trying to do anything |
|
From: Mark W. <ma...@kl...> - 2022-12-25 00:33:48
|
Hi Bart, On Sat, Dec 24, 2022 at 11:37:34PM +0000, Bart Van Assche wrote: > https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=2bd7f7042125c99326ffa21c52f368f0721040ca > > commit 2bd7f7042125c99326ffa21c52f368f0721040ca > Author: Bart Van Assche <bva...@ac...> > Date: Mon Jun 20 12:46:40 2022 -0700 > > syscall Could you explain this commit a bit more? It seems to have broken the build on at least debian-i386: In file included from scalar.c:4: scalar.c: In function ‘main’: scalar.c:1272:7: error: ‘__NR_sys_kexec_load’ undeclared (first use in this function) 1272 | GO(__NR_sys_kexec_load, "ni"); | ^~~~~~~~~~~~~~~~~~~ scalar.h:21:20: note: in definition of macro ‘GO’ 21 | __NR_xxx, #__NR_xxx, s); | ^~~~~~~~ scalar.c:1272:7: note: each undeclared identifier is reported only once for each function it appears in 1272 | GO(__NR_sys_kexec_load, "ni"); | ^~~~~~~~~~~~~~~~~~~ scalar.h:21:20: note: in definition of macro ‘GO’ 21 | __NR_xxx, #__NR_xxx, s); | ^~~~~~~~ make[5]: *** [Makefile:755: scalar.o] Error 1 Thanks, Mark > Diff: > --- > memcheck/tests/arm64-linux/scalar.h | 8 +------- > memcheck/tests/x86-linux/scalar.h | 7 +------ > 2 files changed, 2 insertions(+), 13 deletions(-) > > diff --git a/memcheck/tests/arm64-linux/scalar.h b/memcheck/tests/arm64-linux/scalar.h > index 9008816d6e..3dbfa79673 100644 > --- a/memcheck/tests/arm64-linux/scalar.h > +++ b/memcheck/tests/arm64-linux/scalar.h > @@ -1,6 +1,3 @@ > -/* This is the arm64 variant of memcheck/tests/x86-linux/scalar.h */ > -#include "../../../include/vki/vki-scnums-arm64-linux.h" > - > #include <assert.h> > #include <errno.h> > #include <fcntl.h> > @@ -11,10 +8,7 @@ > #include <sys/ptrace.h> > #include <sys/types.h> > #include <sys/mman.h> > - > -// Since we use vki_unistd.h, we can't include <unistd.h>. So we have to > -// declare this ourselves. > -extern long int syscall (long int __sysno, ...) __THROW; > +#include <unistd.h> > > // Thorough syscall scalar arg checking. Also serves as thorough checking > // for (very) basic syscall use. Generally not trying to do anything > diff --git a/memcheck/tests/x86-linux/scalar.h b/memcheck/tests/x86-linux/scalar.h > index ef28b03550..3dbfa79673 100644 > --- a/memcheck/tests/x86-linux/scalar.h > +++ b/memcheck/tests/x86-linux/scalar.h > @@ -1,5 +1,3 @@ > -#include "../../../include/vki/vki-scnums-x86-linux.h" > - > #include <assert.h> > #include <errno.h> > #include <fcntl.h> > @@ -10,10 +8,7 @@ > #include <sys/ptrace.h> > #include <sys/types.h> > #include <sys/mman.h> > - > -// Since we use vki_unistd.h, we can't include <unistd.h>. So we have to > -// declare this ourselves. > -extern long int syscall (long int __sysno, ...) __THROW; > +#include <unistd.h> > > // Thorough syscall scalar arg checking. Also serves as thorough checking > // for (very) basic syscall use. Generally not trying to do anything > > > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers |
|
From: Bart V. A. <bva...@ac...> - 2022-12-25 00:39:03
|
On 12/24/22 16:33, Mark Wielaard wrote: > Hi Bart, > > On Sat, Dec 24, 2022 at 11:37:34PM +0000, Bart Van Assche wrote: >> https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=2bd7f7042125c99326ffa21c52f368f0721040ca >> >> commit 2bd7f7042125c99326ffa21c52f368f0721040ca >> Author: Bart Van Assche <bva...@ac...> >> Date: Mon Jun 20 12:46:40 2022 -0700 >> >> syscall > > Could you explain this commit a bit more? > It seems to have broken the build on at least debian-i386: Hi Mark, That commit is incomplete work that should not have been published. I tried to remove that commit but apparently I do not have permission to do a force-push: ---------------------------------------------------------------------- $ git push origin +master Enumerating objects: 9, done. Counting objects: 100% (9/9), done. Delta compression using up to 8 threads Compressing objects: 100% (5/5), done. Writing objects: 100% (5/5), 557 bytes | 557.00 KiB/s, done. Total 5 (delta 4), reused 0 (delta 0), pack-reused 0 remote: error: denying non-fast-forward refs/heads/master (you should pull first) To ssh://sourceware.org/git/valgrind.git/ ! [remote rejected] master -> master (non-fast-forward) error: failed to push some refs to 'ssh://sourceware.org/git/valgrind.git/' ---------------------------------------------------------------------- Does that mean that my only option is to revert that patch? Thanks, Bart. |
|
From: Mark W. <ma...@kl...> - 2022-12-25 00:45:49
|
Hi Bart, On Sat, Dec 24, 2022 at 04:38:53PM -0800, Bart Van Assche wrote: > That commit is incomplete work that should not have been published. I tried > to remove that commit but apparently I do not have permission to do a > force-push: > > ---------------------------------------------------------------------- > $ git push origin +master > Enumerating objects: 9, done. > Counting objects: 100% (9/9), done. > Delta compression using up to 8 threads > Compressing objects: 100% (5/5), done. > Writing objects: 100% (5/5), 557 bytes | 557.00 KiB/s, done. > Total 5 (delta 4), reused 0 (delta 0), pack-reused 0 > remote: error: denying non-fast-forward refs/heads/master (you should pull > first) > To ssh://sourceware.org/git/valgrind.git/ > ! [remote rejected] master -> master (non-fast-forward) > error: failed to push some refs to 'ssh://sourceware.org/git/valgrind.git/' > ---------------------------------------------------------------------- > > Does that mean that my only option is to revert that patch? Ah, yes, sorry, once pushed publicly it cannot be taken back. But no worries, you can indeed just git revert 2bd7f7042 and push that. Thanks, Mark |