public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] PR 85025: libgcc/config/i386/shadow-stack-unwind.h is wrong
@ 2018-03-22 11:16 Tsimbalist, Igor V
  2018-03-22 11:56 ` H.J. Lu
  0 siblings, 1 reply; 2+ messages in thread
From: Tsimbalist, Igor V @ 2018-03-22 11:16 UTC (permalink / raw)
  To: gcc-patches; +Cc: Uros Bizjak, Tsimbalist, Igor V

The incspp instruction from CET accepts only the value in the range of 0-255.
The patch fixes the typo in the loop to handle this.

I'm checking in the fix as obvious.

Thanks,
Igor

       PR target/85025
       * config/i386/shadow-stack-unwind.h: Fix a typo, tmp => 255.

Index: libgcc/config/i386/shadow-stack-unwind.h
===================================================================
--- libgcc/config/i386/shadow-stack-unwind.h    (revision 258760)
+++ libgcc/config/i386/shadow-stack-unwind.h    (working copy)
@@ -42,7 +42,7 @@
          _Unwind_Word tmp = (x);               \
          while (tmp > 255)                     \
            {                                   \
-             _inc_ssp (tmp);                   \
+             _inc_ssp (255);                   \
              tmp -= 255;                       \
            }                                   \
          _inc_ssp (tmp);                       \

Igor


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

* Re: [PATCH] PR 85025: libgcc/config/i386/shadow-stack-unwind.h is wrong
  2018-03-22 11:16 [PATCH] PR 85025: libgcc/config/i386/shadow-stack-unwind.h is wrong Tsimbalist, Igor V
@ 2018-03-22 11:56 ` H.J. Lu
  0 siblings, 0 replies; 2+ messages in thread
From: H.J. Lu @ 2018-03-22 11:56 UTC (permalink / raw)
  To: Tsimbalist, Igor V; +Cc: gcc-patches, Uros Bizjak

On Thu, Mar 22, 2018 at 4:11 AM, Tsimbalist, Igor V
<igor.v.tsimbalist@intel.com> wrote:
> The incspp instruction from CET accepts only the value in the range of 0-255.
> The patch fixes the typo in the loop to handle this.
>
> I'm checking in the fix as obvious.
>
> Thanks,
> Igor
>
>        PR target/85025
>        * config/i386/shadow-stack-unwind.h: Fix a typo, tmp => 255.

Please add "(_Unwind_Frames_Extra)".

Thanks.

> Index: libgcc/config/i386/shadow-stack-unwind.h
> ===================================================================
> --- libgcc/config/i386/shadow-stack-unwind.h    (revision 258760)
> +++ libgcc/config/i386/shadow-stack-unwind.h    (working copy)
> @@ -42,7 +42,7 @@
>           _Unwind_Word tmp = (x);               \
>           while (tmp > 255)                     \
>             {                                   \
> -             _inc_ssp (tmp);                   \
> +             _inc_ssp (255);                   \
>               tmp -= 255;                       \
>             }                                   \
>           _inc_ssp (tmp);                       \
>
> Igor
>
>



-- 
H.J.

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

end of thread, other threads:[~2018-03-22 11:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-22 11:16 [PATCH] PR 85025: libgcc/config/i386/shadow-stack-unwind.h is wrong Tsimbalist, Igor V
2018-03-22 11:56 ` H.J. Lu

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