From: Siddhesh Poyarekar <siddhesh@sourceware.org>
To: Paul Eggert <eggert@cs.ucla.edu>, libc-alpha@sourceware.org
Cc: jakub@redhat.com, fweimer@redhat.com
Subject: Re: [PATCH 1/2] string: _FORTIFY_SOURCE=3 using __builtin_dynamic_object_size
Date: Fri, 11 Dec 2020 07:06:05 +0530 [thread overview]
Message-ID: <08a25ebb-08df-8001-5582-bfcd64bb1036@sourceware.org> (raw)
In-Reply-To: <11032ad8-821f-541a-4622-680b7c604458@cs.ucla.edu>
On 12/11/20 12:40 AM, Paul Eggert wrote:
> On 12/10/20 10:13 AM, Siddhesh Poyarekar via Libc-alpha wrote:
>
>> +checks are applied. If defined to @math{3}, @theglibc{} attempts to use
>> +compiler-specific checks that may be more computationally expensive.
>
> Please change "attempts to use compiler-specific checks" to "may also
> use checks". The documentation need not mention compilers here, and the
> "also" documents that 3 subsumes 2.
Thanks, I'll fix this.
>> # elif !__GNUC_PREREQ (4, 1)
>> # warning _FORTIFY_SOURCE requires GCC 4.1 or later
>> -# elif _FORTIFY_SOURCE > 1
>> -# define __USE_FORTIFY_LEVEL 2
>> +# elif _FORTIFY_SOURCE > 2
>> +# define __USE_FORTIFY_LEVEL 3
>> # else
>> -# define __USE_FORTIFY_LEVEL 1
>> +# define __USE_FORTIFY_LEVEL _FORTIFY_SOURCE
>> # endif
>
> The existing code warns if you define _FORTIFY_SOURCE on a platform that
> doesn't support _FORTIFY_SOURCE. Shouldn't the revised code warn if you
> define _FORTIFY_SOURCE to 3 on a platform that doesn't support that?
> Otherwise people may be lulled into the belief that -D_FORTIFY_SOURCE=3
> means something even on platforms where it doesn't.
Thanks, that's a good idea, I'll add a check. I suppose I ought to
document in the NEWS too that _FORTIFY_SOURCE=3 at present only adds
additional checks with llvm 9 and later and that gcc-10.2 does not have
the needed support?
Thanks,
Siddhesh
next prev parent reply other threads:[~2020-12-11 1:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-10 18:13 [PATCH 0/2] _FORTIFY_SOURCE=3 Siddhesh Poyarekar
2020-12-10 18:13 ` [PATCH 1/2] string: _FORTIFY_SOURCE=3 using __builtin_dynamic_object_size Siddhesh Poyarekar
2020-12-10 19:10 ` Paul Eggert
2020-12-11 1:36 ` Siddhesh Poyarekar [this message]
2020-12-11 2:42 ` Paul Eggert
2020-12-14 5:23 ` [PATCH v2 " Siddhesh Poyarekar
2020-12-14 14:54 ` Florian Weimer
2020-12-14 15:02 ` Jakub Jelinek
2020-12-14 15:09 ` Siddhesh Poyarekar
2020-12-14 15:34 ` Florian Weimer
2020-12-14 15:47 ` Andreas Schwab
2020-12-14 15:52 ` Florian Weimer
2020-12-14 17:41 ` [PATCH v3 " Siddhesh Poyarekar
2020-12-10 18:13 ` [PATCH 2/2] nonstring: " Siddhesh Poyarekar
2020-12-15 11:28 ` Florian Weimer
2020-12-15 11:33 ` Jakub Jelinek
2020-12-15 12:00 ` Siddhesh Poyarekar
2020-12-19 6:33 [PATCH v6 0/2] _FORTIFY_SOURCE=3 Siddhesh Poyarekar
2020-12-19 6:33 ` [PATCH 1/2] string: _FORTIFY_SOURCE=3 using __builtin_dynamic_object_size Siddhesh Poyarekar
2020-12-28 16:44 ` Adhemerval Zanella
2020-12-29 15:14 ` Siddhesh Poyarekar
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=08a25ebb-08df-8001-5582-bfcd64bb1036@sourceware.org \
--to=siddhesh@sourceware.org \
--cc=eggert@cs.ucla.edu \
--cc=fweimer@redhat.com \
--cc=jakub@redhat.com \
--cc=libc-alpha@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).