From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: Eric Dumazet <eric.dumazet@gmail.com>,
Alexei Starovoitov <ast@plumgrid.com>
Cc: Network Development <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Brad Spengler <spender@grsecurity.net>,
Daniel Borkmann <dborkman@redhat.com>,
Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH net-next v2] net: bpf: make eBPF interpreter images read-only
Date: Tue, 02 Sep 2014 23:43:02 +0200 [thread overview]
Message-ID: <1409694182.1034977.162882841.29AA6A80@webmail.messagingengine.com> (raw)
In-Reply-To: <1409694059.26422.18.camel@edumazet-glaptop2.roam.corp.google.com>
On Tue, Sep 2, 2014, at 23:40, Eric Dumazet wrote:
> On Tue, 2014-09-02 at 14:31 -0700, Alexei Starovoitov wrote:
>
> > > +static inline void bpf_prog_unlock_ro(struct bpf_prog *fp)
> > > +{
> > > + set_memory_rw((unsigned long)fp, fp->pages);
> >
> > why rw is needed?
> > since fp is allocated with vmalloc, vfree doesn't need
> > to touch the pages to free them, no?
>
> That assumes that vmalloc() do not have any debugging features, like
> poisoning content before freeing, to catch some use after free.
>
> Lets be clean and safe, and give back same memory permission we had
> after vmalloc()
Yes, I agree. I just went down the kmemleak codepaths and we certainly
don't want to cause issues in there if the implementation changes one
day.
Bye,
Hannes
next prev parent reply other threads:[~2014-09-02 21:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-02 20:42 [PATCH net-next] " Hannes Frederic Sowa
2014-09-02 20:53 ` [PATCH net-next v2] " Hannes Frederic Sowa
2014-09-02 21:31 ` Alexei Starovoitov
2014-09-02 21:35 ` Hannes Frederic Sowa
2014-09-02 21:40 ` Eric Dumazet
2014-09-02 21:43 ` Hannes Frederic Sowa [this message]
2014-09-02 22:08 ` Alexei Starovoitov
2014-09-02 21:47 ` Daniel Borkmann
2014-09-05 19:03 ` David Miller
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=1409694182.1034977.162882841.29AA6A80@webmail.messagingengine.com \
--to=hannes@stressinduktion.org \
--cc=ast@plumgrid.com \
--cc=dborkman@redhat.com \
--cc=eric.dumazet@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=spender@grsecurity.net \
/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
all inboxes | Powered by JetHome®