[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2022-02-23 Thread andrew.cooper3 at citrix dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 --- Comment #25 from Andrew Cooper --- (In reply to H.J. Lu from comment #24) > (In reply to Andrew Cooper from comment #23) > > Apologies for the delay, but I do now have a working prototype of Xen with > > CET-IBT active, using the current

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-11-05 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 --- Comment #24 from H.J. Lu --- (In reply to Andrew Cooper from comment #23) > Apologies for the delay, but I do now have a working prototype of Xen with > CET-IBT active, using the current version of these patches. > > The result actually

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-11-05 Thread andrew.cooper3 at citrix dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 --- Comment #23 from Andrew Cooper --- Apologies for the delay, but I do now have a working prototype of Xen with CET-IBT active, using the current version of these patches. The result actually builds back to older versions of GCCs, but the

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-30 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 --- Comment #22 from H.J. Lu --- (In reply to Andrew Cooper from comment #21) > Another possibly-bug, but possibly mis-expectations on my behalf. > > I've found some code in the depths of Xen which is causing a failure on > final link due to a

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-29 Thread andrew.cooper3 at citrix dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 --- Comment #21 from Andrew Cooper --- Another possibly-bug, but possibly mis-expectations on my behalf. I've found some code in the depths of Xen which is causing a failure on final link due to a missing `__x86_indirect_thunk_nt_rax` symbol.

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-29 Thread andrew.cooper3 at citrix dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 --- Comment #20 from Andrew Cooper --- (In reply to H.J. Lu from comment #19) > (In reply to Andrew Cooper from comment #17) > > I think I've found a bug in the -fcf-check-attribute implementation. > > Please try the v5 patch. Thanks. That

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-29 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 --- Comment #19 from H.J. Lu --- (In reply to Andrew Cooper from comment #17) > I think I've found a bug in the -fcf-check-attribute implementation. > Please try the v5 patch. BTW, do you have a testcase to show how -fcf-check-attribute=yes

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-29 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 H.J. Lu changed: What|Removed |Added Attachment #51696|0 |1 is obsolete|

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-29 Thread andrew.cooper3 at citrix dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 --- Comment #17 from Andrew Cooper --- I think I've found a bug in the -fcf-check-attribute implementation. $ cat fnptr-array-arg.c static int __attribute__((cf_check)) foo(char a[], int b) { return 0; } int (*ptr)(char[], int)

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-28 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 --- Comment #16 from H.J. Lu --- (In reply to Andrew Cooper from comment #14) > (In reply to H.J. Lu from comment #13) > > (In reply to Andrew Cooper from comment #11) > > > > > > There should be a diagnostic, but it ought to include cf_check

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-28 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 H.J. Lu changed: What|Removed |Added Attachment #51693|0 |1 is obsolete|

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-28 Thread andrew.cooper3 at citrix dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 --- Comment #14 from Andrew Cooper --- (In reply to H.J. Lu from comment #13) > (In reply to Andrew Cooper from comment #11) > > > > There should be a diagnostic, but it ought to include cf_check in the type > > it prints. > > Try the v3

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-28 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 --- Comment #13 from H.J. Lu --- (In reply to Andrew Cooper from comment #11) > > There should be a diagnostic, but it ought to include cf_check in the type > it prints. Try the v3 patch.

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-28 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 H.J. Lu changed: What|Removed |Added Attachment #51687|0 |1 is obsolete|

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-28 Thread andrew.cooper3 at citrix dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 --- Comment #11 from Andrew Cooper --- (In reply to H.J. Lu from comment #10) > (In reply to Andrew Cooper from comment #8) > > Actually, there is a (possibly pre-existing) diagnostics issue: > > > > $ cat proto.c > > static void

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-27 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 --- Comment #10 from H.J. Lu --- (In reply to Andrew Cooper from comment #8) > Actually, there is a (possibly pre-existing) diagnostics issue: > > $ cat proto.c > static void __attribute__((cf_check)) foo(void); > static void

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-27 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 H.J. Lu changed: What|Removed |Added Attachment #51672|0 |1 is obsolete|

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-27 Thread andrew.cooper3 at citrix dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 --- Comment #8 from Andrew Cooper --- Actually, there is a (possibly pre-existing) diagnostics issue: $ cat proto.c static void __attribute__((cf_check)) foo(void); static void __attribute__((unused)) foo(void) { } void (*ptr)(void) = foo; $

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-27 Thread andrew.cooper3 at citrix dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 --- Comment #7 from Andrew Cooper --- Thankyou. I've tried these two patches and they do appear to be behaving as intended. I've put together a slightly extended version of the original test. Compile with gcc -Wall -fno-pic -Os

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-27 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 H.J. Lu changed: What|Removed |Added Attachment #51670|0 |1 is obsolete|

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-27 Thread peterz at infradead dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 peterz at infradead dot org changed: What|Removed |Added CC||peterz at infradead dot

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-26 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 H.J. Lu changed: What|Removed |Added Status|NEW |WAITING --- Comment #4 from H.J. Lu ---

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-26 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 --- Comment #3 from H.J. Lu --- Created attachment 51672 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51672=edit Add -fcf-check-attribute=[yes|no] -fcf-check-attribute=[yes|no] implies "cf_check" or "nocf_check" function attribute.

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-26 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 H.J. Lu changed: What|Removed |Added Last reconfirmed||2021-10-26 Ever confirmed|0

[Bug target/102953] Improvements to CET-IBT and ENDBR generation

2021-10-26 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953 H.J. Lu changed: What|Removed |Added CC||crazylht at gmail dot com,