public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug manual/28998] New: Document -D_FORTIFY_SOURCE
@ 2022-03-24 11:58 mliska at suse dot cz
  2022-03-24 12:27 ` [Bug manual/28998] " adhemerval.zanella at linaro dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: mliska at suse dot cz @ 2022-03-24 11:58 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28998

            Bug ID: 28998
           Summary: Document -D_FORTIFY_SOURCE
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: manual
          Assignee: unassigned at sourceware dot org
          Reporter: mliska at suse dot cz
                CC: mtk.manpages at gmail dot com, siddhesh at sourceware dot org
  Target Milestone: ---

Moved from: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105043

I would like to see documentation of the feature, as well as what each level
(1-3) enables. If it's documented in glibc, then please provide a link to the
feature.

And I would add a caveat about the usage of malloc_usable_size.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug manual/28998] Document -D_FORTIFY_SOURCE
  2022-03-24 11:58 [Bug manual/28998] New: Document -D_FORTIFY_SOURCE mliska at suse dot cz
@ 2022-03-24 12:27 ` adhemerval.zanella at linaro dot org
  2022-03-26 22:42 ` sam at gentoo dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-03-24 12:27 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28998

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg

--- Comment #1 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
It is documented briefly on manual/creature.texi:

303 @defvr Macro _FORTIFY_SOURCE
304 @standards{GNU, (none)}
305 If this macro is defined to @math{1}, security hardening is added to
306 various library functions.  If defined to @math{2}, even stricter
307 checks are applied. If defined to @math{3}, @theglibc{} may also use
308 checks that may have an additional performance overhead.
309 @end defvr

But there is no further explanation of exactly each level enables, the
functions covered, and how it plays with compiler.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug manual/28998] Document -D_FORTIFY_SOURCE
  2022-03-24 11:58 [Bug manual/28998] New: Document -D_FORTIFY_SOURCE mliska at suse dot cz
  2022-03-24 12:27 ` [Bug manual/28998] " adhemerval.zanella at linaro dot org
@ 2022-03-26 22:42 ` sam at gentoo dot org
  2022-08-02 13:24 ` mliska at suse dot cz
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: sam at gentoo dot org @ 2022-03-26 22:42 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28998

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sam at gentoo dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug manual/28998] Document -D_FORTIFY_SOURCE
  2022-03-24 11:58 [Bug manual/28998] New: Document -D_FORTIFY_SOURCE mliska at suse dot cz
  2022-03-24 12:27 ` [Bug manual/28998] " adhemerval.zanella at linaro dot org
  2022-03-26 22:42 ` sam at gentoo dot org
@ 2022-08-02 13:24 ` mliska at suse dot cz
  2022-08-02 22:43 ` siddhesh at sourceware dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mliska at suse dot cz @ 2022-08-02 13:24 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28998

--- Comment #2 from Martin Liska <mliska at suse dot cz> ---
@Siddhesh: May I please remind you this issue?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug manual/28998] Document -D_FORTIFY_SOURCE
  2022-03-24 11:58 [Bug manual/28998] New: Document -D_FORTIFY_SOURCE mliska at suse dot cz
                   ` (2 preceding siblings ...)
  2022-08-02 13:24 ` mliska at suse dot cz
@ 2022-08-02 22:43 ` siddhesh at sourceware dot org
  2022-08-03  7:18 ` mliska at suse dot cz
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: siddhesh at sourceware dot org @ 2022-08-02 22:43 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28998

--- Comment #3 from Siddhesh Poyarekar <siddhesh at sourceware dot org> ---
Do we need documentation beyond the stuff above, which appears to describe the
interface to sufficient detail?  Anything more seems like implementation
detail.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug manual/28998] Document -D_FORTIFY_SOURCE
  2022-03-24 11:58 [Bug manual/28998] New: Document -D_FORTIFY_SOURCE mliska at suse dot cz
                   ` (3 preceding siblings ...)
  2022-08-02 22:43 ` siddhesh at sourceware dot org
@ 2022-08-03  7:18 ` mliska at suse dot cz
  2022-12-06  3:45 ` gandalf at winds dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mliska at suse dot cz @ 2022-08-03  7:18 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28998

--- Comment #4 from Martin Liska <mliska at suse dot cz> ---
Ok, so can you please adapt the documentation entry to the GCC compiler. The
macro is already mentioned in the manual page, so it would be nice having that
explained. Thanks.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug manual/28998] Document -D_FORTIFY_SOURCE
  2022-03-24 11:58 [Bug manual/28998] New: Document -D_FORTIFY_SOURCE mliska at suse dot cz
                   ` (4 preceding siblings ...)
  2022-08-03  7:18 ` mliska at suse dot cz
@ 2022-12-06  3:45 ` gandalf at winds dot org
  2022-12-08  8:52 ` mliska at suse dot cz
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: gandalf at winds dot org @ 2022-12-06  3:45 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28998

Byron Stanoszek <gandalf at winds dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gandalf at winds dot org

--- Comment #5 from Byron Stanoszek <gandalf at winds dot org> ---
I too am looking for documentation on this feature. More specifically, what is
the action of the program when the check fails? Does it act like a failed
assert() and call abort()? Is there a way to catch the exception like one would
catch SIGSEGV using a signal handler?
Thanks.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug manual/28998] Document -D_FORTIFY_SOURCE
  2022-03-24 11:58 [Bug manual/28998] New: Document -D_FORTIFY_SOURCE mliska at suse dot cz
                   ` (5 preceding siblings ...)
  2022-12-06  3:45 ` gandalf at winds dot org
