Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp78676ybn; Thu, 3 Oct 2019 01:45:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqyoZCIoYILA16qqQV4Cab2ZG0Ee4u1qJtCAAE4GlJPqfjBwcwVC8uLCrvdbC6YP6It34+Ch X-Received: by 2002:a50:eb03:: with SMTP id y3mr8428901edp.194.1570092344718; Thu, 03 Oct 2019 01:45:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570092344; cv=none; d=google.com; s=arc-20160816; b=nRZd5QawKiqjpDxSWTBr55dFmEa9fHyLhno4DCP99bZYNwKJWhVFIhJn/XBIlpsOiM 9Cf5q1Sh7tVbgSUcl0/jT4ljCip/PqiH4eqAfT/IEcC3P/VzFb19fv5J2Q3UNlIxGh26 YSiGgzGie6/tp0cSBUvtlekK8sx1CRG+U5WC1zQ9uV1WEOZaQurxmQd2n8xjJbD0gqwj mMrMMU0igizX/YrxVHjU0ALB95lqANfa3T1/MZLe6cV4JAoWhsPu7z1Y3i+ZWWGTh8Ha vW4srlH7wTlyCaNXAO7t0XThKN7q+snZ5PSVZp7ojNKVW2ntDIsj3kPiEEsRHrnAyq7M HQRg== 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=50RIEioku5CDiSfNzlxsHwpRubKKO5Rp34EruQU7kdU=; b=kgwPQ9xLd6zkAB0k8chjrmZJg3qySHCoQaASTKGwOGHVe72c4uK9sw615Z1hWCVVcj ULzrx0lAtCeSxQofqwSo0U50ikoG5EFVxzrduN34BMkaf/SpO8HoWBskJyNSLsAL8Q2R aRbjFywo2dFA0zVC5vnIMvhu92tAMrRLxSI4/qrSNXNbdyT+kIyX6FIirddX9D1UZX+6 t2erCeFu97+nvU6GvzEyh8ODP/P/jLUTbuv0MeoSjWy+NP6Xs3bmgmBvsek5Nd8gd583 GGqQTEcNJ4iiWKwI1k5QkuLNda51si+sz1qHCd2zGdVSTYuiI+IaCYU1KjHK9AAXZGc2 x9kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Qx9d9qv/"; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 v19si836208eja.352.2019.10.03.01.45.09; Thu, 03 Oct 2019 01:45:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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="Qx9d9qv/"; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 S1727912AbfJCInn (ORCPT + 99 others); Thu, 3 Oct 2019 04:43:43 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:45890 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729155AbfJCInn (ORCPT ); Thu, 3 Oct 2019 04:43:43 -0400 Received: by mail-qt1-f194.google.com with SMTP id c21so2417063qtj.12 for ; Thu, 03 Oct 2019 01:43:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=50RIEioku5CDiSfNzlxsHwpRubKKO5Rp34EruQU7kdU=; b=Qx9d9qv/WE3y5X+tlKjqpa0xc/JfvUvTM8z7HZkbCGisehBHJVsgq3YOT+8cevBjq0 4D0jjGroAASHzwscxa6o3LPdYXuA3i8BaBgg584D5/mYl1aS3Ors9aCoX73tku3X4UiB /XiU2I5k4pVafGIMN/OIvJYp2siiD6/DkgCQV2LHzi2V3pbe942Q4dmB5FPGh/J0QVR0 EYbqMpO064gBDpXcV5RN9t/BneNrIZf1U3cVgkURibQUHVzHb7bKBbYxS1D8SwbJ9SRQ +UW20SW2SxtvMxbNdUgXXGeb5xtcUhE7q9vzpEykA51W6UUDENQSnEJnLWoG02j5xzaq eEJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=50RIEioku5CDiSfNzlxsHwpRubKKO5Rp34EruQU7kdU=; b=otnfzKwY/3hnCsA0SQCsOBEAW3QjJ1XrvUHG/QsIdsx8Z1TEetHw8iNOuWLCo5U41E JLDOPTxKJFHo1xXHjUw41ePnReazjsTh8Z0+iOOdiIXGusYST/ObtI1+kCc8+YwrMsI2 KgLdxCcv9sLmBuHV2jmzkNrIw5/mlY5F5QmWzrJMboBreE1Z/3xDHmRAzBaNReUDRvUA /azXFCqCLIhJJeHkD+92ywnFxl8DYmmBQfYWJdck3l4uK1EXe/22YZiGBW+g/stYfeFn A789LFYm9JhiRudGLQqJzTKqoqi2T3gDsHV1yCQxCXpf53j5daPDoeIshU2MWQS3g2dK wTFg== X-Gm-Message-State: APjAAAW2rNZvNloxcAzaPzhKrwQdbHipNw3a8o5ma1boXBuOSNK/0iKD 3oUVXwV+1ik25sY28qAcDY+0G6W11eWwJnTQ9ll0OY3ZEvc= X-Received: by 2002:aed:2381:: with SMTP id j1mr8670886qtc.373.1570092222344; Thu, 03 Oct 2019 01:43:42 -0700 (PDT) MIME-Version: 1.0 References: <20191002141713.31189-1-ard.biesheuvel@linaro.org> In-Reply-To: <20191002141713.31189-1-ard.biesheuvel@linaro.org> From: Ard Biesheuvel Date: Thu, 3 Oct 2019 10:43:29 +0200 Message-ID: Subject: Re: [PATCH v2 00/20] crypto: crypto API library interfaces for WireGuard To: "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" Cc: Herbert Xu , David Miller , Greg KH , Linus Torvalds , "Jason A . Donenfeld" , Samuel Neves , Dan Carpenter , Arnd Bergmann , Eric Biggers , Andy Lutomirski , Will Deacon , Marc Zyngier , Catalin Marinas , Martin Willi , Peter Zijlstra , Josh Poimboeuf Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, 2 Oct 2019 at 16:17, Ard Biesheuvel wrote: > ... > > In the future, I would like to extend these interfaces to use static calls, > so that the accelerated implementations can be [un]plugged at runtime. For > the time being, we rely on weak aliases and conditional exports so that the > users of the library interfaces link directly to the accelerated versions, > but without the ability to unplug them. > As it turns out, we don't actually need static calls for this. Instead, we can simply permit weak symbol references to go unresolved between modules (as we already do in the kernel itself, due to the fact that ELF permits it), and have the accelerated code live in separate modules that may not be loadable on certain systems, or be blacklisted by the user.