lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 24 May 2020 11:22:14 -0600
From:   David Ahern <dsahern@...il.com>
To:     Lorenzo Bianconi <lorenzo@...nel.org>, bpf@...r.kernel.org,
        netdev@...r.kernel.org
Cc:     ast@...nel.org, davem@...emloft.net, brouer@...hat.com,
        daniel@...earbox.net, lorenzo.bianconi@...hat.com,
        dsahern@...nel.org
Subject: Re: [RFC bpf-next 1/2] bpf: cpumap: add the possibility to attach a
 eBPF program to cpumap

On 5/22/20 10:11 AM, Lorenzo Bianconi wrote:
> @@ -307,8 +354,23 @@ static int cpu_map_kthread_run(void *data)
>  	return 0;
>  }
>  
> -static struct bpf_cpu_map_entry *__cpu_map_entry_alloc(u32 qsize, u32 cpu,
> -						       int map_id)
> +static int __cpu_map_load_bpf_program(struct bpf_cpu_map_entry *rcpu,
> +				      u32 prog_id)
> +{
> +	struct bpf_prog *prog;
> +
> +	/* TODO attach type */
> +	prog = bpf_prog_by_id(prog_id);
> +	if (IS_ERR(prog) || prog->type != BPF_PROG_TYPE_XDP)
> +		return -EINVAL;

Add check that expected_attach_type is NOT set since it uses existing
xdp programs which should not have it set.

Powered by blists - more mailing lists