Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp731057imm; Fri, 5 Oct 2018 10:46:30 -0700 (PDT) X-Google-Smtp-Source: ACcGV61WvryeqvgwlArF32uKjd+UQ8NSNqZOMQVA1FkSJXhO/NKOl1GGerJ7jVqsTxLfaCiMEIbP X-Received: by 2002:a62:475c:: with SMTP id u89-v6mr1069805pfa.212.1538761590172; Fri, 05 Oct 2018 10:46:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538761590; cv=none; d=google.com; s=arc-20160816; b=EDPuFCcnclMMl9CxGh3A+uqjYCIZIUFnnjGe5WzPDAJOX+FKp19BB6gxmBjfF7GtMz JEgL/KJq4kCFkOOQijqMgHNeCAsK9J8P1uijNQtuvruugO9VQNBPqEySrdhNbPkRSX0K y8wrrZvPShJta7gUfJSm+GXOtjyHX71pDKBKMPJxfPn9czTA6YFkeC/cDyQk9zUUkGFI t2LYIq/0onZEtdWuKmFmTg3uKWK1/3vJK81noZ91/XBvYN27XwzamdMw0me4TJZ0XE92 NpKAcDd+IGpn9qqsKdqtweh7mEXu+2Nr2GsKra9lkUumzAF/Ofz74CDHzyIVd0zepErJ o3Jw== 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 :in-reply-to:references:mime-version:dkim-signature; bh=oK6F8GLqUWMhKTvAH8/uCovf582z9W1dynIk7RhGdMo=; b=rUX9l7uy6hjnizOy4iJ3GmuN8/GvlkRBrVnwXQ9Udia/oD8e8B0zQITrrzfVIrshiH 47T2CGys7hqiL7fDV2lASQAP03THtRYUSDCU8BZzq0EwpsLncSMF63ewPz+smuqSFX56 N0qRfTavndyh8GAWRUpVGBVaaAnOVoGxH6KrvQQfWX94UC/zvCfO1zwnYHlFXFBEZjnk cVXItMZJfq3OKC/sIziIjzwhgEz9dj0iWxd1pQuAjKdPHQtrtCJli2t/4A/zWa+0wZap 2R4PVwzXAJwlJPr7SxGoSNRWv2soScEI9IXkZJzpqANvSgPZ9MGBGjS86gxQsO3sfvaK B/lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=poOBzOY8; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p7-v6si8930482plo.159.2018.10.05.10.46.14; Fri, 05 Oct 2018 10:46:30 -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=@kernel.org header.s=default header.b=poOBzOY8; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729173AbeJFAoG (ORCPT + 99 others); Fri, 5 Oct 2018 20:44:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:54122 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727941AbeJFAoG (ORCPT ); Fri, 5 Oct 2018 20:44:06 -0400 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 64673214AB for ; Fri, 5 Oct 2018 17:44:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1538761460; bh=O9q3VnBXuU3U2B2KsI93KQt4N0OimsBG8KXQ5BMVg/M=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=poOBzOY8+7zG9Bi3bRYKw8J+IBJeOv5yaPvl/QkFFe1t4QfSEVgBiKIk381j6Wclh LUE/4iWIaIfErmp8knn7T7hMyDlKERt4juMLdUWdA/k+ShycbQ0b80p+Gzb5XFy8fi 065jVb/L5nGtU/ValqOuwCwJ9unuFBZn8XGQxc84= Received: by mail-wm1-f46.google.com with SMTP id 193-v6so2658737wme.3 for ; Fri, 05 Oct 2018 10:44:20 -0700 (PDT) X-Gm-Message-State: ABuFfohoJo/Y5UCWhoqm8tMwKXuf3aYDoRoJ5EKrxkAO7/n6F6iUE0hQ WFuZZLlK1kdyMTGYKL4CZy7zw3v/inzTyAWrRTfgRw== X-Received: by 2002:a1c:9355:: with SMTP id v82-v6mr8430319wmd.128.1538761458721; Fri, 05 Oct 2018 10:44:18 -0700 (PDT) MIME-Version: 1.0 References: <20181005081333.15018-1-ard.biesheuvel@linaro.org> <20181005081333.15018-2-ard.biesheuvel@linaro.org> <20181005141433.GS19272@hirez.programming.kicks-ass.net> <9E0E08C8-0DFC-4E50-A4FA-73208835EF9E@amacapital.net> In-Reply-To: From: Andy Lutomirski Date: Fri, 5 Oct 2018 10:44:07 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 1/9] kernel: add support for patchable function pointers To: "Jason A. Donenfeld" Cc: Andrew Lutomirski , Ard Biesheuvel , Peter Zijlstra , LKML , Eric Biggers , Samuel Neves , 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 KH , Andrew Morton , Richard Weinberger , Linux Crypto Mailing List , 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 Fri, Oct 5, 2018 at 10:38 AM Jason A. Donenfeld wrote: > > On Fri, Oct 5, 2018 at 7:29 PM Andy Lutomirski wrote: > > (None of this is to say that I disagree with Jason, though -- I'm not > > entirely convinced that this makes sense for Zinc. But maybe it can > > be done in a way that makes everyone happy.) > > Zinc indeed will continue to push in the simpler and more minimal > direction. Down the line I'm open to trying and benching a few > different ways of going about it with dynamic patching -- something > that will be pretty easy to experiment with given the lean structure > of Zinc -- but for the initial merge I intend to do it the way it is, > which is super fast and pretty straightforward to follow. > I *think* the only change to Zinc per se would be that the calls like chacha20_simd() would be static calls or patchable functions or whatever we want to call them. And there could be a debugfs to override the default selection. Ard, I don't think that sticking this in udev rules makes sense. The kernel has bascially complete information as to what the right choice is, and that will change over time as the implementation gets tuned, and the udev rules will never get updated in sync.