Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

eddyz87 (Eduard Zingerman)
User

Projects

User does not belong to any projects.

User Details

User Since
May 8 2022, 6:30 AM (72 w, 9 h)

Recent Activity

Yesterday

eddyz87 committed rGf22442553b8e: [BPF] Check jump and memory offsets to avoid truncation (authored by eddyz87).
[BPF] Check jump and memory offsets to avoid truncation
Sat, Sep 23, 9:53 AM · Restricted Project, Restricted Project
eddyz87 closed D158425: [BPF] Check jump and memory offsets to avoid truncation.
Sat, Sep 23, 9:53 AM · Restricted Project, Restricted Project
eddyz87 updated the diff for D158425: [BPF] Check jump and memory offsets to avoid truncation.

Rebase, will merge this in after CI run.

Sat, Sep 23, 6:25 AM · Restricted Project, Restricted Project

Thu, Sep 21

eddyz87 committed rGd15f96fe4b64: [BPF][DebugInfo] Show CO-RE relocations in llvm-objdump (authored by eddyz87).
[BPF][DebugInfo] Show CO-RE relocations in llvm-objdump
Thu, Sep 21, 12:00 PM · Restricted Project, Restricted Project
eddyz87 closed D150079: [BPF][DebugInfo] Show CO-RE relocations in llvm-objdump.
Thu, Sep 21, 12:00 PM · Restricted Project, Restricted Project

Wed, Sep 20

eddyz87 added a comment to D150079: [BPF][DebugInfo] Show CO-RE relocations in llvm-objdump.

Thank you for all the feedback!
I've applied the latest suggestions and going to merge this revision once CI is done.

Wed, Sep 20, 4:50 PM · Restricted Project, Restricted Project
eddyz87 updated the diff for D150079: [BPF][DebugInfo] Show CO-RE relocations in llvm-objdump.

Changes in accordance with @MaskRay feedback.

Wed, Sep 20, 4:48 PM · Restricted Project, Restricted Project

Tue, Sep 19

eddyz87 added a comment to D150079: [BPF][DebugInfo] Show CO-RE relocations in llvm-objdump.

Could you please take a look at this revision?
I think I addressed all feedback.

Tue, Sep 19, 5:26 AM · Restricted Project, Restricted Project

Fri, Sep 15

eddyz87 updated the diff for D133361: [BPF] Attribute preserve_static_offset for structs.

Fix for failed unit test pragma-attribute-supported-attributes-list.test

Fri, Sep 15, 8:01 AM · Restricted Project, Restricted Project, Restricted Project

Thu, Sep 14

eddyz87 updated the diff for D133361: [BPF] Attribute preserve_static_offset for structs.
  • Use (new) attribute((preserve_static_offset)) instead of attribute((btf_decl_tag("ctx"))).
  • Rename files, passes, etc accordingly.
Thu, Sep 14, 4:50 PM · Restricted Project, Restricted Project, Restricted Project

Tue, Sep 5

eddyz87 updated the diff for D150079: [BPF][DebugInfo] Show CO-RE relocations in llvm-objdump.

Missing dot at the end of the comment.

Tue, Sep 5, 4:38 AM · Restricted Project, Restricted Project

Mon, Sep 4

eddyz87 updated the diff for D150079: [BPF][DebugInfo] Show CO-RE relocations in llvm-objdump.

Unit tests are passing on S390 under emulation w/o issues.

Mon, Sep 4, 4:19 PM · Restricted Project, Restricted Project
eddyz87 added a comment to D150079: [BPF][DebugInfo] Show CO-RE relocations in llvm-objdump.

Thank you for the feedback, I think I covered all but one items.
The last remaining item is to verify that unit test is working on the bigendian system.
I'll update the revision once I check that.

Mon, Sep 4, 12:31 PM · Restricted Project, Restricted Project
eddyz87 updated the diff for D150079: [BPF][DebugInfo] Show CO-RE relocations in llvm-objdump.

Stylistic changes according to feedback from @MaskRay and @jhenderson.

Mon, Sep 4, 12:27 PM · Restricted Project, Restricted Project
eddyz87 added a comment to D133361: [BPF] Attribute preserve_static_offset for structs.

...
Right. Such recursive propagation of PAI is necessary. For btf_tag we cannot do it. Always propagating it won't be correct.
New preserve_const_field_offset would need to be propagated too and we actually have nested unions.
__bpf_md_ptr is such example. btf_tag wouldn't propagate into that union, but attr(preserve_const_field_offset) should.

Mon, Sep 4, 5:41 AM · Restricted Project, Restricted Project, Restricted Project
eddyz87 added a comment to D133361: [BPF] Attribute preserve_static_offset for structs.

After retesting kernel build with LLVM=1 and libbpf patch to reconstruct btf_decl_tag [1], statistics for BPF selftests looks as follows:

  • out of 653 object files 13 have some differences with and w/o this change;
  • for 2 programs there is small instruction count increase (+2 insn total);
  • for 5 programs there is small instruction decrease (-6 insn total);
  • 6 programs differ slightly but number of instructions is the same.
Mon, Sep 4, 4:55 AM · Restricted Project, Restricted Project, Restricted Project

Wed, Aug 30

eddyz87 added a comment to D133361: [BPF] Attribute preserve_static_offset for structs.

I agree that it's not useful outside of BPF, but it's useful outside of 'ctx'. I think 'preserve_constant_field_offset' would be more accurate description of the restriction.
We can expand in the doc that it's a constant offset when field of the struct is accessed.

Also instead of btf_tag it would be better to add another builtin similar to preserve_access_index.
Currently we add attribute((preserve_access_index)) to trigger CO-RE.
This one will be a new attribute((preserve_constant_field_offset)) that will be specified manually either in uapi/bpf.h or in vmlinux.h on some structs

Wed, Aug 30, 11:31 AM · Restricted Project, Restricted Project, Restricted Project

Tue, Aug 29

eddyz87 added inline comments to D133361: [BPF] Attribute preserve_static_offset for structs.
Tue, Aug 29, 5:22 AM · Restricted Project, Restricted Project, Restricted Project

Mon, Aug 28

eddyz87 updated the diff for D133361: [BPF] Attribute preserve_static_offset for structs.

git-clang-format fixes.

Mon, Aug 28, 3:22 AM · Restricted Project, Restricted Project, Restricted Project
eddyz87 added inline comments to D133361: [BPF] Attribute preserve_static_offset for structs.
Mon, Aug 28, 3:18 AM · Restricted Project, Restricted Project, Restricted Project

Sun, Aug 27

eddyz87 updated the diff for D133361: [BPF] Attribute preserve_static_offset for structs.
  • Removed special Sema processing and btf_decl_tag("ctx") prioritization in CGExpr, preserve access index calls are now handled by BPFContextMarker transformation.
  • Correctness fixes for isPointerOperand().
Sun, Aug 27, 5:12 PM · Restricted Project, Restricted Project, Restricted Project

Aug 24 2023

eddyz87 added inline comments to D150079: [BPF][DebugInfo] Show CO-RE relocations in llvm-objdump.
Aug 24 2023, 4:07 PM · Restricted Project, Restricted Project

Aug 23 2023

eddyz87 added a comment to D150079: [BPF][DebugInfo] Show CO-RE relocations in llvm-objdump.

Sorry, was pretty busy handling a backlog of reviews and day work... Feel free to ping after a week https://llvm.org/docs/CodeReview.html#lgtm-how-a-patch-is-accepted

Aug 23 2023, 5:49 PM · Restricted Project, Restricted Project
eddyz87 updated the diff for D150079: [BPF][DebugInfo] Show CO-RE relocations in llvm-objdump.

Fixes basing on feedback from @MaskRay.
Fix for incorrect BTF::CommonType::getVlen() mask.

Aug 23 2023, 5:47 PM · Restricted Project, Restricted Project

Aug 21 2023

eddyz87 committed rG651e644595b7: [BPF] Replace BPFMIPeepholeTruncElim by custom logic in isZExtFree() (authored by eddyz87).
[BPF] Replace BPFMIPeepholeTruncElim by custom logic in isZExtFree()
Aug 21 2023, 2:14 PM · Restricted Project, Restricted Project
eddyz87 closed D157870: [BPF] Replace BPFMIPeepholeTruncElim by custom logic in isZExtFree().
Aug 21 2023, 2:13 PM · Restricted Project, Restricted Project
eddyz87 updated the diff for D157870: [BPF] Replace BPFMIPeepholeTruncElim by custom logic in isZExtFree().

Rebase, want to see green CI build

Aug 21 2023, 11:04 AM · Restricted Project, Restricted Project
eddyz87 added a comment to D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF.

If you have some time, could you please take a look at my response?

Aug 21 2023, 9:46 AM · Restricted Project, Restricted Project, Restricted Project
eddyz87 added a comment to D150079: [BPF][DebugInfo] Show CO-RE relocations in llvm-objdump.

If you have some time, could you please take a look?

Aug 21 2023, 9:45 AM · Restricted Project, Restricted Project
eddyz87 added a reviewer for D158425: [BPF] Check jump and memory offsets to avoid truncation: yonghong-song.

Hi Yonghong,

Aug 21 2023, 8:11 AM · Restricted Project, Restricted Project
eddyz87 requested review of D158425: [BPF] Check jump and memory offsets to avoid truncation.
Aug 21 2023, 7:59 AM · Restricted Project, Restricted Project

Aug 18 2023

eddyz87 added a comment to D156497: [BPF] Emit UNDEF rather than constant 0.

By the way, it is still possible to test this using e.g. llc or clang. As noted previously in this thread the default error handler for llc/clang is stateful, so it proceeds the code generation, produces assembly code and returns non-zero error code.

Aug 18 2023, 5:52 AM · Restricted Project, Restricted Project

Aug 17 2023

eddyz87 updated the summary of D157870: [BPF] Replace BPFMIPeepholeTruncElim by custom logic in isZExtFree().
Aug 17 2023, 5:01 PM · Restricted Project, Restricted Project
eddyz87 published D157870: [BPF] Replace BPFMIPeepholeTruncElim by custom logic in isZExtFree() for review.

Hi Yonghong, could you please take a look?
As described here, this fixes one of the selftest compilation bugs that occur when LLVM_ENABLE_EXPENSIVE_CHECKS is on. Sorry for the long description, I tried to explain why instruction selection would always cover cases that BPFMIPeepholeTruncElim covered.

Aug 17 2023, 4:52 PM · Restricted Project, Restricted Project

Aug 16 2023

eddyz87 committed rG8f28e8069c4b: [BPF] support for BPF_ST instruction in codegen (authored by eddyz87).
[BPF] support for BPF_ST instruction in codegen
Aug 16 2023, 7:55 AM · Restricted Project, Restricted Project
eddyz87 closed D140804: [BPF] support for BPF_ST instruction in codegen.
Aug 16 2023, 7:54 AM · Restricted Project, Restricted Project
eddyz87 added a comment to D156726: Make globals with mutable members non-constant, even in custom sections.

As an additional data point, the same example but w/o section specification compiles fine:

Aug 16 2023, 4:16 AM · Restricted Project, Restricted Project
eddyz87 added a comment to D156726: Make globals with mutable members non-constant, even in custom sections.

After this revision landed yesterday one BPF kernel selftest (written in C) stopped building. I narrowed the issue to the following example:

Aug 16 2023, 4:07 AM · Restricted Project, Restricted Project

Aug 14 2023

eddyz87 committed rG08d92dedd26c: [BPF] Fix in/out argument constraints for CORE_MEM instructions (authored by eddyz87).
[BPF] Fix in/out argument constraints for CORE_MEM instructions
Aug 14 2023, 4:38 PM · Restricted Project, Restricted Project
eddyz87 closed D157806: [BPF] Fix in/out argument constraints for CORE_MEM instructions.
Aug 14 2023, 4:38 PM · Restricted Project, Restricted Project
eddyz87 committed rG27026fe5633b: [BPF] Reset machine register kill mark in BPFMISimplifyPatchable (authored by eddyz87).
[BPF] Reset machine register kill mark in BPFMISimplifyPatchable
Aug 14 2023, 4:26 PM · Restricted Project, Restricted Project
eddyz87 closed D157805: [BPF] Reset machine register kill mark in BPFMISimplifyPatchable.
Aug 14 2023, 4:26 PM · Restricted Project, Restricted Project

Aug 13 2023

eddyz87 added a comment to D157806: [BPF] Fix in/out argument constraints for CORE_MEM instructions.

