Re: [PATCH] iptables: open eBPF programs in read only mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I think your build system's kernel headers are old.

Linux 4.15-rc1 commit 6e71b04a82248ccf13a94b85cbc674a9fefe53f5
Author: Chenbo Feng <fengc@xxxxxxxxxx>
Date:   Wed Oct 18 13:00:22 2017 -0700

    bpf: Add file mode configuration into bpf maps
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -218,6 +218,10 @@ enum bpf_attach_type {

 #define BPF_OBJ_NAME_LEN 16U

+/* Flags for accessing BPF object */
+#define BPF_F_RDONLY           (1U << 3)
+#define BPF_F_WRONLY           (1U << 4)
+
 union bpf_attr {
        struct { /* anonymous struct used by BPF_MAP_CREATE command */
                __u32   map_type;       /* one of enum bpf_map_type */
@@ -260,6 +264,7 @@ union bpf_attr {
        struct { /* anonymous struct used by BPF_OBJ_* commands */
                __aligned_u64   pathname;
                __u32           bpf_fd;
+               __u32           file_flags;
        };

        struct { /* anonymous struct used by BPF_PROG_ATTACH/DETACH commands */

On Thu, Mar 26, 2020 at 7:08 AM Maciej Żenczykowski
<zenczykowski@xxxxxxxxx> wrote:
>
> I don't get it.  It builds for me.
>
> And it doesn't if I insert an intentional syntax error in the same line,
> so I'm definitely compiling exactly that code.




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux