Re: [RFC PATCH] compat: update linux/compat.h and kernel/sys_ni.c

From: Randy Dunlap
Date: Wed Aug 24 2022 - 20:36:53 EST




On 8/22/22 13:46, Andrew Morton wrote:
> On Mon, 22 Aug 2022 12:43:10 -0700 Randy Dunlap <rdunlap@xxxxxxxxxxxxx> wrote:
>
>> Add conditional syscalls entries in kernel/sys_ni.c
>> for any syscalls that are arch- or config-dependent.
>
> What is the reason for this? What effects does it have?

Hi Andrew,

For <linux/compat.h> it's mostly a cleanup/completeness change,
as suggested by Arnd here:
https://lore.kernel.org/lkml/CAK8P3a140FFhCvrOXbCtYKCW6BR6tEz6uy8Wqd0aG3DdHiZSXg@xxxxxxxxxxxxxx/


For kernel/sys_ni.c, it adds compat syscalls that are arch- or
config-dependent, to prevent the possibility of linker errors.

I have successfully built allnoconfig, defconfig, and allmodconfig for around 20
architectures with this patch applied.

--
~Randy