From: Segher Boessenkool <segher@kernel.crashing.org>
To: Mark Wielaard <mark@klomp.org>
Cc: Sandipan Das <sandipan@linux.vnet.ibm.com>,
systemtap@sourceware.org, naveen.n.rao@linux.vnet.ibm.com,
fche@redhat.com
Subject: Re: [PATCH] powerpc: Change SDT argument constraint
Date: Thu, 05 Oct 2017 12:40:00 -0000 [thread overview]
Message-ID: <20171005123945.GU8421@gate.crashing.org> (raw)
In-Reply-To: <1507198583.9961.29.camel@klomp.org>
On Thu, Oct 05, 2017 at 12:16:23PM +0200, Mark Wielaard wrote:
> On Thu, 2017-10-05 at 14:39 +0530, Sandipan Das wrote:
> > With the 'o' memory constraint, any memory operand which
> > has an offsettable address is allowed. However, for some
> > architectures such as powerpc, this allows operands like
> > the ones shown below in the readelf output from Fedora 26
> > to be generated.
> >
> > Â $ readelf -n /lib64/libc.so.6 | grep memory_mallopt_mmap_max -A2
> > -B2
> >     stapsdt              0x0000006c NT_STAPSDT (SystemTap
> > probe descriptors)
> > Â Â Â Â Â Â Provider: libc
> > Â Â Â Â Â Â Name: memory_mallopt_mmap_max
> > Â Â Â Â Â Â Location: 0x00000000000a0274, Base: 0x00000000001ccb90,
> > Semaphore: 0x0000000000000000
> > Â Â Â Â Â Â Arguments: -4@9 -4@.LANCHOR0+44@toc@l(8) -4@.LANCHOR0+52@toc@l(
> > 7)
> >
> > The second and third argument shown above are both having
> > operands which are pointers to static data anchors. Since
> > these static anchors are not included in the symbol table,
> > they cannot be resolved from the binary itself. So, such
> > arguments cannot be read via their corresponding markers.
> >
> > Using the 'Z' memory constraint instead solves this issue
> > as it will only allow a memory operand that is an indexed
> > or indirect from a register.
> >
> > So, for powerpc, we set STAP_SDT_ARG_CONSTRAINT to 'nZr'
> > but keep it as 'nor' for all other architectures.
>
> I haven't tested it, but just reading the machine constraints page
> https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html it looks
> correct to me.
I wonder why only PowerPC is hitting this problem though?
Segher
next prev parent reply other threads:[~2017-10-05 12:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-05 9:11 Sandipan Das
2017-10-05 10:16 ` Mark Wielaard
2017-10-05 12:40 ` Segher Boessenkool [this message]
2017-10-05 15:59 ` Frank Ch. Eigler
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=20171005123945.GU8421@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=fche@redhat.com \
--cc=mark@klomp.org \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=sandipan@linux.vnet.ibm.com \
--cc=systemtap@sourceware.org \
/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).