From owner-freebsd-arch@freebsd.org Thu Jan 11 07:54:28 2018 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0085DE7579D for ; Thu, 11 Jan 2018 07:54:28 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id D0F8B1E3 for ; Thu, 11 Jan 2018 07:54:27 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id CD514E7579C; Thu, 11 Jan 2018 07:54:27 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCFB4E7579B for ; Thu, 11 Jan 2018 07:54:27 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f180.google.com (mail-io0-f180.google.com [209.85.223.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D6151E1 for ; Thu, 11 Jan 2018 07:54:26 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f180.google.com with SMTP id w188so2304992iod.10 for ; Wed, 10 Jan 2018 23:54:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=CF6OZ5J/k7pYhpx792TcOz3uPAYJxYP7Pbzfr85zifo=; b=NFn3+DYtiOyQ8hqEY4IGiVWWBA8ct8hj9mka79cCJ4ZEVf1XmBBY883n0jC8oTk6VM NTX16HGu3XhcG6EJjaDJozLQVaK71ltOSIKNLOPaiMxaEXE6WXBhHZzdtJCmkIHC2z1Z fGFrTai6eufGdVg5rxq/2MoYG4zkvphIA78hxID5fUlcRarB+iyq4+XxLJTLGE+nCoAQ OTySWFFUTara3tBKI7eiytzYaag4HARrHTHihcHvkk3P5v1EiBOa9yK5QMXv8gtqroYC izuwkm+XICfjZcm6epmljM0okJK4C0Iy3QlchuFgbHKLlAcJs8/17eiwBZnJGy2uVYW3 CH8A== X-Gm-Message-State: AKwxytd3LLBusTge/qKpHtTmWsZyv7slw9IA+CmtJFX5OMNDGnwnRMIX 47/GbDPivcw+L0rQlXfVVCPl8cxO X-Google-Smtp-Source: ACJfBovbS72zqyrsLg9sakHud44SH/2JeTd87Zbui0ZqQDy4Q9NNdEeWmFGhjDRidVr6s8+kJJcRmA== X-Received: by 10.107.131.200 with SMTP id n69mr20888411ioi.76.1515657260415; Wed, 10 Jan 2018 23:54:20 -0800 (PST) Received: from mail-io0-f182.google.com (mail-io0-f182.google.com. [209.85.223.182]) by smtp.gmail.com with ESMTPSA id o138sm11356777ioo.21.2018.01.10.23.54.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jan 2018 23:54:20 -0800 (PST) Received: by mail-io0-f182.google.com with SMTP id t63so2330310iod.0 for ; Wed, 10 Jan 2018 23:54:20 -0800 (PST) X-Received: by 10.107.143.8 with SMTP id r8mr20290643iod.215.1515657259966; Wed, 10 Jan 2018 23:54:19 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.74.80 with HTTP; Wed, 10 Jan 2018 23:54:19 -0800 (PST) In-Reply-To: <51883.1515656784@critter.freebsd.dk> References: <3790717.UIxaijsHl3@ralph.baldwin.cx> <51883.1515656784@critter.freebsd.dk> From: Conrad Meyer Date: Wed, 10 Jan 2018 23:54:19 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Ranting about OCF / crypto(9) To: Poul-Henning Kamp Cc: "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jan 2018 07:54:28 -0000 On Wed, Jan 10, 2018 at 11:46 PM, Poul-Henning Kamp wrote: > -------- > In message <3790717.UIxaijsHl3@ralph.baldwin.cx>, John Baldwin writes: > >>- OCF is over flexible and overly broad. > > I would actually argue that it is neithe, quite the contrary. > > With the kernel-userland transition becoming more expensive, what > we need is a DSL where you can put entire processing steps into the > kernel, sort of like BPF but more general. > > Ideally, you should be able to push something like this into > the kernel and have it executed in a single syscall: > > h = hash:sha256() > b = file_buffer() > f = open("/tmp/foo", "r") > while f.read(b): > h.input(b) > return h.hex() > > BPF is the existence proof that stuff like this is both > feasible and profitable, now we just need to take it to > the next level. > > If we had a language like this, accept-filters whouldn't be > necessary. Sure, that's a great idea (well, aside from introducing a large attack surface that the Linux folks have repeatedly discovered with eBPF). But, embedding lua or something like lua in the kernel is completely tangential to the problem of providing a good generic interface for crypto hardware. Please don't hijack this thread with that discussion. Conrad