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] [day] [month] [year] [list]
Date:	Mon, 2 Mar 2015 19:15:56 -0800
From:	Alexei Starovoitov <ast@...mgrid.com>
To:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc:	Daniel Borkmann <daniel@...earbox.net>,
	"David S. Miller" <davem@...emloft.net>,
	Network Development <netdev@...r.kernel.org>
Subject: Re: Re: [PATCH net-next] ebpf: move CONFIG_BPF_SYSCALL-only function declarations

On Mon, Mar 2, 2015 at 7:12 PM, Masami Hiramatsu
<masami.hiramatsu.pt@...achi.com> wrote:
> (2015/03/03 2:35), Alexei Starovoitov wrote:
>> On Mon, Mar 2, 2015 at 6:21 AM, Daniel Borkmann <daniel@...earbox.net> wrote:
>>> Masami noted that it would be better to hide the remaining CONFIG_BPF_SYSCALL-only
>>> function declarations within the BPF header ifdef, w/o else path dummy alternatives
>>> since these functions are not supposed to have a user outside of CONFIG_BPF_SYSCALL.
>>
>> So far we didn't have anyone trying to add new map types
>> outside of kernel/bpf/, so this patch is a defensive move.
>> Such potential future abuser will get compile error for
>> missing bpf_register_map_type() instead of linker error for the same.
>> Not sure that's really needed.
>> Also bpf_map_put() and bpf_map_get() are only used
>> by bpf syscall and verifier. imo moving them under ifdef is overkill.
>
> No, not overkill. This patch becomes good description about the code to
> reader who learns the eBPF. It tells them what functions are provided
> when the kconfig is set or not.
>
> And compiler error is better since abuser would get it before
> compiling all other object :)

Just as Daniel, I don't have strong preference one way or another.
Dave already applied it to net-next, so hopefully now you can
do some more eBPF coding :)
--
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