Re: [PATCH v2 3/3] arm64: use the correct function type for __arm64_sys_ni_syscall

2019-05-24 Thread Sami Tolvanen
On Fri, May 24, 2019 at 07:35:51PM +0100, Will Deacon wrote: > > In the absence of a patch from Mark, I'd suggest just adding a SYS_NI macro > > to our asm/syscall_wrapper.h file which avoids the error injection stuff. If we don't want to use SYSCALL_DEFINE0, I don't think we need a macro at all.

Re: [PATCH v2 3/3] arm64: use the correct function type for __arm64_sys_ni_syscall

2019-05-24 Thread Will Deacon
Hi Sami, On Wed, May 15, 2019 at 12:40:39PM +0100, Will Deacon wrote: > On Tue, May 07, 2019 at 11:32:27AM -0700, Sami Tolvanen wrote: > > On Tue, May 07, 2019 at 06:25:12PM +0100, Mark Rutland wrote: > > > I strongly think that we cant to fix up the common definition in > > > kernel/sys_ni.c

Re: [PATCH v2 3/3] arm64: use the correct function type for __arm64_sys_ni_syscall

2019-05-15 Thread Will Deacon
On Tue, May 07, 2019 at 11:32:27AM -0700, Sami Tolvanen wrote: > On Tue, May 07, 2019 at 06:25:12PM +0100, Mark Rutland wrote: > > I strongly think that we cant to fix up the common definition in > > kernel/sys_ni.c rather than having a point-hack in arm64. Other > > architectures (e.g. x86, s390)

Re: [PATCH v2 3/3] arm64: use the correct function type for __arm64_sys_ni_syscall

2019-05-07 Thread Sami Tolvanen
On Tue, May 07, 2019 at 06:25:12PM +0100, Mark Rutland wrote: > I strongly think that we cant to fix up the common definition in > kernel/sys_ni.c rather than having a point-hack in arm64. Other > architectures (e.g. x86, s390) will want the same for CFI, and I'd like > to ensure that our

Re: [PATCH v2 3/3] arm64: use the correct function type for __arm64_sys_ni_syscall

2019-05-07 Thread Mark Rutland
On Fri, May 03, 2019 at 12:12:25PM -0700, Sami Tolvanen wrote: > Calling sys_ni_syscall through a syscall_fn_t pointer trips indirect > call Control-Flow Integrity checking due to a function type > mismatch. Use SYSCALL_DEFINE0 for __arm64_sys_ni_syscall instead and > remove the now unnecessary

[PATCH v2 3/3] arm64: use the correct function type for __arm64_sys_ni_syscall

2019-05-03 Thread Sami Tolvanen
Calling sys_ni_syscall through a syscall_fn_t pointer trips indirect call Control-Flow Integrity checking due to a function type mismatch. Use SYSCALL_DEFINE0 for __arm64_sys_ni_syscall instead and remove the now unnecessary casts. Signed-off-by: Sami Tolvanen --- arch/arm64/kernel/sys.c | 14