public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/93654] Inappropriate "-fcf-protection and -mindirect-branch=thunk are incompatible on x86_64" restriction
[not found] <bug-93654-4@http.gcc.gnu.org/bugzilla/>
@ 2020-03-16 18:02 ` dwmw2 at infradead dot org
2020-04-28 15:01 ` hjl.tools at gmail dot com
` (10 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: dwmw2 at infradead dot org @ 2020-03-16 18:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93654
David Woodhouse <dwmw2 at infradead dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dwmw2 at infradead dot org
--- Comment #1 from David Woodhouse <dwmw2 at infradead dot org> ---
Indeed. We even changed the ABI of the thunk to be CET-compatible and allow the
'jmp *reg' form instead of being ret-equivalent.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/93654] Inappropriate "-fcf-protection and -mindirect-branch=thunk are incompatible on x86_64" restriction
[not found] <bug-93654-4@http.gcc.gnu.org/bugzilla/>
2020-03-16 18:02 ` [Bug target/93654] Inappropriate "-fcf-protection and -mindirect-branch=thunk are incompatible on x86_64" restriction dwmw2 at infradead dot org
@ 2020-04-28 15:01 ` hjl.tools at gmail dot com
2020-04-28 15:02 ` hjl.tools at gmail dot com
` (9 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: hjl.tools at gmail dot com @ 2020-04-28 15:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93654
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hjl.tools at gmail dot com
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 48394
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48394&action=edit
A proposal to support retpoline and CET
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/93654] Inappropriate "-fcf-protection and -mindirect-branch=thunk are incompatible on x86_64" restriction
[not found] <bug-93654-4@http.gcc.gnu.org/bugzilla/>
2020-03-16 18:02 ` [Bug target/93654] Inappropriate "-fcf-protection and -mindirect-branch=thunk are incompatible on x86_64" restriction dwmw2 at infradead dot org
2020-04-28 15:01 ` hjl.tools at gmail dot com
@ 2020-04-28 15:02 ` hjl.tools at gmail dot com
2020-04-28 22:52 ` hjl.tools at gmail dot com
` (8 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: hjl.tools at gmail dot com @ 2020-04-28 15:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93654
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
Please DO disable -fcf-protection in the kernel build. We are enabling
CET for the user space first. The kernel CET will be the next.
I am enclosing a proposal to make -fcf-protection compatible with retpoline.
It targets user space. It can be made compatible with kernel.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/93654] Inappropriate "-fcf-protection and -mindirect-branch=thunk are incompatible on x86_64" restriction
[not found] <bug-93654-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2020-04-28 15:02 ` hjl.tools at gmail dot com
@ 2020-04-28 22:52 ` hjl.tools at gmail dot com
2020-04-28 23:14 ` andrew.cooper3 at citrix dot com
` (7 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: hjl.tools at gmail dot com @ 2020-04-28 22:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93654
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2020-04-28
Assignee|unassigned at gcc dot gnu.org |hjl.tools at gmail dot com
--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 48396
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48396&action=edit
A patch
Please try this.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/93654] Inappropriate "-fcf-protection and -mindirect-branch=thunk are incompatible on x86_64" restriction
[not found] <bug-93654-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2020-04-28 22:52 ` hjl.tools at gmail dot com
@ 2020-04-28 23:14 ` andrew.cooper3 at citrix dot com
2020-04-29 0:12 ` hjl.tools at gmail dot com
` (6 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: andrew.cooper3 at citrix dot com @ 2020-04-28 23:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93654
--- Comment #5 from Andrew Cooper <andrew.cooper3 at citrix dot com> ---
Thanks. Just compiling the patch.
As a note however, https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html will
need adjusting to remove the final note for -mindirect-branch=choice
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/93654] Inappropriate "-fcf-protection and -mindirect-branch=thunk are incompatible on x86_64" restriction
[not found] <bug-93654-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2020-04-28 23:14 ` andrew.cooper3 at citrix dot com
@ 2020-04-29 0:12 ` hjl.tools at gmail dot com
2020-04-29 0:17 ` andrew.cooper3 at citrix dot com
` (5 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: hjl.tools at gmail dot com @ 2020-04-29 0:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93654
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #48396|0 |1
is obsolete| |
--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 48401
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48401&action=edit
A patch
I am testing this.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/93654] Inappropriate "-fcf-protection and -mindirect-branch=thunk are incompatible on x86_64" restriction
[not found] <bug-93654-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2020-04-29 0:12 ` hjl.tools at gmail dot com
@ 2020-04-29 0:17 ` andrew.cooper3 at citrix dot com
2020-04-29 2:00 ` hjl.tools at gmail dot com
` (4 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: andrew.cooper3 at citrix dot com @ 2020-04-29 0:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93654
--- Comment #7 from Andrew Cooper <andrew.cooper3 at citrix dot com> ---
Yes - that works. Confirmed that I have both retpolines and endbr64
instructions, and the resulting hypervisor boots.
(I don't have CET capable hardware, but that is fine. There is at minimum
there is MSR setup to do, so any other issues can be addressed at that time.)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/93654] Inappropriate "-fcf-protection and -mindirect-branch=thunk are incompatible on x86_64" restriction
[not found] <bug-93654-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2020-04-29 0:17 ` andrew.cooper3 at citrix dot com
@ 2020-04-29 2:00 ` hjl.tools at gmail dot com
2020-04-29 12:00 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: hjl.tools at gmail dot com @ 2020-04-29 2:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93654
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |10.0
URL| |https://gcc.gnu.org/piperma
| |il/gcc-patches/2020-April/5
| |44804.html
Keywords| |patch
--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> ---
A patch is posted at
https://gcc.gnu.org/pipermail/gcc-patches/2020-April/544804.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/93654] Inappropriate "-fcf-protection and -mindirect-branch=thunk are incompatible on x86_64" restriction
[not found] <bug-93654-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2020-04-29 2:00 ` hjl.tools at gmail dot com
@ 2020-04-29 12:00 ` cvs-commit at gcc dot gnu.org
2020-04-29 12:12 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-29 12:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93654
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:
https://gcc.gnu.org/g:9be3bb2c0a258fd6a7d3d05d232a21930c757d3c
commit r10-8047-g9be3bb2c0a258fd6a7d3d05d232a21930c757d3c
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Apr 29 04:52:46 2020 -0700
x86: Allow -fcf-protection with external thunk
Allow -fcf-protection with external thunk since the external thunk can be
made compatible with -fcf-protection.
gcc/
PR target/93654
* config/i386/i386-options.c (ix86_set_indirect_branch_type):
Allow -fcf-protection with -mindirect-branch=thunk-extern and
-mfunction-return=thunk-extern.
* doc/invoke.texi: Update notes for -fcf-protection=branch with
-mindirect-branch=thunk-extern and -mindirect-return=thunk-extern.
gcc/testsuite/
PR target/93654
* gcc.target/i386/pr93654.c: New test.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/93654] Inappropriate "-fcf-protection and -mindirect-branch=thunk are incompatible on x86_64" restriction
[not found] <bug-93654-4@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2020-04-29 12:00 ` cvs-commit at gcc dot gnu.org
@ 2020-04-29 12:12 ` cvs-commit at gcc dot gnu.org
2020-04-29 12:18 ` andrew.cooper3 at citrix dot com
2020-04-29 12:22 ` [Bug target/93654] [9/10 Regression] Inappropriate "-fcf-protection and -mindirect-branch=thunk-extern are incompatible" restriction hjl.tools at gmail dot com
11 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-29 12:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93654
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:
https://gcc.gnu.org/g:a03efb266fcbf4a01285fff871a5bfe5caac4944
commit r9-8552-ga03efb266fcbf4a01285fff871a5bfe5caac4944
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Apr 29 04:52:46 2020 -0700
x86: Allow -fcf-protection with external thunk
Allow -fcf-protection with external thunk since the external thunk can be
made compatible with -fcf-protection.
gcc/
Backport from master
PR target/93654
* config/i386/i386-options.c (ix86_set_indirect_branch_type):
Allow -fcf-protection with -mindirect-branch=thunk-extern and
-mfunction-return=thunk-extern.
* doc/invoke.texi: Update notes for -fcf-protection=branch with
-mindirect-branch=thunk-extern and -mindirect-return=thunk-extern.
gcc/testsuite/
Backport from master
PR target/93654
* gcc.target/i386/pr93654.c: New test.
(cherry picked from commit 9be3bb2c0a258fd6a7d3d05d232a21930c757d3c)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/93654] Inappropriate "-fcf-protection and -mindirect-branch=thunk are incompatible on x86_64" restriction
[not found] <bug-93654-4@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2020-04-29 12:12 ` cvs-commit at gcc dot gnu.org
@ 2020-04-29 12:18 ` andrew.cooper3 at citrix dot com
2020-04-29 12:22 ` [Bug target/93654] [9/10 Regression] Inappropriate "-fcf-protection and -mindirect-branch=thunk-extern are incompatible" restriction hjl.tools at gmail dot com
11 siblings, 0 replies; 12+ messages in thread
From: andrew.cooper3 at citrix dot com @ 2020-04-29 12:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93654
--- Comment #11 from Andrew Cooper <andrew.cooper3 at citrix dot com> ---
Thankyou very much for your help
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/93654] [9/10 Regression] Inappropriate "-fcf-protection and -mindirect-branch=thunk-extern are incompatible" restriction
[not found] <bug-93654-4@http.gcc.gnu.org/bugzilla/>
` (10 preceding siblings ...)
2020-04-29 12:18 ` andrew.cooper3 at citrix dot com
@ 2020-04-29 12:22 ` hjl.tools at gmail dot com
11 siblings, 0 replies; 12+ messages in thread
From: hjl.tools at gmail dot com @ 2020-04-29 12:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93654
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.0 |9.4
Summary|Inappropriate |[9/10 Regression]
|"-fcf-protection and |Inappropriate
|-mindirect-branch=thunk are |"-fcf-protection and
|incompatible on x86_64" |-mindirect-branch=thunk-ext
|restriction |ern are incompatible"
| |restriction
Status|NEW |RESOLVED
Target|x86_64-*-* |i386, x86_64
Resolution|--- |FIXED
--- Comment #12 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed for GCC 10 and GCC 9.4.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2020-04-29 12:22 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-93654-4@http.gcc.gnu.org/bugzilla/>
2020-03-16 18:02 ` [Bug target/93654] Inappropriate "-fcf-protection and -mindirect-branch=thunk are incompatible on x86_64" restriction dwmw2 at infradead dot org
2020-04-28 15:01 ` hjl.tools at gmail dot com
2020-04-28 15:02 ` hjl.tools at gmail dot com
2020-04-28 22:52 ` hjl.tools at gmail dot com
2020-04-28 23:14 ` andrew.cooper3 at citrix dot com
2020-04-29 0:12 ` hjl.tools at gmail dot com
2020-04-29 0:17 ` andrew.cooper3 at citrix dot com
2020-04-29 2:00 ` hjl.tools at gmail dot com
2020-04-29 12:00 ` cvs-commit at gcc dot gnu.org
2020-04-29 12:12 ` cvs-commit at gcc dot gnu.org
2020-04-29 12:18 ` andrew.cooper3 at citrix dot com
2020-04-29 12:22 ` [Bug target/93654] [9/10 Regression] Inappropriate "-fcf-protection and -mindirect-branch=thunk-extern are incompatible" restriction hjl.tools at gmail dot com
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).