All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Kosina <jkosina@suse.com>
To: speck@linutronix.de
Subject: [MODERATED] Re: [PATCH v2] Linux Patch 1/1
Date: Fri, 4 May 2018 08:00:13 +0200 (CEST)	[thread overview]
Message-ID: <nycvar.YFH.7.76.1805040745430.27054@cbobk.fhfr.pm> (raw)
In-Reply-To: <alpine.LFD.2.21.999.1805031734540.26992@xps13.linux-foundation.org>

On Thu, 3 May 2018, speck for Linus Torvalds wrote:

> This part is probably easyish. BUT:
> 
>  - you have to use a different base pointer for it, which suddenly means 
>    that it's not the obvious case of a stack spill "let's store to the 
>    stack and the load the value back", because that generally uses the 
>    same base pointer unless your code generation is complete garbage.

Fair enough; if gcc is ever generating such code, it should probably be 
better to fix gcc directly anyway.

> So what we should look at is "can you make ebpf easily generate that 
> "store followed by load from same address with a different base 
> register, and can you run it as non-root".

So that's, according to my understanding, the PoC that google folks have 
succesfully created (the only modification AFAIK they did to eBPF is 
allowing more easier cacheline flush from within eBPF), basically let 
otherwise sandboxed process to

- store unsingned long into memory
- store pointer into the same memory location
- load from that location and use it so that the side channel is there 
  (array index), as due to MD the speculative execution observes the
  unsinged long, and not the pointer

And reportedly they succeeded (with the easiser cacheline flush 
modification).

> And I haven't seen anybody actually try to look into that.  Have the ebpf 
> people been involved on this issue at all?

I am not sure if any of them is on this list. Jon, would it be possible to 
drag Daniel Borkmann here?

Thanks,

-- 
Jiri Kosina
SUSE Labs

  reply	other threads:[~2018-05-04  6:00 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-26  0:11 [MODERATED] [PATCH v2] Linux Patch 1/1 Tim Chen
2018-04-26  3:15 ` [MODERATED] " Jon Masters
2018-04-26 17:03   ` Tim Chen
2018-04-26  3:29 ` Jon Masters
2018-04-26 12:03   ` Thomas Gleixner
2018-04-26 16:48     ` [MODERATED] " Tim Chen
2018-04-26 16:18 ` Jon Masters
2018-04-27 16:08 ` Thomas Gleixner
2018-04-27 16:47   ` [MODERATED] " Borislav Petkov
2018-04-27 17:13     ` Jon Masters
2018-04-27 17:32       ` Borislav Petkov
2018-04-27 17:48         ` Thomas Gleixner
2018-04-27 18:09           ` [MODERATED] " Andi Kleen
2018-04-27 18:17             ` Thomas Gleixner
2018-04-27 18:20               ` Thomas Gleixner
2018-04-27 18:30                 ` [MODERATED] " Linus Torvalds
2018-04-27 18:36                   ` Thomas Gleixner
2018-04-27 18:53                     ` [MODERATED] " Linus Torvalds
2018-04-27 19:14                       ` Andi Kleen
2018-04-27 19:37                       ` Jon Masters
2018-04-27 19:52                         ` Linus Torvalds
2018-04-27 20:01                           ` Jon Masters
2018-05-03 12:55                           ` Jiri Kosina
2018-05-03 16:24                             ` Linus Torvalds
2018-05-03 19:40                               ` Jiri Kosina
2018-05-04  3:51                                 ` Linus Torvalds
2018-05-04  6:00                                   ` Jiri Kosina [this message]
2018-05-04  6:03                                     ` Jiri Kosina
2018-05-07 16:40                                   ` [MODERATED] " Dave Hansen
2018-04-27 19:26                   ` [MODERATED] " Tim Chen
2018-04-27 19:57                     ` Jon Masters
2018-04-27 20:07                       ` Tim Chen
2018-04-27 20:20                         ` Thomas Gleixner
2018-04-27 20:37                       ` Thomas Gleixner
2018-04-28  3:57                         ` [MODERATED] " Tim Chen
2018-04-28 12:26                           ` Thomas Gleixner
2018-04-28 17:14                             ` [MODERATED] " Tim Chen
2018-04-27 22:52                     ` Thomas Gleixner
2018-04-27 18:45               ` [MODERATED] " Andi Kleen
2018-04-27 19:08                 ` Thomas Gleixner
2018-04-27 19:25                   ` [MODERATED] " Andi Kleen
2018-04-27 19:52                     ` Thomas Gleixner
2018-04-27 17:50         ` [MODERATED] " Andi Kleen
2018-04-27 17:58   ` Thomas Gleixner
2018-04-27 19:01   ` [MODERATED] " Tim Chen
2018-04-27 19:19     ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=nycvar.YFH.7.76.1805040745430.27054@cbobk.fhfr.pm \
    --to=jkosina@suse.com \
    --cc=speck@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.