<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in rdrand.c</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>154fcf3a - x86/msr: Prepare for including &lt;linux/percpu.h&gt; into &lt;asm/msr.h&gt;</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/arch/x86/kernel/cpu/rdrand.c#154fcf3a</link>
        <description>x86/msr: Prepare for including &lt;linux/percpu.h&gt; into &lt;asm/msr.h&gt;To clean up the per CPU insanity of UP which causes sparse to be rightfullyunhappy and prevents the usage of the generic per CPU accessors on cpu_infoit is necessary to include &lt;linux/percpu.h&gt; into &lt;asm/msr.h&gt;.Including &lt;linux/percpu.h&gt; into &lt;asm/msr.h&gt; is impossible because it endsup in header dependency hell. The problem is that &lt;asm/processor.h&gt;includes &lt;asm/msr.h&gt;. The inclusion of &lt;linux/percpu.h&gt; results in acompile fail where the compiler cannot longer handle an include in&lt;asm/cpufeature.h&gt; which references boot_cpu_data which isdefined in &lt;asm/processor.h&gt;.The only reason why &lt;asm/msr.h&gt; is included in &lt;asm/processor.h&gt; are theset/get_debugctlmsr() inlines. They are defined there because &lt;asm/processor.h&gt;is such a nice dump ground for everything. In fact they belong obviouslyinto &lt;asm/debugreg.h&gt;.Move them to &lt;asm/debugreg.h&gt; and fix up the resulting damage which is justexposing the reliance on random include chains.Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;Link: https://lore.kernel.org/r/20240304005104.454678686@linutronix.de

            List of files:
            /linux-6.15/arch/x86/kernel/cpu/rdrand.c</description>
        <pubDate>Mon, 04 Mar 2024 10:12:19 +0000</pubDate>
        <dc:creator>Thomas Gleixner &lt;tglx@linutronix.de&gt;</dc:creator>
    </item>
<item>
        <title>049f9ae9 - x86/rdrand: Remove &quot;nordrand&quot; flag in favor of &quot;random.trust_cpu&quot;</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/arch/x86/kernel/cpu/rdrand.c#049f9ae9</link>
        <description>x86/rdrand: Remove &quot;nordrand&quot; flag in favor of &quot;random.trust_cpu&quot;The decision of whether or not to trust RDRAND is controlled by the&quot;random.trust_cpu&quot; boot time parameter or the CONFIG_RANDOM_TRUST_CPUcompile time default. The &quot;nordrand&quot; flag was added during the earlydays of RDRAND, when there were worries that merely using its valuescould compromise the RNG. However, these days, RDRAND values are notused directly but always go through the RNG&apos;s hash function, making&quot;nordrand&quot; no longer useful.Rather, the correct switch is &quot;random.trust_cpu&quot;, which not only handlesthe relevant trust issue directly, but also is general to multiple CPUtypes, not just x86.However, x86 RDRAND does have a history of being occasionallyproblematic. Prior, when the kernel would notice something strange, it&apos;dwarn in dmesg and suggest enabling &quot;nordrand&quot;. We can improve on that bymaking the test a little bit better and then taking the step ofautomatically disabling RDRAND if we detect it&apos;s problematic.Also disable RDSEED if the RDRAND test fails.Cc: x86@kernel.orgCc: Theodore Ts&apos;o &lt;tytso@mit.edu&gt;Suggested-by: H. Peter Anvin &lt;hpa@zytor.com&gt;Suggested-by: Borislav Petkov &lt;bp@suse.de&gt;Acked-by: Borislav Petkov &lt;bp@suse.de&gt;Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;

            List of files:
            /linux-6.15/arch/x86/kernel/cpu/rdrand.c</description>
        <pubDate>Sat, 09 Jul 2022 10:43:06 +0000</pubDate>
        <dc:creator>Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;</dc:creator>
    </item>
