Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1819061rwb; Sat, 19 Nov 2022 04:16:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf7z0mqxct25l8oNY9tL2Offe/UsVBhxzMUKM7V9Pzd25huVMLfpNsR5IfM2+mWt1oWDlqdj X-Received: by 2002:a17:90a:d681:b0:213:d08f:a455 with SMTP id x1-20020a17090ad68100b00213d08fa455mr18432737pju.130.1668860168683; Sat, 19 Nov 2022 04:16:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668860168; cv=none; d=google.com; s=arc-20160816; b=hHi0e2SEW66atFz0CyPSLdRXGX7NN5vVGBoQ3NOrve+BbK1CqGyRaBaRGfBinLK9gf Z7UQ1kWJW0MrLdeZuPxun6Mbenp4I8FjaFdcAlMfUDL578nZk6zojeWDspt+HhOw2uX+ Jl7bOrwmocyuckIz6169QVTuLJwG7ZipzKYKo8HejGdaQrhS5nCFURqRTtdjoL5mqlah RLlk7EkgTdg86smM9Jd60njZTHCrUF8K9WJOhOxWyLmz4UUb46udubhiRHHawV31qKQv q3BEmJOb9d22TL0NdBhqF4JG9usl+H1Ms1T4BfzfsalaPBIg9AxwFyPNBTYNqHNCpaDi 2tBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0f5sHGnHFD8uGcnBWXObpXpEeLaxXL7BEoTo3VGLAUE=; b=t6H/mbAayhdSlfdiLbPFrS71uMMyX3QKS6iH2t9MTrXqPs0WCMxLLhOkzYbPU9EY8S uZfGNFDwZGEgu8pEVo5r2xxLVQGvv4xSmKBj+UYVth68ptEtrTAfkOThCyI0OF1giMWn cuU73kWCLHVhhiyLpivsdFUsfhiXH3FkTfPndUs5ki8W34DxuuiM7ousyo8Y1npFNg4r U8XePK0prNcuCZla8e2YTeujNGgCsP8+r18SIhZy3qUs38S0fs2PtJHqEpeQNN4l4nCh WdBYHAQmXZnV9KFU+K2lkcMyDxMH8FkIXjBYmxYbAxnpJpCmz1BQv/NfHxRCVKiqsVsp Q2cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=crmR5Npm; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j24-20020a63cf18000000b004624e24b4e9si6615402pgg.543.2022.11.19.04.15.55; Sat, 19 Nov 2022 04:16:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=crmR5Npm; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230244AbiKSMMS (ORCPT + 99 others); Sat, 19 Nov 2022 07:12:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229958AbiKSMMR (ORCPT ); Sat, 19 Nov 2022 07:12:17 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72EF5920A5; Sat, 19 Nov 2022 04:12:16 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 24F82B80AB4; Sat, 19 Nov 2022 12:12:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA0F9C433C1; Sat, 19 Nov 2022 12:12:12 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="crmR5Npm" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1668859931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0f5sHGnHFD8uGcnBWXObpXpEeLaxXL7BEoTo3VGLAUE=; b=crmR5NpmQqT0pvhxMeGyRgocdNXOUxNE2Scu9tjN8yIldG4xmW5uRm1wi2vgh+5ydtKY2j x+huCYS/5LESEm96q+Rd3kdZ5RdpPR7xlOQirLKhHeYsvbRXBs+JYc2XtDiuviAqCfijuU ZAUiR8cJz/HJfMWaAgNJn7QBxtpCLnU= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 3e4f51d0 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 19 Nov 2022 12:12:11 +0000 (UTC) Date: Sat, 19 Nov 2022 13:12:08 +0100 From: "Jason A. Donenfeld" To: Christophe Leroy Cc: "linux-kernel@vger.kernel.org" , "patches@lists.linux.dev" , "linux-crypto@vger.kernel.org" , "x86@kernel.org" , Thomas Gleixner , Greg Kroah-Hartman , Adhemerval Zanella Netto , Carlos O'Donell Subject: Re: [PATCH v4 2/3] random: introduce generic vDSO getrandom() implementation Message-ID: References: <20221118172839.2653829-1-Jason@zx2c4.com> <20221118172839.2653829-3-Jason@zx2c4.com> <2571f72a-3420-977f-7b08-8f6216bba6a8@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Sat, Nov 19, 2022 at 12:43:31PM +0100, Jason A. Donenfeld wrote: > On Sat, Nov 19, 2022 at 07:51:21AM +0000, Christophe Leroy wrote: > > > > > > Le 19/11/2022 à 01:04, Jason A. Donenfeld a écrit : > > > On Sat, Nov 19, 2022 at 12:55:02AM +0100, Jason A. Donenfeld wrote: > > >> Sorry if I'm a bit slow here to grok what's up. > > > > Maybe I should also have mentionned commit ce7d8056e38b ("powerpc/vdso: > > Prepare for switching VDSO to generic C implementation.") for you to > > have a complete picture. > > > > > > > > Okay, I think I see it now. That's a complicated patch for a simple idea > > > because gettime is more complicated than getrandom. I suspect what you > > > want is something like the below, correct? Seems easy enough. > > > > Yes it is exactly that, powerpc will then call __cvdso_getrandom_data() > > directly and pass rng_info pointer. > > Okay, I'll do that and send out a v+1. Alright, new series posted here, with those changes. Let me know if that is workable for you. Since a lot of the vDSO is tied up (currently) with timekeeping stuff, it's a bit tricky adding things to it like this. I've done the best I can to keep it clean and such, but if you want to play around with wiring up powerpc, that might prove to be an interesting exercise in shaking out inconsistencies. New series is here: https://lore.kernel.org/lkml/20221119120929.2963813-1-Jason@zx2c4.com/T Jason