Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
The bpf syscall and selftests conflicts were trivial overlapping changes. The r8169 change involved moving the added mdelay from 'net' into a different function. A TLS close bug fix overlapped with the splitting of the TLS state into separate TX and RX parts. I just expanded the tests in the bug fix from "ctx->conf == X" into "ctx->tx_conf == X && ctx->rx_conf == X". Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include <linux/timekeeping.h>
|
||||
#include <linux/ctype.h>
|
||||
#include <linux/btf.h>
|
||||
#include <linux/nospec.h>
|
||||
|
||||
#define IS_FD_ARRAY(map) ((map)->map_type == BPF_MAP_TYPE_PROG_ARRAY || \
|
||||
(map)->map_type == BPF_MAP_TYPE_PERF_EVENT_ARRAY || \
|
||||
@@ -104,12 +105,14 @@ const struct bpf_map_ops bpf_map_offload_ops = {
|
||||
static struct bpf_map *find_and_alloc_map(union bpf_attr *attr)
|
||||
{
|
||||
const struct bpf_map_ops *ops;
|
||||
u32 type = attr->map_type;
|
||||
struct bpf_map *map;
|
||||
int err;
|
||||
|
||||
if (attr->map_type >= ARRAY_SIZE(bpf_map_types))
|
||||
if (type >= ARRAY_SIZE(bpf_map_types))
|
||||
return ERR_PTR(-EINVAL);
|
||||
ops = bpf_map_types[attr->map_type];
|
||||
type = array_index_nospec(type, ARRAY_SIZE(bpf_map_types));
|
||||
ops = bpf_map_types[type];
|
||||
if (!ops)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
@@ -124,7 +127,7 @@ static struct bpf_map *find_and_alloc_map(union bpf_attr *attr)
|
||||
if (IS_ERR(map))
|
||||
return map;
|
||||
map->ops = ops;
|
||||
map->map_type = attr->map_type;
|
||||
map->map_type = type;
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -897,11 +900,17 @@ static const struct bpf_prog_ops * const bpf_prog_types[] = {
|
||||
|
||||
static int find_prog_type(enum bpf_prog_type type, struct bpf_prog *prog)
|
||||
{
|
||||
if (type >= ARRAY_SIZE(bpf_prog_types) || !bpf_prog_types[type])
|
||||
const struct bpf_prog_ops *ops;
|
||||
|
||||
if (type >= ARRAY_SIZE(bpf_prog_types))
|
||||
return -EINVAL;
|
||||
type = array_index_nospec(type, ARRAY_SIZE(bpf_prog_types));
|
||||
ops = bpf_prog_types[type];
|
||||
if (!ops)
|
||||
return -EINVAL;
|
||||
|
||||
if (!bpf_prog_is_dev_bound(prog->aux))
|
||||
prog->aux->ops = bpf_prog_types[type];
|
||||
prog->aux->ops = ops;
|
||||
else
|
||||
prog->aux->ops = &bpf_offload_prog_ops;
|
||||
prog->type = type;
|
||||
|
مرجع در شماره جدید
Block a user