public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Siddhesh Poyarekar <siddhesh@gotplt.org>
To: "Frédéric Bérat" <fberat@redhat.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH v4 00/15] Allow glibc to be built with _FORTIFY_SOURCE
Date: Tue, 4 Jul 2023 20:13:41 -0400	[thread overview]
Message-ID: <d329a5af-bc92-8e98-e073-ff46028fb190@gotplt.org> (raw)
In-Reply-To: <20230704165554.239581-1-fberat@redhat.com>

On 2023-07-04 12:55, Frédéric Bérat wrote:
> Hello,
> 
> This patch series introduces a new "--enable-fortify-source" option to glibc
> build. This option may either be set to a value between 1 and 3, or left empty
> to let configure select the highest value available for the build system.
> 
> The first patch adds the new configure option, the second excludes the routines
> that can't be built with the option enabled.
> 
> The next patches are fixing test and compilation errors that arose with
> fortification enabled.
> 
> I couldn't test the patch series in all configuration possible on all arches
> possible but I ran the following:
> 
>   - build-many-glibcs was executed on x86_64, for all arches/variants. This was
>     mainly done to ensure that installed headers were not broken (as some
>     patches are modifying system headers)
>   - The new "enable-fortify-source" variant for BMG got executed on x86_64
>   - make check and benchtests were executed on x86_64, i686, ppc64le, aarch64,
>     s390x, with and without fortification enabled.
> 
> Fred.
> 
> Changes since v1:
>   - The patch that introduced the new config option has been split in 2.
>     There is now one patch that allows glibc to be built with fortification and
>     one that adds a new configure option to enable it.
>     The patch adding the configure option has been moved to the end of the
>     series.
>   - A new variant has been added to x86_64 bmg to test enable-fortify-source.
>   - NEWS and INSTALL have been updated.
>   - Patch series has been re-based
>   - Error message has been fixed in newly introduced headers
>   - Include directive has been fixed in newly introduced include/* headers
> 
> Changes since v2:
>   - Test for bug269 modifies the stack in a way that may trigger an abort on
>     longjump when fortification is enabled. Thus, disable fortification for this
>     test.
>   - Added 2 patches to perform the same changes on stdio.h that was done for
>     unistd.h and wchar.h. Declarations that were in stdio2.h are moved into
>     existing stdio-decl.h, and __REDIRECT is rplaced by __REDIRECT_FORTIFY for
>     fgets_unlocked_alias.
>   - Title for some patches were modified without content change.
> 
> Changes since v3:
>   - Patch 02 (Exclude routines from fortification): Add $(no-fortify-source) to
>     CFLAGS-tst-sprintf-ub.c
>   - Patch 06 (asprintf_chk: Ensure compatibility for both s390x and ppc64le) is
>     squashed in patch 05 (stdio: Ensure *_chk routines have their hidden builtin
>     definition available). Hence, reviewed-by on patch 05 is dropped.
>   - Patch 05 now details why s390x couldn't build if ldbl_* macros are used with
>     __asprintf_chk
>   - Patch 08 (wchar: Avoid PLT entries with _FORTIFY_SOURCE): unexpected left
>     over is removed.
>   - Patch 10 (unistd: Avoid PLT entries with _FORTIFY_SOURCE):
>     libc_hidden_builtin_{def,proto} replaced with libc_hidden_{def,proto}
>   - Patch 11 (misc/bits/select2.h: Clearly separate declaration from
>     definitions): libc_hidden_builtin_{def,proto} replaced with
>     libc_hidden_{def,proto}
>   - Patch 16 (Add --enable-fortify-source option): if "--enable-fortify-source"
>     is NOT set (i.e. assume "--disable-fortify-source"), forcibly undefine
>     _FORTIFY_SOURCE (instead of letting it pass-through). This is the default
>     and matches old behavior.

Almost done.  In summary:

- Wait for Paul to review the ldbl-128 symbol hacks

- Merge 1/15 and 15/15 together into a single, first patch of the series 
with the recommended changes.

That should get us through.

Given that you'll likely be doing more glibc work, I'll be happy to 
sponsor write access for you if you like so that you can push your own 
patches after review.  Please review the consensus[1] wiki page to 
understand the responsibilities of someone with write access and then 
once you're ready, request an account on sourceware[2].

Cheers,
Sid

[1] https://sourceware.org/glibc/wiki/Consensus
[2] https://sourceware.org/cgi-bin/pdw/ps_form.cgi

      parent reply	other threads:[~2023-07-05  0:13 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-04 16:55 Frédéric Bérat
2023-07-04 16:55 ` [PATCH v4 01/15] " Frédéric Bérat
2023-07-04 23:45   ` Siddhesh Poyarekar
2023-07-04 16:55 ` [PATCH v4 02/15] Exclude routines from fortification Frédéric Bérat
2023-07-04 23:48   ` Siddhesh Poyarekar
2023-07-04 16:55 ` [PATCH v4 03/15] sysdeps: Ensure ieee128*_chk routines to be properly named Frédéric Bérat
2023-07-04 16:55 ` [PATCH v4 04/15] string: Ensure *_chk routines have their hidden builtin definition available Frédéric Bérat
2023-07-04 16:55 ` [PATCH v4 05/15] stdio: " Frédéric Bérat
2023-07-04 23:49   ` Siddhesh Poyarekar
2023-07-06 21:15     ` Paul E Murphy
2023-07-05 12:12   ` Carlos O'Donell
2023-07-04 16:55 ` [PATCH v4 06/15] misc/sys/cdefs.h: Create FORTIFY redirects for internal calls Frédéric Bérat
2023-07-04 16:55 ` [PATCH v4 07/15] wchar: Avoid PLT entries with _FORTIFY_SOURCE Frédéric Bérat
2023-07-04 23:51   ` Siddhesh Poyarekar
2023-07-04 16:55 ` [PATCH v4 08/15] posix/bits/unistd.h: Clearly separate declaration from definitions Frédéric Bérat
2023-07-04 16:55 ` [PATCH v4 09/15] unistd: Avoid PLT entries with _FORTIFY_SOURCE Frédéric Bérat
2023-07-04 23:52   ` Siddhesh Poyarekar
2023-07-04 16:55 ` [PATCH v4 10/15] misc/bits/select2.h: Clearly separate declaration from definitions Frédéric Bérat
2023-07-04 23:53   ` Siddhesh Poyarekar
2023-07-04 16:55 ` [PATCH v4 11/15] misc/bits/syslog.h: Clearly separate declaration from definition Frédéric Bérat
2023-07-04 16:55 ` [PATCH v4 12/15] libio/bits/stdio2.h: Clearly separate declaration from definitions Frédéric Bérat
2023-07-04 16:55 ` [PATCH v4 13/15] libio/bits/stdio2-decl.h: Avoid PLT entries with _FORTIFY_SOURCE Frédéric Bérat
2023-07-04 16:55 ` [PATCH v4 14/15] sysdeps/ieee754/ldbl-128ibm-compat: Fix warn unused result Frédéric Bérat
2023-07-04 16:55 ` [PATCH v4 15/15] Add --enable-fortify-source option Frédéric Bérat
2023-07-05  0:02   ` Siddhesh Poyarekar
2023-07-05  0:13 ` Siddhesh Poyarekar [this message]

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=d329a5af-bc92-8e98-e073-ff46028fb190@gotplt.org \
    --to=siddhesh@gotplt.org \
    --cc=fberat@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).