Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp15528069rwb; Mon, 28 Nov 2022 12:43:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf6helFwPre/z3f4L4Buo0FRfH0j10GAOIzZMMo1VvE1w4C5j9aX/2eYS1U9W+1tNx+rc052 X-Received: by 2002:a17:907:9852:b0:7a8:a957:5b4e with SMTP id jj18-20020a170907985200b007a8a9575b4emr4874092ejc.305.1669668184144; Mon, 28 Nov 2022 12:43:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669668184; cv=none; d=google.com; s=arc-20160816; b=gM55Pl3IAyQfwRggDxcarr8obMIexGtvLYh+/YfiXBwZRAeWI0fuwGSuypcn/lpSzX qu5U4eemFxnbP2/zgGCUAWpLRpaTe6g0vRILvUr35ZFAPVUNMrj6se4qFul51zUmm6d0 R2jigKEoGCFE9XSOTvrpwwGPfFsAoTobh9OJPiTVGoCKz5Truvlr6AdaXbo3LkPUY6Z4 XYQ0urcjbk2DHyfvig4kw8o7wWrgMrrdgml8ZCF8PA0k6KSt/AFDfiMPNLATm7P1E5nW MTm5UjCyEfeA7XCj1dxIrSiaVMRwIWAfp1cY+sqR5Vwa3eOz7UiK0JZhHK8gs7T4WWcg aSvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=D8JvkqslPVbF1sVkadwrc/dHj4sGZrwzWhDSPyXC0iA=; b=yfL5cNOpQRL7hoYFlld9CBxCVmE0ulzPaFUtUl40XkaHSXq3Bj8Vguq0kFPvMDKqJ8 DFHAPVjsM3aw20qZhRM/T5Rwy/NXjtclJdMPcaWgxCUgd3AEIDydV08sblyJpXkesA4w xeGalx4dKRc7PRbEk9rPBYhDJbdG38dyrh73R3AoyZm9zrjKFaafvLPv8wtFNU7TX2m7 f07DLu45eRUIZzO3vDIGfu/ITr3QKPKvEeu+z0lvFmUIOifI4tg2jMim4f/qvXyYN7/n /rNQ2M2iIZ3WKAg3x8GMCWkEVCkHrrSprtOyBparQ/6XS/4CMcbdqYz8NLoeYc/3mY+P i49Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=SJg8wj4K; 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 ss28-20020a170907c01c00b007b2c221a505si7791643ejc.265.2022.11.28.12.42.34; Mon, 28 Nov 2022 12:43:04 -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=SJg8wj4K; 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 S233401AbiK1Ulv (ORCPT + 99 others); Mon, 28 Nov 2022 15:41:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233310AbiK1Ulu (ORCPT ); Mon, 28 Nov 2022 15:41:50 -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 34DBA614B; Mon, 28 Nov 2022 12:41:49 -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 DD679B80FEE; Mon, 28 Nov 2022 20:41:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 175C2C43141; Mon, 28 Nov 2022 20:41:46 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="SJg8wj4K" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1669668103; 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: in-reply-to:in-reply-to:references:references; bh=D8JvkqslPVbF1sVkadwrc/dHj4sGZrwzWhDSPyXC0iA=; b=SJg8wj4KRRLy9GYEMoYu0SdEW67lBhfEBgSjbS7Y5Ldh+fS6U2U9/FkdNSsNEOwiNHtkz+ sVISLnKzyPz/JOQ+9fHS8ReK3FKr3zPBD/cTq3WYi1UWFnMobHQe+BUx9qRz4Cv/NjcOul ZCjbDNFsDLsLQ7hio4Yg3cZ3atcl/4I= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id f03cb47a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 28 Nov 2022 20:41:42 +0000 (UTC) Received: by mail-ua1-f54.google.com with SMTP id x24so4315413uaf.4; Mon, 28 Nov 2022 12:41:42 -0800 (PST) X-Gm-Message-State: ANoB5pkUysLhsiBhfMXLfR92/8EKPj75epFR6fn8EymTLZrEJqx9sjFs 0QvNudn1Psf2JwSyBrPwc9mtopLX4SKGpTdjQtY= X-Received: by 2002:ab0:3899:0:b0:419:1b4a:360b with SMTP id z25-20020ab03899000000b004191b4a360bmr5012971uav.102.1669668101214; Mon, 28 Nov 2022 12:41:41 -0800 (PST) MIME-Version: 1.0 References: <20221128111829.2477505-1-Jason@zx2c4.com> <20221128111829.2477505-4-Jason@zx2c4.com> <8f9326ba-f879-4b9e-9e5d-b65cad7cd726@app.fastmail.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Mon, 28 Nov 2022 21:41:30 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v8 3/3] x86: vdso: Wire up getrandom() vDSO implementation To: Arnd Bergmann Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, Thomas Gleixner , linux-crypto@vger.kernel.org, linux-api@vger.kernel.org, x86@kernel.org, Greg Kroah-Hartman , Adhemerval Zanella Netto , "Carlos O'Donell" , Florian Weimer , Christian Brauner , Samuel Neves Content-Type: text/plain; charset="UTF-8" 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 Hey again, On Mon, Nov 28, 2022 at 9:02 PM Jason A. Donenfeld wrote: > > Hi Arnd, > > On Mon, Nov 28, 2022 at 8:57 PM Arnd Bergmann wrote: > > > > On Mon, Nov 28, 2022, at 20:23, Jason A. Donenfeld wrote: > > > On Mon, Nov 28, 2022 at 08:18:12PM +0100, Arnd Bergmann wrote: > > >> On Mon, Nov 28, 2022, at 12:18, Jason A. Donenfeld wrote: > > > > > > That's more or less how v7 was, but Thomas thought the x86 stuff should > > > be separate. So for v8, the organization is: > > > > > > 1) generic syscall > > > 2) generic vdso > > > 3) x86 wiring > > > > > > The primary advantage is that future archs wanting to add this now can > > > just look at commit (3) only, and make a similar commit for that new > > > arch. > > > > > > If you think a different organization outweighs that advantage, can you > > > spell out what division of patches you want, and I'll do that for v9? > > > Or maybe this v8 is okay? > > > > My interest is that at the end of the series, all architectures > > are hooked up with the same syscall number, which avoids confusion > > and merge conflicts when we add the next syscall to all tables. > > > > How about one patch to add all the syscall table entries, and then > > have the x86 specific change just turn on the Kconfig symbol that > > actually enables the syscall? > > Okay, I can split it that way. If I gather your meaning correctly: > > 1) generic syscall C code > 2) #define __NR_... in asm-generic/unistd.h x86/.../unistd.h, > x86/.../syscall_64.tbl > 3) generic vdso C code > 4) hook up x86 vdso, and select the right Kconfig symbol to start > compiling the code > > Is that what you have in mind? If so, I'll name (2) "arch: wire up > vgetrandom_alloc() syscall number". Well, I just did this, and it seems clean enough. The result is in: https://git.zx2c4.com/linux-rng/log/?h=vdso if you're curious to poke at it ahead of v9. Jason