... Another solution is similar to D157805 where we can clear 'killed' for the 'out' parameter, right?

Aug 13 2023, 3:29 PM · Restricted Project, Restricted Project
eddyz87 added a comment to D157805: [BPF] Reset machine register kill mark in BPFMISimplifyPatchable.

LGTM. Thanks for detailed comments to show why generated code is incorrect. Do you think we should backport this fix to llvm17?

Aug 13 2023, 12:50 PM · Restricted Project, Restricted Project
eddyz87 added a comment to D140804: [BPF] support for BPF_ST instruction in codegen.

The build bot failure (here) was caused by newly added test case field-reloc-st-imm.ll. When LLVM is built with LLVM_ENABLE_EXPENSIVE_CHECKS=ON flag this test triggered bug described in D157806. I rebased this revision on top of D157806. Could you please double check if you are still ok with these changes?

Aug 13 2023, 11:51 AM · Restricted Project, Restricted Project
eddyz87 added a comment to D157806: [BPF] Fix in/out argument constraints for CORE_MEM instructions.

I have finished changes for this revision, please take a look.

Aug 13 2023, 11:48 AM · Restricted Project, Restricted Project
eddyz87 updated the diff for D140804: [BPF] support for BPF_ST instruction in codegen.

Rebased on top of D157806.

Aug 13 2023, 11:45 AM · Restricted Project, Restricted Project
eddyz87 updated the diff for D157806: [BPF] Fix in/out argument constraints for CORE_MEM instructions.

It is possible to avoid separate versions for CORE_ST32 and CORE_ST64, merging these simplifies implementation for D140804.

Aug 13 2023, 11:44 AM · Restricted Project, Restricted Project
eddyz87 planned changes to D157806: [BPF] Fix in/out argument constraints for CORE_MEM instructions.

Hold-on, I need to update this one to be more in line with changes necessary for D140804 functionality.

Aug 13 2023, 9:55 AM · Restricted Project, Restricted Project
eddyz87 published D157806: [BPF] Fix in/out argument constraints for CORE_MEM instructions for review.

Hi Yonghong,

Aug 13 2023, 7:26 AM · Restricted Project, Restricted Project
eddyz87 published D157805: [BPF] Reset machine register kill mark in BPFMISimplifyPatchable for review.

Hi Yonghong,

Aug 13 2023, 5:52 AM · Restricted Project, Restricted Project

Aug 10 2023

eddyz87 reopened D140804: [BPF] support for BPF_ST instruction in codegen.

Build bot reports a failure (link):

Aug 10 2023, 4:26 PM · Restricted Project, Restricted Project
eddyz87 added a reverting change for rG92e28e397d4c: [BPF] support for BPF_ST instruction in codegen: rGe66affa17e32: Revert "[BPF] support for BPF_ST instruction in codegen".
Aug 10 2023, 4:24 PM · Restricted Project, Restricted Project
eddyz87 committed rGe66affa17e32: Revert "[BPF] support for BPF_ST instruction in codegen" (authored by eddyz87).
Revert "[BPF] support for BPF_ST instruction in codegen"
Aug 10 2023, 4:24 PM · Restricted Project, Restricted Project
eddyz87 added a reverting change for D140804: [BPF] support for BPF_ST instruction in codegen: rGe66affa17e32: Revert "[BPF] support for BPF_ST instruction in codegen".
Aug 10 2023, 4:24 PM · Restricted Project, Restricted Project
eddyz87 committed rG92e28e397d4c: [BPF] support for BPF_ST instruction in codegen (authored by eddyz87).
[BPF] support for BPF_ST instruction in codegen
Aug 10 2023, 4:12 PM · Restricted Project, Restricted Project
eddyz87 closed D140804: [BPF] support for BPF_ST instruction in codegen.
Aug 10 2023, 4:12 PM · Restricted Project, Restricted Project
eddyz87 added a comment to D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF.

Could you please take a look at my response?

Aug 10 2023, 12:55 PM · Restricted Project, Restricted Project, Restricted Project

Aug 6 2023

eddyz87 updated the diff for D140804: [BPF] support for BPF_ST instruction in codegen.

Changes according to Yonghong's comments

Aug 6 2023, 4:54 PM · Restricted Project, Restricted Project