<item>
        <title>9592eef7 - random: remove CONFIG_ARCH_RANDOM</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/arch/x86/kernel/cpu/rdrand.c#9592eef7</link>
        <description>random: remove CONFIG_ARCH_RANDOMWhen RDRAND was introduced, there was much discussion on whether itshould be trusted and how the kernel should handle that. Initially, twomechanisms cropped up, CONFIG_ARCH_RANDOM, a compile time switch, and&quot;nordrand&quot;, a boot-time switch.Later the thinking evolved. With a properly designed RNG, using RDRANDvalues alone won&apos;t harm anything, even if the outputs are malicious.Rather, the issue is whether those values are being *trusted* to be goodor not. And so a new set of options were introduced as the realones that people use -- CONFIG_RANDOM_TRUST_CPU and &quot;random.trust_cpu&quot;.With these options, RDRAND is used, but it&apos;s not always credited. So inthe worst case, it does nothing, and in the best case, maybe it helps.Along the way, CONFIG_ARCH_RANDOM&apos;s meaning got sort of pulled into thecenter and became something certain platforms force-select.The old options don&apos;t really help with much, and it&apos;s a bit odd to havespecial handling for these instructions when the kernel can deal finewith the existence or untrusted existence or broken existence ornon-existence of that CPU capability.Simplify the situation by removing CONFIG_ARCH_RANDOM and using theordinary asm-generic fallback pattern instead, keeping the two optionsthat are actually used. For now it leaves &quot;nordrand&quot; for now, as theremoval of that will take a different route.Acked-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;Acked-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;Acked-by: Borislav Petkov &lt;bp@suse.de&gt;Acked-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;

            List of files:
            /linux-6.15/arch/x86/kernel/cpu/rdrand.c</description>
        <pubDate>Tue, 05 Jul 2022 18:48:41 +0000</pubDate>
        <dc:creator>Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;</dc:creator>
    </item>
<item>
        <title>7879fc4b - x86/rdrand: Sanity-check RDRAND output</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/arch/x86/kernel/cpu/rdrand.c#7879fc4b</link>
        <description>x86/rdrand: Sanity-check RDRAND outputIt turned out recently that on certain AMD F15h and F16h machines, dueto the BIOS dropping the ball after resume, yet again, RDRAND would notfunction anymore:  c49a0a80137c (&quot;x86/CPU/AMD: Clear RDRAND CPUID bit on AMD family 15h/16h&quot;)Add a silly test to the CPU bringup path, to sanity-check the randomdata RDRAND returns and scream as loudly as possible if that returnedrandom data doesn&apos;t change.Suggested-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;Cc: Pu Wen &lt;puwen@hygon.cn&gt;Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;Cc: x86-ml &lt;x86@kernel.org&gt;Link: https://lkml.kernel.org/r/CAHk-=wjWPDauemCmLTKbdMYFB0UveMszZpcrwoUkJRRWKrqaTw@mail.gmail.com

            List of files:
            /linux-6.15/arch/x86/kernel/cpu/rdrand.c</description>
        <pubDate>Sun, 25 Aug 2019 20:50:18 +0000</pubDate>
        <dc:creator>Borislav Petkov &lt;bp@suse.de&gt;</dc:creator>
    </item>
<item>
        <title>a61127c2 - treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/arch/x86/kernel/cpu/rdrand.c#a61127c2</link>
        <description>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335Based on 1 normalized pattern(s):  this program is free software you can redistribute it and or modify  it under the terms and conditions of the gnu general public license  version 2 as published by the free software foundation this program  is distributed in the hope it will be useful but without any  warranty without even the implied warranty of merchantability or  fitness for a particular purpose see the gnu general public license  for more details you should have received a copy of the gnu general  public license along with this program if not write to the free  software foundation inc 51 franklin st fifth floor boston ma 02110  1301 usaextracted by the scancode license scanner the SPDX license identifier  GPL-2.0-onlyhas been chosen to replace the boilerplate/reference in 111 file(s).Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;Reviewed-by: Alexios Zavras &lt;alexios.zavras@intel.com&gt;Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;Cc: linux-spdx@vger.kernel.orgLink: https://lkml.kernel.org/r/20190530000436.567572064@linutronix.deSigned-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

            List of files:
            /linux-6.15/arch/x86/kernel/cpu/rdrand.c</description>
        <pubDate>Wed, 29 May 2019 23:57:49 +0000</pubDate>
        <dc:creator>Thomas Gleixner &lt;tglx@linutronix.de&gt;</dc:creator>
    </item>
