Daniel Borkmann says: ==================== pull-request: bpf 2020-06-30 The following pull-request contains BPF updates for your *net* tree. We've added 28 non-merge commits during the last 9 day(s) which contain a total of 35 files changed, 486 insertions(+), 232 deletions(-). The main changes are: 1) Fix an incorrect verifier branch elimination for PTR_TO_BTF_ID pointer types, from Yonghong Song. 2) Fix UAPI for sockmap and flow_dissector progs that were ignoring various arguments passed to BPF_PROG_{ATTACH,DETACH}, from Lorenz Bauer & Jakub Sitnicki. 3) Fix broken AF_XDP DMA hacks that are poking into dma-direct and swiotlb internals and integrate it properly into DMA core, from Christoph Hellwig. 4) Fix RCU splat from recent changes to avoid skipping ingress policy when kTLS is enabled, from John Fastabend. 5) Fix BPF ringbuf map to enforce size to be the power of 2 in order for its position masking to work, from Andrii Nakryiko. 6) Fix regression from CAP_BPF work to re-allow CAP_SYS_ADMIN for loading of network programs, from Maciej Żenczykowski. 7) Fix libbpf section name prefix for devmap progs, from Jesper Dangaard Brouer. 8) Fix formatting in UAPI documentation for BPF helpers, from Quentin Monnet. ====================
Showing the changes to include/uapi/linux (1 of 35 files). Show all
Unified · Split
| @@ -3171,13 +3171,12 @@ union bpf_attr { · 3170 unmodified lines | |||
| 3171 | * int bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags) | 3171 | * int bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags) |
| 3172 | * Description | 3172 | * Description |
| 3173 | * Copy *size* bytes from *data* into a ring buffer *ringbuf*. | 3173 | * Copy *size* bytes from *data* into a ring buffer *ringbuf*. |
| 3174 | * If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of | 3174 | * If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification |
| 3175 | * new data availability is sent. | 3175 | * of new data availability is sent. |
| 3176 | * IF BPF_RB_FORCE_WAKEUP is specified in *flags*, notification of | 3176 | * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification |
| 3177 | * new data availability is sent unconditionally. | 3177 | * of new data availability is sent unconditionally. |
| 3178 | * Return | 3178 | * Return |
| 3179 | * 0, on success; | 3179 | * 0 on success, or a negative error in case of failure. |
| 3180 | * < 0, on error. | ||
| 3181 | * | 3180 | * |
| 3182 | * void *bpf_ringbuf_reserve(void *ringbuf, u64 size, u64 flags) | 3181 | * void *bpf_ringbuf_reserve(void *ringbuf, u64 size, u64 flags) |
| 3183 | * Description | 3182 | * Description |
| @@ -3189,20 +3188,20 @@ union bpf_attr { · 5 unmodified lines | |||
| 3189 | * void bpf_ringbuf_submit(void *data, u64 flags) | 3188 | * void bpf_ringbuf_submit(void *data, u64 flags) |
| 3190 | * Description | 3189 | * Description |
| 3191 | * Submit reserved ring buffer sample, pointed to by *data*. | 3190 | * Submit reserved ring buffer sample, pointed to by *data*. |
| 3192 | * If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of | 3191 | * If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification |
| 3193 | * new data availability is sent. | 3192 | * of new data availability is sent. |
| 3194 | * IF BPF_RB_FORCE_WAKEUP is specified in *flags*, notification of | 3193 | * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification |
| 3195 | * new data availability is sent unconditionally. | 3194 | * of new data availability is sent unconditionally. |
| 3196 | * Return | 3195 | * Return |
| 3197 | * Nothing. Always succeeds. | 3196 | * Nothing. Always succeeds. |
| 3198 | * | 3197 | * |
| 3199 | * void bpf_ringbuf_discard(void *data, u64 flags) | 3198 | * void bpf_ringbuf_discard(void *data, u64 flags) |
| 3200 | * Description | 3199 | * Description |
| 3201 | * Discard reserved ring buffer sample, pointed to by *data*. | 3200 | * Discard reserved ring buffer sample, pointed to by *data*. |
| 3202 | * If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of | 3201 | * If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification |
| 3203 | * new data availability is sent. | 3202 | * of new data availability is sent. |
| 3204 | * IF BPF_RB_FORCE_WAKEUP is specified in *flags*, notification of | 3203 | * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification |
| 3205 | * new data availability is sent unconditionally. | 3204 | * of new data availability is sent unconditionally. |
| 3206 | * Return | 3205 | * Return |
| 3207 | * Nothing. Always succeeds. | 3206 | * Nothing. Always succeeds. |
| 3208 | * | 3207 | * |
| @@ -3210,16 +3209,18 @@ union bpf_attr { · 1 unmodified line | |||
| 3210 | * Description | 3209 | * Description |
| 3211 | * Query various characteristics of provided ring buffer. What | 3210 | * Query various characteristics of provided ring buffer. What |
| 3212 | * exactly is queries is determined by *flags*: | 3211 | * exactly is queries is determined by *flags*: |
| 3213 | * - BPF_RB_AVAIL_DATA - amount of data not yet consumed; | 3212 | * |
| 3214 | * - BPF_RB_RING_SIZE - the size of ring buffer; | 3213 | * * **BPF_RB_AVAIL_DATA**: Amount of data not yet consumed. |
| 3215 | * - BPF_RB_CONS_POS - consumer position (can wrap around); | 3214 | * * **BPF_RB_RING_SIZE**: The size of ring buffer. |
| 3216 | * - BPF_RB_PROD_POS - producer(s) position (can wrap around); | 3215 | * * **BPF_RB_CONS_POS**: Consumer position (can wrap around). |
| 3217 | * Data returned is just a momentary snapshots of actual values | 3216 | * * **BPF_RB_PROD_POS**: Producer(s) position (can wrap around). |
| 3217 | * | ||
| 3218 | * Data returned is just a momentary snapshot of actual values | ||
| 3218 | * and could be inaccurate, so this facility should be used to | 3219 | * and could be inaccurate, so this facility should be used to |
| 3219 | * power heuristics and for reporting, not to make 100% correct | 3220 | * power heuristics and for reporting, not to make 100% correct |
| 3220 | * calculation. | 3221 | * calculation. |
| 3221 | * Return | 3222 | * Return |
| 3222 | * Requested value, or 0, if flags are not recognized. | 3223 | * Requested value, or 0, if *flags* are not recognized. |
| 3223 | * | 3224 | * |
| 3224 | * int bpf_csum_level(struct sk_buff *skb, u64 level) | 3225 | * int bpf_csum_level(struct sk_buff *skb, u64 level) |
| 3225 | * Description | 3226 | * Description |