Aug 4 2023

eddyz87 added a comment to D140804: [BPF] support for BPF_ST instruction in codegen.

Note: CI failures seem to be completely unrelated...

Aug 4 2023, 9:09 AM · Restricted Project, Restricted Project
eddyz87 published D140804: [BPF] support for BPF_ST instruction in codegen for review.

Hi Yonghong,

Aug 4 2023, 9:08 AM · Restricted Project, Restricted Project
eddyz87 added inline comments to D156497: [BPF] Emit UNDEF rather than constant 0.
Aug 4 2023, 5:25 AM · Restricted Project, Restricted Project
eddyz87 added inline comments to D156497: [BPF] Emit UNDEF rather than constant 0.
Aug 4 2023, 3:36 AM · Restricted Project, Restricted Project

Aug 3 2023

eddyz87 added a comment to D156497: [BPF] Emit UNDEF rather than constant 0.

I messed up.
@ast is right, I missed the fact that clang already exits with return code 1 when any of the conditions reported by fail(...) happen, e.g.:

Aug 3 2023, 6:22 AM · Restricted Project, Restricted Project

Aug 2 2023

eddyz87 added a comment to D156497: [BPF] Emit UNDEF rather than constant 0.

After examining source code for llvm-lit, I found an option --crash for not. Here is the portable incantation:

Aug 2 2023, 12:19 PM · Restricted Project, Restricted Project
eddyz87 added a comment to D156497: [BPF] Emit UNDEF rather than constant 0.

Note also that 8e6aab3 (D21368) removed the exit-on-error flag which is necessary for the unit tests with this change.

I think that even if everyone agreed that crashing is acceptable we'd have to find a solution that would allow the tests to pass. Any ideas?

Aug 2 2023, 11:42 AM · Restricted Project, Restricted Project
eddyz87 added a comment to D156497: [BPF] Emit UNDEF rather than constant 0.

I grepped the code base and see that finalizeLowering() logic is customized only in a handful of cases:

  • llvm/lib/Target/ARM/ARMISelLowering.cpp
  • llvm/lib/Target/AMDGPU/SIISelLowering.cpp
  • llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Aug 2 2023, 11:05 AM · Restricted Project, Restricted Project
eddyz87 added a comment to D156446: [BPF] Don't crash on missing line info.

Sounds good! I'll do that. Can you share the C source code of the program as well please?

Aug 2 2023, 9:36 AM · Restricted Project, Restricted Project
eddyz87 added a comment to D156445: [BPF] Avoid repeating MI->getOperand(NumDefs) x3.

In my opinion, whether or not to repeat MI->getOperand(NumDefs) is a matter of personal preference in this case. Current code is ok and this change does not change any related functionality. I suggest to withheld from this change to avoid cluttering commit history.

I seems obvious that readability of code-at-HEAD should be of a higher priority than the readability of the commit history; the extant code will be read many more times than the the commit history for the same piece of code.

Aug 2 2023, 9:33 AM · Restricted Project, Restricted Project
eddyz87 added a comment to D156445: [BPF] Avoid repeating MI->getOperand(NumDefs) x3.

In my opinion, whether or not to repeat MI->getOperand(NumDefs) is a matter of personal preference in this case. Current code is ok and this change does not change any related functionality. I suggest to withheld from this change to avoid cluttering commit history.

Aug 2 2023, 7:58 AM · Restricted Project, Restricted Project
eddyz87 added a comment to D156446: [BPF] Don't crash on missing line info.

This error could be detected using the following test case:

Aug 2 2023, 7:35 AM · Restricted Project, Restricted Project

Aug 1 2023

eddyz87 added a comment to D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF.

Thank you for the detailed response!

Aug 1 2023, 4:50 PM · Restricted Project, Restricted Project, Restricted Project

Jul 31 2023

eddyz87 committed rGd542a56c1c2c: [BPF] Clean up SelLowering (authored by tamird).
[BPF] Clean up SelLowering
Jul 31 2023, 2:35 PM · Restricted Project, Restricted Project
eddyz87 closed D156136: [BPF] Clean up SelLowering.
Jul 31 2023, 2:34 PM · Restricted Project, Restricted Project
eddyz87 added a comment to D156136: [BPF] Clean up SelLowering.

