From: Ard Biesheuvel Subject: Re: [RFC PATCH 1/9] kernel: add support for patchable function pointers Date: Fri, 5 Oct 2018 21:13:08 +0200 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> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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-ar To: "Jason A. Donenfeld" Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-crypto.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.=