lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 28 Feb 2020 14:34:44 -0500
From:   Brian Gerst <brgerst@...il.com>
To:     Andy Lutomirski <luto@...nel.org>
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>,
        Dominik Brodowski <linux@...inikbrodowski.net>
Subject: Re: [PATCH v3 1/8] x86, syscalls: Refactor SYSCALL_DEFINEx macros

On Fri, Feb 28, 2020 at 1:33 PM Andy Lutomirski <luto@...nel.org> wrote:
>
> 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.

Yeah, after several iterations this ended up back in it's original
form other than whitespace changes.  Personally I think the 80-column
hard limit is silly in this age of 4k widescreen monitors, and can
lead to some weird line breaks in certain cases, but that's still the
rule.

--
Brian Gerst

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