Daniel Borkmann via llvm-dev
2016-Jun-16 19:55 UTC
[llvm-dev] [iovisor-dev] [PATCH, BPF 1/5] BPF: Use a provisional ELF e_machine value
On 06/16/2016 06:57 PM, Richard Henderson via iovisor-dev wrote:> On 06/15/2016 10:14 PM, Alexei Starovoitov wrote: >> On Wed, Jun 15, 2016 at 2:37 PM, Richard Henderson via iovisor-dev >> <iovisor-dev at lists.iovisor.org> wrote: >>> This same value for EM_BPF is being propagated to glibc, >>> elfutils, and binutils. >> >> great! >> Can you share the link to glibc and the other patches? > > https://sourceware.org/ml/libc-alpha/2016-06/msg00212.html > > https://lists.fedorahosted.org/archives/list/elfutils-devel at lists.fedorahosted.org/message/OEOF26ZHEJLHPOMRMOGDXTMYXUHPWVGA/ > > I haven't sent one yet for binutils. > >>> + EM_BPF = 0xeb9f, // Linux kernel bpf virtual machineGreat, can that be assumed the final magic e_machine number for the ELF header that eBPF loaders can check for as well then (I do like 0xeb9f ;))?>> was this id reserved this with whoever managing the numbers ? >> The only reason bpf backend used em_none is that we were couldn't >> figure out who's responsible for keeping these records. > > No, it's an unofficial number. But there's history for this. > In binutils there's a comment > > > /* If it is necessary to assign new unofficial EM_* values, please pick large > random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision > with official or non-GNU unofficial values. > > NOTE: Do not just increment the most recent number by one. > Somebody else somewhere will do exactly the same thing, and you > will have a collision. Instead, pick a random number. > > Normally, each entity or maintainer responsible for a machine with an > unofficial e_machine number should eventually ask registry at sco.com for > an officially blessed number to be added to the list above. */ > > > It used to take years to get sco to answer such emails. > > > > r~ > _______________________________________________ > iovisor-dev mailing list > iovisor-dev at lists.iovisor.org > https://lists.iovisor.org/mailman/listinfo/iovisor-dev >
Richard Henderson via llvm-dev
2016-Jun-16 20:59 UTC
[llvm-dev] [iovisor-dev] [PATCH, BPF 1/5] BPF: Use a provisional ELF e_machine value
On 06/16/2016 12:55 PM, Daniel Borkmann wrote:>>>> + EM_BPF = 0xeb9f, // Linux kernel bpf virtual machine > > Great, can that be assumed the final magic e_machine number for the ELF > header that eBPF loaders can check for as well then (I do like 0xeb9f ;))?I'm quite fond of 0xeb9f myself. ;-) I have sent a message to both registry at sco.com and registry at uxsglobal.com. We'll see if that produces a response within a reasonable time frame. Failing that, I'm tempted to just use 0xeb9f forever. r~
Daniel Borkmann via llvm-dev
2016-Jun-16 21:03 UTC
[llvm-dev] [iovisor-dev] [PATCH, BPF 1/5] BPF: Use a provisional ELF e_machine value
On 06/16/2016 10:59 PM, Richard Henderson wrote:> On 06/16/2016 12:55 PM, Daniel Borkmann wrote: >>>>> + EM_BPF = 0xeb9f, // Linux kernel bpf virtual machine >> >> Great, can that be assumed the final magic e_machine number for the ELF >> header that eBPF loaders can check for as well then (I do like 0xeb9f ;))? > > I'm quite fond of 0xeb9f myself. ;-) > > I have sent a message to both registry at sco.com and registry at uxsglobal.com. > We'll see if that produces a response within a reasonable time frame. Failing > that, I'm tempted to just use 0xeb9f forever.Yeah, sounds good!