@ 2022-12-08  8:52 ` mliska at suse dot cz
  2022-12-08 15:04 ` siddhesh at sourceware dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mliska at suse dot cz @ 2022-12-08  8:52 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28998

Martin Liska <mliska at suse dot cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-12-08

--- Comment #6 from Martin Liska <mliska at suse dot cz> ---
(In reply to Byron Stanoszek from comment #5)
> I too am looking for documentation on this feature. More specifically, what
> is the action of the program when the check fails?

abort is called.

> Does it act like a failed
> assert() and call abort()? Is there a way to catch the exception like one
> would catch SIGSEGV using a signal handler?

Likely not, Siddhesh, please correct me if I'm wrong.

> Thanks.

Anyway, the documentation should be really improved and taken to GCC compiler
as well.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug manual/28998] Document -D_FORTIFY_SOURCE
  2022-03-24 11:58 [Bug manual/28998] New: Document -D_FORTIFY_SOURCE mliska at suse dot cz
                   ` (6 preceding siblings ...)
  2022-12-08  8:52 ` mliska at suse dot cz
@ 2022-12-08 15:04 ` siddhesh at sourceware dot org
  2023-01-10 15:23 ` cvs-commit at gcc dot gnu.org
  2023-01-10 15:25 ` siddhesh at sourceware dot org
  9 siblings, 0 replies; 11+ messages in thread
From: siddhesh at sourceware dot org @ 2022-12-08 15:04 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28998

Siddhesh Poyarekar <siddhesh at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |siddhesh at sourceware dot org

--- Comment #7 from Siddhesh Poyarekar <siddhesh at sourceware dot org> ---
(In reply to Martin Liska from comment #6)
> > Does it act like a failed
> > assert() and call abort()? Is there a way to catch the exception like one
> > would catch SIGSEGV using a signal handler?
> 
> Likely not, Siddhesh, please correct me if I'm wrong.

You could trap SIGABRT if you really really want to, but that's not a
recommendation.

> > Thanks.
> 
> Anyway, the documentation should be really improved and taken to GCC
> compiler as well.

I'm going to try writing something up for the glibc manual and gcc
documentation.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug manual/28998] Document -D_FORTIFY_SOURCE
  2022-03-24 11:58 [Bug manual/28998] New: Document -D_FORTIFY_SOURCE mliska at suse dot cz
                   ` (7 preceding siblings ...)
  2022-12-08 15:04 ` siddhesh at sourceware dot org
@ 2023-01-10 15:23 ` cvs-commit at gcc dot gnu.org
  2023-01-10 15:25 ` siddhesh at sourceware dot org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-01-10 15:23 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28998

--- Comment #8 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Siddhesh Poyarekar
<siddhesh@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3d3a2911ba65e613eac878d8eb02a0aba4ad7651

commit 3d3a2911ba65e613eac878d8eb02a0aba4ad7651
Author: Siddhesh Poyarekar <siddhesh@sourceware.org>
Date:   Tue Jan 10 10:22:38 2023 -0500

    Add _FORTIFY_SOURCE implementation documentation [BZ #28998]

    There have been multiple requests to provide more detail on how the
    _FORTIFY_SOURCE macro works, so this patch adds a new node in the
    Library Maintenance section that does this.  A lot of the description is
    implementation detail, which is why I put this in the appendix and not
    in the main documentation.

    Resolves: BZ #28998.
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    Reviewed-by: Florian Weimer <fweimer@redhat.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug manual/28998] Document -D_FORTIFY_SOURCE
  2022-03-24 11:58 [Bug manual/28998] New: Document -D_FORTIFY_SOURCE mliska at suse dot cz
                   ` (8 preceding siblings ...)
  2023-01-10 15:23 ` cvs-commit at gcc dot gnu.org
@ 2023-01-10 15:25 ` siddhesh at sourceware dot org
  9 siblings, 0 replies; 11+ messages in thread
From: siddhesh at sourceware dot org @ 2023-01-10 15:25 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28998

Siddhesh Poyarekar <siddhesh at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #9 from Siddhesh Poyarekar <siddhesh at sourceware dot org> ---
Fixed on main branch, the gcc complement of _FORTIFY_SOURCE documentation
change is here:

https://gcc.gnu.org/g:b3009222b7bb26654c1e93d34e65e8f80ae20595

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-01-10 15:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-24 11:58 [Bug manual/28998] New: Document -D_FORTIFY_SOURCE mliska at suse dot cz
2022-03-24 12:27 ` [Bug manual/28998] " adhemerval.zanella at linaro dot org
2022-03-26 22:42 ` sam at gentoo dot org
2022-08-02 13:24 ` mliska at suse dot cz
2022-08-02 22:43 ` siddhesh at sourceware dot org
2022-08-03  7:18 ` mliska at suse dot cz
2022-12-06  3:45 ` gandalf at winds dot org
2022-12-08  8:52 ` mliska at suse dot cz
2022-12-08 15:04 ` siddhesh at sourceware dot org
2023-01-10 15:23 ` cvs-commit at gcc dot gnu.org
2023-01-10 15:25 ` siddhesh at sourceware dot org

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).