#else /* !CONFIG_BPF_SYSCALL */
static inline struct bpf_prog *bpf_prog_get(u32 ufd)
{
-@@ -801,6 +806,12 @@ static inline int bpf_fd_reuseport_array
+@@ -644,6 +649,12 @@ static inline struct bpf_prog *bpf_prog_
{
- return -EOPNOTSUPP;
+ return ERR_PTR(-EOPNOTSUPP);
}
+
+static inline bool unprivileged_ebpf_enabled(void)
+}
+
#endif /* CONFIG_BPF_SYSCALL */
- #endif /* defined(CONFIG_INET) && defined(CONFIG_BPF_SYSCALL) */
+ static inline struct bpf_prog *bpf_prog_get_type(u32 ufd,
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -251,6 +251,11 @@ static int sysrq_sysctl_handler(struct c
#else /* !CONFIG_BPF_SYSCALL */
static inline struct bpf_prog *bpf_prog_get(u32 ufd)
{
-@@ -1034,6 +1040,12 @@ static inline int bpf_fd_reuseport_array
+@@ -881,6 +887,12 @@ static inline int bpf_prog_test_run_flow
{
- return -EOPNOTSUPP;
+ return -ENOTSUPP;
}
+
+static inline bool unprivileged_ebpf_enabled(void)
+}
+
#endif /* CONFIG_BPF_SYSCALL */
- #endif /* defined(CONFIG_INET) && defined(CONFIG_BPF_SYSCALL) */
+ static inline struct bpf_prog *bpf_prog_get_type(u32 ufd,
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -251,6 +251,11 @@ static int sysrq_sysctl_handler(struct c