Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1093668imw; Fri, 8 Jul 2022 18:54:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v7JIiZ+H0ANtIBCE8BVL2UM9J4YPSPz30KiEgMvdKX4xjIL99VPdEUe5C/geegwlyrbYqg X-Received: by 2002:a05:6402:51ca:b0:437:79a9:4dd with SMTP id r10-20020a05640251ca00b0043779a904ddmr8409028edd.319.1657331672343; Fri, 08 Jul 2022 18:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657331672; cv=none; d=google.com; s=arc-20160816; b=QTnOGotGzfRkz28paYN/vN1zKyFm8us9zCN67sXj5mZpJsxgdBRfCFSRILjk7LGzQJ 6ONzIl3SsE7XNc3lcRd4NzdDHoB0uKteFYSU9445HOPTL3L2kuF0CJSeVXf4SmQ8tBEN iOHXWCrTKEyrpTRZrFl63xyJZKT+kdgoO3DdKwR226tf44vGLc5l9yNO5/VYqwc0tWbP IL5Ln+gzklK73ETvzI5G6YgeOsgfnWtzCqBNUvsvDStLo1xLjoGPXgY39XUsdXI80iNd pkWIDRfXXaiijQNx/IeBIidUDnEQPg9EbSSLqHW32vbfxBf7L2yWj9pkpphYImbDXp4L Ssog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature:dkim-filter; bh=dPzbUbU2KTNW1KlzlD3Fu+Pwv5VzHijL+VHbQPZN/88=; b=WBIEB3VwQcFYB8cFOKeBrUi+KVGXUhrbgvmG2uA9EvR9xflhUeqSOcBL/SXDhYrdeI kuA0Hs++TLog1INr5JlDgFLhrDbl2DbgFaacDj4sAUu6ulGoNvQ2m2MOEcsRic/VLfZV mElhPdcjH2CCIQBzXmfJlBsrs7kMJOWKLhC3Ulwdl/+uEHIQF3Zr1H0g9n2k3aQFMwkV ymhCicYf/CgoFTnZOSklkNQYN+oRqORkkbhaN0diuSNQJ2Yl/+BrgKG5FdcwBHxV1H6E jltAAGvs9f9IaLVUnsexIkvbNU0scE8hsPOpCTJiZZCs/pHYRoPmoSsOfSZskF1vUOdv ZkbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2022070501 header.b=12p46JWh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw25-20020a1709066a1900b00722eb684a60si200174ejc.979.2022.07.08.18.54.06; Fri, 08 Jul 2022 18:54:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@zytor.com header.s=2022070501 header.b=12p46JWh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229522AbiGIBv4 (ORCPT + 99 others); Fri, 8 Jul 2022 21:51:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbiGIBvz (ORCPT ); Fri, 8 Jul 2022 21:51:55 -0400 Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7D3E71709 for ; Fri, 8 Jul 2022 18:51:54 -0700 (PDT) Received: from [IPV6:2601:646:8600:40c0:425:cd56:6750:e1bf] ([IPv6:2601:646:8600:40c0:425:cd56:6750:e1bf]) (authenticated bits=0) by mail.zytor.com (8.17.1/8.15.2) with ESMTPSA id 2691pLJW2002161 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Fri, 8 Jul 2022 18:51:22 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 2691pLJW2002161 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2022070501; t=1657331482; bh=dPzbUbU2KTNW1KlzlD3Fu+Pwv5VzHijL+VHbQPZN/88=; h=Date:Subject:To:References:From:In-Reply-To:From; b=12p46JWhFkklwYxQSRDhwe+rcEsnfPufbXLyzzSgLmeFoZoAXt3bm35A2816AKZEs EMf8k8qPAojkMPOBAVXHti92SxoGZULCMbeRNO44Qp10skQNUkPhPcY29nVuAmK4eG mtSNC3Lz6ZXOByLZ3dZA/gVkT9AoAddhwRar5W+2xZJ1tlEjgF2TQVEA0r52F2oK5X lSJ65K3bvYBm7pA+p4mpXDDfTe1iVHpCar5MY7uDn5f7Ez/qVQXOG4WIxQmgHiPWWE ThCO0Moc8Ln2KHX56YepHAepxj6uHcUApc0Qgx+Dx4MTNZq6z2qsOYSTh9UoRS7aLd 9SkKKEPIf5C0w== Message-ID: Date: Fri, 8 Jul 2022 18:51:16 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH tip v8] x86/setup: Use rng seeds from setup_data Content-Language: en-US To: "Jason A. Donenfeld" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , X86 ML , LKML , Andy Lutomirski References: <20220707000852.523788-1-Jason@zx2c4.com> <20220708113907.891319-1-Jason@zx2c4.com> From: "H. Peter Anvin" In-Reply-To: <20220708113907.891319-1-Jason@zx2c4.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org On 7/8/22 04:39, Jason A. Donenfeld wrote: > > diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h > index ca0796ac4403..2cbfe630230d 100644 > --- a/arch/x86/include/uapi/asm/bootparam.h > +++ b/arch/x86/include/uapi/asm/bootparam.h > @@ -12,6 +12,7 @@ > #define SETUP_JAILHOUSE 6 > #define SETUP_CC_BLOB 7 > #define SETUP_IMA 8 > +#define SETUP_RNG_SEED 9 > > #define SETUP_INDIRECT (1<<31) > Just one miss here: you need to bump SETUP_TYPE_MAX. It is a bit more confusing than it needs to be that SETUP_INDIRECT sits in between, and honestly I think SETUP_TYPE_MAX shouldn't include the SETUP_INDIRECT bit; however, this is uapi and so we can't change that per se. Perhaps we should do: #define SETUP_ENUM_MAX SETUP_RNG_SEED #define SETUP_INDIRECT (1<<31) #define SETUP_TYPE_MAX (SETUP_ENUM_MAX | SETUP_INDIRECT) -hpa