Re: [PATCH v4 2/2] arm64/bpf: don't allocate BPF JIT programs in module memory

2018-12-05 Thread Daniel Borkmann
On 12/05/2018 02:24 PM, Will Deacon wrote: > On Wed, Dec 05, 2018 at 01:24:17PM +0100, Daniel Borkmann wrote: >> On 12/04/2018 04:45 PM, Ard Biesheuvel wrote: >>> On Mon, 3 Dec 2018 at 13:49, Will Deacon wrote: On Fri, Nov 30, 2018 at 08:20:06PM +0100, Ard Biesheuvel wrote: > On Fri, 30 N

Re: [PATCH v4 2/2] arm64/bpf: don't allocate BPF JIT programs in module memory

2018-12-05 Thread Will Deacon
On Wed, Dec 05, 2018 at 01:24:17PM +0100, Daniel Borkmann wrote: > On 12/04/2018 04:45 PM, Ard Biesheuvel wrote: > > On Mon, 3 Dec 2018 at 13:49, Will Deacon wrote: > >> On Fri, Nov 30, 2018 at 08:20:06PM +0100, Ard Biesheuvel wrote: > >>> On Fri, 30 Nov 2018 at 19:26, Will Deacon wrote: > O

Re: [PATCH v4 2/2] arm64/bpf: don't allocate BPF JIT programs in module memory

2018-12-05 Thread Daniel Borkmann
Hi Will, On 12/04/2018 04:45 PM, Ard Biesheuvel wrote: > On Mon, 3 Dec 2018 at 13:49, Will Deacon wrote: >> On Fri, Nov 30, 2018 at 08:20:06PM +0100, Ard Biesheuvel wrote: >>> On Fri, 30 Nov 2018 at 19:26, Will Deacon wrote: On Fri, Nov 23, 2018 at 11:18:04PM +0100, Ard Biesheuvel wrote: >>

Re: [PATCH v4 2/2] arm64/bpf: don't allocate BPF JIT programs in module memory

2018-12-04 Thread Ard Biesheuvel
On Mon, 3 Dec 2018 at 13:49, Will Deacon wrote: > > On Fri, Nov 30, 2018 at 08:20:06PM +0100, Ard Biesheuvel wrote: > > On Fri, 30 Nov 2018 at 19:26, Will Deacon wrote: > > > > > > On Fri, Nov 23, 2018 at 11:18:04PM +0100, Ard Biesheuvel wrote: > > > > The arm64 module region is a 128 MB region t

Re: [PATCH v4 2/2] arm64/bpf: don't allocate BPF JIT programs in module memory

2018-12-03 Thread Will Deacon
On Fri, Nov 30, 2018 at 08:20:06PM +0100, Ard Biesheuvel wrote: > On Fri, 30 Nov 2018 at 19:26, Will Deacon wrote: > > > > On Fri, Nov 23, 2018 at 11:18:04PM +0100, Ard Biesheuvel wrote: > > > The arm64 module region is a 128 MB region that is kept close to > > > the core kernel, in order to ensur

Re: [PATCH v4 2/2] arm64/bpf: don't allocate BPF JIT programs in module memory

2018-11-30 Thread Ard Biesheuvel
On Fri, 30 Nov 2018 at 19:26, Will Deacon wrote: > > On Fri, Nov 23, 2018 at 11:18:04PM +0100, Ard Biesheuvel wrote: > > The arm64 module region is a 128 MB region that is kept close to > > the core kernel, in order to ensure that relative branches are > > always in range. So using the same region

Re: [PATCH v4 2/2] arm64/bpf: don't allocate BPF JIT programs in module memory

2018-11-30 Thread Will Deacon
On Fri, Nov 23, 2018 at 11:18:04PM +0100, Ard Biesheuvel wrote: > The arm64 module region is a 128 MB region that is kept close to > the core kernel, in order to ensure that relative branches are > always in range. So using the same region for programs that do > not have this restriction is wastefu

[PATCH v4 2/2] arm64/bpf: don't allocate BPF JIT programs in module memory

2018-11-23 Thread Ard Biesheuvel
The arm64 module region is a 128 MB region that is kept close to the core kernel, in order to ensure that relative branches are always in range. So using the same region for programs that do not have this restriction is wasteful, and preferably avoided. Now that the core BPF JIT code permits the a