Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp814116imm; Fri, 5 Oct 2018 12:14:06 -0700 (PDT) X-Google-Smtp-Source: ACcGV61ZNuqa6vIdlfBUI4zDwDSHDoxg5dAPvCacy3UYsV2uSYu0H2iJtQAnLZGcXP2FHI3327kQ X-Received: by 2002:a63:1919:: with SMTP id z25-v6mr6255353pgl.135.1538766846469; Fri, 05 Oct 2018 12:14:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538766846; cv=none; d=google.com; s=arc-20160816; b=Kxv5L9ejnSzpAwGuXmM/hY8UJmrTRf+rkjTRreSEicZ6v6F9JSrCVwtmU0BKZCebjC ywRNiVpvcGF+/Rq29kbkG5SEG+IZ5nLqfCSNa285e4zpUtcCiOuUAuRtvPf6F5KAlW0f W4Xk8EmXWiO5vgHJ/GHvjl+wbVBpZFxA2lYYWw2txJx8bTWxy8C2CcM0NJ/qi1s9ceA1 9n6fnexEheK9beZxg6UFDOWNka3waNUWf4zYhjjIrw5S2uNcEhq+Wk6pIqxN8sa5R2lp zEL9NwaMew5n3hwT848WAROzfTwvtU/AwOledbAe/oep9ELFds6fujkoE4Du7zY6mNb6 JgBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=sdpbSWqVxxATFOTM+th+JlVkcdQW8j/qVBFdj3PvebQ=; b=rYpdD/Fy1S2lL2kpW7OgpFmwcY8B/d6as+Ls9J4zUo6TZN5xRn6qxw0+DAh3CCWQyb Pzkd2m/FceMWgKnI+QgtgvDYMEys3Poh6YYegr0uJV5UQI5SCT2qnuHo/ep/RYUr4f70 lDjNNsIlaIBTkGy/PNYlbsZs9/l9gRyBE0lrfyBqDU9ghWRBhipC32cQiQDxQam27IEk ZylFXfhRVgCtLD9i6nhHEc32kqkOqYVL0GUNYrpXxSNndHCYLtFrzrYe2wUOE3DjlXU1 mNEbeAJxFWZz/6/B9yIOxlpjZkLo3wFyJ15xLu+IfrC8H+mu9rxaJ3h0Kb7ujos2q1z4 aikQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A5ZwVVCg; 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 n74-v6si9815151pfj.30.2018.10.05.12.13.50; Fri, 05 Oct 2018 12:14:06 -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=A5ZwVVCg; 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 S1728698AbeJFCNS (ORCPT + 99 others); Fri, 5 Oct 2018 22:13:18 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:36270 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728170AbeJFCNS (ORCPT ); Fri, 5 Oct 2018 22:13:18 -0400 Received: by mail-wr1-f65.google.com with SMTP id y16so14602069wrw.3 for ; Fri, 05 Oct 2018 12:13:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=sdpbSWqVxxATFOTM+th+JlVkcdQW8j/qVBFdj3PvebQ=; b=A5ZwVVCgW5kIJ5Pqo/lVRjpSvXxTqQENFwQsGhsWyEMHYcm6w1jHw8h2WhxTPQGU+0 gFQ+BPxZCvrxsquHrqlpi2lHxcCWWTz6J2mJ2dtFCp8Ta9YMkw+V2JJBPIXG0elFuMx+ /RWpmU4AMbh2GYfR26Lv9ZSJB368ycgNHiZN0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=sdpbSWqVxxATFOTM+th+JlVkcdQW8j/qVBFdj3PvebQ=; b=uRvb/tPMiFGrhjq0aDe/OMl0g/lbXxF727y1NhdeZqEuEw7Ea3P0dK7xOXgy9yynL9 3IWVm1GOCh5fGDbglMq7JQa1kWhCRWBuk/bjUXnJiWZOj1CYBju8YJ9OZaWO2IrcICvf ZeucqxI7DVnGqzOvu3O9/18WKj2qCMQOCUATCjrzg4E3oHQ3O96F4DZL4lmbrNzElryK HFcMlU8xCDNEGVmpVw0EkmyniGcKyYrYjvXasrAh33wkqc55Imh1MEQh0vQYdGQTHQKR y26GVeJ0IRSP3aN8kH7yI37ibMKa7rjyYgjKiOdRCUNa0dbV/qTJuv3t4DxL4wgJh1tq g53g== X-Gm-Message-State: ABuFfoh3CRKMHkll9ZiJS6uoMTB4AbgvavHXVxCMOQGPhQs26aFiPsJh T/uRByfdfhuE7OEQPH3xFFjVZg== X-Received: by 2002:adf:b743:: with SMTP id n3-v6mr9445850wre.274.1538766791049; Fri, 05 Oct 2018 12:13:11 -0700 (PDT) Received: from [100.89.214.43] (26.202.154.77.rev.sfr.net. [77.154.202.26]) by smtp.gmail.com with ESMTPSA id h63-v6sm2732947wmf.31.2018.10.05.12.13.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Oct 2018 12:13:10 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: [RFC PATCH 1/9] kernel: add support for patchable function pointers From: Ard Biesheuvel X-Mailer: iPhone Mail (16A366) In-Reply-To: Date: Fri, 5 Oct 2018 21:13:08 +0200 Cc: Andrew Lutomirski , Peter Zijlstra , LKML , Eric Biggers , Samuel Neves , Arnd Bergmann , Herbert Xu , David Miller , Catalin Marinas , Will Deacon , benh@kernel.crashing.org, paulus@samba.org, Michael Ellerman , Thomas Gleixner , mingo@redhat.com, Kees Cook , "Martin K. Petersen" , Greg Kroah-Hartman , Andrew Morton , richard@nod.at, Linux Crypto Mailing List , linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Content-Transfer-Encoding: quoted-printable Message-Id: 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> To: "Jason A. Donenfeld" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On 5 Oct 2018, at 20:28, Jason A. Donenfeld wrote: >=20 > Hey Andy, >=20 >> On Fri, Oct 5, 2018 at 7:44 PM Andy Lutomirski wrote: >> 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. >=20 > Yea, right, exactly. It turns out this is really easy to do with the > way it's structured now. I'd actually experimented considerably with > using the static keys a while back, but couldn't find any performance > difference on any platform at all (four ARM microarchitectures, three > MIPS, various random intel, an old powerpc), so went with the simplest > solution. But we can certainly play with more elaborate patching > mechanisms later on and see how those turn out. Also, even with the > simple bools as we have now, it's quite easy to make all the > parameters toggle-able. >=20 >> 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. >=20 > Yes, I agree with this. >=20 >=20 I am not referring to udev rules. I just mean the current way that udev auto= loads modules based on CPU features.=