Bug 1648667 - Add magic for eBPF objects
Summary: Add magic for eBPF objects
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: file
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1652993
TreeView+ depends on / blocked
 
Reported: 2018-11-11 13:31 UTC by Matteo Croce
Modified: 2020-03-25 10:16 UTC (History)
3 users (show)

Fixed In Version: file-5.34-4.fc30 file-5.34-4.fc29 file-5.33-9.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1652993 (view as bug list)
Environment:
Last Closed: 2018-11-14 03:12:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
example eBPF object file (1.02 KB, application/x-object)
2018-11-11 13:31 UTC, Matteo Croce
no flags Details

Description Matteo Croce 2018-11-11 13:31:23 UTC
Created attachment 1504385 [details]
example eBPF object file

Description of problem:

The file utility recently gained support to detect ELF binaries containing eBPF bytecode.
Before this addition, file detects the binary as "unknown arch"

Version-Release number of selected component (if applicable):

file-5.34-3.fc29.x86_64

How reproducible:

100%

Steps to Reproduce:
1. Compile a C code as eBPF, like:
   clang -target bpf -c test.c -o test.o
2. run file on the binary

Actual results:

$ file test.o 
test.o: ELF 64-bit LSB relocatable, *unknown arch 0xf7* version 1 (SYSV), not stripped

Expected results:

$ file test.o
test.o: ELF 64-bit LSB relocatable, eBPF, version 1 (SYSV), not stripped


Additional info:

Upstream commit:

https://github.com/file/file/commit/4cf4e817457ce6ca32452a7c80b27e96be6441dc

Comment 1 Kamil Dudka 2018-11-11 16:12:57 UTC
This should be easy to backport.  Thanks!

Comment 3 Fedora Update System 2018-11-12 15:40:26 UTC
file-5.34-4.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-4222a53d59

Comment 4 Fedora Update System 2018-11-12 15:40:31 UTC
file-5.33-9.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-c7f670fe4f

Comment 5 Fedora Update System 2018-11-13 04:07:16 UTC
file-5.33-9.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-c7f670fe4f

Comment 6 Fedora Update System 2018-11-13 04:49:19 UTC
file-5.34-4.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-4222a53d59

Comment 7 Fedora Update System 2018-11-14 03:12:28 UTC
file-5.34-4.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2018-11-21 03:11:33 UTC
file-5.33-9.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.