From: Yury Gribov <y.gribov@samsung.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Cc: Jakub Jelinek <jakub@redhat.com>,
Andi Kleen <andi@firstfloor.org>,
Andrey Ryabinin <a.ryabinin@samsung.com>,
Dmitry Vyukov <dvyukov@google.com>,
Andi Kleen <andi@firstfloor.org>
Subject: Re: [PATCH] Optionally sanitize globals in user-defined sections
Date: Wed, 22 Apr 2015 08:31:00 -0000 [thread overview]
Message-ID: <55375C7C.40804@samsung.com> (raw)
In-Reply-To: <20150419151142.GZ1725@tucnak.redhat.com>
On 04/19/2015 06:11 PM, Jakub Jelinek wrote:
> On Sun, Apr 19, 2015 at 10:54:57AM +0300, Yury Gribov wrote:
>> On 04/17/2015 08:29 PM, Andi Kleen wrote:
>>> Yury Gribov <y.gribov@samsung.com> writes:
>>>> +
>>>> +static bool
>>>> +section_sanitized_p (const char *sec)
>>>> +{
>>>> + if (!sanitized_sections)
>>>> + return false;
>>>> + size_t len = strlen (sec);
>>>> + const char *p = sanitized_sections;
>>>> + while ((p = strstr (p, sec)))
>>>> + {
>>>> + if ((p == sanitized_sections || p[-1] == ',')
>>>> + && (p[len] == 0 || p[len] == ','))
>>>> + return true;
>>>
>>> No wildcard support? That may be a long option in some cases.
>>
>> Right. Do you think * will be enough or we also need ? and [a-f] syntax?
>
> libiberty contains and gcc build utilities already use fnmatch, so you
> should just use that (with carefully chosen FNM_* options).
Hi all,
Here is an new patch which adds support for wildcards in
-fsanitize-file:///home/ygribov/user-section-2.diff
sections. This also adds a test which I forgot to svn-add last time
(shame on me).
Bootstrapped and regtested on x64. Ok to commit?
-Y
next prev parent reply other threads:[~2015-04-22 8:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-17 7:32 Yury Gribov
2015-04-17 7:37 ` Yury Gribov
2015-04-17 7:41 ` Jakub Jelinek
2015-04-17 17:29 ` Andi Kleen
2015-04-19 7:55 ` Yury Gribov
2015-04-19 15:48 ` Jakub Jelinek
2015-04-22 8:31 ` Yury Gribov [this message]
2015-04-22 8:43 ` Yury Gribov
2015-04-22 9:00 ` Jakub Jelinek
2015-04-22 9:26 ` Yury Gribov
2015-04-22 9:37 ` 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=55375C7C.40804@samsung.com \
--to=y.gribov@samsung.com \
--cc=a.ryabinin@samsung.com \
--cc=andi@firstfloor.org \
--cc=dvyukov@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.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).