Could someone land this for me please?

Jul 31 2023, 2:31 AM · Restricted Project, Restricted Project

Jul 30 2023

eddyz87 added inline comments to D156136: [BPF] Clean up SelLowering.
Jul 30 2023, 4:39 AM · Restricted Project, Restricted Project

Jul 28 2023

eddyz87 added inline comments to D156136: [BPF] Clean up SelLowering.
Jul 28 2023, 1:29 PM · Restricted Project, Restricted Project
eddyz87 added a comment to D156136: [BPF] Clean up SelLowering.

I left a few minor comments.
All-in-all I think these modifications are fine if it makes BPF backend simpler to work with.
However, I'm not sure if fixing my comments is worthwhile if Alexei objects the whole idea.

Jul 28 2023, 12:41 PM · Restricted Project, Restricted Project
eddyz87 added a comment to D155894: [BPF] allow external calls.

If we want to report this for multiple functions I think we can set some flag and exit in TargetLoweringBase::finalizeLowering().

Doesn't this still run at the end of a function, rather than at the end of an entire file? We can report multiple functions have errored, but we can't emit all the errors in the file.

Jul 28 2023, 6:24 AM · Restricted Project, Restricted Project

Jul 27 2023

eddyz87 added a comment to D150079: [BPF][DebugInfo] Show CO-RE relocations in llvm-objdump.

if you have a minute, could you please take a look?
I used this locally and it proved to be convenient for debugging (e.g. here).

Jul 27 2023, 5:05 AM · Restricted Project, Restricted Project
eddyz87 added a comment to D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF.

Could you please take a look at my reply?

Jul 27 2023, 5:02 AM · Restricted Project, Restricted Project, Restricted Project

Jul 25 2023

eddyz87 added a comment to D155894: [BPF] allow external calls.

To better reiterate my position on the warning for ExternalSymbolSDNode: in C analogy such warnings would be generated by the linker, not compiler.
So, I vote to agree with @tamird here and remove the warning (or at-least make it optional).

Jul 25 2023, 10:31 AM · Restricted Project, Restricted Project
eddyz87 added a comment to D155894: [BPF] allow external calls.

Figured it out - if you pass --bpf-expand-memcpy-in-order to llc, you will reproduce the A call to built-in function 'memset' is not supported. prints.

Jul 25 2023, 10:18 AM · Restricted Project, Restricted Project
eddyz87 accepted D144829: [BPF] Add a few new insns under cpu=v4.

Hi Yonghong,

Jul 25 2023, 8:27 AM · Restricted Project, Restricted Project, Restricted Project

Jul 24 2023

eddyz87 added a comment to D155894: [BPF] allow external calls.

Yeah, I also can't reproduce using llc. But in the actual code this module is fed into LLVMTargetMachineEmitToFile and those errors do show up.

Jul 24 2023, 4:40 PM · Restricted Project, Restricted Project
eddyz87 added a comment to D155894: [BPF] allow external calls.

This reproduces in the aya integration tests in this PR on this commit: https://github.com/aya-rs/bpf-linker/pull/77/commits/6624b7d673a7b65cc634e94a4a8a63f79aa90f64

It's not exactly a simple repro. I can try to give you just the IR if that'd be helpful?

Yes, please, that would be helpful.

https://gist.github.com/tamird/f3ff414f183b085c3e37cd7d5b5754de

Jul 24 2023, 3:10 PM · Restricted Project, Restricted Project
eddyz87 added a comment to D155894: [BPF] allow external calls.

This reproduces in the aya integration tests in this PR on this commit: https://github.com/aya-rs/bpf-linker/pull/77/commits/6624b7d673a7b65cc634e94a4a8a63f79aa90f64

It's not exactly a simple repro. I can try to give you just the IR if that'd be helpful?

Jul 24 2023, 2:49 PM · Restricted Project, Restricted Project
eddyz87 added a comment to D155894: [BPF] allow external calls.
  • change of the behavior for ExternalSymbolSDNode: this was not a part of Diff 1, so I assume that it was not a part of the @tamird's initial intent. Is there a use case for this change? The libbpf commit 0a34245 deals only with external maps, not external functions.

