netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"ast@plumgrid.com" <ast@plumgrid.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Laura Abbott <lauraa@codeaurora.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next 09/10] arm64: unexport set_memory_ro and set_memory_rw
Date: Fri, 27 Feb 2015 19:54:43 +0000	[thread overview]
Message-ID: <20150227195443.GD24818@arm.com> (raw)
In-Reply-To: <cb778076d2d089dd52605b8eaad3ee6097e61eae.1425040940.git.daniel@iogearbox.net>

On Fri, Feb 27, 2015 at 02:55:41PM +0000, Daniel Borkmann wrote:
> This effectively unexports set_memory_ro and set_memory_rw functions from
> commit 11d91a770f1f ("arm64: Add CONFIG_DEBUG_SET_MODULE_RONX support").
> 
> No module user of those is in mainline kernel and we explicitly do not want
> modules to use these functions, as they i.e. protect eBPF (interpreted and
> JIT'ed) images from malicious modifications or bugs.
> 
> Outside of eBPF scope, I believe also other set_memory_* functions should
> be unexported on arm64 for modules.
> 
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
> Cc: Laura Abbott <lauraa@codeaurora.org>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: linux-kernel@vger.kernel.org
> Acked-by: Alexei Starovoitov <ast@plumgrid.com>
> ---
>  arch/arm64/mm/pageattr.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/arm64/mm/pageattr.c b/arch/arm64/mm/pageattr.c
> index bb0ea94..8659357 100644
> --- a/arch/arm64/mm/pageattr.c
> +++ b/arch/arm64/mm/pageattr.c
> @@ -70,7 +70,6 @@ int set_memory_ro(unsigned long addr, int numpages)
>  					__pgprot(PTE_RDONLY),
>  					__pgprot(PTE_WRITE));
>  }
> -EXPORT_SYMBOL_GPL(set_memory_ro);
>  
>  int set_memory_rw(unsigned long addr, int numpages)
>  {
> @@ -78,7 +77,6 @@ int set_memory_rw(unsigned long addr, int numpages)
>  					__pgprot(PTE_WRITE),
>  					__pgprot(PTE_RDONLY));
>  }
> -EXPORT_SYMBOL_GPL(set_memory_rw);
>  
>  int set_memory_nx(unsigned long addr, int numpages)
>  {

Looks good to me. Can this be applied independently, or does it need to
remain part of your series?

Will

  parent reply	other threads:[~2015-02-27 19:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 14:55 [PATCH net-next 00/10] eBPF support for cls_bpf Daniel Borkmann
2015-02-27 14:55 ` [PATCH net-next 01/10] ebpf: remove kernel test stubs Daniel Borkmann
2015-02-27 14:55 ` [PATCH net-next 02/10] ebpf: constify various function pointer structs Daniel Borkmann
2015-02-27 14:55 ` [PATCH net-next 03/10] ebpf: export BPF_PSEUDO_MAP_FD to uapi Daniel Borkmann
2015-02-27 14:55 ` [PATCH net-next 04/10] ebpf: make internal bpf API independent of CONFIG_BPF_SYSCALL ifdefs Daniel Borkmann
2015-02-27 14:55 ` [PATCH net-next 05/10] ebpf: remove CONFIG_BPF_SYSCALL ifdefs in socket filter code Daniel Borkmann
2015-02-27 14:55 ` [PATCH net-next 06/10] ebpf: add sched_cls_type and map it to sk_filter's verifier ops Daniel Borkmann
2015-02-27 14:55 ` [PATCH net-next 07/10] ebpf: move read-only fields to bpf_prog and shrink bpf_prog_aux Daniel Borkmann
2015-02-27 14:55 ` [PATCH net-next 08/10] x86: unexport set_memory_ro and set_memory_rw Daniel Borkmann
2015-02-27 14:55 ` [PATCH net-next 09/10] arm64: " Daniel Borkmann
2015-02-27 18:51   ` Laura Abbott
2015-02-27 19:54   ` Will Deacon [this message]
2015-02-27 20:05     ` Daniel Borkmann
2015-03-01  9:52       ` Daniel Borkmann
2015-02-27 14:55 ` [PATCH net-next 10/10] cls_bpf: add initial eBPF support for programmable classifiers Daniel Borkmann
2015-03-01  5:28 ` [PATCH net-next 00/10] eBPF support for cls_bpf David Miller
2015-03-01  9:49   ` Daniel Borkmann

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=20150227195443.GD24818@arm.com \
    --to=will.deacon@arm.com \
    --cc=ast@plumgrid.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=lauraa@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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).