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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190423162855.4580667d@cakuba.netronome.com>
Date:   Tue, 23 Apr 2019 16:28:55 -0700
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Stanislav Fomichev <sdf@...gle.com>
Cc:     netdev@...r.kernel.org, bpf@...r.kernel.org, davem@...emloft.net,
        ast@...nel.org, daniel@...earbox.net, quentin.monnet@...ronome.com
Subject: Re: [PATCH bpf-next 1/2] bpf: support BPF_PROG_QUERY for
 BPF_FLOW_DISSECTOR attach_type

On Tue, 23 Apr 2019 16:21:59 -0700, Stanislav Fomichev wrote:
> +	rcu_read_lock();
> +	attached = rcu_dereference(net->flow_dissector_prog);
> +	if (attached) {
> +		cnt = 1;
> +		if (prog_ids &&
> +		    copy_to_user(prog_ids, &attached->aux->id, sizeof(u32))) {

Not sure you can do copy_to_user inside an RCU section, doesn't it
sleep?

> +			rcu_read_unlock();
> +			return -EFAULT;
> +		}
> +	}
> +	rcu_read_unlock();

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