On 2015/8/14 5:49, Alexei Starovoitov wrote:
On 8/13/15 2:35 PM, pi3orama wrote:
I was thinking about whether to add a "type" field there, so we will have an explicit mov const instruction before the call instruction, which can act as a mark. Also, if we generate the type code automatically, a type field in this API can make things easier since we don't need wrap the user structure in BPF stack. However, the
LLVM side is not ready yet, so we haven't post the new version.

I think the helper was clean enough. Any type info probably needs to be
done as a side channel and not part of the helper anyway.
But, ok, let's figure out the type stuff first.
Also I don't think you can rely on extra insn in front of a call insn.
Compiler can freely insert other insns there. You don't want to
introduce data flow analysis in elf parser.

I agree with you. I think we can rely on user providing correct type information.

Then we should make this two patches go into kernel. Both 1/2 and 2/2 are
required.

The bug mentioned in patch 1/3 of v5 series
(http://lkml.kernel.org/r/1436839171-31527-2-git-send-email-heku...@huawei.com)
has already been fixed by adjusting sample
(d6726c8145290bef950ae2538ea6ae1d96a1944b)

So we only need these two patches. Currently they can be applied to mainline master
clearly since you haven't add new BPF functions.

Thank you.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to