ebpf.patch 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. --- a/config/Config-kernel.in
  2. +++ b/config/Config-kernel.in
  3. @@ -364,6 +364,7 @@ config KERNEL_DEBUG_INFO
  4. config KERNEL_DEBUG_INFO_BTF
  5. bool "Enable additional BTF type information"
  6. + default y if (TARGET_armsr || TARGET_bcm27xx || TARGET_ipq806x_chromium || TARGET_ipq807x || TARGET_mediatek_filogic || TARGET_mvebu_cortexa53 || TARGET_mvebu_cortexa72 || TARGET_rockchip || TARGET_sunxi || TARGET_x86_64)
  7. depends on !HOST_OS_MACOS
  8. depends on KERNEL_DEBUG_INFO && !KERNEL_DEBUG_INFO_REDUCED
  9. select DWARVES
  10. @@ -374,9 +375,20 @@ config KERNEL_DEBUG_INFO_BTF
  11. Required to run BPF CO-RE applications.
  12. +config KERNEL_MODULE_ALLOW_BTF_MISMATCH
  13. + bool "Allow loading modules with non-matching BTF type info"
  14. + depends on KERNEL_DEBUG_INFO_BTF
  15. + default y
  16. + help
  17. + For modules whose split BTF does not match vmlinux, load without
  18. + BTF rather than refusing to load. The default behavior with
  19. + module BTF enabled is to reject modules with such mismatches;
  20. + this option will still load module BTF where possible but ignore
  21. + it when a mismatch is found.
  22. +
  23. config KERNEL_DEBUG_INFO_REDUCED
  24. bool "Reduce debugging information"
  25. - default y
  26. + default y if !(TARGET_armsr || TARGET_bcm27xx || TARGET_ipq806x_chromium || TARGET_ipq807x || TARGET_mediatek_filogic || TARGET_mvebu_cortexa53 || TARGET_mvebu_cortexa72 || TARGET_rockchip || TARGET_sunxi || TARGET_x86_64)
  27. depends on KERNEL_DEBUG_INFO
  28. help
  29. If you say Y here gcc is instructed to generate less debugging
  30. @@ -464,17 +476,28 @@ config KERNEL_KPROBE_EVENTS
  31. config KERNEL_BPF_EVENTS
  32. bool "Compile the kernel with BPF event support"
  33. select KERNEL_KPROBES
  34. + default y if KERNEL_DEBUG_INFO_BTF
  35. help
  36. Allows to attach BPF programs to kprobe, uprobe and tracepoint events.
  37. This is required to use BPF maps of type BPF_MAP_TYPE_PERF_EVENT_ARRAY
  38. for sending data from BPF programs to user-space for post-processing
  39. or logging.
  40. +config KERNEL_PROBE_EVENTS_BTF_ARGS
  41. + bool
  42. + depends on KERNEL_KPROBE_EVENTS && KERNEL_DEBUG_INFO_BTF
  43. + default n
  44. +
  45. config KERNEL_BPF_KPROBE_OVERRIDE
  46. bool
  47. depends on KERNEL_KPROBES
  48. default n
  49. +config KERNEL_BPF_STREAM_PARSER
  50. + bool "Allow a TCP stream parser to be used with BPF_MAP_TYPE_SOCKMAP"
  51. + depends on KERNEL_CGROUP_BPF
  52. + default y if KERNEL_DEBUG_INFO_BTF
  53. +
  54. config KERNEL_AIO
  55. bool "Compile the kernel with asynchronous IO support"
  56. default y if !SMALL_FLASH
  57. @@ -1100,6 +1123,7 @@ config KERNEL_NET_L3_MASTER_DEV
  58. config KERNEL_XDP_SOCKETS
  59. bool "XDP sockets support"
  60. + default y if KERNEL_DEBUG_INFO_BTF
  61. help
  62. XDP sockets allows a channel between XDP programs and
  63. userspace applications.