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

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