From: Daniel Borkmann <daniel@iogearbox.net>
To: Laura Abbott <labbott@fedoraproject.org>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Kees Cook <keescook@chromium.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: Allow vmalloc regions to be set with set_memory_*
Date: Wed, 13 Jan 2016 01:31:20 +0100 [thread overview]
Message-ID: <56959AD8.90206@iogearbox.net> (raw)
In-Reply-To: <20160113000112.GA36310@ast-mbp.thefacebook.com>
On 01/13/2016 01:01 AM, Alexei Starovoitov wrote:
> On Tue, Jan 12, 2016 at 01:46:27PM -0800, Laura Abbott wrote:
>>
>> The range of set_memory_* is currently restricted to the module address
>> range because of difficulties in breaking down larger block sizes.
>> vmalloc maps PAGE_SIZE pages so it is safe to use as well. Update the
>> function ranges and add a comment explaining why the range is restricted
>> the way it is.
>>
>> Signed-off-by: Laura Abbott <labbott@fedoraproject.org>
>> ---
>> This should let the protections for the eBPF work as expected, I don't
>> know if there is some sort of self test for thatL.
>
> you can test it with:
> # sysctl net.core.bpf_jit_enable=1
> # insmod test_bpf.ko
>
> On x64 it shows:
> test_bpf: Summary: 291 PASSED, 0 FAILED, [282/283 JIT'ed]
>
> arm64 may have less JIT'ed tests.
Also, in that lib/test_bpf.c file, you can do a test by overwriting/'corrupting'
part of the fp->insnsi instructions right after bpf_prog_select_runtime(fp) to
see if setting the bpf_prog as RO works.
Thanks,
Daniel
next prev parent reply other threads:[~2016-01-13 0:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-12 21:46 [PATCH] arm64: Allow vmalloc regions to be set with set_memory_* Laura Abbott
2016-01-13 0:01 ` Alexei Starovoitov
2016-01-13 0:31 ` Daniel Borkmann [this message]
2016-01-13 14:03 ` Ard Biesheuvel
2016-01-13 16:10 ` Ard Biesheuvel
2016-01-14 23:01 ` Laura Abbott
2016-01-18 11:56 ` Mark Rutland
2016-01-28 1:47 ` Xishi Qiu
2016-01-28 10:51 ` Mark Rutland
2016-01-28 11:47 ` Xishi Qiu
2016-01-28 14:27 ` Mark Rutland
2016-01-29 1:21 ` Xishi Qiu
2016-01-29 11:02 ` Mark Rutland
2016-01-30 2:48 ` Xishi Qiu
2016-02-03 13:43 ` Mark Rutland
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=56959AD8.90206@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=alexei.starovoitov@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=keescook@chromium.com \
--cc=labbott@fedoraproject.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=will.deacon@arm.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).