From: David S. Miller Date: Fri, 23 Jul 2021 14:59:46 +0000 (+0100) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net X-Git-Tag: xarray-5.18~1187^2~408 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5af84df962dd6699e3972fda7a0c8b579fb3ab04;p=users%2Fwilly%2Fxarray.git Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Conflicts are simple overlapping changes. Signed-off-by: David S. Miller --- 5af84df962dd6699e3972fda7a0c8b579fb3ab04 diff --cc net/bpf/test_run.c index cda8375bbbaf,1cc75c811e24..b488e2779718 --- a/net/bpf/test_run.c +++ b/net/bpf/test_run.c @@@ -756,24 -697,15 +756,29 @@@ int bpf_prog_test_run_xdp(struct bpf_pr struct netdev_rx_queue *rxqueue; struct xdp_buff xdp = {}; u32 retval, duration; + struct xdp_md *ctx; u32 max_data_sz; void *data; - int ret; + int ret = -EINVAL; + if (prog->expected_attach_type == BPF_XDP_DEVMAP || + prog->expected_attach_type == BPF_XDP_CPUMAP) + return -EINVAL; + if (kattr->test.ctx_in || kattr->test.ctx_out) + return -EINVAL; + ctx = bpf_ctx_init(kattr, sizeof(struct xdp_md)); + if (IS_ERR(ctx)) + return PTR_ERR(ctx); + + if (ctx) { + /* There can't be user provided data before the meta data */ + if (ctx->data_meta || ctx->data_end != size || + ctx->data > ctx->data_end || + unlikely(xdp_metalen_invalid(ctx->data))) + goto free_ctx; + /* Meta data is allocated from the headroom */ + headroom -= ctx->data; + } /* XDP have extra tailroom as (most) drivers use full page */ max_data_sz = 4096 - headroom - tailroom; diff --cc net/ipv4/tcp_ipv4.c index e9321dd39cdb,a692626c19e4..84db1c9ee92a --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@@ -2964,7 -2964,8 +2964,7 @@@ static int __net_init tcp_sk_init(struc net->ipv4.sysctl_tcp_comp_sack_slack_ns = 100 * NSEC_PER_USEC; net->ipv4.sysctl_tcp_comp_sack_nr = 44; net->ipv4.sysctl_tcp_fastopen = TFO_CLIENT_ENABLE; - net->ipv4.sysctl_tcp_fastopen_blackhole_timeout = 60 * 60; - spin_lock_init(&net->ipv4.tcp_fastopen_ctx_lock); + net->ipv4.sysctl_tcp_fastopen_blackhole_timeout = 0; atomic_set(&net->ipv4.tfo_active_disable_times, 0); /* Reno is always built in */