|
From: | Paolo Bonzini |
Subject: | Re: [PATCH v2] pc: add property for Linux setup_data random number seed |
Date: | Fri, 5 Aug 2022 10:16:37 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 |
On 8/5/22 09:01, Michael S. Tsirkin wrote:
- if (!legacy_no_rng_seed) { + if (x86ms->linuxboot_randomness != ON_OFF_AUTO_OFF && + (protocol >= 0x209 || x86ms->linuxboot_randomness == ON_OFF_AUTO_ON)) {Hmm so if user requested "on" but protocol is too old then we just ignore it silently? I'd rather we failed initialization. So: if (x86ms->linuxboot_randomness == ON_OFF_AUTO_ON && protocol < 0x209) { fprintf(stderr, "qemu: Linux kernel too old to load a dtb\n"); exit(1); }
It doesn't ignore the "on" setting; it passes the seed anyway even if the protocol is too old. Basically, a kernel that is too old to support setup data is treated the same as a kernel that supports setup data but doesn't know about the seed datum.
It seemed the more sensible implementation because anyway you cannot know if the kernel will use the datum.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |