Re: [PATCH v2] Fix build on older kernels without BPF.

Dave Jones <[email protected]> Thu, 21 Jul 2016 16:10:48 -0400
Newsgroups org.kernel.vger.trinity
Message-ID <[email protected]>
On Tue, Jul 12, 2016 at 09:33:56PM +0000, Vinson Lee wrote:
 > Suggested-by: Dave Jones <[email protected]>
 > Signed-off-by: Vinson Lee <[email protected]>

Close, but..

 > diff --git a/include/syscalls-aarch64.h b/include/syscalls-aarch64.h
 > index 09acf41..ee18c64 100644
 > --- a/include/syscalls-aarch64.h
 > +++ b/include/syscalls-aarch64.h
 > @@ -290,6 +290,8 @@ struct syscalltable syscalls_aarch64[] = {
 >  /* 277 */	{ .entry = &syscall_seccomp },
 >  /* 278 */	{ .entry = &syscall_getrandom },
 >  /* 279 */	{ .entry = &syscall_memfd_create },
 > +#ifdef USE_BPF
 >  /* 280 */	{ .entry = &syscall_bpf },
 > +#endif
 >  /* 281 */	{ .entry = &syscall_execveat },
 >  };

You need an

#else
	NULL,

for each of these, otherwise the next syscall will be in the wrong slot.

	Dave