User Details
- User Since
- Dec 2 2014, 6:51 PM (433 w, 6 d)
Mon, Mar 13
Jan 19 2023
This approach looks better to me than NVPTX warn and I agree with Ed that it's better to leave NVPTX as-is to avoid any regression.
Sep 23 2022
looks fine, but could you add a unit test for it?
Sep 8 2022
Aug 18 2022
clang -target bpf -O2 -S t3.c
t3.c:1:5: error: defined with too many args
Aug 16 2022
Jul 13 2022
The workaround is not pretty, but I couldn't come up with a better way.
May 12 2022
good catch.
May 11 2022
May 10 2022
a test got lost?
lgtm as well.
Apr 19 2022
Thanks!
assert is a heavy hammer.
can we exit with report_fatal_error instead?
Apr 14 2022
The fix to prevent the crash looks good, but what should be the expected codegen for a global variable?
CO-RE needs a constant.
Are we assuming that the global data will be inited with some constant and a later pass will propagate it further into __builtin_preserve,
so at the end it will become a constant?
Mar 29 2022
builtin_memcpy is not inlined
Mar 17 2022
makes sense. without scalar evolution in the verfiier we cannot really propagate the range of r3 back into r2 and adjust it through reverse transformation of 13: (07) r3 += -3.
The llvm path is better.
Thanks!
Mar 16 2022
Feb 28 2022
Feb 16 2022
Feb 14 2022
Jan 6 2022
Dec 20 2021
Nov 18 2021
Nov 9 2021
Nov 4 2021
Nov 1 2021
Oct 21 2021
Oct 18 2021
Sep 30 2021
Sep 23 2021
Sep 20 2021
Jun 7 2021
Jun 2 2021
Yep LLVM does have some custom attributes and such, eg: https://github.com/llvm/llvm-project/blob/effb87dfa810a28e763f914fe3e6e984782cc846/llvm/include/llvm/BinaryFormat/Dwarf.def#L592
May 24 2021
May 11 2021
I think addition of emitFuncDataSections is justified.
The rest is bpf specific.
May 6 2021
Apr 15 2021
Makes sense to me. Only BPF target will notice this difference.
Apr 13 2021
Mar 25 2021
Mar 11 2021
Mar 4 2021
Mar 2 2021
thanks for the quick fix!
Mar 1 2021
Feb 25 2021
Thanks!
Feb 10 2021
looks great. thanks
Dec 19 2020
why the current behavior is not enough?
BTF_KIND_FUNC (foo1) -> BTF_KIND_FUNC_PROTO (foo1)
BTF_KIND_FUNC (foo2) -> BTF_KIND_FUNC_PROTO (foo2)
libbpf can use order to find proper function. foo can be extern as it is right now. Then libbpf will first try to match between multiple elf bpf files. If still not found it will search in vmlinux/mods.
I think using KIND_VAR is incorrect. There is no variable here.
Dec 18 2020
Does it work already without specifying the section, right?
void foo1(int); works ?
void foo2(int) __ attribute __((section("bar"))); sort-of works, but this one goes into the same section as foo1 ?
Dec 15 2020
What's a use case?
The test is necessary.
Dec 2 2020
Dec 1 2020
Nov 19 2020
Looks like the test didn't change. Only commit log... that's fine. I think the diff is ready to land, but let's wait for the kernel patches to be ready as well.
Nov 18 2020
Nov 17 2020
looks good. Before landing we need to agree on the full set of instructions that -mcpu=v4 will support.
atomic_fetch_or|xor|and are probably needed as instructions. The kernel JIT will generate x86 cmpxchg for them.
Because if llvm generates bpf cmpxchg insn then we'd need to teach the verifier to recognize infinite loops.
Nov 15 2020
Nov 3 2020
Oct 7 2020
Oct 6 2020
Oct 5 2020
Sep 30 2020
looks like x86 64-bit is ILP, so it's not niche.
Looks like Source gets the least amount of testing (judging by archs that use it).
RegPressure is probably 2nd most used after ILP.
It feels that we should fix it inside ILP instead.
Sep 29 2020
ouch. sounds like we don't have much choice. Let's figure out what happened with test_verif_scale3 first, but looks like we have to land regardless.
Sep 28 2020
Sep 21 2020
Sep 10 2020
is this based on D87153 ?
the passthrough will be removed later, right?
Aug 6 2020
thanks for detailed analysis.
Aug 3 2020
Is it a cleanup or is it a fix for some bug? If latter there should be a new test for it?
Jul 17 2020
Jul 15 2020
lgtm.
curious what happens when type is defined within args, like:
__builtin_preserve_field_info(*(struct { int a; } *)0, 2);
lgtm
Jul 10 2020
'float *var;' in the struct won't be trivial to handle with a skip indeed.
My concern with float->char[] substitute is that the kernel decides on calling convention based on these types.
If there is a function fn(int a, float b); and pahole emits BTF for it as fn(int a, char b[4])
the kernel will let bpf progs to attach to it with wrong register passing.
Currently array is not allowed in btf_distill_func_proto(), so it's a theoretical issue, but still dangerous long term.
I think pahole/clang should either skip generating BTF for anything with float or BTF should be extended to encode it.
I think extending BTF would be easier.
I don't like KIND_INT_FLOATING though. KIND_FLOAT is better. Just like single KIND_INT that represents char/int/long
the KIND_FLOAT should be able to represent float/double/long double.
does pahole convert float/double to int ? Is it really the case?
I think it's better to skip float/double when they are part of a struct and leave a hole in there.
I worry that representing them as 'char' array may cause backward compatibility issues later.
If pahole is doing such hack now it probably should be fixed too.
Jul 1 2020
Jun 30 2020
Jun 17 2020
Jun 15 2020
that's an important fix to backport
Jun 11 2020
Jun 9 2020
It feels that the same thing can be represented as inline asm.
What advantage builtin has?