Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, viro@ZenIV.linux.org.uk
Subject: Re: [PATCH net-next] x86: bpf_jit_comp: can call module_free() from any context
Date: Fri, 17 May 2013 15:22:46 -0700	[thread overview]
Message-ID: <1368829366.3301.121.camel@edumazet-glaptop> (raw)
In-Reply-To: <20130517.141952.581871611521516663.davem@davemloft.net>

On Fri, 2013-05-17 at 14:19 -0700, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Thu, 16 May 2013 22:45:30 -0700
> 
> > From: Eric Dumazet <edumazet@google.com>
> > 
> > It looks like we can call module_free()/vfree() from softirq context,
> > so no longer need a wrapper and a work_struct.
> > 
> > Signed-off-by: Eric Dumazet <edumazet@google.com>
> 
> Applied.

Thanks David

I am considering adding ReadOnly protection to the pages containing BPF
generated code, like we do for modules text if
CONFIG_DEBUG_SET_MODULE_RONX=y

Should we have an option to configure this, driven by HAVE_BPF_JIT_RO,
or should we do the RO thing in all cases (ie not adding yet another
Kconfig stuff)



Another ongoing work is to add some protection against BPF JIT spraying
attacks
( http://mainisusuallyafunction.blogspot.com/2012/11/attacking-hardened-linux-systems-with.html )

My idea would be to have a hole of random size before the code, filled
with 0xcc (int3) opcodes. Since we allocate a multiple of PAGE_SIZE
anyway, we have plenty of available space to play with.

  reply	other threads:[~2013-05-17 22:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-17  5:45 [PATCH net-next] x86: bpf_jit_comp: can call module_free() from any context Eric Dumazet
2013-05-17 21:19 ` David Miller
2013-05-17 22:22   ` Eric Dumazet [this message]
2013-05-18  1:29     ` 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=1368829366.3301.121.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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