From: David Miller <davem@davemloft.net>
To: daniel@iogearbox.net
Cc: alexei.starovoitov@gmail.com, xiakaixu@huawei.com,
netdev@vger.kernel.org
Subject: Re: [PATCH net] bpf, trace: use READ_ONCE for retrieving file ptr
Date: Tue, 07 Jun 2016 14:48:46 -0700 (PDT) [thread overview]
Message-ID: <20160607.144846.1662240162265441902.davem@davemloft.net> (raw)
In-Reply-To: <5aa8512414e4f9f19734e59665f0fe893a109be2.1465065428.git.daniel@iogearbox.net>
From: Daniel Borkmann <daniel@iogearbox.net>
Date: Sat, 4 Jun 2016 20:50:59 +0200
> In bpf_perf_event_read() and bpf_perf_event_output(), we must use
> READ_ONCE() for fetching the struct file pointer, which could get
> updated concurrently, so we must prevent the compiler from potential
> refetching.
>
> We already do this with tail calls for fetching the related bpf_prog,
> but not so on stored perf events. Semantics for both are the same
> with regards to updates.
>
> Fixes: a43eec304259 ("bpf: introduce bpf_perf_event_output() helper")
> Fixes: 35578d798400 ("bpf: Implement function bpf_perf_event_read() that get the selected hardware PMU conuter")
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
> Acked-by: Alexei Starovoitov <ast@kernel.org>
Applied and queued up for -stable, thanks.
prev parent reply other threads:[~2016-06-07 21:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-04 18:50 [PATCH net] bpf, trace: use READ_ONCE for retrieving file ptr Daniel Borkmann
2016-06-07 21:48 ` David Miller [this message]
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=20160607.144846.1662240162265441902.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=alexei.starovoitov@gmail.com \
--cc=daniel@iogearbox.net \
--cc=netdev@vger.kernel.org \
--cc=xiakaixu@huawei.com \
/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).