0124-bpf-fix-build-issues-on-um-due-to-mising-bpf_perf_ev.patch 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Daniel Borkmann <[email protected]>
  3. Date: Tue, 12 Dec 2017 02:25:31 +0100
  4. Subject: [PATCH] bpf: fix build issues on um due to mising bpf_perf_event.h
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. CVE-2017-5754
  9. [ Note, this is a Git cherry-pick of the following commit:
  10. a23f06f06dbe ("bpf: fix build issues on um due to mising bpf_perf_event.h")
  11. ... for easier x86 PTI code testing and back-porting. ]
  12. Since c895f6f703ad ("bpf: correct broken uapi for
  13. BPF_PROG_TYPE_PERF_EVENT program type") um (uml) won't build
  14. on i386 or x86_64:
  15. [...]
  16. CC init/main.o
  17. In file included from ../include/linux/perf_event.h:18:0,
  18. from ../include/linux/trace_events.h:10,
  19. from ../include/trace/syscall.h:7,
  20. from ../include/linux/syscalls.h:82,
  21. from ../init/main.c:20:
  22. ../include/uapi/linux/bpf_perf_event.h:11:32: fatal error:
  23. asm/bpf_perf_event.h: No such file or directory #include
  24. <asm/bpf_perf_event.h>
  25. [...]
  26. Lets add missing bpf_perf_event.h also to um arch. This seems
  27. to be the only one still missing.
  28. Fixes: c895f6f703ad ("bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program type")
  29. Reported-by: Randy Dunlap <[email protected]>
  30. Suggested-by: Richard Weinberger <[email protected]>
  31. Signed-off-by: Daniel Borkmann <[email protected]>
  32. Tested-by: Randy Dunlap <[email protected]>
  33. Cc: Hendrik Brueckner <[email protected]>
  34. Cc: Richard Weinberger <[email protected]>
  35. Acked-by: Alexei Starovoitov <[email protected]>
  36. Acked-by: Richard Weinberger <[email protected]>
  37. Signed-off-by: Alexei Starovoitov <[email protected]>
  38. Signed-off-by: Ingo Molnar <[email protected]>
  39. (cherry picked from commit ab95477e7cb35557ecfc837687007b646bab9a9f)
  40. Signed-off-by: Andy Whitcroft <[email protected]>
  41. Signed-off-by: Kleber Sacilotto de Souza <[email protected]>
  42. (cherry picked from commit 1883b099261ebece3016b50fa403ffde90027a04)
  43. Signed-off-by: Fabian Grünbichler <[email protected]>
  44. ---
  45. arch/um/include/asm/Kbuild | 1 +
  46. 1 file changed, 1 insertion(+)
  47. diff --git a/arch/um/include/asm/Kbuild b/arch/um/include/asm/Kbuild
  48. index 50a32c33d729..73c57f614c9e 100644
  49. --- a/arch/um/include/asm/Kbuild
  50. +++ b/arch/um/include/asm/Kbuild
  51. @@ -1,4 +1,5 @@
  52. generic-y += barrier.h
  53. +generic-y += bpf_perf_event.h
  54. generic-y += bug.h
  55. generic-y += clkdev.h
  56. generic-y += current.h
  57. --
  58. 2.14.2