Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp700484imm; Fri, 5 Oct 2018 10:15:40 -0700 (PDT) X-Google-Smtp-Source: ACcGV60OKQmJnBEhy9fe20eM7OgpJS6h4vZC5sv+RjA/L6tECKsXdeNWvW3yVM+fhg64S4Z9REzm X-Received: by 2002:a63:f202:: with SMTP id v2-v6mr10736716pgh.371.1538759740489; Fri, 05 Oct 2018 10:15:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538759740; cv=none; d=google.com; s=arc-20160816; b=rkTTAJChh6nfJb29prqsIAMSL4ozb1C1vK7Ar+RF2z7NvNYVl6GGy8Te42Y0DSKdBy FNYZ7m6Lo7K/TSCjiUIHzmVXUA75fiUOFtTfqCx38qZf8ncpDuyrx/SAFVXK0YQPmuGc n6YgiCjPyRLeBlJZ+Kl3Eo9IT/BdgWvm1ziuwkZsZWZVGLOr8NPm2huSua2IReoKEE2o tWPtwu6Fa4f6+MhEa6HqmPE8pUwZemojpOGCGZCYKlN9SRdu/TpKejE0QpELeG3x47QY rmLly8c62xv7mIzgkBG2Km+qrFdIXwZ1VXpurh78ysGMGN5YHbLOFwC5WZ8UIe3A2Y6Y Dj3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=dU9e3rgpB1fsPGYP9fVdia6W/fR8iyw7Oa8Se3v/bRk=; b=TqtdqB15KHBlxevlRoclNbcmDj/XEsCkjxEYTFicNRGZRBwffX6F7QqplyrDR/QXqw vEdgKwdfxfzCwJ49ds0Co1sqgDq+7KdBfSN8cSKFqI/Jz1spmQapRXuqIQaakoLUuwnp WuBI1YL8XgCexpiGdw4NV3cjkfCfle2+VGwZJWHfKidyV/lobqEKo2NQPRn2a8icJMGe ns64d4PEwWEyyyFO5JbgjGVAIcD6ydES+VFk84prz5+pP+no8w6fkjKv2l2eDFTPPspu YXUx1c/zrsL13fkEHuV4pkluuD408Vhq6QZ6rModM/flXlWqRl/IdptnR6g7n59NJCF5 yhlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FJRiL9S3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d23-v6si8913407plr.127.2018.10.05.10.15.24; Fri, 05 Oct 2018 10:15:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FJRiL9S3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728446AbeJFAOx (ORCPT + 99 others); Fri, 5 Oct 2018 20:14:53 -0400 Received: from mail-it1-f196.google.com ([209.85.166.196]:50480 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727572AbeJFAOw (ORCPT ); Fri, 5 Oct 2018 20:14:52 -0400 Received: by mail-it1-f196.google.com with SMTP id j81-v6so3574203ite.0 for ; Fri, 05 Oct 2018 10:15:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dU9e3rgpB1fsPGYP9fVdia6W/fR8iyw7Oa8Se3v/bRk=; b=FJRiL9S33QUtPnZ8LhpgH2DVhAXeRMRjeCmklufK77gqT1oh6Tb68pkyIrBX1JQTGx uiIpvb6qKPtxauC72/riYpuaKups5i/cygnQlKf5YLNFleXx/5CTdS61NtVQsSwbXEyj hXzyFXDnclJWjhVpY6/tN2hBtOudWCr1sXKKU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dU9e3rgpB1fsPGYP9fVdia6W/fR8iyw7Oa8Se3v/bRk=; b=SSNSOwE27rf8ean+yPK2Lvuov3t/sFwgnVUQ/vVfwdquvxSnLzJqA6XqB86bE7t/Dr AEq5jbq1WDVBoJAlyWntg0/hcdCz3/VOZP9BwwkUm2HNMmhzxkE8hLGScgYYk7eLscyt 5hYNGJYSL/NooxS0dBz6QJ4WfD88cslhfR3JYS8lDRAVvIV6omcx9d3wJfMplJuylVUo y4rLWlK4iAWlGtoYLrlkJEnQdRNmsdY3HWCGsAyQIi3YdoTcvtbg5Fkld0CMAUeMxKkA TotgXDtEXMCoNv3d6I+DO0QVihwRwc5nDw09IcwwNrHR/GZtIgSo1J4TE5ng47k4aPfX icvg== X-Gm-Message-State: ABuFfoiB9sXIvTDzO/mE2tJ3bddcfkNrjy9n+KcnajQV1xFg3OA7R0X0 b0h+ON0m8uFSSxbXnULuOH6SC70GCEz0o+m4kO7kIw== X-Received: by 2002:a02:5147:: with SMTP id s68-v6mr9292226jaa.62.1538759713791; Fri, 05 Oct 2018 10:15:13 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:5910:0:0:0:0:0 with HTTP; Fri, 5 Oct 2018 10:15:13 -0700 (PDT) In-Reply-To: <20181005133705.GA4588@zx2c4.com> References: <20181005081333.15018-1-ard.biesheuvel@linaro.org> <20181005133705.GA4588@zx2c4.com> From: Ard Biesheuvel Date: Fri, 5 Oct 2018 19:15:13 +0200 Message-ID: Subject: Re: [RFC PATCH 0/9] patchable function pointers for pluggable crypto routines To: "Jason A. Donenfeld" Cc: Linux Kernel Mailing List , Eric Biggers , Samuel Neves , Andy Lutomirski , Arnd Bergmann , Herbert Xu , "David S. Miller" , Catalin Marinas , Will Deacon , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Thomas Gleixner , Ingo Molnar , Kees Cook , "Martin K. Petersen" , Greg Kroah-Hartman , Andrew Morton , Richard Weinberger , Peter Zijlstra , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , linux-arm-kernel , linuxppc-dev Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5 October 2018 at 15:37, Jason A. Donenfeld wrote: ... > Therefore, I think this patch goes in exactly the wrong direction. I > mean, if you want to introduce dynamic patching as a means for making > the crypto API's dynamic dispatch stuff not as slow in a post-spectre > world, sure, go for it; that may very well be a good idea. But > presenting it as an alternative to Zinc very widely misses the point and > serves to prolong a series of bad design choices, which are now able to > be rectified by putting energy into Zinc instead. > This series has nothing to do with dynamic dispatch: the call sites call crypto functions using ordinary function calls (although my example uses CRC-T10DIF), and these calls are redirected via what is essentially a PLT entry, so that we can supsersede those routines at runtime.