Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdXXB0GxbzV2YR9yvp=DhgXnbm2QRFQzQ+tJ46dG9feC-w@mail.gmail.com>
Date: Fri, 12 Jan 2018 11:38:58 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Dan Williams <dan.j.williams@...el.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Mark Rutland <mark.rutland@....com>, 
	Linux-Arch <linux-arch@...r.kernel.org>, kernel-hardening@...ts.openwall.com, 
	Peter Zijlstra <peterz@...radead.org>, Jonathan Corbet <corbet@....net>, Will Deacon <will.deacon@....com>, 
	Thomas Gleixner <tglx@...utronix.de>, 
	"torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>, Andrew Morton <akpm@...ux-foundation.org>, 
	Alan Cox <alan@...ux.intel.com>
Subject: Re: [PATCH v2 01/19] Documentation: document array_ptr

Hi Dan,

On Fri, Jan 12, 2018 at 1:46 AM, Dan Williams <dan.j.williams@...el.com> wrote:
> From: Mark Rutland <mark.rutland@....com>
>
> Document the rationale and usage of the new array_ptr() helper.
>
> Signed-off-by: Mark Rutland <mark.rutland@....com>
> Signed-off-by: Will Deacon <will.deacon@....com>
> Cc: Dan Williams <dan.j.williams@...el.com>
> Cc: Jonathan Corbet <corbet@....net>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Signed-off-by: Dan Williams <dan.j.williams@...el.com>

Thanks for the update!

> --- /dev/null
> +++ b/Documentation/speculation.txt
> @@ -0,0 +1,142 @@
> +This document explains potential effects of speculation, and how undesirable
> +effects can be mitigated portably using common APIs.
> +
> +===========
> +Speculation
> +===========
> +
> +To improve performance and minimize average latencies, many contemporary CPUs
> +employ speculative execution techniques such as branch prediction, performing
> +work which may be discarded at a later stage.
> +
> +Typically speculative execution cannot be observed from architectural state,
> +such as the contents of registers. However, in some cases it is possible to
> +observe its impact on microarchitectural state, such as the presence or
> +absence of data in caches. Such state may form side-channels which can be
> +observed to extract secret information.
> +
> +For example, in the presence of branch prediction, it is possible for bounds
> +checks to be ignored by code which is speculatively executed. Consider the
> +following code:
> +
> +       int load_array(int *array, unsigned int idx) {

One more opening curly brace to move to the next line.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.