From owner-freebsd-net@FreeBSD.ORG Sun Aug 4 22:30:38 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D6D4DE32 for ; Sun, 4 Aug 2013 22:30:38 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x22e.google.com (mail-wg0-x22e.google.com [IPv6:2a00:1450:400c:c00::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6D5232C3A for ; Sun, 4 Aug 2013 22:30:38 +0000 (UTC) Received: by mail-wg0-f46.google.com with SMTP id k13so1867925wgh.1 for ; Sun, 04 Aug 2013 15:30:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=EQzlBbkX9eJmnudVUSkuvkLlAHPipQTXeeP3Iy6vozg=; b=o6TuXBrCqWboo0SmruJnQWgMPObCBPKqMyvTs26936ApI9/+bgLGDG7EgYD4O8XKH0 KRM20LjM5VajTjXWpKxNwfQGVhCc1r+PVwATlAFh+3qwZjVqJJ36lI43iS437ZlkZla4 gOujvUB1KVgHJVkTjwZGuYvfzPXK5zh+Pf0UEvQVh4kjWr7e9F/HOx6TpORARY6RqkX9 nvI5ZSSgI63dPlGSbLTaOdjxwam2pM61TdHCO95p3O17q0ZgAV/1DBE4msczvBYCJVUM i3BsxzdHM5whhlhd/gYRugRiz8p5PgJbM+4otzlO5NhZ0wa8qbAdfaLQ+D4x/nXmm4hG /eUQ== MIME-Version: 1.0 X-Received: by 10.180.20.116 with SMTP id m20mr4760198wie.46.1375655436584; Sun, 04 Aug 2013 15:30:36 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.94.132 with HTTP; Sun, 4 Aug 2013 15:30:36 -0700 (PDT) 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> Date: Sun, 4 Aug 2013 15:30:36 -0700 X-Google-Sender-Auth: vcMAWwfZm2Np_FbRDKET2_vl4yQ Message-ID: Subject: Re: BPF_MISC+BPF_COP and BPF_COPX From: Adrian Chadd To: Mindaugas Rasiukevicius Content-Type: text/plain; charset=ISO-8859-1 Cc: tech-net@netbsd.org, guy@alum.mit.edu, Rui Paulo , freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Aug 2013 22:30:38 -0000 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 wrote: > Rui Paulo 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"