When compiling Rust code, we see this warning trigger on memset intrinsics, but this is not a problem because we provide an implementation of memset and the intrinsic is eventually lowered to a call to the function we provide. Is there a finer-grained change that would achieve our goals?

Jul 24 2023, 12:21 PM · Restricted Project, Restricted Project
eddyz87 added a comment to D144829: [BPF] Add a few new insns under cpu=v4.

Hi Yonghong,

Jul 24 2023, 4:37 AM · Restricted Project, Restricted Project, Restricted Project

Jul 23 2023

eddyz87 added a comment to D155894: [BPF] allow external calls.

Please note that a number of unit tests fails with this patch applied:

  • LLVM :: CodeGen/BPF/many_args1.ll
  • LLVM :: CodeGen/BPF/many_args2.ll
  • LLVM :: CodeGen/BPF/struct_ret1.ll
  • LLVM :: CodeGen/BPF/vararg1.ll
  • LLVM :: CodeGen/BPF/warn-call.ll
Jul 23 2023, 9:01 AM · Restricted Project, Restricted Project

Jul 20 2023

eddyz87 added a comment to D144829: [BPF] Add a few new insns under cpu=v4.

I tried adding a test similar to assemble-disassemble.ll:

Jul 20 2023, 7:33 AM · Restricted Project, Restricted Project, Restricted Project

Jul 16 2023

eddyz87 updated the summary of D150079: [BPF][DebugInfo] Show CO-RE relocations in llvm-objdump.
Jul 16 2023, 7:37 AM · Restricted Project, Restricted Project
eddyz87 published D150079: [BPF][DebugInfo] Show CO-RE relocations in llvm-objdump for review.

Could you please take a look at this revision?
It adds support for CO-RE relocations printing in llvm-objdump.
While current implementation works, there are two aspects that might be sub-optimal:

  • ELF relocations are not unified with BTF relocations and thus there are two functions: llvm-objdump.cpp:printRelocation(), llvm-objdump.cpp:printBTFRelocation();
  • The BTFParser instance is not shared between LLVMSymbolizer (used for source line printing) and llvm-objdump.cpp:disassembleObject() (used for relocations printing).
Jul 16 2023, 7:35 AM · Restricted Project, Restricted Project

Jul 13 2023

eddyz87 committed rG490e8e22b1e3: [BTF] Fix BTFParserTest.cpp for unaligned access after D149058 (authored by eddyz87).
[BTF] Fix BTFParserTest.cpp for unaligned access after D149058
Jul 13 2023, 6:40 AM · Restricted Project, Restricted Project
eddyz87 closed D155176: [BTF] Fix BTFParserTest.cpp for unaligned access after D149058.
Jul 13 2023, 6:39 AM · Restricted Project, Restricted Project
eddyz87 published D155176: [BTF] Fix BTFParserTest.cpp for unaligned access after D149058 for review.

I've tested this patch and it also fixes unit tests for this ARM bot:
https://lab.llvm.org/buildbot/#/builders/245/builds/10973

Jul 13 2023, 5:45 AM · Restricted Project, Restricted Project
eddyz87 added a comment to D149058: [BPF][DebugInfo] Use .BPF.ext for line info when DWARF is not available.

I opened D155176 with packed attribute shuffling, will commit after pre-merge checks are complete for it.
(Want to make sure that the change does not cause issues with MSVC).

Jul 13 2023, 4:07 AM · Restricted Project, Restricted Project

Jul 12 2023

eddyz87 added a comment to D149058: [BPF][DebugInfo] Use .BPF.ext for line info when DWARF is not available.

The test has good test coverage for the regular code path, but the error code paths need the unittest.

Jul 12 2023, 3:49 PM · Restricted Project, Restricted Project
eddyz87 added a comment to D149058: [BPF][DebugInfo] Use .BPF.ext for line info when DWARF is not available.

Sorry, I was away from the PC. Thank you for committing the fix, I will update the unit test to execute in both big and little endian.
However, it looks like there is one more issue, as reported here for address sanitizer:

Jul 12 2023, 2:58 PM · Restricted Project, Restricted Project
eddyz87 updated the diff for D149058: [BPF][DebugInfo] Use .BPF.ext for line info when DWARF is not available.

Changes requested by @MaskRay in the last review round.

Jul 12 2023, 4:31 AM · Restricted Project, Restricted Project