From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
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 18:29:35 -0700 (PDT) [thread overview]
Message-ID: <20130517.182935.208791672952634187.davem@davemloft.net> (raw)
In-Reply-To: <1368829366.3301.121.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 17 May 2013 15:22:46 -0700
> 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)
I think we should do this unconditionally, it'll be noise as far as
overhead during filter compilation.
> 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.
This sounds like a good idea too.
prev parent reply other threads:[~2013-05-18 1:29 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
2013-05-18 1:29 ` 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=20130517.182935.208791672952634187.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--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