From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Lutomirski Subject: Re: [RFC PATCH 1/9] kernel: add support for patchable function pointers Date: Fri, 5 Oct 2018 10:44:07 -0700 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 Content-Type: text/plain; charset="UTF-8" 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 < To: "Jason A. Donenfeld" Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-crypto.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.