[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrWqmpChXCs0b-rO4X-yKKy0Afy3ioaK01ZmeiCvsN=3+Q@mail.gmail.com>
Date: Fri, 28 Feb 2020 10:33:43 -0800
From: Andy Lutomirski <luto@...nel.org>
To: Brian Gerst <brgerst@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>,
"H . Peter Anvin" <hpa@...or.com>,
Andy Lutomirski <luto@...nel.org>,
Dominik Brodowski <linux@...inikbrodowski.net>
Subject: Re: [PATCH v3 1/8] x86, syscalls: Refactor SYSCALL_DEFINEx macros
On Thu, Feb 27, 2020 at 5:28 AM Brian Gerst <brgerst@...il.com> wrote:
>
> Pull the common code out from the SYSCALL_DEFINEx macros into a new
> __SYS_STUBx macro. Also conditionalize the X64 version in preparation for
> enabling syscall wrappers on 32-bit native kernels.
>
> Signed-off-by: Brian Gerst <brgerst@...il.com>
> ---
> -#define COMPAT_SYSCALL_DEFINEx(x, name, ...) \
> - static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \
> - static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\
> - __IA32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \
> - __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \
> - static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
> - { \
> - return __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\
> - } \
> - static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
> +#define COMPAT_SYSCALL_DEFINEx(x, name, ...) \
> + static long \
> + __se_compat_sys##name(__MAP(x, __SC_LONG, __VA_ARGS__)); \
> + static inline long \
> + __do_compat_sys##name(__MAP(x, __SC_DECL, __VA_ARGS__)); \
> + __IA32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \
> + __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \
> + static long \
> + __se_compat_sys##name(__MAP(x, __SC_LONG, __VA_ARGS__)) \
> + { \
> + return __do_compat_sys##name( \
> + __MAP(x, __SC_DELOUSE, __VA_ARGS__)); \
> + } \
> + static inline long \
> + __do_compat_sys##name(__MAP(x, __SC_DECL, __VA_ARGS__))
>
This hunk looks like a pure anti-cleanup. I much prefer slightly long
lines over messy excessively multi-line macros.
Other than that:
Reviewed-by: Andy Lutomirski <luto@...nel.org>
--Andy
Powered by blists - more mailing lists