--- zzzz-none-000/linux-4.9.231/include/linux/syscalls.h 2020-07-22 07:10:54.000000000 +0000 +++ falcon-5530-730/linux-4.9.231/include/linux/syscalls.h 2022-08-31 08:19:49.000000000 +0000 @@ -191,19 +191,23 @@ __SYSCALL_DEFINEx(x, sname, __VA_ARGS__) #define __PROTECT(...) asmlinkage_protect(__VA_ARGS__) -#define __SYSCALL_DEFINEx(x, name, ...) \ - asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ - __attribute__((alias(__stringify(SyS##name)))); \ - static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ - asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ - asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ - { \ - long ret = SYSC##name(__MAP(x,__SC_CAST,__VA_ARGS__)); \ - __MAP(x,__SC_TEST,__VA_ARGS__); \ - __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \ - return ret; \ - } \ - static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)) +#define __SYSCALL_DEFINEx(x, name, ...) \ + __diag_push(); \ + __diag_ignore(GCC, 8, "-Wattribute-alias", \ + "Type aliasing is used to sanitize syscall arguments"); \ + asmlinkage long sys##name(__MAP(x, __SC_DECL, __VA_ARGS__)) \ + __attribute__((alias(__stringify(SyS##name)))); \ + static inline long SYSC##name(__MAP(x, __SC_DECL, __VA_ARGS__)); \ + asmlinkage long SyS##name(__MAP(x, __SC_LONG, __VA_ARGS__)); \ + asmlinkage long SyS##name(__MAP(x, __SC_LONG, __VA_ARGS__)) \ + { \ + long ret = SYSC##name(__MAP(x, __SC_CAST, __VA_ARGS__)); \ + __MAP(x, __SC_TEST, __VA_ARGS__); \ + __PROTECT(x, ret, __MAP(x, __SC_ARGS, __VA_ARGS__)); \ + return ret; \ + } \ + __diag_pop(); \ + static inline long SYSC##name(__MAP(x, __SC_DECL, __VA_ARGS__)) asmlinkage long sys32_quotactl(unsigned int cmd, const char __user *special, qid_t id, void __user *addr);