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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 16 Apr 2015 10:48:39 -0700
From:	Alexei Starovoitov <ast@...mgrid.com>
To:	Daniel Borkmann <daniel@...earbox.net>, stephen@...workplumber.org
CC:	hannes@...essinduktion.org, netdev@...r.kernel.org
Subject: Re: [PATCH iproute2 -next] tc: built-in eBPF exec proxy

On 4/15/15 7:52 AM, Daniel Borkmann wrote:
>
> File descriptors, based on their id, are being fetched from the same
> unix domain socket as demonstrated in the bpf_agent, the shell spawned
> via execvpe(2) and the map fds passed over the environment, and thus
> are made available to applications in the fashion of std{in,out,err}
> for read/write access, for example in case of iproute2's examples/bpf/:

Amazing that it worked.
Acked-by: Alexei Starovoitov <ast@...mgrid.com>

> +static void bpf_map_set_env(int *tfd)
> +{
> +	char key[64], *val;
> +	int i;
> +	for (i = 0; i < BPF_MAP_ID_MAX; i++) {
> +		memset(key, 0, sizeof(key));
> +		snprintf(key, sizeof(key), "BPF_MAP%d", i);
>
> +		val = secure_getenv(key);
> +		assert(val != NULL);

everything looks good. My only nit is that the name of the function
reads as this function is setting env vars, whereas it's actually
reading them. I guess in your mind it fits with the rest of
'bpf_map_set_*' functions, but the name is still confusing.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