From: Jakub Jelinek <jakub@redhat.com>
To: Maxim Ostapenko <m.ostapenko@partner.samsung.com>
Cc: Christophe Lyon <christophe.lyon@linaro.org>,
Kostya Serebryany <kcc@google.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Yury Gribov <y.gribov@samsung.com>,
Vyacheslav Barinov <v.barinov@samsung.com>,
Slava Garbuzov <v.garbuzov@samsung.com>,
Adhemerval Zanella <adhemerval.zanella@linaro.org>
Subject: Re: [PATCH 1/2] Libsanitizer merge from upstream r253555.
Date: Mon, 23 Nov 2015 13:29:00 -0000 [thread overview]
Message-ID: <20151123132411.GB5675@tucnak.redhat.com> (raw)
In-Reply-To: <565312DE.2020207@partner.samsung.com>
On Mon, Nov 23, 2015 at 04:21:34PM +0300, Maxim Ostapenko wrote:
> Yeah, right. I've asked about kernel headers just to make sure I correctly
> understand the issue.
>
> Actually, I see such code in
> lib/sanitizer_common/sanitizer_platform_limits_posix.cc:
>
> #if defined(PTRACE_GETVFPREGS) && defined(PTRACE_SETVFPREGS)
> int ptrace_getvfpregs = PTRACE_GETVFPREGS;
> int ptrace_setvfpregs = PTRACE_SETVFPREGS;
> #else
> int ptrace_getvfpregs = -1;
> int ptrace_setvfpregs = -1;
> #endif
>
> and in ptrace interceptor:
>
> else if (request == ptrace_setvfpregs)
> COMMON_INTERCEPTOR_READ_RANGE(ctx, data, struct_user_vfpregs_struct_sz);
> else if (request == ptrace_getvfpregs)
> COMMON_INTERCEPTOR_WRITE_RANGE(ctx, data, struct_user_vfpregs_struct_sz)
>
> So, perhaps we can do the same thing with ARM_VFPREGS_SIZE, something like
> this?
>
> diff --git
> a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
> b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
> index 9866cc9..20ff224 100644
> --- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
> +++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
> @@ -323,10 +323,14 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
> unsigned struct_user_fpxregs_struct_sz = sizeof(struct
> user_fpxregs_struct);
> #endif // __x86_64 || __mips64 || __powerpc64__ || __aarch64__ || __arm__
> #ifdef __arm__
> +#if defined(ARM_VFPREGS_SIZE)
> unsigned struct_user_vfpregs_struct_sz = ARM_VFPREGS_SIZE;
> #else
> unsigned struct_user_vfpregs_struct_sz = 0;
> #endif
> +#else
> + unsigned struct_user_vfpregs_struct_sz = 0;
> +#endif
Maybe, but then it would need to be approved upstream.
If you just define ARM_VFPREGS_SIZE to 0 or whatever else in
the GCC owned wrapper headers, you can avoid that.
I guess talk to upstream.
Jakub
next prev parent reply other threads:[~2015-11-23 13:24 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-23 7:46 [PATCH 0/2] " Maxim Ostapenko
2015-11-23 7:48 ` [PATCH 1/2] " Maxim Ostapenko
2015-11-23 8:19 ` Jakub Jelinek
2015-11-23 12:24 ` Christophe Lyon
2015-11-23 12:37 ` Maxim Ostapenko
2015-11-23 12:42 ` Jakub Jelinek
2015-11-23 13:05 ` Christophe Lyon
2015-11-23 13:24 ` Maxim Ostapenko
2015-11-23 13:29 ` Jakub Jelinek [this message]
2015-11-24 8:08 ` Maxim Ostapenko
2015-11-24 8:30 ` Jakub Jelinek
2015-11-24 8:38 ` Maxim Ostapenko
2015-11-24 8:43 ` Jakub Jelinek
2015-11-24 8:58 ` Maxim Ostapenko
2015-11-24 9:24 ` Christophe Lyon
2015-11-24 11:12 ` Christophe Lyon
2015-11-24 11:23 ` Jakub Jelinek
2015-11-24 11:23 ` Christophe Lyon
2015-11-24 11:34 ` Jakub Jelinek
2015-11-24 11:57 ` Maxim Ostapenko
2015-11-24 12:06 ` Jakub Jelinek
2015-11-24 12:20 ` Christophe Lyon
2015-11-24 13:06 ` Maxim Ostapenko
2015-11-24 12:09 ` Yury Gribov
2015-11-23 8:06 ` [PATCH 2/2] " Maxim Ostapenko
2015-11-23 8:20 ` Jakub Jelinek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151123132411.GB5675@tucnak.redhat.com \
--to=jakub@redhat.com \
--cc=adhemerval.zanella@linaro.org \
--cc=christophe.lyon@linaro.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=kcc@google.com \
--cc=m.ostapenko@partner.samsung.com \
--cc=v.barinov@samsung.com \
--cc=v.garbuzov@samsung.com \
--cc=y.gribov@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).