<item>
        <title>3b290398 - x86, asm: Use CC_SET()/CC_OUT() and static_cpu_has() in archrandom.h</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/arch/x86/kernel/cpu/rdrand.c#3b290398</link>
        <description>x86, asm: Use CC_SET()/CC_OUT() and static_cpu_has() in archrandom.hUse CC_SET()/CC_OUT() and static_cpu_has().  This produces code goodenough to eliminate ad hoc use of alternatives in &lt;asm/archrandom.h&gt;,greatly simplifying the code.While we are at it, make x86_init_rdrand() compile out completely ifwe don&apos;t need it.Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;Link: http://lkml.kernel.org/r/1465414726-197858-11-git-send-email-hpa@linux.intel.comv2: fix a conflict between &lt;linux/random.h&gt; and &lt;asm/archrandom.h&gt;    discovered by Ingo Molnar.  There are a few places in x86-specific    code where we need all of &lt;arch/archrandom.h&gt; even when    CONFIG_ARCH_RANDOM is disabled, so &lt;linux/random.h&gt; does not    suffice.

            List of files:
            /linux-6.15/arch/x86/kernel/cpu/rdrand.c</description>
        <pubDate>Wed, 08 Jun 2016 19:38:46 +0000</pubDate>
        <dc:creator>H. Peter Anvin &lt;hpa@linux.intel.com&gt;</dc:creator>
    </item>
<item>
        <title>1b74dde7 - x86/cpu: Convert printk(KERN_&lt;LEVEL&gt; ...) to pr_&lt;level&gt;(...)</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/arch/x86/kernel/cpu/rdrand.c#1b74dde7</link>
        <description>x86/cpu: Convert printk(KERN_&lt;LEVEL&gt; ...) to pr_&lt;level&gt;(...) - Use the more current logging style pr_&lt;level&gt;(...) instead of the old   printk(KERN_&lt;LEVEL&gt; ...). - Convert pr_warning() to pr_warn().Signed-off-by: Chen Yucong &lt;slaoub@gmail.com&gt;Cc: Borislav Petkov &lt;bp@alien8.de&gt;Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;Link: http://lkml.kernel.org/r/1454384702-21707-1-git-send-email-slaoub@gmail.comSigned-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;

            List of files:
            /linux-6.15/arch/x86/kernel/cpu/rdrand.c</description>
        <pubDate>Tue, 02 Feb 2016 03:45:02 +0000</pubDate>
        <dc:creator>Chen Yucong &lt;slaoub@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>0007bccc - x86: Replace RDRAND forced-reseed with simple sanity check</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/arch/x86/kernel/cpu/rdrand.c#0007bccc</link>
        <description>x86: Replace RDRAND forced-reseed with simple sanity checkx86_init_rdrand() was added with 2 goals:1. Sanity check that the built-in-self-test circuit on the Digital   Random Number Generator (DRNG) is not complaining.  As RDRAND   HW self-checks on every invocation, this goal is achieved   by simply invoking RDRAND and checking its return code.2. Force a full re-seed of the random number generator.   This was done out of paranoia to benefit the most un-sophisticated   DRNG implementation conceivable in the architecture,   an implementation that does not exist, and unlikely ever will.   This worst-case full-re-seed is achieved by invoking   a 64-bit RDRAND 8192 times.Unfortunately, this worst-case re-seed costs O(1,000us).Magnifying this cost, it is done from identify_cpu(), which is thesynchronous critical path to bring a processor on-line -- repeatedfor every logical processor in the system at boot and resume from S3.As it is very expensive, and of highly dubious value, we delete theworst-case re-seed from the kernel.We keep the 1st goal -- sanity check the hardware, and mark it absentif it complains.This change reduces the cost of x86_init_rdrand() by a factor of 1,000x,to O(1us) from O(1,000us).Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;Link: http://lkml.kernel.org/r/058618cc56ec6611171427ad7205e37e377aa8d4.1439738240.git.len.brown@intel.comSigned-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

            List of files:
            /linux-6.15/arch/x86/kernel/cpu/rdrand.c</description>
        <pubDate>Sun, 16 Aug 2015 15:20:00 +0000</pubDate>
        <dc:creator>Len Brown &lt;len.brown@intel.com&gt;</dc:creator>
    </item>
<item>
        <title>7a5091d5 - x86, rdrand: When nordrand is specified, disable RDSEED as well</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/arch/x86/kernel/cpu/rdrand.c#7a5091d5</link>
        <description>x86, rdrand: When nordrand is specified, disable RDSEED as wellOne can logically expect that when the user has specified &quot;nordrand&quot;,the user doesn&apos;t want any use of the CPU random number generator,neither RDRAND nor RDSEED, so disable both.Reported-by: Stephan Mueller &lt;smueller@chronox.de&gt;Cc: Theodore Ts&apos;o &lt;tytso@mit.edu&gt;Link: http://lkml.kernel.org/r/21542339.0lFnPSyGRS@myon.chronox.deSigned-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;

            List of files:
            /linux-6.15/arch/x86/kernel/cpu/rdrand.c</description>
        <pubDate>Mon, 12 May 2014 03:25:20 +0000</pubDate>
        <dc:creator>H. Peter Anvin &lt;hpa@linux.intel.com&gt;</dc:creator>
    </item>
