Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1462291pxa; Thu, 13 Aug 2020 09:01:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqVbgTLYS+wK42ZXIl7Z9KBrZ0hbpevFnhZIrChtFSdHVsHusoswPZwpOMZUen16aaBsb4 X-Received: by 2002:a17:906:a8f:: with SMTP id y15mr5370993ejf.140.1597334470375; Thu, 13 Aug 2020 09:01:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597334470; cv=none; d=google.com; s=arc-20160816; b=d6jxzdcqr5Q6gkTw8/AuezXX2Tp+TSU9uYbFsO2pdZBqqBZppcMNNmdoqD7GYi7eFS obAAoJ9B567anyVSplpVVWwYFu9az4s+KpfTcCJHYFRh7tIeM2wT9+QbcXW2oNAiknID xAdjAocuEfbF7BTeQPMoTJSzvwiWNInuO+eeuiXuoaWgK6GnTYkCPNli98nCUcTzasMk RDiMF0z7TspBQx/xw0HpjH5fUSTm5zqsFYpt6eHWA3EpmXhYNPfupcwHcZAbViweXt4I Y1KCOMnRACVn7UdIlmzrHJoUMga1NAqZhzlpStLVArFzE3jbtcTK4LxtCnPUKAjwBQMV uy6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Uz/cNk20B4Pdm+eJU2YEuMj3D+DxHPGJTVcvZP/a3A0=; b=I/AAWll9PVd47gdMDq2CKAgXzsDTIh5YM9ZiN1bPL4OlOUEbNHlWpLMMEbvXPQboL9 UqHw27elZCsxohjScxOdAH1kK3taUVmqyMSuL0/S8B10MNGZPre7dW4xcWVWn8YOvJJT 4ORQ4nJXf4PIEFPZJfQjYp/QMugrpNGnLqtNLyVBnKRZQd/fPsyMF+FYT1udJJdH6kUp /OmidLlzG3ifjGdkCpF6AGuxcGMQbb77D6WhsBGtCJh+TiZSR9aQXaBU3md3I1FYiIkA DlCkHB34klbTpKKdGtthNyeRlIVuiVQC/5ZbulB8lj25YD1SZTu3A0HM4vn4xLi9U35R 01tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=oufo0qJR; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x22si3601169ejw.73.2020.08.13.09.00.44; Thu, 13 Aug 2020 09:01:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=oufo0qJR; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726252AbgHMQAm (ORCPT + 99 others); Thu, 13 Aug 2020 12:00:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726249AbgHMQAk (ORCPT ); Thu, 13 Aug 2020 12:00:40 -0400 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10263C061757 for ; Thu, 13 Aug 2020 09:00:40 -0700 (PDT) Received: by mail-il1-x144.google.com with SMTP id z3so5983519ilh.3 for ; Thu, 13 Aug 2020 09:00:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Uz/cNk20B4Pdm+eJU2YEuMj3D+DxHPGJTVcvZP/a3A0=; b=oufo0qJRy+zUdMu2RRLiOPpc+oFdYwxzBrxeA2RO2v1Hq7EVwY6GcUUTumYFYOhqAV JNn95j8Txy9qR+TEnohzUY2uHBV6oTcN61e7BKaxzkaH6r5hlvjMPJ8a48njOqRKHaGy ou68AOWO0apfRAB/FYnW71DOUKQ0q3f/yk5zdKStoapzf/kUzt3vg8yl7y54/ZzOv7o3 M+BfEwgPqY02DSqhHSKw8fJs44VsrEPS4pEUBqHXFmREi/NaSIdnxasTiihH4Hytqy+J +++PAcQFaerNbF+Sml9B3CvPGZHU4IVkDQKHCj04ZQYBVXQtHoQDlIKecwvn672PBMlr GV7Q== 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:content-transfer-encoding; bh=Uz/cNk20B4Pdm+eJU2YEuMj3D+DxHPGJTVcvZP/a3A0=; b=mNyIs49yL7EC/QKaaS7NNJ+2VK9p2j3TZCLtbJL7kYvZYUOQudLx8S3ldWMwuFF7hk DifIFtfm4VNUady51NXNqLyBcLo46YzYyvSwtW1OiAqudL5wqp+Iia8OP/n6HtnAoqkZ SAnIZSXlfR1ADSlrpNe2d24olk8yQztk3BnXT0nV0VHWHq8OVOCjWpzpRmwfpMVCva+K wlufq8l1cqieeKcZSal58hc4qoIqxbrxgddxFOHtoGjf3O0wGeSh9/zO4D5a8AbWN3Z2 3nRqi/kdOy8tCMWuotkVyq2XWt3NAX2lxT2SUm71/BbqA/AND9aFoPKJYoHMvtQvGkwd HIXQ== X-Gm-Message-State: AOAM532Z5e3G73iw9fgkY8P3lITnwnrzCmBKE6AXQyqHNSm6iFustU9p azcmJWveB2kUyzomxAiqKW2jcGYWlRUmLcoXkzbqvw== X-Received: by 2002:a92:da0a:: with SMTP id z10mr5241022ilm.275.1597334439072; Thu, 13 Aug 2020 09:00:39 -0700 (PDT) MIME-Version: 1.0 References: <20200713172511.GB722906@gmail.com> <20200731072654.GA17312@gondor.apana.org.au> In-Reply-To: <20200731072654.GA17312@gondor.apana.org.au> From: Elena Petrova Date: Thu, 13 Aug 2020 17:00:27 +0100 Message-ID: Subject: Re: [PATCH 1/1] crypto: af_alg - add extra parameters for DRBG interface To: Herbert Xu Cc: Eric Biggers , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , Ard Biesheuvel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hi Herbert, On Fri, 31 Jul 2020 at 08:27, Herbert Xu wrot= e: > > How about you fork the code in rng_accept_parent so that you have > a separate proto_ops for the test path that is used only if > setentropy has been called? That way all of this code could > magically go away if the CONFIG option wasn't set. I tried doing `ask->type->ops =3D &algif_rng_test_ops;` in accept_parent, to which the compiler complained "error: assignment of member =E2=80=98ops=E2=80=99 in read-only object". So I'm setting `.ops` ac= cordingly at compile-time instead, together with `.setentropy`, in v5.