[Bug target/114431] bpf: GCC generates unverifiable code for systemd restrict_fs_bpf

2024-04-09 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114431 David Faust changed: What|Removed |Added CC||david.faust at oracle dot com ---

[Bug debug/113566] New: btf: incorrect BTF_KIND_DATASEC entries for variables which are optimized out

2024-01-23 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113566 Bug ID: 113566 Summary: btf: incorrect BTF_KIND_DATASEC entries for variables which are optimized out Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords:

[Bug debug/111735] incorrect BTF representation of forward-declared enums

2023-12-05 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111735 David Faust changed: What|Removed |Added CC||david.faust at oracle dot com ---

[Bug debug/112849] New: btf: wrong BTF_KIND_DATSEC entries for extern variables without known section

2023-12-04 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112849 Bug ID: 112849 Summary: btf: wrong BTF_KIND_DATSEC entries for extern variables without known section Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords:

[Bug debug/112849] btf: wrong BTF_KIND_DATSEC entries for extern variables without known section

2023-12-04 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112849 --- Comment #1 from David Faust --- Simple reproducer. Note how clang does not emit an entry in BTF_KIND_DATASEC for 'extern int a'. $ cat a.c extern int a; int b; int foo (void) { return a + b; } $

[Bug target/109558] bpf: support BTF and DWARF tag annotations for BPF

2023-07-19 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109558 --- Comment #2 from David Faust --- Patches for btf_type_tag WIP, but DWARF for type_tags in certain cases is incorrect seemingly due to PR debug/110439. I am still investigating. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110439

[Bug target/109558] bpf: support BTF and DWARF tag annotations for BPF

2023-07-19 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109558 --- Comment #1 from David Faust --- v1 patch series for btf_decl_tag: https://gcc.gnu.org/pipermail/gcc-patches/2023-July/624156.html This also adds infrastructure which will be used for btf_type_tag.

[Bug debug/110439] Missing DW_TAG_typedef for variable with attribute of typedef'd type

2023-06-27 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110439 David Faust changed: What|Removed |Added CC||jemarch at gcc dot gnu.org --- Comment

[Bug debug/110439] New: Missing DW_TAG_typedef for variable with attribute of typedef'd type

2023-06-27 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110439 Bug ID: 110439 Summary: Missing DW_TAG_typedef for variable with attribute of typedef'd type Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal

[Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap

2023-06-02 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073 --- Comment #9 from David Faust --- (In reply to Alex Coplan from comment #8) > Thanks for the follow-up fix and apologies for the mid-air collision, I > didn't see the %zu problem on the target I was testing. No problem, thanks for the fixes

[Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap

2023-06-02 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073 --- Comment #6 from David Faust --- (In reply to Iain Sandoe from comment #5) > (In reply to David Faust from comment #4) > > (In reply to Iain Sandoe from comment #3) > > > (In reply to Iain Sandoe from comment #2) > > > > there seems to be a

[Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap

2023-06-02 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073 --- Comment #4 from David Faust --- (In reply to Iain Sandoe from comment #3) > (In reply to Iain Sandoe from comment #2) > > there seems to be a second fail on x86_64 darwin on line 970. > > I tried the alternate patch on a number of x86_64,

[Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap

2023-06-01 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073 --- Comment #1 from David Faust --- Created attachment 55234 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55234=edit alternate proposed patch Thank you for catching this, and for the fix! With the proposed patch on linux x86_64 I see

[Bug target/109253] libbpf: failed to find BTF info for global/extern symbol '__divdi3'

2023-03-23 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109253 --- Comment #1 from David Faust --- See: https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608152.html Also related as Andrew pointed out in the above thread: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48783

[Bug target/109068] New: bpf: "error: too many function arguments for eBPF" for always_inline function

2023-03-08 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109068 Bug ID: 109068 Summary: bpf: "error: too many function arguments for eBPF" for always_inline function Product: gcc Version: 13.0 Status: UNCONFIRMED Severity:

[Bug target/108790] New: bpf: gcc emits malformed ldxdw instruction at -O2

2023-02-14 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108790 Bug ID: 108790 Summary: bpf: gcc emits malformed ldxdw instruction at -O2 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug target/107844] error: argument is not a field access for __builtin_preserve_field_info

2023-01-18 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107844 --- Comment #5 from David Faust --- (In reply to Andrew Pinski from comment #4) > (In reply to David Faust from comment #3) > > Thanks for the info Andrew. I'll look at __builtin_offsetof. > > > > As for the implementation in clang, I can

[Bug target/107844] error: argument is not a field access for __builtin_preserve_field_info

2023-01-18 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107844 --- Comment #3 from David Faust --- Thanks for the info Andrew. I'll look at __builtin_offsetof. As for the implementation in clang, I can point to some bits relevant to the builtin itself: llvm-project/clang/lib/CodeGen/CGBuiltin.cpp

[Bug target/107844] error: argument is not a field access for __builtin_preserve_field_info

2023-01-18 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107844 --- Comment #1 from David Faust --- Looks like this is a result of the combination of how the bpf_core_field_exists macro is defined and some sort of optimization(?) happening in the C frontend. Consider: struct S { unsigned short x;

[Bug target/107843] error: incompatible type for argument in ___bpf_ctx_cast2

2022-12-06 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107843 --- Comment #1 from David Faust --- Looks like this is an issue with passing void* where an enum type is expected in a function call. This is not specific to the BPF backend. Not entirely clear to me whether this is expected or a bug, but it

[Bug target/106773] libbpf: failed to find BTF info for global/extern symbol 'bpf_link_fops'

2022-12-05 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106773 David Faust changed: What|Removed |Added Attachment #54017|0 |1 is obsolete|

[Bug target/106773] libbpf: failed to find BTF info for global/extern symbol 'bpf_link_fops'

2022-12-05 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106773 --- Comment #13 from David Faust --- Created attachment 54017 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54017=edit DATASEC entries for extern funcs Applies on top of 54002: updated patch Adds emission of DATASEC entries for extern

[Bug target/106773] libbpf: failed to find BTF info for global/extern symbol 'bpf_link_fops'

2022-12-01 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106773 David Faust changed: What|Removed |Added Attachment #53993|0 |1 is obsolete|

[Bug target/106773] libbpf: failed to find BTF info for global/extern symbol 'bpf_link_fops'

2022-12-01 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106773 --- Comment #8 from David Faust --- (In reply to James Hilliard from comment #5) > (In reply to David Faust from comment #4) > > Created attachment 53993 [details] > > proposed patch > > > > Should fix the remaining issues with 'extern'

[Bug target/106773] libbpf: failed to find BTF info for global/extern symbol 'bpf_link_fops'

2022-11-30 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106773 --- Comment #4 from David Faust --- Created attachment 53993 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53993=edit proposed patch Should fix the remaining issues with 'extern' linkage and the missing 'const' modifier (and includes

[Bug target/106773] libbpf: failed to find BTF info for global/extern symbol 'bpf_link_fops'

2022-11-28 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106773 --- Comment #3 from David Faust --- There are two remaining issues: 1. We are missing support for 'linkage=extern' encoding for variables, so 'bpf_link_fops' and others are incorrectly marked with 'linkage=global' instead. 2.

[Bug target/107846] error: result of '8000 << 8' requires 22 bits to represent, but 'short int' only has 16 bits

2022-11-23 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107846 --- Comment #1 from David Faust --- I think this is a bug in the test itself (or with these macros from libbpf). libbpf/src/bpf_endian.h #define ___bpf_mvb(x, b, n, m) ((__u##b)(x) << (b-(n+1)*8) >> (b-8) << (m*8)) #define ___bpf_swab16(x)

[Bug target/107481] New: bpf: add __builtin_preserve_enum_value

2022-10-31 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107481 Bug ID: 107481 Summary: bpf: add __builtin_preserve_enum_value Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target

[Bug target/107480] New: bpf: add __builtin_preserve_type_info

2022-10-31 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107480 Bug ID: 107480 Summary: bpf: add __builtin_preserve_type_info Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target

[Bug target/107479] New: bpf: add __builtin_btf_type_id

2022-10-31 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107479 Bug ID: 107479 Summary: bpf: add __builtin_btf_type_id Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target

[Bug target/106745] segfault in bpf_core_get_sou_member_index

2022-08-26 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106745 David Faust changed: What|Removed |Added CC||david.faust at oracle dot com ---