<item>
        <title>5bfce5ef - x86, kaslr: Provide randomness functions</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/arch/x86/kernel/cpu/rdrand.c#5bfce5ef</link>
        <description>x86, kaslr: Provide randomness functionsAdds potential sources of randomness: RDRAND, RDTSC, or the i8254.This moves the pre-alternatives inline rdrand function into the header soboth pieces of code can use it. Availability of RDRAND is then controlledby CONFIG_ARCH_RANDOM, if someone wants to disable it even for kASLR.Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;Link: http://lkml.kernel.org/r/1381450698-28710-4-git-send-email-keescook@chromium.orgSigned-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;

            List of files:
            /linux-6.15/arch/x86/kernel/cpu/rdrand.c</description>
        <pubDate>Fri, 11 Oct 2013 00:18:15 +0000</pubDate>
        <dc:creator>Kees Cook &lt;keescook@chromium.org&gt;</dc:creator>
    </item>
<item>
        <title>148f9bb8 - x86: delete __cpuinit usage from all x86 files</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/arch/x86/kernel/cpu/rdrand.c#148f9bb8</link>
        <description>x86: delete __cpuinit usage from all x86 filesThe __cpuinit type of throwaway sections might have made sensesome time ago when RAM was more constrained, but now the savingsdo not offset the cost and complications.  For example, the fix incommit 5e427ec2d0 (&quot;x86: Fix bit corruption at CPU resume time&quot;)is a good example of the nasty type of bugs that can be createdwith improper use of the various __init prefixes.After a discussion on LKML[1] it was decided that cpuinit should gothe way of devinit and be phased out.  Once all the users are gone,we can then finally remove the macros themselves from linux/init.h.Note that some harmless section mismatch warnings may result, sincenotify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)are flagged as __cpuinit  -- so if we remove the __cpuinit fromarch specific callers, we will also get section mismatch warnings.As an intermediate step, we intend to turn the linux/init.h cpuinitcontent into no-ops as early as possible, since that will get ridof these warnings.  In any case, they are temporary and harmless.This removes all the arch/x86 uses of the __cpuinit macros fromall C files.  x86 only had the one __CPUINIT used in assembly files,and it wasn&apos;t paired off with a .previous or a __FINIT, so we candelete it directly w/o any corresponding additional change there.[1] https://lkml.org/lkml/2013/5/20/589Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;Cc: Ingo Molnar &lt;mingo@redhat.com&gt;Cc: &quot;H. Peter Anvin&quot; &lt;hpa@zytor.com&gt;Cc: x86@kernel.orgAcked-by: Ingo Molnar &lt;mingo@kernel.org&gt;Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;Acked-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;

            List of files:
            /linux-6.15/arch/x86/kernel/cpu/rdrand.c</description>
        <pubDate>Tue, 18 Jun 2013 22:23:59 +0000</pubDate>
        <dc:creator>Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;</dc:creator>
    </item>
<item>
        <title>49d859d7 - x86, random: Verify RDRAND functionality and allow it to be disabled</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/arch/x86/kernel/cpu/rdrand.c#49d859d7</link>
        <description>x86, random: Verify RDRAND functionality and allow it to be disabledIf the CPU declares that RDRAND is available, go through a guranteedreseed sequence, and make sure that it is actually working (producingdata.)   If it does not, disable the CPU feature flag.Allow RDRAND to be disabled on the command line (as opposed to atcompile time) for a user who has special requirements with regards torandom numbers.Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;Cc: Matt Mackall &lt;mpm@selenic.com&gt;Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;Cc: &quot;Theodore Ts&apos;o&quot; &lt;tytso@mit.edu&gt;

            List of files:
            /linux-6.15/arch/x86/kernel/cpu/rdrand.c</description>
        <pubDate>Sun, 31 Jul 2011 21:02:19 +0000</pubDate>
        <dc:creator>H. Peter Anvin &lt;hpa@zytor.com&gt;</dc:creator>
    </item>
</channel>
</rss>
