[Bug libc/20305] New: x86_64: MINSIGSTKSZ too small for AVX512 support

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug libc/20305] New: x86_64: MINSIGSTKSZ too small for AVX512 support

glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=20305

            Bug ID: 20305
           Summary: x86_64: MINSIGSTKSZ too small for AVX512 support
           Product: glibc
           Version: 2.24
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---
            Target: x86_64

Created attachment 9368
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9368&action=edit
tst-minsigstksz.c

The attached test case fails on a system with AVX512 support (both hardware and
kernel) with the following error:

tst-minsigstksz: changed byte 1376 bytes below configured stack

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/20305] x86_64: MINSIGSTKSZ too small for AVX512 support

glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=20305

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
As a possible fix, the kernel could refuse to save FPU state to the signal
handler stack if the specified stack is not large enough.

I do not see a good way to fix this in glibc.  Increasing MINSIGSTKSZ has
potential impact on ABI.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/20305] x86_64: MINSIGSTKSZ too small for AVX-512F support

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=20305

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|x86_64: MINSIGSTKSZ too     |x86_64: MINSIGSTKSZ too
                   |small for AVX512 support    |small for AVX-512F support

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/20305] x86_64: MINSIGSTKSZ too small for AVX-512F support

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=20305

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
           See Also|                            |https://bugzilla.kernel.org
                   |                            |/show_bug.cgi?id=153531
         Resolution|---                         |MOVED

--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
I filed a kernel bug: https://bugzilla.kernel.org/show_bug.cgi?id=153531

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/20305] x86_64: MINSIGSTKSZ too small for AVX-512F support

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=20305

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl.tools at gmail dot com

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/20305] x86: MINSIGSTKSZ too small for AVX-512F support

Sourceware - glibc-bugs mailing list
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=20305

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|x86_64                      |x86_64, i686
            Summary|x86_64: MINSIGSTKSZ too     |x86: MINSIGSTKSZ too small
                   |small for AVX-512F support  |for AVX-512F support
                 CC|                            |fweimer at redhat dot com

--- Comment #3 from Florian Weimer <fweimer at redhat dot com> ---
Not surprisingly, this issue happens with 32-bit glibc builds, too.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/20305] x86: MINSIGSTKSZ too small for AVX-512F support

Sourceware - glibc-bugs mailing list
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=20305

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|MOVED                       |---
   Target Milestone|---                         |2.33

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
MINSIGSTKSZ is defined in <bits/sigstack.h>.  Changing it in the kernel
doesn't help.  However, for AT_MINSIGSTKSZ kernel, we can do

extern int getminsigstacksize (void);

#ifdef __USE_GNU
/* Minumum stack size for a signal handler.  */
# undef MINSIGSTKSZ
# define MINSIGSTKSZ (getminsigstacksize ())
#endif

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/20305] x86: MINSIGSTKSZ too small for AVX-512F support

Sourceware - glibc-bugs mailing list
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=20305

--- Comment #5 from Andreas Schwab <[hidden email]> ---
MINSIGSTKSZ is required to be a constant.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/20305] x86: MINSIGSTKSZ too small for AVX-512F support

Sourceware - glibc-bugs mailing list
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=20305

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Andreas Schwab from comment #5)
> MINSIGSTKSZ is required to be a constant.

True.  But this requirement is very old at the time a fixed signal stack
size was sufficient. We can define MINSIGSTKSZ as a function return
under -D_GNU_SOURCE or other macro.

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