From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Dianzhang Chen <dianzhangchen0@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kernel/sys.c: fix possible spectre-v1 in do_prlimit()
Date: Tue, 28 May 2019 10:10:53 +0300 [thread overview]
Message-ID: <20190528071053.GL11013@uranus> (raw)
In-Reply-To: <CAFbcbMATqCCpCR596FTaSdUV50nQSxDgXMd1ASgXu1CE+DJqTw@mail.gmail.com>
On Tue, May 28, 2019 at 10:37:10AM +0800, Dianzhang Chen wrote:
> Hi,
> Because when i reply your email,i always get 'Message rejected' from
> gmail(get this rejection from all the recipients). I still don't know
> how to deal with it, so i reply your email here:
Hi! This is weird. Next time simply reply to LKML (I CC'ed it back).
> Because of speculative execution, the attacker can bypass the bound
> check `if (resource >= RLIM_NLIMITS)`.
And then misprediction get detected and execution is dropped. So I
still don't see a problem here, since we don't leak info even in
such case.
That said I don't mind for this patch but rather in a sake of
code clarity, not because of spectre issue since it has
nothing to do here.
> as for array_index_nospec(index, size), it will clamp the index within
> the range of [0, size), and attacker can't exploit speculative
> execution to make the index out of range [0, size).
>
>
> For more detail, please check the link below:
>
> https://github.com/torvalds/linux/commit/f3804203306e098dae9ca51540fcd5eb700d7f40
next parent reply other threads:[~2019-05-28 7:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAFbcbMATqCCpCR596FTaSdUV50nQSxDgXMd1ASgXu1CE+DJqTw@mail.gmail.com>
2019-05-28 7:10 ` Cyrill Gorcunov [this message]
2019-05-29 2:39 ` [PATCH] kernel/sys.c: fix possible spectre-v1 in do_prlimit() Dianzhang Chen
2019-05-29 12:18 ` Cyrill Gorcunov
2019-05-30 5:45 ` Dianzhang Chen
2019-05-30 7:58 ` Cyrill Gorcunov
2019-05-27 7:23 Dianzhang Chen
2019-05-27 7:38 ` Cyrill Gorcunov
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=20190528071053.GL11013@uranus \
--to=gorcunov@gmail.com \
--cc=dianzhangchen0@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).