Re: [PATCH] arm64: fix function types in COND_SYSCALL
From: Will Deacon
Date: Thu Sep 12 2019 - 09:11:50 EST
On Wed, Sep 11, 2019 at 04:15:46PM +0100, Mark Rutland wrote:
> On Tue, Sep 10, 2019 at 03:40:44PM -0700, Sami Tolvanen wrote:
> > Define a weak function in COND_SYSCALL instead of a weak alias to
> > sys_ni_syscall, which has an incompatible type. This fixes indirect
> > call mismatches with Control-Flow Integrity (CFI) checking.
> > Signed-off-by: Sami Tolvanen <samitolvanen@xxxxxxxxxx>
> This looks correct to me, builds fine, and I asume has been tested, so FWIW:
> Acked-by: Mark Rutland <mark.rutland@xxxxxxx>
> In looking at this, I came to the conclusion that we can drop the ifdeffery
> around our SYSCALL_DEFINE0(), COND_SYSCALL(), and SYS_NI(), which I evidently
> cargo-culted from x86 (where the ifdeffery is actually necessary).
Curious: why is it required on x86?
> I can send a follow up for that.