Date: Sun, 4 Aug 2013 15:30:36 -0700 From: Adrian Chadd <adrian@freebsd.org> To: Mindaugas Rasiukevicius <rmind@netbsd.org> Cc: tech-net@netbsd.org, guy@alum.mit.edu, Rui Paulo <rpaulo@felyko.com>, freebsd-net@freebsd.org Subject: Re: BPF_MISC+BPF_COP and BPF_COPX Message-ID: <CAJ-VmokkbWCWmYng1QCpKOrfDuOC=0J1mjRX-kNDQj2%2BYO1rjA@mail.gmail.com> In-Reply-To: <20130804195538.C87A614A135@mail.netbsd.org> References: <20130804191310.2FFBB14A152@mail.netbsd.org> <9813E50B-C557-4FE1-BADF-A2CFFCBB8BD7@felyko.com> <20130804195538.C87A614A135@mail.netbsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
I think it's slightly unfair to propose a new extension for BPF without any in-tree users. Is this going to be some external commercial coprocessor? -adrian On 4 August 2013 12:55, Mindaugas Rasiukevicius <rmind@netbsd.org> wrote: > Rui Paulo <rpaulo@felyko.com> wrote: >> > >> > Comments? >> >> >> Why do you need this in the first place? > > It provides us a capability to offload more complex packet processing. > My primary user would be NPF in NetBSD, e.g. one of the operations is to > lookup an IP address in a table/ipset. > >> Are you sure this is a safe design? Adding this functionality to BPF >> makes me a little nervous as an error in the implementation leads to >> kernel code execution (I could be able to call random kernel functions). > > This is functionality is for a custom use of BPF. There would be no > coprocessor by default and the instruction would essentially be a NOP. > Perhaps I was not clear on bpf_set_cop(9) - it is a kernel routine, so > the user would be a kernel subsystem which has a full control over the > functions it provides. The functions are predetermined, not random. > > -- > Mindaugas > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmokkbWCWmYng1QCpKOrfDuOC=0J1mjRX-kNDQj2%2BYO1rjA>